@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
    --gold: #D4A017;
    --gold-light: #F5D568;
    --gold-dark: #B8860B;
    --gold-50: #FFFBEB;
    --gold-100: #FEF3C7;
    --gold-200: #FDE68A;
    --gold-500: #D4A017;
    --gold-600: #C5920E;
    --gold-700: #A57B0B;
    --gold-gradient: linear-gradient(135deg, #D4A017 0%, #F5D568 50%, #D4A017 100%);
    --gold-gradient-hover: linear-gradient(135deg, #F5D568 0%, #D4A017 50%, #F5D568 100%);
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --dark: #1C1108;
    --cream: #FFFBEB;
    --cream-dark: #FEF3C7;
    --green: #059669;
    --green-light: #10B981;
    --text: #374151;
    --text-light: #6B7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 10px 40px -10px rgba(212, 160, 23, 0.35);
    --border: 1px solid var(--gray-200);
    --border-gold: 1px solid var(--gold-200);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    /* Make room for bottom nav */
    body { padding-bottom: 92px; }
}

html {
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 3000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--border);
    transition: var(--transition);
}

/* Ensure hero slider never overlays the fixed navbar */
.hero,
.hero-slider,
.slider-track,
.slide,
.slide-bg,
.slide-overlay {
    z-index: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gold-gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.25);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
}

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--gray-900);
    font-weight: 700;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-700);
    background: var(--gold-50);
}

.nav-cta {
    background: var(--gold-gradient) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    margin-left: 0.75rem;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.25);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.hamburger:hover {
    background: var(--gray-100);
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
    background: #000;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
    transform: scale(1);
    filter: brightness(0.8);
}

.slide-bg.active {
    opacity: 0.5;
    animation: slowZoom 6s ease forwards;
}

@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 10, 5, 0.75) 0%,
        rgba(15, 10, 5, 0.55) 40%,
        rgba(15, 10, 5, 0.35) 70%,
        rgba(180, 134, 11, 0.15) 100%
    );
    z-index: 1;
}


.slide-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(0, 0, 0, 0.08) 100%);
}

.slide-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(212, 160, 23, 0.1) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

.hero-content {
    max-width: 1280px;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--white);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(212, 160, 23, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 160, 23, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 0.875rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hero-image {
    position: relative;
}

.hero-image-cover {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(212, 160, 23, 0.35);
    box-shadow: var(--shadow-xl), 0 18px 45px -20px rgba(212, 160, 23, 0.45);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s ease, transform .35s ease;
}

.hero-image-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.12) 0%, rgba(245, 213, 104, 0.06) 100%);
}

.hero-image-cover::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: calc(var(--radius-xl) - 10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Keep placeholder hidden if cover is present */
.hero-image .hero-image-placeholder { display: none; }

.slide.active .hero-image-cover {
    opacity: 1;
    transform: translateY(0);
}

.hero-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.2) 0%, rgba(245, 213, 104, 0.1) 100%);
}

.hero-image-placeholder::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: calc(var(--radius-xl) - 8px);
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: float 4s ease-in-out infinite;
    border: var(--border);
}

.floating-card.card-1 {
    top: 10%;
    right: -40px;
}

.floating-card.card-2 {
    bottom: 15%;
    left: -40px;
    animation-delay: 1.5s;
}

.floating-card .icon {
    width: 44px;
    height: 44px;
    background: var(--gold-50);
    border: var(--border-gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.floating-card .text h4 {
    font-size: 0.95rem;
    color: var(--gray-900);
    font-weight: 700;
}

.floating-card .text span {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    overflow: visible;
    z-index: 5;
}

.slider-track {
    position: relative;
    z-index: 20;
}

.slide {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateX(20px);
    position: relative;
    z-index: 20;
}

.slider-track {
    position: relative;
}

.slide {
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateX(20px);
}

.slide.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.hero-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(212, 160, 23, 0.25);
    color: var(--gold-light);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 160, 23, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.hero-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.hero-text h3 {
    font-size: 1.25rem;
    color: var(--gold-100);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.6;
    text-shadow: 
        -1px -1px 0 rgba(0, 0, 0, 0.5),
        1px 1px 2px rgba(0, 0, 0, 0.8);
}

.hero-text p {
    font-size: 1.05rem;
    color: var(--white);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 520px;
    font-weight: 500;
    text-shadow: 
        -1px -1px 0 rgba(0, 0, 0, 0.4),
        1px 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-text h2 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

.hero-text p {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 520px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    opacity: 0.92;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    color: var(--gold-700);
    padding: 0.875rem 2rem;
    border: 2px solid var(--white);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--white);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.slide.active .hero-badge {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.slide.active .hero-text h2 {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.slide.active .hero-text h3 {
    animation: fadeInUp 0.6s ease 0.4s both;
}

.slide.active .hero-text p {
    animation: fadeInUp 0.6s ease 0.5s both;
}

.slide.active .hero-buttons {
    animation: fadeInUp 0.6s ease 0.6s both;
}

.slide.active .hero-image {
    animation: fadeInRight 0.7s ease 0.4s both;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.slider-arrow {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gold-700);
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
}

.slider-arrow:hover {
    background: var(--white);
    color: var(--gold-700);
    border-color: var(--white);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.slider-prev {
    margin-left: -26px;
}

.slider-next {
    margin-right: -26px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--white);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-dot:hover {
    background: var(--white);
}

.slider-dot.active {
    background: var(--white);
    border-color: var(--white);
    width: 40px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stats Section */
.stats {
    padding: 2.5rem 1.5rem;
    background: var(--white);
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-200), transparent);
}

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-card {
    text-align: right;
    padding: 1.3rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
    border: var(--border);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    flex: 0 1 180px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 0 0 2px 2px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-200);
    background: var(--gold-50);
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: var(--gold-50);
    border: var(--border-gold);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .7rem;
    font-size: 1.2rem;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    background: var(--gold-gradient);
    border-color: transparent;
    transform: scale(1.1);
}

.stat-card h3 {
    font-size: 1.6rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-card p {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.8rem;
}

/* Section Common Styles */
.section {
    padding: 7rem 2rem;
}

.berita-section {
    padding-top: 0;
    padding-bottom: 0;
}

.tahfidz-section {
    background: var(--white);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.tahfidz-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
}

.tahfidz-card {
    position: relative;
    display: grid;
    gap: .85rem;
    padding: 1.1rem;
    border: 1px solid rgba(212, 160, 23, .22);
    border-radius: 28px;
    background: linear-gradient(180deg, #fff 0%, var(--gold-50) 100%);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.tahfidz-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 88px;
    background: var(--gold-gradient);
    opacity: .92;
}

.tahfidz-card-top {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: .5rem;
    padding-top: .35rem;
}

.tahfidz-detail-toggle {
    position: relative;
    z-index: 1;
    display: grid;
    gap: .85rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.tahfidz-detail-toggle:hover .tahfidz-avatar {
    transform: translateY(-2px);
}

.tahfidz-avatar {
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--white);
    color: var(--gold-700);
    border: 4px solid rgba(255,255,255,.85);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .16);
    font-weight: 900;
    font-size: 1.8rem;
}

.tahfidz-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--gold-700);
    font-size: .76rem;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.tahfidz-info {
    position: relative;
    z-index: 1;
    text-align: center;
}

.tahfidz-detail {
    position: relative;
    z-index: 1;
}

.tahfidz-info h3 {
    margin: 0 0 .25rem;
    color: var(--gray-900);
    font-size: 1.05rem;
    line-height: 1.25;
}

.tahfidz-class {
    color: var(--gold-700);
    font-weight: 700;
    font-size: .8rem;
    margin-bottom: .65rem;
}

.tahfidz-meta {
    display: flex;
    justify-content: center;
    gap: .45rem;
    flex-wrap: wrap;
    color: var(--gray-600);
    font-size: .78rem;
    line-height: 1.45;
    margin-bottom: .8rem;
}

.tahfidz-meta span {
    padding: .25rem .5rem;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.tahfidz-validated-list {
    margin-bottom: .85rem;
    padding: .75rem;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-size: .78rem;
    line-height: 1.45;
    text-align: left;
}

.tahfidz-validated-list > div {
    font-weight: 800;
    margin-bottom: .25rem;
}

.tahfidz-detail-sticky-head {
    position: sticky;
    top: 3.75rem;
    z-index: 7;
    margin: -.75rem -.75rem .65rem;
    padding: .75rem .75rem .65rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 400;
}

.tahfidz-detail-sticky-head > div {
    margin-bottom: .45rem;
    font-weight: 800;
}

.tahfidz-validated-list ul {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: .25rem;
}

.tahfidz-validated-items {
    display: grid;
    gap: .65rem;
}

.validated-surah-filter {
    width: 100%;
    margin: .35rem 0 .65rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: .55rem .65rem;
    font: inherit;
    font-size: .82rem;
    background: var(--white);
}

.tahfidz-validated-item {
    padding: .65rem .75rem;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--gray-50);
    display: grid;
    gap: .25rem;
}

.tahfidz-validated-item strong {
    color: var(--gray-900);
}

.tahfidz-progress-row {
    display: grid;
    gap: .3rem;
}

.tahfidz-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--gray-200);
    overflow: hidden;
}

.tahfidz-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gold-gradient);
}

.tahfidz-validated-list small {
    color: var(--gray-500);
    font-size: .72rem;
}

.tahfidz-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hafalan-request-modal {
    z-index: 5010;
}

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

.tahfidz-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(5px);
}

.tahfidz-modal-panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(82vh, 720px);
    overflow: auto;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    padding: 1.25rem 1.25rem 0;
}

.tahfidz-floating-request {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 1rem -1.25rem 0;
    padding: .85rem 1.25rem 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.72), var(--white) 42%);
    border-top: 1px solid var(--gray-200);
}

.tahfidz-floating-request .tahfidz-request-toggle {
    width: 100%;
}

.tahfidz-modal-panel h3 {
    position: sticky;
    top: 0;
    z-index: 8;
    margin: -1.25rem -1.25rem 1rem;
    padding: 1.25rem 3.5rem .85rem 1.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-900);
    font-size: 1.2rem;
}

.hafalan-request-panel {
    width: min(480px, 100%);
    min-height: 260px;
    max-height: min(90vh, 760px);
}

.hafalan-request-panel .tahfidz-modal-close {
    top: .75rem;
    right: .75rem;
}

.tahfidz-modal-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.tahfidz-hafalan {
    color: var(--gray-600);
    font-size: .85rem;
    line-height: 1.5;
}

.tahfidz-hafalan ul {
    margin: 0;
    padding-left: 1rem;
}

.hafalan-request-form {
    margin-top: .85rem;
    display: grid;
    gap: .75rem;
    padding-bottom: 1rem;
}

.tahfidz-request-toggle {
    justify-content: center;
    width: 100%;
    padding: .62rem .8rem;
    font-size: .8rem;
}

.hafalan-request-label {
    color: var(--gray-700);
    font-size: .78rem;
    font-weight: 700;
}

.hafalan-request-empty {
    padding: .65rem .75rem;
    border-radius: 12px;
    background: var(--gold-50);
    color: var(--gold-800);
    font-size: .78rem;
    font-weight: 700;
}

.hafalan-request-row {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: .45rem;
}

.hafalan-request-form select,
.hafalan-request-form input,
.hafalan-request-form textarea {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: .72rem .75rem;
    font: inherit;
    font-size: .78rem;
    background: var(--white);
}

.hafalan-request-form textarea {
    resize: vertical;
}

.hafalan-request-form .btn-primary {
    justify-content: center;
    padding: .78rem .9rem;
    font-size: .78rem;
}

.berita-section .programs-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(220px, 1fr);
    grid-auto-rows: auto;
    align-items: start;
    column-gap: 1rem;
    row-gap: 1.6rem;
}

.berita-section .berita-headline {
    grid-column: 1;
    grid-row: 1 / span 5;
}

.berita-section .berita-headline .program-icon {
    height: 320px;
}

.berita-section .berita-small {
    grid-column: 2;
}

.berita-lainnya-title {
    grid-column: 2;
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0 0 -.6rem;
}

.berita-section .berita-headline .program-content {
    padding: 1.25rem;
}

.berita-section .berita-headline .program-content p {
    font-size: .95rem;
    line-height: 1.7;
}

.berita-headline-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: .85rem 1rem;
    background: rgba(0, 0, 0, .22);
    color: var(--white);
    text-align: left;
}

.berita-headline-overlay .program-title {
    margin: 0 0 .35rem;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    font-size: 1rem !important;
    font-weight: 500;
    opacity: .82;
    text-align: left;
}

.berita-headline-overlay p {
    margin: 0 0 .45rem;
    color: rgba(255,255,255,.92);
    font-size: .82rem;
    line-height: 1.45;
}

.berita-headline-overlay .program-link {
    color: var(--white);
    font-size: .82rem;
}

.berita-section .berita-small .program-icon {
    height: 135px;
}

.berita-section .berita-small {
    min-height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: start;
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    transition: none;
    gap: .5rem;
}

.berita-small-image {
    flex: 0 0 58px;
    width: 58px;
    height: 44px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
}

.berita-small-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    font-size: 1.2rem;
}

.berita-section .berita-small::before {
    display: none;
}

.berita-section .berita-small:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    background: transparent;
}

.berita-small-title {
    color: var(--gray-900);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.35;
    font-size: .9rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-section .berita-small .program-content {
    padding: .85rem;
}

.berita-section .berita-small .program-content p {
    font-size: .75rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-section .berita-small .program-link {
    font-size: .78rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section-header .badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--gold-50);
    color: var(--gold-700);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: var(--border-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-500);
    line-height: 1.7;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* Programs Section */
.programs {
    background: var(--gray-50);
    position: relative;
    padding-top: .5rem;
}

.programs-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.program-slider {
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
}

.programs .programs-grid {
    max-width: none;
    margin: 0;
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    width: max-content;
    gap: 4ch;
    animation: programSlideLeft 45s linear infinite;
    will-change: transform;
}

.programs .programs-grid:hover {
    animation-play-state: paused;
}

.programs .program-card {
    flex: 0 0 345px;
}

@keyframes programSlideLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.program-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: var(--border);
    position: relative;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--gold-200);
}

.program-card:hover::before {
    transform: scaleX(1);
}

.program-icon {
    height: 165px;
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--gold-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.65rem;
    position: relative;
    overflow: hidden;
}

.program-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.18) 58%, rgba(0,0,0,.78) 100%);
    z-index: 1;
}

.program-icon::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 2px dashed rgba(212, 160, 23, 0.2);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.program-card:hover .program-icon::after {
    border-color: rgba(212, 160, 23, 0.4);
}

.program-content {
    padding: .9rem .95rem;
}

.program-content h3 {
    font-size: 1rem;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.program-title {
    min-height: 3.6em;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-title-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: .55rem .75rem;
    border-radius: 0;
    background: rgba(0, 0, 0, .10);
    opacity: .82;
    color: var(--white) !important;
    -webkit-text-fill-color: var(--white) !important;
    font-size: 1rem !important;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: .01em;
    text-shadow: 0 2px 6px rgba(0,0,0,.9), 0 0 1px rgba(0,0,0,1);
    min-height: 0;
}

.program-location {
    min-height: 2.8em;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.program-meta {
    display: grid;
    gap: .2rem;
    margin-bottom: .45rem;
    color: var(--gray-600);
    font-size: .7rem;
}

.program-content p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.92rem;
}

.program-link {
    color: var(--gold-600);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.program-link:hover {
    gap: 0.75rem;
    color: var(--gold-700);
}

/* Features Section */
.features {
    background: var(--white);
}

.features-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    transition: var(--transition);
    text-align: center;
    border: var(--border);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

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

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--white);
    border: var(--border-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    background: var(--gold-gradient);
    border-color: transparent;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.3);
}

.feature-card h3 {
    font-size: 1.15rem;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--gray-500);
    line-height: 1.7;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* Gallery Section */
.gallery {
    background: var(--gray-50);
}

.gallery-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    height: 260px;
    background: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-200) 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: var(--transition);
    border: var(--border-gold);
}

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

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

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; height: auto; }

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(28, 17, 8, 0.7) 100%);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: var(--white);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1rem;
    font-weight: 600;
}

/* Testimonials */
.testimonials {
    background: var(--white);
}

.testimonials-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--gray-50);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    position: relative;
    border: var(--border);
    transition: var(--transition);
}

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

.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    opacity: 0.3;
}

.testimonial-text {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: var(--border);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    background: var(--gold-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.25);
}

.testimonial-info h4 {
    color: var(--gray-900);
    font-size: 0.95rem;
    font-weight: 700;
}

.testimonial-info span {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
}

/* CTA Section */
.cta {
    padding: 7rem 2rem;
    background: var(--gray-900);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(212, 160, 23, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(245, 213, 104, 0.1) 0%, transparent 50%);
}

.cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cta h2 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta p {
    font-size: 1.2rem;
    color: var(--gray-400);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-white {
    background: var(--white);
    color: var(--gray-900);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Footer */
.footer {
    background: var(--gray-950);
    color: var(--white);
    padding: 5rem 2rem 2rem;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

/* Brand colors for social icons */
.footer-social a[aria-label="Facebook"] { color: #1877F2; }
.footer-social a[aria-label="Instagram"] { color: #E1306C; }
.footer-social a[aria-label="YouTube"] { color: #FF0000; }
.footer-social a[aria-label="X"] { color: #E5E7EB; }
.footer-social a[aria-label="TikTok"] { color: #25F4EE; }
.footer-social a[aria-label="LinkedIn"] { color: #0A66C2; }

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.footer-social a:hover {
    background: var(--gold-gradient);
    border-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--gold-400);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
    font-size: 0.95rem;
}

.footer-contact .icon {
    color: var(--gold-400);
    margin-top: 2px;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Page Header (for inner pages) */
.page-header {
    padding: 10rem 2rem 5rem;
    background: linear-gradient(180deg, var(--gold-50) 0%, var(--white) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(212, 160, 23, 0.1) 1px, transparent 0);
    background-size: 40px 40px;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
}

.breadcrumb {
    display: inline-flex;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.9rem;
    position: relative;
}

.breadcrumb a {
    color: var(--gold-600);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--gold-700);
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Contact Page */
.contact-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem 2rem;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: var(--transition);
    border: var(--border);
}

.contact-info-card:hover {
    border-color: var(--gold-200);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.contact-icon {
    width: 52px;
    height: 52px;
    background: var(--gold-50);
    border: var(--border-gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-info-card:hover .contact-icon {
    background: var(--gold-gradient);
    border-color: transparent;
}

.contact-details h4 {
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.contact-details p {
    color: var(--gray-500);
    font-size: 0.9rem;
    line-height: 1.6;
}

.map-container {
    height: 280px;
    background: var(--gray-100);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: var(--border);
}

/* Steps (Pendaftaran) */
.steps {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    border: var(--border);
    transition: var(--transition);
    min-width: 180px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-300);
    font-size: 1.5rem;
    font-weight: 300;
}

.step:hover {
    border-color: var(--gold-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gold-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

.step h4 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.step p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    border: var(--border);
    background: var(--white);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.filter-btn:hover {
    border-color: var(--gold-300);
    color: var(--gold-700);
}

.filter-btn.active {
    background: var(--gold-gradient);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 3rem;
    background: var(--gold-50);
    border-radius: var(--radius-xl);
    border: var(--border-gold);
}

.success-message h3 {
    color: var(--green);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.success-message p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .floating-card.card-1 { right: -20px; }
    .floating-card.card-2 { left: -20px; }
    
    .slider-controls {
        display: none;
    }
    
    .programs-grid,
    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-item:nth-child(1) {
        grid-column: span 2;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Mobile drawer menu uses .nav-links.active toggled by .hamburger click */
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.25rem;
        gap: 0.5rem;
        width: 100vw;
        border-left: 0;
        box-shadow: var(--shadow-xl);
        transform: translateX(110%);
        transition: var(--transition);
        overflow-y: auto;
        z-index: 4000;
        pointer-events: none;
    }

    /* Empty space at top of mobile menu */
    .nav-links::before {
        content: '';
        display: block;
        height: 12px;
    }
    
    .nav-links.active {
        transform: translateX(0);
        pointer-events: auto;
    }
    
    .nav-links a {
        padding: 1rem;
        font-size: 1rem;
        text-align: center;
    }
    
    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .hamburger {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: 8rem 1.5rem 4rem;
    }
    
    .hero-slider {
        padding: 2rem 1rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-image {
        display: none;
    }
    
    .slider-dots {
        margin-top: 2rem;
    }
    
    .stats-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        justify-items: center;
    }
    
    .stat-card {
        padding: 0.9rem 0.6rem;
        min-width: 0;
        width: 100%;
        max-width: 140px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .stat-icon {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }
    
    .stat-card h3 {
        font-size: 1.15rem;
    }
    
    .stat-card p {
        font-size: 0.75rem;
    }
    
    .programs-grid,
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
        height: 260px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .form-container {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer {
        padding-top: 10px !important;
        padding-bottom: 0 !important;
        font-size: 1.5em;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .footer-bottom p {
        display: block;
        width: 100%;
        margin: 0 0 .35rem;
        line-height: 1.35;
    }

    .footer-bottom p:last-child {
        margin-bottom: 0;
    }

    .footer-copyright span {
        display: block;
    }
    
    .section-header h2,
    .page-header h1 {
        font-size: 2rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
    
    .steps {
        gap: 1rem;
    }
    
    .step {
        min-width: 140px;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .section {
        padding: 4rem 1rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .stats-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        justify-items: center;
    }
    .stat-card {
        padding: 0.7rem 0.4rem;
        min-width: 0;
        width: 100%;
        max-width: 120px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .stat-card h3,
    .stat-card p,
    .stat-icon {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-500);
}

/* Selection */
::selection {
    background: var(--gold-200);
    color: var(--gray-900);
}

/* Gallery Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    cursor: default;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-caption {
    text-align: center;
    color: white;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.lightbox-counter {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .lightbox-content img {
        max-height: 80vh;
        border-radius: var(--radius);
    }
}

/* Partners/Kerjasama Section - force one horizontal row */
.kerjasama {
    background: var(--white);
    padding: .25rem 0;
}

.partners-grid {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.partner-card {
    flex: 0 0 120px !important;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 120px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 3.75rem;
    transition: var(--transition);
}

.partner-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-info {
    display: none !important;
}

@media (max-width: 768px) {
    .tahfidz-section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .tahfidz-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .tahfidz-card {
        border-radius: 22px;
    }

    .berita-section .programs-grid {
        display: grid !important;
        grid-template-columns: 1fr;
        column-gap: .75rem !important;
        row-gap: .8rem !important;
        overflow-x: visible;
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .berita-section .berita-headline {
        grid-column: 1;
        grid-row: auto;
        order: 1;
        flex: none !important;
        width: 100%;
        max-width: 100%;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 14px 38px rgba(15,23,42,.12);
        box-sizing: border-box;
    }

    .berita-section .berita-small {
        grid-column: 1;
        order: 2;
        flex: none !important;
        display: block;
        padding: .78rem .9rem;
        border: 1px solid rgba(148,163,184,.22);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(15,23,42,.07);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .berita-lainnya-title {
        grid-column: 1;
        order: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin: .15rem 0 .25rem;
        padding: .65rem .85rem;
        border-radius: 999px;
        background: var(--gray-900);
        color: #fff;
        font-size: .92rem;
        text-align: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .berita-section .berita-headline .program-icon {
        height: 235px;
        border-radius: 20px;
        width: 100%;
        max-width: 100%;
    }

    .berita-section .berita-small .program-icon {
        height: 140px;
    }

    .berita-section .berita-small-image {
        display: none;
    }

    .berita-small-title {
        min-width: 0;
        display: block;
        font-size: .9rem;
        font-weight: 800;
        line-height: 1.35;
        -webkit-line-clamp: 3;
        padding-left: .75rem;
        border-left: 3px solid var(--gold-500);
    }

    .berita-mobile-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .45rem;
        margin: .9rem auto 0;
        padding: 0 1rem;
    }

    .berita-mobile-pagination button {
        min-width: 34px;
        height: 34px;
        padding: 0 .65rem;
        border: 1px solid rgba(148,163,184,.35);
        border-radius: 999px;
        background: #fff;
        color: var(--gray-700);
        font-weight: 900;
        cursor: pointer;
        box-shadow: 0 8px 20px rgba(15,23,42,.07);
    }

    .berita-mobile-pagination button.active {
        background: var(--gray-900);
        border-color: var(--gray-900);
        color: #fff;
    }

    .berita-mobile-pagination button:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

    .berita-headline-overlay {
        padding: .85rem;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
    }

    .berita-headline-overlay .program-title {
        font-size: .92rem !important;
        font-weight: 800;
        opacity: 1;
        line-height: 1.25;
    }

    .berita-headline-overlay p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: .76rem;
    }

    @media (max-width: 420px) {
        .berita-section .berita-small {
            padding: .62rem;
            border-radius: 14px;
        }

        .berita-section .berita-small-image {
            display: none;
        }

        .berita-small-title {
            font-size: .82rem;
            -webkit-line-clamp: 3;
        }

        .berita-section .berita-headline .program-icon {
            height: 210px;
            border-radius: 16px;
        }

        .berita-section .berita-headline {
            border-radius: 16px;
        }
    }

    .program-slider {
        max-width: 100vw;
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .programs .programs-grid {
        gap: 4ch;
        animation-duration: 38s;
    }

    .programs .program-card {
        flex-basis: 59vw;
        max-width: 345px;
    }

    .kerjasama {
        padding: .15rem 0;
        min-height: auto;
        overflow: hidden;
    }

    .partners-grid {
        justify-content: flex-start;
        gap: .5rem;
        width: 100vw;
        max-width: 100vw;
        margin-left: 50%;
        transform: translateX(-50%);
        padding: 0 .75rem;
        scrollbar-width: none;
    }

    .partners-grid::-webkit-scrollbar {
        display: none;
    }

    .partner-card {
        flex-basis: 90px !important;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        height: 70px;
        font-size: 3rem;
    }
}
