/* ==========================================
   PRACTICE AREAS — POPUP / MODAL
   ========================================== */

/* --- OVERLAY --- */
.pa-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 32, 38, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 20px;
}

.pa-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- MODAL PANEL --- */
.pa-popup-panel {
    background: #FFFFFF;
    width: 600px;
    max-height: 650px;
    border-radius: 6px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.35s ease;
}

.pa-popup-overlay.active .pa-popup-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Custom scrollbar */
.pa-popup-panel::-webkit-scrollbar {
    width: 4px;
}

.pa-popup-panel::-webkit-scrollbar-track {
    background: transparent;
}

.pa-popup-panel::-webkit-scrollbar-thumb {
    background: rgba(31, 32, 38, 0.15);
    border-radius: 10px;
}

/* --- CLOSE BUTTON --- */
.pa-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(31, 32, 38, 0.08);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease;
}

.pa-popup-close:hover {
    background: rgba(31, 32, 38, 0.15);
    transform: rotate(90deg);
}

.pa-popup-close svg {
    width: 16px;
    height: 16px;
    stroke: #1F2026;
    stroke-width: 2;
}

/* RTL: mirror close button to left */
html[lang="ar"] .pa-popup-close {
    right: auto;
    left: 16px;
}

/* --- IMAGE AREA --- */
.pa-popup-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #F6F6F6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CONTENT BODY --- */
.pa-popup-content {
    padding: 30px 40px 40px;
}

/* --- SEPARATOR (between image and title) --- */
.pa-popup-separator {
    width: 100%;
    height: 2px;
    background: #DADADA;
    margin-bottom: 30px;
}

/* --- HEADLINE --- */
.pa-popup-title {
    font-family: 'Abhaya Libre', serif;
    font-weight: 500;
    font-size: 48px;
    color: #2B3561;
    line-height: 1.1;
    margin: 0 0 30px 0;
}

html[lang="ar"] .pa-popup-title {
    font-family: "greycliff-arabic-cf", sans-serif;
    font-size: 44px;
    line-height: 1.4;
}

/* --- DESCRIPTION --- */
.pa-popup-description {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: #1F2026;
    margin: 0 0 30px 0;
}

html[lang="ar"] .pa-popup-description {
    font-family: "greycliff-arabic-cf", sans-serif;
}

/* --- TAGS --- */
.pa-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pa-popup-tag {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #FEC96D;
    color: #1F2026;
    border-radius: 3px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    border: none;
    cursor: default;
    user-select: none;
    transition: background 0.2s ease;
}

html[lang="ar"] .pa-popup-tag {
    font-family: "greycliff-arabic-cf", sans-serif;
}

/* --- BODY SCROLL LOCK --- */
body.popup-open {
    overflow: hidden;
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
    .pa-popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .pa-popup-panel {
        width: 100%;
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
    }

    .pa-popup-content {
        padding: 24px 24px 32px;
    }

    .pa-popup-title {
        font-size: 34px;
    }

    html[lang="ar"] .pa-popup-title {
        font-size: 32px;
    }

    .pa-popup-description {
        font-size: 15px;
    }

    .pa-popup-tag {
        font-size: 14px;
        padding: 8px 16px;
    }

    .pa-popup-image {
        height: 160px;
    }

    .pa-popup-separator {
        margin-bottom: 20px;
    }
}