/* ===================================================================
   Custom CSS: MTsN 4 Aceh Barat - Portal Web Profil Modern
   Tema Warna: Emerald Green (Kemenag), Deep Forest, Warm Gold, Clean White
   =================================================================== */

:root {
    --primary-emerald: #0b663b;
    --primary-dark: #074628;
    --primary-light: #128a50;
    --accent-gold: #e5a93b;
    --accent-gold-dark: #c68923;
    --accent-gold-light: #fef4e2;
    --bg-light: #f8faf9;
    --text-main: #22292f;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(11, 102, 59, 0.08);
    --shadow-lg: 0 10px 25px rgba(11, 102, 59, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .brand-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
}

/* Typography Helpers */
.font-11 { font-size: 0.72rem; }
.font-12 { font-size: 0.78rem; }
.font-13 { font-size: 0.84rem; }
.font-14 { font-size: 0.88rem; }
.font-15 { font-size: 0.94rem; }
.tracking-wider { letter-spacing: 0.05em; }

/* Custom Colors */
.text-emerald { color: var(--primary-emerald) !important; }
.text-gold { color: var(--accent-gold) !important; }
.bg-emerald { background-color: var(--primary-emerald) !important; color: #fff; }
.bg-emerald-subtle { background-color: rgba(11, 102, 59, 0.15) !important; }

.btn-emerald {
    background: linear-gradient(135deg, var(--primary-emerald) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    transition: var(--transition-smooth);
}
.btn-emerald:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #032b17 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 102, 59, 0.3);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #d49324 100%);
    color: #1e293b;
    border: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #d49324 0%, #b87b14 100%);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 169, 59, 0.35);
}

.btn-outline-emerald {
    color: var(--primary-emerald);
    border: 2px solid var(--primary-emerald);
    background: transparent;
    transition: var(--transition-smooth);
}
.btn-outline-emerald:hover {
    background-color: var(--primary-emerald);
    color: #fff;
    transform: translateY(-2px);
}

.hover-gold:hover {
    color: var(--accent-gold) !important;
}

/* TOPBAR */
.topbar {
    background: linear-gradient(90deg, #05331d 0%, #0b663b 60%, #084c2b 100%);
    font-size: 0.85rem;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}
.topbar a {
    text-decoration: none;
    transition: var(--transition-smooth);
}
.topbar-info {
    display: flex;
    align-items: center;
    gap: 22px;
}
.topbar-info span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.topbar-info span i {
    margin-right: 8px;
}

/* TOPBAR RUNNING TEXT / TICKER */
.topbar-ticker {
    flex: 1 1 0%;
    min-width: 0 !important;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}
.ticker-track-wrap {
    flex: 1 1 0%;
    min-width: 0 !important;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
}
.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: topbar-marquee var(--ticker-speed, 25s) linear infinite;
    color: #ffffff;
    font-weight: 500;
}
.ticker-content:hover {
    animation-play-state: paused;
    cursor: pointer;
}
.ticker-spacer {
    display: inline-block;
    margin: 0 24px;
    color: var(--accent-gold);
    opacity: 0.85;
}
@keyframes topbar-marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}


/* NAVBAR */
.main-navbar {
    transition: var(--transition-smooth);
    border-bottom: 2px solid rgba(229, 169, 59, 0.35);
    background-color: #ffffff;
    padding: 0.65rem 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

/* NAVBAR HERO TRANSPARENT (HOMEPAGE FULL-BLEED SLIDE OVERLAY) */
.navbar-hero-transparent {
    position: absolute;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-hero-transparent::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 17, 10, 0.72) 0%, rgba(3, 17, 10, 0.3) 70%, transparent 100%);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Text & Colors when at top of hero */
.navbar-hero-transparent:not(.navbar-scrolled) .brand-title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.navbar-hero-transparent:not(.navbar-scrolled) .brand-subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-nav .nav-link {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-nav .nav-link:hover {
    color: var(--accent-gold) !important;
    background-color: rgba(255, 255, 255, 0.16);
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-nav .nav-link.active {
    color: var(--accent-gold) !important;
    background-color: rgba(229, 169, 59, 0.28);
    font-weight: 600;
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-nav .nav-link .nav-icon {
    color: var(--accent-gold) !important;
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-toggler {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 6px 10px;
}
.navbar-hero-transparent:not(.navbar-scrolled) .navbar-toggler-icon {
    filter: invert(1) brightness(1.8);
}
.navbar-hero-transparent:not(.navbar-scrolled) .btn-emerald {
    background: linear-gradient(135deg, #128a50 0%, #0b663b 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Dropdown menu mobile view */
@media (max-width: 991.98px) {
    .navbar-hero-transparent:not(.navbar-scrolled) .navbar-collapse {
        background: rgba(5, 26, 16, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 14px;
        padding: 16px 18px;
        margin-top: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    }
}

/* NAVBAR SCROLLED STATE (STICKY SOLID WHITE) */
.navbar-hero-transparent.navbar-scrolled {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 2px solid rgba(229, 169, 59, 0.35) !important;
    animation: navSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar-hero-transparent.navbar-scrolled::before {
    opacity: 0;
}
@keyframes navSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Flash message positioning on home */
.flash-container-home {
    position: relative;
    z-index: 1040;
    margin-top: 85px;
    margin-bottom: -60px;
}
.main-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0;
    margin-right: 0.5rem;
}
.brand-logo-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0;
}
.kemenag-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}
.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
}
.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-emerald);
    letter-spacing: -0.01em;
    margin: 0;
    white-space: nowrap;
}
.brand-subtitle {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1px;
}

.navbar-nav .nav-item {
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    gap: 4px;
    white-space: nowrap !important;
    font-size: 0.84rem;
    font-weight: 500;
    color: #334155 !important;
    padding: 0.4rem 0.5rem !important;
    border-radius: 50rem;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    line-height: 1.25;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-emerald) !important;
    background-color: rgba(11, 102, 59, 0.07);
}

.navbar-nav .nav-link.active {
    color: var(--primary-emerald) !important;
    background-color: rgba(11, 102, 59, 0.12);
    font-weight: 600;
}

.nav-icon {
    display: inline-block !important;
    font-size: 0.86rem;
    color: var(--primary-emerald);
    opacity: 0.85;
    margin: 0 !important;
    flex-shrink: 0;
    line-height: 1;
    transition: transform 0.2s;
}

.navbar-nav .nav-link:hover .nav-icon {
    color: var(--accent-gold);
    transform: translateY(-1px);
}

/* ===================================================================
   DROPDOWN MENU STYLING (Tema Eksklusif Madrasah)
   =================================================================== */
.navbar .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid rgba(11, 102, 59, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(11, 102, 59, 0.04) !important;
    padding: 6px !important;
    min-width: 220px !important;
    background-color: #ffffff !important;
    margin-top: 8px;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar .dropdown-item {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    transition: all 0.18s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    background-color: transparent;
    text-decoration: none !important;
}

.navbar .dropdown-item i {
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

/* Hover State */
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: #f0fdf4 !important;
    color: #065f46 !important;
}

.navbar .dropdown-item:hover i,
.navbar .dropdown-item:focus i {
    transform: scale(1.15);
}

/* Active & Pressed state (Item yang sedang dipilih/halaman aktif) */
.navbar .dropdown-item.active,
.navbar .dropdown-item:active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--primary-emerald) !important;
}

.navbar .dropdown-item.active i,
.navbar .dropdown-item:active i,
.dropdown-menu .dropdown-item.active i,
.dropdown-menu .dropdown-item:active i {
    color: var(--primary-emerald) !important;
}

/* Garis pembatas divider */
.navbar .dropdown-divider {
    border-color: rgba(11, 102, 59, 0.08) !important;
    margin: 5px 4px !important;
}

/* ===================================================================
   HERO PHOTO SLIDESHOW (Gaya Eksklusif MTsN 3 Aceh Barat)
   =================================================================== */
.hero-section {
    position: relative;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    background-color: #051a10;
    color: #fff;
    padding: 95px 0 50px;
    overflow: hidden;
}

@media (min-width: 992px) {
    .hero-section {
        min-height: calc(100vh - 40px);
        max-height: calc(100vh - 40px);
        padding: 90px 0 35px;
    }
}

/* Dynamic Hero Slideshow Container */
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #03120a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1.1s ease-in-out, transform 5.5s ease-out;
    pointer-events: none;
    z-index: 1;
    will-change: opacity, transform;
}

/* Slide sebelumnya tetap bertahan di bawah (z-index: 1) saat slide aktif baru memudar di atasnya */
.hero-slide.prev-active {
    opacity: 1;
    z-index: 1;
    transform: scale(1.06);
}

/* Slide aktif tampil secara mulus di lapisan paling atas (z-index: 2) */
.hero-slide.active {
    opacity: 1;
    transform: scale(1.06);
    z-index: 2;
    transition: opacity 1.1s ease-in-out, transform 5.5s ease-out;
}

/* Fallback tanpa JS atau jika hanya ada 1 slide */
.hero-slides[data-slide-count="1"] .hero-slide {
    opacity: 1 !important;
    transform: scale(1.04) !important;
    transition: none !important;
    z-index: 2 !important;
}

/* Atmospheric Calm Dark Overlay (seperti mtsn3acehbarat.sch.id) */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(5, 26, 16, 0.72) 0%,
        rgba(6, 32, 20, 0.78) 50%,
        rgba(3, 17, 10, 0.88) 100%
    );
}

/* Radial Glow Accent */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(45% 55% at 15% 30%, rgba(18, 138, 80, 0.28) 0%, transparent 70%),
                radial-gradient(40% 50% at 85% 75%, rgba(229, 169, 59, 0.18) 0%, transparent 70%);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(229, 169, 59, 0.2);
    color: #ffd885;
    border: 1px solid rgba(229, 169, 59, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 30px;
    padding: 5px 14px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.9rem !important;
}

.hero-title {
    font-size: clamp(2rem, 2.65vw, 2.65rem);
    line-height: 1.15;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem !important;
}

.hero-title .text-gold {
    color: #f6c05d !important;
    text-shadow: 0 2px 20px rgba(229, 169, 59, 0.45);
}

.hero-desc {
    font-size: 0.92rem;
    color: rgba(241, 245, 249, 0.9);
    line-height: 1.55;
    max-width: 540px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.35rem !important;
}

/* Modern Hero Buttons */
.btn-hero-primary {
    background: linear-gradient(135deg, #e5a93b 0%, #c68923 100%);
    color: #111827 !important;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 9px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(229, 169, 59, 0.35);
    border: none;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}
.btn-hero-primary:hover {
    background: linear-gradient(135deg, #f6c05d 0%, #d4952d 100%);
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 169, 59, 0.45);
}

.btn-hero-ghost {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}
.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.75);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.hero-card {
    background: rgba(7, 30, 18, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    position: relative;
    padding: 16px 18px;
    max-width: 390px;
    margin-left: auto;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-emerald));
}

/* Slide Progress Indicators */
.hero-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 6px;
    align-items: center;
}
.hero-dot {
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
}
.hero-dot.active {
    background: var(--accent-gold);
    width: 36px;
}

/* STATS DALAM ANGKA SECTION & COMPACT CARDS */
.section-stats-angka {
    background-color: #f1f5f3;
    position: relative;
    border-top: 1px solid rgba(11, 102, 59, 0.08);
    border-bottom: 1px solid rgba(11, 102, 59, 0.08);
}

.stat-card-compact {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(11, 102, 59, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.stat-card-compact:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(11, 102, 59, 0.12);
    border-color: rgba(11, 102, 59, 0.35);
}

.stat-card-compact .stat-icon-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

.stat-card-compact:hover .stat-icon-wrap {
    transform: scale(1.1);
}

/* Individual Icon Palette & Top Hover Bars */
.stat-card-students .stat-icon-wrap {
    background: rgba(11, 102, 59, 0.12);
    color: var(--primary-emerald);
}
.stat-card-students:hover::before {
    background: var(--primary-emerald);
}

.stat-card-teachers .stat-icon-wrap {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}
.stat-card-teachers:hover::before {
    background: #0284c7;
}

.stat-card-classes .stat-icon-wrap {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}
.stat-card-classes:hover::before {
    background: #7c3aed;
}

.stat-card-accreditation .stat-icon-wrap {
    background: rgba(229, 169, 59, 0.18);
    color: #b45309;
}
.stat-card-accreditation:hover::before {
    background: var(--accent-gold);
}

.stat-card-compact .stat-body {
    flex-grow: 1;
    min-width: 0;
}

.stat-card-compact .stat-number {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 2px;
    display: block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-card-compact .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.25;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
    .stat-card-compact {
        padding: 12px 10px;
        gap: 10px;
        border-radius: 12px;
    }
    .stat-card-compact .stat-icon-wrap {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
        border-radius: 9px;
    }
    .stat-card-compact .stat-number {
        font-size: 1.25rem;
    }
    .stat-card-compact .stat-label {
        font-size: 0.72rem;
        white-space: normal;
    }
}

/* STATS COUNTER STRIP & ANIMATION RULES */
.stats-strip {
    margin-top: 0;
    padding-top: 30px;
    position: relative;
    z-index: 10;
}
.stat-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px 18px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}
.stat-number.stat-pulse-done {
    transform: scale(1.08);
    color: var(--primary-emerald);
}
.stat-number.stat-number-pop {
    animation: statPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes statPopIn {
    0% {
        opacity: 0.3;
        transform: scale(0.65);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* SECTION TITLES */
.section-tag {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-emerald);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 6px;
    background: rgba(11, 102, 59, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}
.section-heading {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.heading-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-emerald), var(--accent-gold));
    border-radius: 2px;
    margin-top: 8px;
}

/* SAMBUTAN KEPALA MADRASAH */
.sambutan-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.kepsek-photo-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.kepsek-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: rgba(7, 56, 32, 0.88);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
}
.quote-icon {
    font-size: 2.5rem;
    color: rgba(229, 169, 59, 0.35);
}

/* CARDS: BERITA, GURU, GALERI */
.article-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(11, 102, 59, 0.25);
}
.article-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #e2e8f0;
    overflow: hidden;
}
.article-img-wrap img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-card:hover .article-img-wrap img {
    transform: scale(1.06);
}
.article-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    letter-spacing: 0.04em;
}

/* GURU CARD */
.guru-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: var(--transition-smooth);
    text-align: center;
}
.guru-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-emerald);
}
.guru-avatar-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 24px auto 14px;
    overflow: hidden;
    border: 4px solid var(--accent-gold-light);
    box-shadow: var(--shadow-sm);
}
.guru-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* GALERI CARD */
.gallery-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.gallery-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 */
    overflow: hidden;
}
.gallery-img-wrap img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(7, 56, 32, 0.9) 0%, rgba(7, 56, 32, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

/* FOOTER */
.footer-section {
    background: linear-gradient(180deg, #073820 0%, #052615 100%);
    border-top: 4px solid var(--accent-gold);
}
.footer-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}
.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}
.footer-social-btn:hover {
    background: var(--accent-gold);
    color: #052615;
    transform: translateY(-3px);
}

/* BACK TO TOP BUTTON */
#btnBackToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 46px;
    height: 46px;
    display: none;
    z-index: 999;
    border: none;
}

/* LIGHTBOX MODAL */
#lightboxModal .modal-content {
    background: transparent;
    border: none;
}
#lightboxModal .modal-body {
    padding: 0;
    position: relative;
    text-align: center;
}
#lightboxModal img {
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ARTIKEL BERITA & GAMBAR EMBED */
.article-body {
    word-break: break-word;
}
.article-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.article-body img:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.article-body figure {
    margin: 1.75rem 0;
    text-align: center;
}
.article-body figcaption,
.article-body .article-img-caption {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
}
.article-body .float-start,
.article-body img.float-start,
.article-body .img-left {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0 !important;
    max-width: 48% !important;
}
.article-body .float-end,
.article-body img.float-end,
.article-body .img-right {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem !important;
    max-width: 48% !important;
}
@media (max-width: 768px) {
    .article-body .float-start,
    .article-body img.float-start,
    .article-body .img-left,
    .article-body .float-end,
    .article-body img.float-end,
    .article-body .img-right {
        float: none !important;
        margin: 1.25rem auto !important;
        max-width: 100% !important;
    }
}

/* GALERI DOKUMENTASI PADA ARTIKEL */
.gallery-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}
.gallery-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 102, 59, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.gallery-item-card:hover .gallery-hover-overlay {
    opacity: 1;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.2rem;
    }
}
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
}

