/* ==========================================================================
   ZULQARNAIN HAIDER — ISLAMIC ACADEMIC PORTFOLIO
   Core Design System & Styles
   ========================================================================== */

:root {
    /* Color Palette */
    --color-deep-emerald: #0B3D2E;
    --color-forest-green: #145C43;
    --color-dark-green: #06291F;
    --color-muted-gold: #C9A45C;
    --color-soft-gold: #E8D39A;
    --color-ivory: #F7F2E8;
    --color-white: #FFFFFF;
    --color-text-main: #17231E;
    --color-text-muted: #68746E;
    --color-card-bg: #FFFFFF;
    --color-border: #E5DDCE;
    --color-header-bg: rgba(11, 61, 46, 0.94);
    --color-surface-hover: #F2ECE0;
    
    /* Status Colors */
    --status-active: #0B3D2E;
    --status-completed: #145C43;
    --status-planned: #7A6233;

    /* Typography */
    --font-arabic: 'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
    --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    --font-latin: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing & Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-soft: 0 4px 20px rgba(11, 61, 46, 0.08);
    --shadow-hover: 0 10px 30px rgba(11, 61, 46, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --color-deep-emerald: #06291F;
    --color-forest-green: #0E4230;
    --color-dark-green: #03140F;
    --color-muted-gold: #D6B26A;
    --color-soft-gold: #F0DFC0;
    --color-ivory: #0D1A15;
    --color-white: #12241D;
    --color-text-main: #EAE6DF;
    --color-text-muted: #9EAEA6;
    --color-card-bg: #12241D;
    --color-border: #1E382E;
    --color-header-bg: rgba(6, 41, 31, 0.96);
    --color-surface-hover: #172F26;
    --shadow-soft: 0 4px 25px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 35px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: var(--font-urdu), var(--font-arabic), var(--font-latin);
    background-color: var(--color-ivory);
    color: var(--color-text-main);
    line-height: 1.8;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-urdu), var(--font-arabic);
    color: var(--color-text-main);
    font-weight: 700;
    line-height: 1.4;
}

a {
    color: var(--color-forest-green);
    text-decoration: none;
    transition: var(--transition);
}

[data-theme="dark"] a {
    color: var(--color-muted-gold);
}

a:hover {
    color: var(--color-muted-gold);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Layout & Containers
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section-padding-sm {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-padding-lg {
    padding-top: 6.5rem;
    padding-bottom: 6.5rem;
}

.bg-light {
    background-color: rgba(201, 164, 92, 0.04);
}

.text-center {
    text-align: center;
}

.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --------------------------------------------------------------------------
   Header & Navigation (Glassmorphic)
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background-color: var(--color-header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 164, 92, 0.25);
    transition: var(--transition);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-arabic {
    font-family: var(--font-arabic);
    color: var(--color-soft-gold);
}

.brand-latin {
    font-family: var(--font-latin);
    font-size: 0.95rem;
    color: var(--color-white);
}

.desktop-nav .nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-latin);
    font-size: 0.92rem;
    font-weight: 500;
    color: #E2E8E5;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-soft-gold);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0.6rem;
    right: 0.6rem;
    height: 2px;
    background-color: var(--color-muted-gold);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 164, 92, 0.3);
    color: var(--color-soft-gold);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: rgba(201, 164, 92, 0.25);
    transform: scale(1.05);
}

[data-theme="light"] .dark-icon { display: none; }
[data-theme="light"] .light-icon { display: block; }
[data-theme="dark"] .light-icon { display: none; }
[data-theme="dark"] .dark-icon { display: block; }

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background-color: var(--color-deep-emerald);
    z-index: 1100;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    transition: right 0.35s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(201, 164, 92, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.drawer-title {
    color: var(--color-soft-gold);
    font-weight: 700;
    font-size: 1.2rem;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mobile-link {
    color: var(--color-white);
    font-size: 1.05rem;
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-link:hover, .mobile-link.active {
    background: rgba(201, 164, 92, 0.15);
    color: var(--color-soft-gold);
    padding-right: 1.2rem;
}

.drawer-footer {
    margin-top: auto;
    border-top: 1px solid rgba(201, 164, 92, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: var(--color-soft-gold);
    font-size: 0.9rem;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    min-height: calc(100svh - var(--header-height));
    background: linear-gradient(135deg, var(--color-dark-green) 0%, var(--color-deep-emerald) 60%, var(--color-forest-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    text-align: center;
    padding: 4rem 1.5rem;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(201, 164, 92, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-geometric-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(var(--color-soft-gold) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.bismillah-block {
    margin-bottom: 1.5rem;
}

.bismillah-arabic {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    color: var(--color-soft-gold);
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.durood-arabic {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    color: #E2E8E5;
}

.bismillah-block.small .bismillah-arabic {
    font-size: 1.4rem;
}

.hero-tag {
    display: inline-block;
    background: rgba(201, 164, 92, 0.15);
    border: 1px solid rgba(201, 164, 92, 0.35);
    color: var(--color-soft-gold);
    font-family: var(--font-latin);
    font-size: 0.82rem;
    letter-spacing: 2px;
    padding: 0.35rem 1.2rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
}

.hero-main-title {
    margin-bottom: 1rem;
}

.hero-name-en {
    display: block;
    font-family: var(--font-latin);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--color-white);
}

.hero-name-ur {
    display: block;
    font-family: var(--font-urdu);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-soft-gold);
    margin-top: 0.3rem;
}

.hero-role-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 1.15rem;
    padding: 0.3rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.2rem;
}

.hero-motto-bar {
    font-family: var(--font-urdu);
    font-size: 1.3rem;
    color: var(--color-soft-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.dot-sep {
    font-size: 0.8rem;
    opacity: 0.7;
}

.hero-intro-text {
    font-size: 1.15rem;
    color: #E2ECE7;
    max-width: 720px;
    margin: 0 auto 2.2rem;
    line-height: 1.9;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons & UI Elements
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-muted-gold);
    color: #0B3D2E;
    border-color: var(--color-muted-gold);
}

.btn-primary:hover {
    background-color: var(--color-soft-gold);
    color: #06291F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 164, 92, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--color-white);
    color: var(--color-soft-gold);
}

.btn-emerald {
    background-color: var(--color-deep-emerald);
    color: var(--color-white);
}

.btn-emerald:hover {
    background-color: var(--color-forest-green);
    color: var(--color-soft-gold);
    transform: translateY(-2px);
}

.btn-gold {
    background-color: var(--color-muted-gold);
    color: #06291F;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.88rem;
}

.btn-block {
    width: 100%;
}

/* Section Headers */
.section-header {
    margin-bottom: 3.5rem;
}

.sub-heading {
    font-family: var(--font-latin);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-muted-gold);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.sub-heading-gold {
    font-family: var(--font-latin);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--color-soft-gold);
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

.main-heading {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    color: var(--color-text-main);
}

.islamic-divider {
    color: var(--color-muted-gold);
    font-size: 1.1rem;
    margin: 0.6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.islamic-divider::before, .islamic-divider::after {
    content: "";
    height: 1px;
    width: 60px;
    background-color: var(--color-border);
}

.divider-gold::before, .divider-gold::after {
    background-color: rgba(201, 164, 92, 0.4);
}

/* --------------------------------------------------------------------------
   Cards & Layout Components
   -------------------------------------------------------------------------- */
.card-styled {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card-styled:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(201, 164, 92, 0.5);
}

/* Verse Card */
.verse-card {
    background: linear-gradient(135deg, var(--color-card-bg), var(--color-surface-hover));
    border: 1px solid var(--color-muted-gold);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.verse-ornament-top, .verse-ornament-bottom {
    font-size: 1.5rem;
    color: var(--color-muted-gold);
}

.arabic-verse {
    font-family: var(--font-arabic);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--color-deep-emerald);
    margin: 1rem 0;
    line-height: 1.6;
}

[data-theme="dark"] .arabic-verse {
    color: var(--color-soft-gold);
}

.verse-translation {
    font-size: 1.25rem;
    color: var(--color-text-main);
    margin-bottom: 0.8rem;
}

.verse-reference {
    font-family: var(--font-arabic);
    color: var(--color-muted-gold);
    font-size: 1rem;
    font-style: normal;
}

/* Fields Grid */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.8rem;
}

.field-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
    border-top: 4px solid var(--color-forest-green);
    display: flex;
    flex-direction: column;
}

.field-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--color-muted-gold);
}

.field-icon {
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.field-title {
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--color-deep-emerald);
}

[data-theme="dark"] .field-title {
    color: var(--color-soft-gold);
}

.field-desc {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Timeline (Journey)
   -------------------------------------------------------------------------- */
.vertical-timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 1rem 0;
}

.vertical-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 2px;
    background-color: var(--color-muted-gold);
    transform: translateX(50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item.timeline-right {
    margin-right: auto;
    padding-left: 2.5rem;
    text-align: right;
}

.timeline-item.timeline-left {
    margin-left: auto;
    padding-right: 2.5rem;
    text-align: right;
}

.timeline-dot {
    position: absolute;
    top: 15px;
    width: 36px;
    height: 36px;
    background-color: var(--color-deep-emerald);
    border: 2px solid var(--color-muted-gold);
    color: var(--color-soft-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    z-index: 2;
}

.timeline-right .timeline-dot {
    right: -18px;
}

.timeline-left .timeline-dot {
    left: -18px;
}

.timeline-year-badge {
    display: inline-block;
    background-color: rgba(201, 164, 92, 0.15);
    color: var(--color-muted-gold);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.timeline-inst {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.timeline-desc {
    font-size: 0.98rem;
    color: var(--color-text-main);
}

.timeline-status-tag {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.status-active { background: #E3F2FD; color: #0D47A1; }
.status-completed { background: #E8F5E9; color: #1B5E20; }
.status-future { background: #FFF8E1; color: #F57F17; }

/* --------------------------------------------------------------------------
   Library & Books
   -------------------------------------------------------------------------- */
.controls-wrapper {
    margin-bottom: 2rem;
}

.search-box-wrapper {
    position: relative;
    margin-bottom: 1.2rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.search-input {
    width: 100%;
    padding: 0.85rem 3rem 0.85rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-card-bg);
    color: var(--color-text-main);
}

.clear-btn {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text-muted);
    display: none;
}

.category-filters-scroll {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--color-deep-emerald);
    color: var(--color-white);
    border-color: var(--color-deep-emerald);
}

[data-theme="dark"] .filter-btn:hover, [data-theme="dark"] .filter-btn.active {
    background-color: var(--color-muted-gold);
    color: #06291F;
    border-color: var(--color-muted-gold);
}

.status-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.status-pills {
    display: flex;
    gap: 0.5rem;
}

.status-pill {
    background: none;
    border: 1px dashed var(--color-border);
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.status-pill.active {
    background: var(--color-muted-gold);
    color: #06291F;
    border-style: solid;
    font-weight: 600;
}

.books-catalog-grid, .books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.book-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-muted-gold);
}

.book-cover-frame {
    position: relative;
    height: 280px;
    background-color: #0B3D2E;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-cover-img {
    transform: scale(1.04);
}

.book-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFF;
    backdrop-filter: blur(4px);
}

.badge-reading { background-color: rgba(11, 61, 46, 0.9); }
.badge-completed { background-color: rgba(20, 92, 67, 0.9); }
.badge-planned { background-color: rgba(122, 98, 51, 0.9); }

.book-info {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-category {
    font-size: 0.8rem;
    color: var(--color-muted-gold);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.book-title {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.book-author {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
}

/* --------------------------------------------------------------------------
   Notes System
   -------------------------------------------------------------------------- */
.daily-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.daily-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition);
}

.daily-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--color-deep-emerald);
}

[data-theme="dark"] .daily-card-header {
    color: var(--color-soft-gold);
}

.daily-icon {
    font-size: 1.6rem;
}

.daily-card-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.daily-arabic {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
    color: var(--color-deep-emerald);
}

[data-theme="dark"] .daily-arabic {
    color: var(--color-soft-gold);
}

.daily-trans {
    font-size: 0.98rem;
    color: var(--color-text-main);
    margin-bottom: 0.8rem;
}

.daily-ref {
    font-size: 0.85rem;
    color: var(--color-muted-gold);
    font-weight: 600;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.note-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: var(--transition);
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-muted-gold);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}

.note-title {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.note-snippet {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Purpose Section
   -------------------------------------------------------------------------- */
.purpose-section {
    background: linear-gradient(135deg, var(--color-dark-green) 0%, var(--color-deep-emerald) 100%);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.purpose-pattern-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: radial-gradient(var(--color-soft-gold) 1px, transparent 1px);
    background-size: 20px 20px;
}

.purpose-container {
    position: relative;
    z-index: 2;
}

.purpose-heading {
    color: var(--color-white);
    font-size: clamp(2rem, 3.5vw, 2.6rem);
}

.purpose-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 3.5rem 0;
}

.flow-step {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 164, 92, 0.3);
    padding: 1.8rem 1.4rem;
    border-radius: var(--radius-md);
    min-width: 180px;
    flex: 1;
    max-width: 210px;
}

.flow-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.flow-step h4 {
    color: var(--color-soft-gold);
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.flow-step p {
    font-size: 0.85rem;
    color: #E2ECE7;
}

.flow-arrow {
    font-size: 1.8rem;
    color: var(--color-muted-gold);
}

.purpose-quote-box {
    max-width: 700px;
    margin: 0 auto;
    border-top: 1px solid rgba(201, 164, 92, 0.3);
    padding-top: 1.5rem;
}

.purpose-quote {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    color: var(--color-soft-gold);
    margin-bottom: 0.4rem;
}

.purpose-quote-trans {
    font-size: 1rem;
    color: #D7E5DF;
}

/* --------------------------------------------------------------------------
   Certificates & Gallery
   -------------------------------------------------------------------------- */
.academic-clarification-note {
    background-color: rgba(201, 164, 92, 0.1);
    border-right: 4px solid var(--color-muted-gold);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.certificate-card {
    padding: 0;
    overflow: hidden;
}

.cert-preview-frame {
    position: relative;
    height: 220px;
    background-color: var(--color-surface-hover);
    overflow: hidden;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 61, 46, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.cert-preview-frame:hover .cert-overlay {
    opacity: 1;
}

.cert-info {
    padding: 1.5rem;
}

.cert-year {
    font-size: 0.85rem;
    color: var(--color-muted-gold);
    font-weight: 700;
}

.cert-title {
    font-size: 1.25rem;
    margin: 0.3rem 0;
}

.cert-inst, .cert-prog {
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.cert-desc {
    margin-top: 0.6rem;
    font-size: 0.95rem;
}

/* Gallery Masonry */
.gallery-masonry {
    columns: 3 300px;
    column-gap: 1.5rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

.gallery-thumb {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb {
    transform: scale(1.05);
}

.gallery-caption-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 41, 31, 0.9) 0%, transparent 70%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
    color: #FFF;
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption-overlay {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Contact Page & Forms
   -------------------------------------------------------------------------- */
.contact-items-list {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-icon {
    width: 44px;
    height: 44px;
    background: rgba(201, 164, 92, 0.15);
    color: var(--color-muted-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-social-grid {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.social-btn {
    background-color: var(--color-surface-hover);
    border: 1px solid var(--color-border);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    color: var(--color-text-main);
}

.social-btn:hover {
    background-color: var(--color-deep-emerald);
    color: #FFF;
}

.contact-dua-card {
    background-color: var(--color-surface-hover);
    border: 1px dashed var(--color-muted-gold);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 2rem;
}

.dua-main-text {
    font-family: var(--font-arabic);
    font-size: 1.3rem;
    color: var(--color-deep-emerald);
    margin-bottom: 0.4rem;
}

[data-theme="dark"] .dua-main-text {
    color: var(--color-soft-gold);
}

.jazakallah {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    color: var(--color-muted-gold);
    font-weight: 700;
    display: block;
    margin-top: 0.5rem;
}

.academic-form .form-group {
    margin-bottom: 1.3rem;
}

.form-label {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-card-bg);
    color: var(--color-text-main);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-muted-gold);
    box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.15);
}

.alert-success {
    background-color: #E8F5E9;
    color: #1B5E20;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #A5D6A7;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Modals & Lightbox
   -------------------------------------------------------------------------- */
.global-modal, .lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.global-modal.active, .lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop, .lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 41, 31, 0.85);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    z-index: 2;
    background-color: var(--color-card-bg);
    border-radius: var(--radius-md);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--color-muted-gold);
}

.modal-dialog.modal-lg {
    max-width: 850px;
}

.modal-close-btn, .lightbox-close-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--color-text-main);
    font-size: 1.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-close-btn {
    color: #FFF;
    background: rgba(255, 255, 255, 0.2);
}

/* Lightbox Content */
.lightbox-container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lightbox-content-box {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 750px;
    width: 100%;
    margin: 0 1rem;
}

.lightbox-img {
    max-height: 65vh;
    width: 100%;
    object-fit: contain;
    background-color: #000;
}

.lightbox-caption {
    padding: 1.2rem;
    text-align: right;
}

.lightbox-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFF;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-nav-btn:hover {
    background: var(--color-muted-gold);
    color: #06291F;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-dark-green);
    color: #E2ECE7;
    border-top: 1px solid rgba(201, 164, 92, 0.25);
    padding-top: 4rem;
    font-size: 0.95rem;
}

.footer-top {
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-soft-gold);
}

.footer-badge {
    color: #B5C9C0;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.footer-creed {
    color: var(--color-muted-gold);
    font-weight: 700;
    margin-top: 0.6rem;
}

.footer-heading {
    color: var(--color-soft-gold);
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: #B5C9C0;
}

.footer-links a:hover {
    color: var(--color-soft-gold);
    padding-right: 5px;
}

.footer-bottom {
    padding: 1.8rem 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-blessing {
    font-family: var(--font-arabic);
    color: var(--color-soft-gold);
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Page Banners
   -------------------------------------------------------------------------- */
.page-banner {
    background: linear-gradient(135deg, var(--color-dark-green) 0%, var(--color-deep-emerald) 100%);
    color: var(--color-white);
    padding: 4rem 1.5rem 3.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(201, 164, 92, 0.2);
}

.page-category-tag {
    font-family: var(--font-latin);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--color-soft-gold);
    background: rgba(201, 164, 92, 0.15);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 0.8rem;
}

.page-title {
    color: var(--color-white);
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #D3DFDA;
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
}
