/* --- ARTICLE POPUP MODAL --- */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.article-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Glassmorphism Background Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 31, 23, 0.7);
    backdrop-filter: blur(10px);
}

/* The Popup Box */
.modal-content-box {
    position: relative;
    background: var(--bg-surface);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 3rem;
    z-index: 2;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s var(--ease-out);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

/* Custom Scrollbar for Modal */
.modal-content-box::-webkit-scrollbar { width: 6px; }
.modal-content-box::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 10px; }

.article-modal.active .modal-content-box {
    transform: translateY(0) scale(1);
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-dark);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header .tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    background: rgba(132, 204, 22, 0.15);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 2.2rem;
    color: var(--bg-dark);
    margin-top: 0;
}

/* The Inner Text Card Styling */
.modal-text-card {
    background: var(--bg-main); /* Soft off-white */
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.modal-text-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-text-card h4 {
    color: var(--bg-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.modal-text-card ul {
    color: var(--text-muted);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modal-content-box {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    .modal-header h3 { font-size: 1.6rem; }
    .modal-text-card { padding: 1.5rem; }
}