/* ==========================================================================
   AL-KHOEI INSTITUTE TEMPLATE - STYLESHEET
   Accurate Reproduction of Reference Design
   ========================================================================== */

/* --- CSS VARIABLES & THEME TOKENS --- */
:root {
    --primary-blue: #244b7a;
    --primary-dark: #1b3a5f;
    --primary-darker: #132b47;
    --accent-blue: #2b5e94;
    --accent-cyan: #3da9fc;
    --light-blue-bg: #eef4fb;
    --light-blue-card: #f2f7fc;

    --dark-bg: #19222b;
    --dark-section: #1b252f;
    --dark-footer: #171d24;
    --dark-footer-bottom: #0f1318;

    --text-main: #2b2b2b;
    --text-p: #333333;
    --text-muted: #6b7280;
    --text-light: #f8fafc;

    --border-color: #d1d9e2;
    --border-card: #b8c7d6;
    --border-active: #244b7a;

    --font-heading: 'AlmaraiRegular', system-ui, -apple-system, sans-serif;
    --font-body: 'AlmaraiRegular', 'Tajawal', Tahoma, sans-serif;
    --font-traditional: 'Amiri', 'Traditional Arabic', serif;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 6px 16px rgba(36, 75, 122, 0.1);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --radius-circle: 50%;
}

/* --- BASE & RESET --- */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}


.highlight-blue {
    color: var(--primary-blue);
}

.highlight-cyan {
    color: var(--accent-cyan);
}

section{
    min-height: auto !important;
}
/* --- TYPOGRAPHY & HEADINGS --- */
.section-heading {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 24px;
    text-align: right;
    position: relative;
}

.section-heading-bar {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 24px;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}



.section-heading-center {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 35px;
    text-align: center;
}

.sub-heading {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #111111;
    margin: 28px 0 16px;
}

.text-container {

    margin: 0 auto;
}

.paragraph {
    font-size: 1.05rem;
    color: var(--text-p);
    line-height: 2.1;
    margin-bottom: 20px;
    text-align: justify;
    text-justify: inter-word;
    font-weight: 400;
}

.content-section {
    padding: 30px 0;
}

/* ==========================================================================
   1. TOP BAR
   ========================================================================== */
.top-bar {
    background: linear-gradient(180deg, #274b74 0%, #1e3d62 100%);
    color: #ffffff;
    height: 48px;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

/* Social icons on the left in RTL */
.top-socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-socials a {
    color: #ffffff;
    font-size: 0.95rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

.top-socials a:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: #ffd166;
}

/* Protruding Crest Logo */
.top-crest-wrapper {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 120;
}

.top-crest-arch {
    background: #ffffff;
    width: 170px;
    height: 52px;
    border-radius: 0 0 85px 85px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    transition: transform 0.3s;
}

.top-crest-arch:hover {
    transform: scale(1.03);
}

.crest-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* Language switch on right in RTL */
.top-languages {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 500;
}

.lang-link {
    color: #e2e8f0;
    opacity: 0.85;
}

.lang-link:hover,
.lang-link.active {
    color: #ffffff;
    opacity: 1;
    font-weight: 700;
}

.lang-divider {
    color: #64748b;
    font-size: 0.8rem;
}

/* ==========================================================================
   2. MAIN NAVBAR
   ========================================================================== */
.main-navbar {
    background: #f1f3f6;
    border-bottom: 3px solid var(--primary-blue);
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    padding: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    color: #334155;
    transition: all 0.25s ease;
    border-radius: var(--radius-sm);
}

.nav-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: #475569;
    transition: color 0.25s, transform 0.25s;
}

.nav-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
    color: var(--primary-blue);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.nav-item.active .nav-title {
    font-weight: 800;
    color: var(--primary-blue);
}

.institute-brand {
    border-right: 1px solid #d8e0e9;
    padding-right: 8px;
    margin-right: 4px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.nav-brand-logo {
    height: 36px;
    width: auto;
}

.nav-brand-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.nav-brand-text small {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Search Nav item */
.search-item .nav-link {
    background: rgba(36, 75, 122, 0.08);
    border-radius: var(--radius-sm);
}

.search-item:hover .nav-link {
    background: var(--primary-blue);
    color: #ffffff;
}

.search-item:hover .nav-icon {
    color: #ffffff;
}

/* ==========================================================================
   3. HERO SECTION & CALLIGRAPHY
   ========================================================================== */
.hero-section {
    position: relative;
    background: #ffffff;
    padding-bottom: 20px;
    border-bottom: none;
    width: 100%;
}

.hero-banner-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: none;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-title-container {
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0 10px;
}

.calligraphy-wrapper {
    max-width: 750px;
    width: 90%;
    text-align: center;
    margin: 0 auto;
    background: #ffffff;
}

.calligraphy-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================================================
   4. BIOGRAPHY SECTION
   ========================================================================== */
.bio-intro-section {
    padding-top: 30px;
}

/* ==========================================================================
   5. TEACHERS SECTION
   ========================================================================== */
.teachers-section {
    background: #ffffff;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 80px;
    margin-bottom: 25px;
}

.teacher-card {
    background: var(--light-blue-card);
    border: 2px solid #2a5687;
    border-radius: 14px;
    padding: 65px 16px 22px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(36, 75, 122, 0.16);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 230px;
    margin: 0 auto;
}

.teacher-avatar-wrap {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 16px rgba(120, 134, 152, 0.25);
    background: #ffffff;
    overflow: hidden;
    margin: 0;
}

.teacher-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.teacher-card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 0px;
    flex: 1;
    width: 100%;
}

.teacher-name {
    font-size: 1.03rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 15px;
    line-height: 1.6;
    flex: 1;
}

.teacher-dates {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #111111;
}

.masters-extra-text {
    margin-top: 15px;
}

/* ==========================================================================
   6. SCHOLARS & MUJTAHIDS BANNER (PARALLAX ENHANCED)
   ========================================================================== */
.scholars-banner-section {
    position: relative;
    background: #000000;
    color: #ffffff;
    min-height: 440px;
    padding: 100px 0;
    margin: 0px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scholars-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://alkhoei.net/assets/imgs/imamkhoei/imam-khoei-bg-01.jpg') center center / cover no-repeat;
    transform: translate3d(0, 0, 0) scale(1.1);
    will-change: transform;
    z-index: 1;
    pointer-events: none;
}

.scholars-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(61, 169, 252, 0.25) 0%, rgba(36, 75, 122, 0.2) 40%, rgba(0, 0, 0, 0) 75%);
    z-index: 2;
    pointer-events: none;
}

.scholars-vignette-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0.2) 70%, rgba(0, 0, 0, 0.9) 100%);
    box-shadow: inset 0 25px 50px rgba(0, 0, 0, 0.95), inset 0 -25px 50px rgba(0, 0, 0, 0.95);
    z-index: 3;
    pointer-events: none;
}

.scholars-banner-overlay {
    position: relative;
    z-index: 4;
    width: 100%;
}

.banner-quote-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(10, 18, 28, 0.72);
    border: 1.5px solid rgba(160, 205, 250, 0.35);
    padding: 28px 32px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    max-width: 1120px;
    margin: 0 auto;
    transition: border-color 0.3s, transform 0.3s;
}

.banner-quote-box:hover {
    border-color: rgba(61, 169, 252, 0.65);
    transform: translateY(-2px);
}
    
.banner-quote-content {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.quote-ornament {
    font-size: 1.8rem;
    font-weight: 900;
    color: #3da9fc;
    line-height: 1;
    opacity: 0.9;
}

.banner-subtext {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 2.1;
    margin: 0 0 40px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.banner-calligraphy-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.3;
    margin: 0;
    letter-spacing: 2px;
    color: #e2f1ff;
    background: linear-gradient(180deg, #ffffff 0%, #cae8ff 35%, #6ab2ec 70%, #20629e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #0d2238) drop-shadow(0 4px 6px rgba(10, 25, 45, 0.98)) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.98));
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: default;
}

.banner-calligraphy-title:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 2px 0 #0d2238) drop-shadow(0 4px 8px rgba(61, 169, 252, 0.6)) drop-shadow(0 14px 32px rgba(0, 0, 0, 1));
}

@media (max-width: 768px) {
    .scholars-banner-section {
        min-height: 320px;
        padding: 40px 0;
    }

    .banner-quote-box {
        padding: 10px 16px;
        gap: 8px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .banner-calligraphy-title {
        font-size: 2.3rem;
    }

    .banner-subtext {
        font-size: 0.98rem;
        line-height: 1.8;
    }
}
/* ==========================================================================
   7. METHODOLOGY SECTION
   ========================================================================== */
.methodology-section {
    padding-top: 50px;
}

/* ==========================================================================
   8. STUDENTS SECTION (INTERACTIVE SLIDER)
   ========================================================================== */
.students-section {
    padding-bottom: 30px;
}

.students-carousel-wrapper {
    position: relative;
    background: #1b4777 url('https://alkhoei.net/assets/imgs/imamkhoei/imam-khoei-bg-03.jpg') center center / cover no-repeat;
    border-top: 3px solid #787878;
    border-bottom: 3px solid #787878;
    padding: 0 0 35px;
    margin-top: 110px;
    margin-bottom: 30px;
    color: #ffffff;
}

.students-slider-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.slider-arrow {
    background: transparent;
    border: none;
    color: #bebebe;
    font-size: 3rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.slider-arrow:hover {
    color: #ffffff;
    opacity: 1;
    transform: scale(1.15);
}

.students-slider-viewport {
    width: 100%;
    position: relative;
    padding: 0;
}

.students-cards-track {
    width: 100%;
    position: relative;
}

.student-slide-group {
    display: none;
    width: 100%;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    padding: 0 10px;
}

.student-slide-group.active {
    display: flex;
    animation: studentSlideIn 0.35s ease forwards;
}

@keyframes studentSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    margin-top: -95px;
    transition: transform 0.3s ease;
    flex: 1;
    max-width: 320px;
}

.student-item:hover {
    transform: translateY(-6px);
}

.student-circle-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #787878;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
    background: #ffffff;
    margin-bottom: 14px;
    transition: transform 0.3s ease;
}

.student-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    line-height: 1.5;
}

.students-footer-note {
    max-width: 950px;
    margin: 25px auto 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    padding: 0 20px;
    line-height: 1.8;
}

.students-action-btn-wrap {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
}

.btn-pill-white {
    display: inline-block;
    background: #ffffff;
    color: var(--primary-blue);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    padding: 6px 36px;
    border-radius: 13px;
    border: 3.5px solid #787878;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

.students-action-btn-wrap .btn-pill-white,
.students-action-btn-wrap .btn-pill-white:link,
.students-action-btn-wrap .btn-pill-white:visited {
    color: #244b7a;
}

.students-action-btn-wrap .btn-pill-white:hover {
    color: #ffffff;
}

.btn-pill-white:hover {
    background: #2a5687;
    color: #ffffff;
    border-color: #787878;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   9. PUBLICATIONS & BOOKS SECTION
   ========================================================================== */
.publications-section {
    padding-top: 10px;
}

.books-showcase-container {
    margin: 35px 0;
    padding: 20px 0;
    overflow-x: auto;
}

.books-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
}

.book-card {
    perspective: 1000px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
}

.book-cover-frame {
    width: 140px;
    height: 190px;
    background: #ffffff;
    border: 2px solid #244b7a;
    border-radius: 8px 14px 14px 8px;
    position: relative;
    display: flex;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), inset -2px 0 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.book-spine {
    width: 12px;
    height: 100%;
    background: linear-gradient(90deg, #1e3a5f 0%, #2b5282 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.book-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    background: #fdfefe;
    border: 1px solid #d6e2ed;
    margin: 6px;
    border-radius: 4px 10px 10px 4px;
}

.book-title-ar {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a5f;
    line-height: 1.35;
    margin-bottom: 12px;
}

.book-meta-ar {
    font-size: 0.92rem;
    font-weight: 700;
    color: #475569;
}

.book-card.featured-book .book-cover-frame {
    border-color: #1a3960;
    box-shadow: 0 10px 24px rgba(36, 75, 122, 0.25);
}

.taqrirat-expandable-container {
    position: relative;
    max-height: 235px;
    /* Displays items 1-3 with 4th item faded */
    overflow: hidden;
    transition: max-height 0.65s cubic-bezier(0.25, 1, 0.5, 1);
    margin: 15px 0 25px;
    cursor: pointer;
}

.taqrirat-expandable-container.expanded {
    max-height: 1400px;
    cursor: default;
}

.numbered-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.numbered-list li {
    margin-bottom: 12px;
    font-size: 1.08rem;
    line-height: 2;
    color: var(--text-p);
    transition: opacity 0.35s ease;
}

/* Faded effect on items 3 and 4 when collapsed matching reference */
.taqrirat-expandable-container:not(.expanded) .taqrir-item:nth-child(3) {
    opacity: 0.75;
}

.taqrirat-expandable-container:not(.expanded) .taqrir-item:nth-child(4) {
    opacity: 0.35;
}

.taqrirat-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 95px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 45%, rgba(255, 255, 255, 1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.taqrirat-expandable-container.expanded .taqrirat-fade-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.taqrirat-expand-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #2a5687;
    border: 1.5px solid #cbd5e1;
    padding: 5px 22px;
    border-radius: 13px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.25s ease;
}

.taqrirat-expand-btn:hover {
    background: #2a5687;
    color: #ffffff;
    border-color: #2a5687;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 80, 129, 0.25);
}

.cta-center-wrap {
    text-align: center;
    margin: 35px 0 15px;
}

.btn-navy-large {
    display: inline-block;
    background: #254b77;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    padding: 14px 50px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(37, 75, 119, 0.35);
    transition: all 0.25s ease;
}

.btn-navy-large:hover {
    background: #193557;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(25, 53, 87, 0.45);
}

/* ==========================================================================
   11. TESTIMONIALS SECTION (FAITHFUL REFERENCE REPLICATION)
   ========================================================================== */
.testimonials-section {
    position: relative;
    background: #173354 url('https://alkhoei.net/assets/imgs/imamkhoei/imam-khoei-bg-02.jpg') center center / cover no-repeat;
    border-top: 0px solid #000000;
    border-bottom: 0px solid #000000;
    color: #ffffff;

    margin: 40px 0;
    overflow: hidden;
}

.testimonials-overlay {
    position: relative;
    padding: 20px 0;
    z-index: 2;
    background: rgba(18, 38, 62, 0.72);
}

.testimonials-header {
    margin-bottom: 25px;
}

.testimonials-main-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.testimonials-main-title .highlight-cyan {
    color: #3da9fc;
    font-weight: 800;
}

.testimonials-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.6;
}

.testimonials-author {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.quote-text-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 10px;
}

.quote-paragraph {
    font-size: 1.12rem;
    line-height: 2.25;
    color: #ffffff;
    text-align: justify;
    text-justify: inter-word;
    font-weight: 500;
}

.testimonials-footer-row {
    display: flex;
    justify-content: flex-end;
    max-width: 1050px;
    margin: 15px auto 0;
    padding: 0 10px;
}

.archive-text-link {
    color: #3da9fc;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-block;
}

.archive-text-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

/* ==========================================================================
   12. DUAL COLUMNS (RESEARCH & ENDORSEMENTS)
   ========================================================================== */
.dual-columns-section {
    padding: 30px 0;
}

.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.dual-col {
    display: flex;
    flex-direction: column;
}

.col-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 20px;
    text-align: center;
}

.col-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.list-card-pill {
    display: block;
    background: #ffffff;
    border: 1.5px solid #0f172a;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.list-card-pill:hover {
    background: #f1f5f9;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.col-btn-wrap {
    text-align: center;
    margin-top: auto;
}

.btn-more-navy {
    display: inline-block;
    background: #ffffff;
    color: #111111;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 38px;
    border: 0.5px solid #2a5687;
    border-radius: 13px;
    box-shadow: 0 1px 10px rgba(42, 86, 135, 1);
    transition: all 0.25s ease;
}

.btn-more-navy:hover {
    background: #f6f6f6;
    transform: translateY(-2px);
}

/* ==========================================================================
   13. MULTIMEDIA SECTION
   ========================================================================== */
.multimedia-section {
    background: #1a1e24;
    color: #ffffff;
    padding: 50px 0;
    margin: 40px 0 0;
}

.media-tabs-header {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.media-tab {
    font-size: 1.35rem;
    font-weight: 700;
    color: #94a3b8;
    padding-bottom: 8px;
    position: relative;
    transition: color 0.25s;
}

.media-tab:hover,
.media-tab.active {
    color: #ffffff;
}

.media-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #3da9fc;
    border-radius: 2px;
}

.media-tab-content {
    display: none;
}

.media-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.media-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.media-card {
    transition: transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-6px);
}

.media-thumb-frame {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: #0f1318;
    aspect-ratio: 16 / 10;
}

.media-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.media-card:hover .play-icon-overlay {
    background: #2a5687;
    border-color: #2a5687;
    transform: translate(-50%, -50%) scale(1.1);
}

.media-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-top: 14px;
    text-align: center;
    line-height: 1.8;
}

.media-archive-wrap {
    margin-top: 35px;
}

.btn-archive-navy {
    display: inline-block;
    background: #254b77;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 40px;
    border-radius: 13px;
    transition: all 0.25s ease;
}

.btn-archive-navy:hover {
    background: #2a5687;
    transform: translateY(-2px);
}

/* ==========================================================================
   14. SOCIAL SERVICES SECTION
   ========================================================================== */
.services-section {
    padding-bottom: 0;
}

.services-strip-wrap {
    background: #0f1620 url('https://alkhoei.net/assets/imgs/imamkhoei/imam-khoei-bg-04.jpg') center center / cover no-repeat;
    padding: 45px 0;
    margin-top: 30px;
}

.services-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 100px;
}

.service-feature-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.service-feature-card:hover {
    transform: translateY(-6px);
}

.service-img-wrap {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    aspect-ratio: 16 / 10;
    background: #1b252f;
    margin-bottom: 12px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.4;
}

/* ==========================================================================
   15. FAMILY & SACRIFICES SECTION
   ========================================================================== */
.family-section {
    padding-top: 60px;
}

.family-nodes-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 30px 0 40px;
}

.family-circle-node {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.family-circle-node:hover {
    transform: translateY(-6px) scale(1.05);
}

.circle-outer {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 40%, #e2eaf2 100%);
    border: 3px solid #244b7a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(36, 75, 122, 0.2);
}

.family-label {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}

.ina-lillah-calligraphy-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 80px;
    margin-bottom: 40px;
    gap: 0;
    overflow: hidden;
}

.calligraphy-side-line {
    flex: 1;
    height: 1.5px;
    background-color: #000000;
}

.ina-lillah-img-holder {
    flex-shrink: 0;
    max-width: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.ina-lillah-img {
    width: 100%;
    height: auto;
    display: block;
}

.family-history-text {
    margin-top: 25px;
}

/* ==========================================================================
   16. ELEGY SECTION (EXACT REFERENCE REPLICATION)
   ========================================================================== */
.elegy-section {
    position: relative;
    background: #0e1724 url('https://alkhoei.net/assets/imgs/imamkhoei/imam-khoei-bg-05.jpg') center center / cover no-repeat;
    border-top: 4px solid #000000;
    border-bottom: 4px solid #000000;
    color: #ffffff;
    padding: 28px 0;
    margin-top: 65px;
}

.elegy-flex-layout {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    align-items: center;
    position: relative;
    width: 100%;
}

.elegy-main-badge-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 10;
}

.elegy-content-center {
    text-align: center;
    position: relative;
    z-index: 5;
    padding: 0 10px;
    width: 100%;
}

.elegy-archive-badge {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 10;
}

.elegy-diamond-archive {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95px;
    height: 95px;
    background: #ffffff;
    border: 4.5px solid #2a5687;
    border-radius: 4px;
    transform: rotate(45deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.elegy-diamond-archive .diamond-inner-text {
    transform: rotate(-45deg);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #000000;
    transition: color 0.3s ease;
}

.elegy-diamond-archive:hover {
    background: #2a5687;
    border-color: #ffffff;
    transform: rotate(45deg) scale(1.08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

.elegy-diamond-archive:hover .diamond-inner-text {
    color: #ffffff;
}

.elegy-poem-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #3da9fc;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.poem-vertical-dash {
    width: 2px;
    height: 10px;
    border-left: 2px dashed #3da9fc;
    margin: 3px auto 8px;
}

.elegy-verses {
    margin-bottom: 8px;
}

.verse-line {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.95;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

.elegy-chronogram-calc {
    font-size: 1.12rem;
    font-weight: 600;
    color: #ffffff;
    margin: 8px 0 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

.elegy-author {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #3da9fc;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
    margin-top: 4px;
}

.elegy-diamond-main {
    width: 175px;
    height: 175px;
    background: #ffffff;
    border: 6px solid #2a5687;
    border-radius: 4px;
    transform: rotate(45deg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: -38px;
    margin-bottom: -38px;
}

.elegy-diamond-main:hover {
    transform: rotate(45deg) scale(1.04);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.75);
}

.diamond-content {
    transform: rotate(-45deg) translateY(-12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.elegy-badge-sub {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #000000;
    line-height: 1.5;
}

.elegy-badge-title {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 900;
    color: #000000;
    line-height: 1.2;
    margin-top: 2px;
}

.highlight-blue-badge {
    color: #2a5687;
}

@media (max-width: 900px) {
    .elegy-flex-layout {
        grid-template-columns: 1fr;
        gap: 70px;
    }

    .elegy-diamond-main {
        margin-top: 0;
        margin-bottom: 0;
    }

    .elegy-main-badge-wrap,
    .elegy-archive-badge {
        justify-content: center;
    }

    .elegy-section {
        padding: 55px 0;
    }
}

/* ==========================================================================
   17. FOOTER
   ========================================================================== */
.site-footer {
    background: #171d24;
    color: #cbd5e1;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 35px;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-brand-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.brand-thin {
    font-weight: 300;
    color: #94a3b8;
}

.footer-center-emblem {
    margin: 10px 0 15px;
}

.footer-emblem-img {
    max-height: 60px;
    width: auto;
    filter: brightness(0.9);
}

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.8;
    color: #94a3b8;
    text-align: justify;
}

.more-link {
    color: #3da9fc;
    font-weight: 700;
}

.more-link:hover {
    text-decoration: underline;
}

.footer-col-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 6px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 2px;
    background: var(--primary-blue);
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    font-size: 0.92rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.footer-nav a:hover {
    color: #ffffff;
    padding-right: 4px;
}

.footer-social-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social-row a {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.25s ease;
}

.footer-social-row a:hover {
    color: #3da9fc;
    transform: translateY(-3px);
}

.footer-bottom-strip {
    background: #0f1318;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-text {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
}

.copyright-text a {
    color: #94a3b8;
    font-weight: 600;
}

.copyright-text a:hover {
    color: #3da9fc;
}

/* ==========================================================================
   18. SEARCH MODAL OVERLAY
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: popUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.modal-close {
    font-size: 1.4rem;
    color: #64748b;
}

.modal-close:hover {
    color: #ef4444;
}

.search-input-wrap {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-blue);
}

.search-submit-btn {
    background: var(--primary-blue);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.25s;
}

.search-submit-btn:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popUp {
    from {
        opacity: 0;
        transform: scale(0.94);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-links {
        gap: 6px;
    }

    .nav-link {
        padding: 4px 6px;
    }

    .nav-title {
        font-size: 0.78rem;
    }

    .teachers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 80px 12px;
    }

    .services-cards-grid {
        gap: 30px;
    }

    .banner-calligraphy-title {
        font-size: 2.6rem;
        letter-spacing: 1px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about-col {
        grid-column: span 2;
    }

    .dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* --- NAV & TOP BAR --- */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 16px 0;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .top-bar-content {
        justify-content: space-between;
    }

    .top-crest-wrapper {
        position: static;
        transform: none;
    }

    .top-crest-arch {
        width: 110px;
        height: 38px;
        border-radius: 4px;
    }

    /* --- TEXT --- */
    .paragraph {
        font-size: 1rem;
        line-height: 2.1;
    }

    /* --- 5. TEACHERS --- */
    .teachers-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 10px;
        scrollbar-width: none;
        padding: 50px 15px 10px;
        margin-top: 10px;
    }

    .teacher-card {
        flex: 0 0 calc((100% - 12px) / 2.3);
        max-width: none;
        margin: 0;
        padding: 50px 10px 16px;
        scroll-snap-align: start;
    }

    .teacher-avatar-wrap {
        top: -40px;
        width: 80px;
        height: 80px;
    }

    .teacher-name {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .teacher-dates {
        font-size: 0.7rem;
    }

    /* --- 6. SCHOLARS BANNER --- */
    .banner-calligraphy-title {
        font-size: 1.5rem;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .banner-subtext {
        font-size: 1.05rem;
    }

    /* --- 8. STUDENTS --- */
    .slider-arrow {
        display: none;
    }

    .students-slider-container.container {
        padding-left: 0;
        padding-right: 0;
    }

    .student-slide-group,
    .student-slide-group.active {
        display: contents;
        animation: none;
    }

    .students-cards-track {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 10px;
        scrollbar-width: none;
        padding: 25px 10px 10px;
        margin-top: -85px;
    }

    .student-item {
        flex: 0 0 calc((100% - 20px) / 2.3);
        margin-top: 0;
        scroll-snap-align: start;
    }

    .student-circle-avatar {
        width: 110px;
        height: 110px;
    }

    .student-name {
        font-size: 0.85rem;
    }

    .students-carousel-wrapper {
        margin-top: 80px;
    }

    /* --- 11. TESTIMONIALS --- */
    .testimonials-main-title {
        font-size: 1.65rem;
    }

    /* --- 12. DUAL COLUMNS --- */
    .col-list .list-card-pill:nth-child(n+5) {
        display: none;
    }

    /* --- 13. MULTIMEDIA --- */
    .media-tab {
        font-size: 1.1rem;
    }

    .media-cards-grid {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .media-cards-grid > a {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .media-card-title {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* --- 14. SERVICES --- */
    .services-cards-grid {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .services-cards-grid > a {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    /* --- 15. FAMILY --- */
    .circle-outer {
        width: 105px;
        height: 105px;
    }

    .family-nodes-row {
        flex-wrap: wrap;
        gap: 11px;
    }

    .ina-lillah-img {
        width: 50%;
    }

    /* --- 16. ELEGY --- */
    .elegy-flex-layout {
        text-align: center;
    }
}
