/* Pondok Pesantren Al-Amien Kediri - Premium Stylesheet */

/* 1. DESIGN SYSTEM VARIABLES */
:root {
    /* Color Palette (Light Theme - Emerald & Gold Editorial) */
    --primary: hsl(164, 85%, 13%);        /* Deep Rich Emerald */
    --primary-light: hsl(164, 60%, 24%);  /* Mid Emerald */
    --primary-ultra-light: hsl(164, 30%, 94%); /* Very Soft Emerald Background */
    --accent: hsl(38, 85%, 50%);         /* Warm Gold Accent */
    --accent-hover: hsl(35, 90%, 40%);   /* Darker Gold on Hover */
    --accent-light: hsl(38, 70%, 94%);   /* Soft Gold Tint */
    --bg-cream: hsl(40, 25%, 98%);        /* Elegant Soft Cream */
    --bg-cream-dark: hsl(40, 20%, 93%);   /* Warm Cream Border/Background */
    --bg-card: hsl(0, 0%, 100%);          /* White Card Base */
    --text-dark: hsl(210, 24%, 15%);      /* Dark Slate Body text (high contrast) */
    --text-light: hsl(210, 12%, 40%);     /* Readable cool gray for metadata */
    --border-color: hsl(210, 16%, 89%);   /* Clean divider borders */
    --red-alert: hsl(0, 75%, 45%);        /* Warning/Error Red */
    --red-bg: hsl(0, 75%, 97%);           /* Light Red Alert Box */
    --gold-bg: hsl(38, 70%, 96%);          /* Light Gold Alert Box */
    
    /* Elegant Modern Shadows */
    --shadow-sm: 0 2px 8px -2px rgba(6, 78, 59, 0.05);
    --shadow-md: 0 10px 24px -6px rgba(6, 78, 59, 0.08);
    --shadow-lg: 0 20px 40px -12px rgba(6, 78, 59, 0.12);
    --shadow-premium: 0 30px 60px -15px rgba(6, 78, 59, 0.15), 0 20px 30px -15px rgba(217, 119, 6, 0.05);
    
    /* Fluid Typography (16px base, automatically scales with viewport) */
    --fs-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.825rem);
    --fs-sm: clamp(0.825rem, 0.8rem + 0.2vw, 0.925rem);
    --fs-base: clamp(0.95rem, 0.92rem + 0.3vw, 1.05rem);
    --fs-md: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
    --fs-lg: clamp(1.2rem, 1.15rem + 0.5vw, 1.35rem);
    --fs-xl: clamp(1.35rem, 1.25rem + 0.8vw, 1.65rem);
    --fs-xxl: clamp(1.65rem, 1.5rem + 1.2vw, 2.2rem);
    --fs-3xl: clamp(2rem, 1.8rem + 2vw, 3rem);
    --fs-4xl: clamp(2.5rem, 2.2rem + 3.5vw, 4.5rem);

    /* Fonts styling */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-arabic: 'Amiri', serif;
    
    /* Layout Elements */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 28px;
    --transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables (Slate Dark Aesthetic) */
[data-theme="dark"] {
    --primary: hsl(164, 75%, 42%);        /* Radiant Emerald */
    --primary-light: hsl(164, 65%, 48%);  /* Shimmering Emerald */
    --primary-ultra-light: hsl(164, 40%, 12%); /* Deep Emerald Underlay */
    --accent: hsl(38, 90%, 55%);         /* Luminous Gold */
    --accent-hover: hsl(38, 95%, 62%);
    --accent-light: hsl(38, 25%, 15%);
    --bg-cream: hsl(220, 24%, 7%);        /* Velvet Slate Black */
    --bg-cream-dark: hsl(220, 28%, 5%);   /* Pitch Carbon */
    --bg-card: hsl(220, 20%, 12%);        /* Soft Carbon Gray */
    --text-dark: hsl(220, 14%, 93%);      /* Soft Premium White */
    --text-light: hsl(220, 10%, 68%);     /* Muted Cool Gray */
    --border-color: hsl(220, 15%, 20%);
    --red-alert: hsl(0, 85%, 60%);
    --red-bg: hsl(0, 30%, 12%);
    --gold-bg: hsl(38, 30%, 12%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
    --shadow-premium: 0 30px 60px rgba(0, 0, 0, 0.7);
}

/* 2. BASE RESET & SCROLLBAR */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background-color: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    border: 3px solid var(--bg-cream);
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-light);
}

/* Scroll progress indicator */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    z-index: 9999;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.1, 0.8, 0.3, 1);
    box-shadow: 0 0 8px var(--accent);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

h1, h2 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

h3, h4, h5, h6 {
    font-family: var(--font-sans);
}

p {
    margin-bottom: 1.25rem;
}

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

/* Highlight Text Mark Style (Search matches) */
.highlight-mark {
    background-color: rgba(245, 158, 11, 0.22);
    border-bottom: 2px solid var(--accent);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: inherit;
}

/* 3. LAYOUT UTILITIES & CARDS */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

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

.align-start {
    align-items: flex-start;
}

.section-padding {
    padding: var(--space-xl) 0;
}

:root {
    --space-xs: clamp(0.5rem, 1vw, 0.75rem);
    --space-sm: clamp(1rem, 2vw, 1.5rem);
    --space-md: clamp(1.75rem, 3.5vw, 2.5rem);
    --space-lg: clamp(3rem, 5vw, 4.5rem);
    --space-xl: clamp(4.5rem, 8vw, 7.5rem);
}

.text-center-wrapper {
    max-width: 750px;
    margin: 0 auto clamp(2rem, 4vw, 3.5rem) auto;
}

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

.text-lead {
    font-size: var(--fs-md);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.section-tagline {
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
    text-align: inherit;
}

.section-heading {
    font-size: var(--fs-3xl);
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtext {
    font-size: var(--fs-md);
    color: var(--text-light);
}

/* Premium Card Base */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(20px, 4vw, 36px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: hsla(164, 60%, 24%, 0.12);
}

.bg-accent-light {
    background-color: var(--accent-light);
    border-color: hsla(38, 85%, 50%, 0.18);
}

[data-theme="dark"] .bg-accent-light {
    background-color: var(--accent-light);
    border-color: hsla(38, 85%, 50%, 0.1);
}

.bg-cream-dark {
    background-color: var(--bg-cream-dark);
}

/* 4. BUTTONS & UI COMPONENTS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-sm);
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
    text-align: center;
    box-shadow: var(--shadow-sm);
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px hsla(164, 85%, 13%, 0.18);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 8px 24px hsla(38, 85%, 50%, 0.18);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: var(--primary);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 16px 38px;
    font-size: var(--fs-base);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Badges */
.badge-accent {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--accent-light);
    color: var(--accent-hover);
    font-weight: 800;
    font-size: var(--fs-xs);
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

[data-theme="dark"] .badge-accent {
    color: var(--accent);
}

.badge-primary {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--primary-ultra-light);
    color: var(--primary);
    font-weight: 800;
    font-size: var(--fs-xs);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 5. MAIN NAVIGATION & HEADER (Glassmorphic) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(250, 247, 242, 0.85); /* Transparent cream */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="dark"] .main-header {
    background-color: rgba(10, 16, 28, 0.82);
}

.main-header.scrolled {
    padding: 4px 0;
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
    background-color: var(--primary-ultra-light);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid rgba(164, 85, 13, 0.1);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.05);
    background-color: var(--accent-light);
    color: var(--accent-hover);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-md);
    letter-spacing: 1.5px;
    color: var(--primary);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: var(--fs-xs);
    letter-spacing: 2px;
    color: var(--accent-hover);
    font-weight: 700;
}

[data-theme="dark"] .brand-subtitle {
    color: var(--accent);
}

.desktop-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
}

.nav-item {
    font-weight: 700;
    font-size: var(--fs-sm);
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background-color: var(--primary-ultra-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.theme-btn:hover {
    background-color: var(--primary-ultra-light);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Hamburger mobile button */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-cream);
    z-index: 999;
    padding: 120px 24px 24px 24px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav-item {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--text-dark);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
}

.mobile-nav-item:hover, .mobile-nav-item.active {
    background-color: var(--primary-ultra-light);
    color: var(--primary);
}

.mobile-cta {
    margin-top: 20px;
    width: 100%;
}

/* SPA SECTION CONFIG */
.page-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding-top: 80px; /* Offset sticky header */
}

.page-section.active-section {
    display: block;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* 6. BERANDA (HOME) STYLES */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 580px;
    max-height: 780px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomSlow 24s infinite alternate ease-in-out;
}

@keyframes zoomSlow {
    from { transform: scale(1.0); }
    to { transform: scale(1.08); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(135deg, rgba(3, 31, 23, 0.9) 0%, rgba(217, 119, 6, 0.15) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    max-width: 850px;
}

.hero-title {
    font-size: var(--fs-4xl);
    font-weight: 800;
    margin: 16px 0 24px 0;
    line-height: 1.15;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-size: var(--fs-md);
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.65;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    max-width: 680px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 4;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: clamp(30px, 5vw, 60px);
}

/* About / Welcome summary */
.summary-image-container {
    position: relative;
    padding-bottom: 20px;
}

.summary-image-container::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-light);
    border-radius: var(--radius-lg);
    z-index: 1;
    pointer-events: none;
}

.rounded-image {
    border-radius: var(--radius-lg);
    width: 100%;
    height: 480px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.est-badge {
    position: absolute;
    bottom: 0;
    right: -10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #ffffff;
    padding: 20px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: pulseGently 3s infinite alternate ease-in-out;
}

@keyframes pulseGently {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.est-badge .number {
    display: block;
    font-size: var(--fs-xxl);
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.est-badge .label {
    font-size: var(--fs-xs);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.maksud-tujuan-box {
    margin: 28px 0;
    padding: 24px;
    background-color: var(--bg-cream-dark);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent);
}

.maksud-tujuan-box h4 {
    color: var(--primary);
    margin-bottom: 14px;
    font-size: var(--fs-md);
    font-weight: 800;
}

.check-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: var(--fs-sm);
    color: var(--text-dark);
}

.check-list li i {
    color: var(--primary);
    margin-top: 4px;
    font-size: 1.05rem;
}

/* Stats section */
.stats-bar-section {
    background-color: var(--primary);
    color: #ffffff;
    padding: clamp(40px, 6vw, 64px) 0;
    border-top: 4px solid var(--accent);
    background-image: radial-gradient(circle at 10% 20%, rgba(3, 31, 23, 1) 0%, rgba(15, 23, 42, 0.6) 100%);
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-card .stat-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.stat-card .stat-number {
    font-size: var(--fs-xxl);
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    color: #ffffff;
}

.stat-card .stat-label {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Highlight Cards */
.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: hsla(164, 60%, 24%, 0.15);
}

.feature-icon {
    font-size: 2.2rem;
    color: var(--primary);
    background-color: var(--primary-ultra-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background-color: var(--accent);
    color: #ffffff;
}

.feature-card h3 {
    font-size: var(--fs-lg);
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 700;
}

.feature-card p {
    color: var(--text-light);
    font-size: var(--fs-sm);
    margin-bottom: 24px;
}

.feature-link {
    font-weight: 700;
    color: var(--accent-hover);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
}

[data-theme="dark"] .feature-link {
    color: var(--accent);
}

.feature-link:hover {
    color: var(--primary);
    gap: 10px;
}

/* Quote Section */
.quote-section {
    background-color: var(--bg-cream-dark);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.quote-icon {
    font-size: 2.5rem;
    color: var(--accent);
    opacity: 0.35;
    margin-bottom: 16px;
}

.founder-quote {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    line-height: 1.6;
    font-style: italic;
    color: var(--primary);
    max-width: 850px;
    margin: 0 auto 28px auto;
}

.founder-name {
    display: block;
    font-weight: 700;
    font-size: var(--fs-md);
    color: var(--text-dark);
    margin-bottom: 4px;
}

.founder-title {
    font-size: var(--fs-xs);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
}

/* 7. PROFIL (ABOUT) SECTION STYLES */
.page-header-bg {
    background: linear-gradient(135deg, var(--primary) 0%, hsl(164, 85%, 8%) 100%);
    color: #ffffff;
    padding: clamp(60px, 8vw, 96px) 0;
    border-bottom: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.page-header-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.header-content {
    max-width: 800px;
}

.header-content h1 {
    font-size: var(--fs-3xl);
    margin-bottom: 12px;
}

.header-content p {
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
}

/* Profil Tabs */
.profil-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.tab-nav-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--text-light);
    cursor: pointer;
    border-radius: 50px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-nav-btn:hover {
    color: var(--primary);
    background-color: var(--primary-ultra-light);
}

.tab-nav-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.profil-tab-content-wrapper {
    min-height: 250px;
}

.profil-tab-pane {
    display: none;
}

.profil-tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

.profil-tab-pane h3 {
    font-size: var(--fs-xl);
    color: var(--primary);
    margin-bottom: 18px;
    font-weight: 700;
}

/* Letak Geografis Compass Grid */
.map-borders-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow-sm);
}

.compass-title {
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.compass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 16px;
    align-items: center;
}

.compass-cell {
    background-color: var(--bg-cream-dark);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
    text-align: center;
    transition: var(--transition-fast);
}

.compass-cell:hover {
    border-color: var(--primary);
    background-color: var(--primary-ultra-light);
    transform: translateY(-2px);
}

.compass-cell p {
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}

.dir-tag {
    display: block;
    font-weight: 800;
    font-size: var(--fs-xs);
    letter-spacing: 1px;
    color: var(--accent-hover);
    margin-bottom: 6px;
}

[data-theme="dark"] .dir-tag {
    color: var(--accent);
}

.north {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.west {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.compass-center {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-core {
    background-color: var(--primary);
    color: #ffffff;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--accent);
    transition: var(--transition);
}

.center-core i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    color: var(--accent);
}

.compass-center:hover .center-core {
    transform: rotate(360deg);
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.4);
}

.east {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.south {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

/* SILSILAH / FAMILY TREE */
.silsilah-section {
    position: relative;
}

.dzuriyyah-tree-container {
    max-width: 960px;
    margin: 40px auto 0 auto;
    position: relative;
}

.tree-root-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tree-node {
    background-color: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.founder-node {
    border-color: var(--accent);
}

.founder-node .node-icon {
    background-color: var(--accent-light);
    color: var(--accent-hover);
}

[data-theme="dark"] .founder-node .node-icon {
    color: var(--accent);
}

.node-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-ultra-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
}

.node-details .node-label {
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
}

.node-details h3 {
    font-size: var(--fs-md);
    color: var(--primary);
    font-weight: 700;
}

.node-details p {
    font-size: var(--fs-xs);
    color: var(--text-light);
}

.tree-line-branch {
    width: 2px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 auto;
}

/* Wife Branch switchers */
.branch-switcher {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
}

.wife-tab-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.wife-tab-btn i {
    font-size: 1.4rem;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.wife-tab-btn strong {
    display: block;
    font-size: var(--fs-sm);
    color: var(--text-dark);
}

.wife-tab-btn span {
    font-size: var(--fs-xs);
    color: var(--text-light);
}

.wife-tab-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.wife-tab-btn.active {
    border-color: var(--primary);
    background-color: var(--primary-ultra-light);
    box-shadow: var(--shadow-md);
}

.wife-tab-btn.active i {
    color: var(--primary);
}

/* Children Cards */
.children-branch {
    display: none;
}

.children-branch.active-branch-view {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

.children-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.family-couple-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
}

.family-couple-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: hsla(164, 60%, 24%, 0.15);
}

.family-couple-card.featured-couple {
    border: 2px solid var(--accent);
    background-color: var(--gold-bg);
}

.family-couple-card .member {
    flex: 1;
}

.family-couple-card .member-tag {
    font-size: var(--fs-xs);
    font-weight: 800;
    color: var(--accent-hover);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

[data-theme="dark"] .family-couple-card .member-tag {
    color: var(--accent);
}

.family-couple-card h4 {
    font-size: var(--fs-sm);
    color: var(--primary);
    font-weight: 700;
}

.family-couple-card .spouse {
    text-align: right;
}

.family-couple-card .spouse .member-tag {
    color: var(--text-light);
}

.couple-divider {
    padding: 0 16px;
    font-size: 1.1rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-couple .couple-divider {
    color: var(--primary);
}

.card-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: var(--fs-xs);
    font-weight: 800;
    padding: 2px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.single-member {
    justify-content: center;
    text-align: center;
}

.single-member .member {
    flex: none;
}

/* 8. AKADEMIK (ACADEMICS) SECTION STYLES */
.sorogan-schedules {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.schedule-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.schedule-item-card:hover {
    border-color: var(--primary-light);
    transform: translateX(6px);
}

.sch-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-light);
    color: var(--accent-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
}

[data-theme="dark"] .sch-icon {
    color: var(--accent);
}

.sch-details h4 {
    font-size: var(--fs-sm);
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}

.sch-details .time {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-dark);
}

.kbm-meta div {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 24px;
    font-size: var(--fs-sm);
}

.kbm-meta i {
    color: var(--accent);
}

.visi-text {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-style: italic;
    color: var(--primary);
    padding-left: 16px;
    border-left: 3px solid var(--accent);
    margin: 8px 0 16px 0;
    line-height: 1.5;
}

.styled-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.styled-list li {
    font-size: var(--fs-sm);
    color: var(--text-dark);
}

/* Interactive Table Filters */
.table-filters-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-group, .search-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 280px;
}

.table-filters-container label {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--text-dark);
    white-space: nowrap;
}

.table-filters-container select, .table-filters-container input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    outline: none;
    transition: var(--transition-fast);
}

.table-filters-container select:focus, .table-filters-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ultra-light);
}

.table-responsive-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.curriculum-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 700px;
}

.curriculum-table th {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    padding: 18px 24px;
    font-size: var(--fs-sm);
    letter-spacing: 0.5px;
}

.curriculum-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-size: var(--fs-sm);
}

.curriculum-table tbody tr:last-child td {
    border-bottom: none;
}

.curriculum-table tbody tr:hover {
    background-color: var(--primary-ultra-light);
}

.fan-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: var(--accent-light);
    color: var(--accent-hover);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 4px;
    margin-bottom: 4px;
}

[data-theme="dark"] .fan-badge {
    color: var(--accent);
}

.kitab-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* 9. KEGIATAN TIMELINE STYLES */
.schedule-switcher-container {
    display: flex;
    justify-content: center;
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 50px;
    background-color: var(--bg-card);
    max-width: 650px;
    margin: 0 auto 48px auto;
    box-shadow: var(--shadow-sm);
}

.sch-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 20px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sch-tab-btn:hover {
    color: var(--primary);
}

.sch-tab-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.schedule-timeline {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

.schedule-timeline.active-schedule {
    display: block;
    animation: fadeIn 0.4s ease;
}

.timeline-wrapper {
    position: relative;
    padding-left: 36px;
}

.timeline-wrapper::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 2px;
    height: calc(100% - 24px);
    background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
}

.timeline-node {
    position: relative;
    margin-bottom: 32px;
}

.timeline-node::before {
    content: '';
    position: absolute;
    top: 6px;
    left: -33px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 3px solid var(--accent);
    z-index: 5;
    transition: var(--transition-fast);
}

.timeline-node:hover::before {
    background-color: var(--accent);
    transform: scale(1.25);
    box-shadow: 0 0 8px var(--accent);
}

.time-stamp {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: var(--fs-sm);
    color: var(--accent-hover);
    margin-bottom: 6px;
}

[data-theme="dark"] .time-stamp {
    color: var(--accent);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.timeline-node:hover .timeline-content {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.timeline-content h4 {
    font-size: var(--fs-sm);
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 700;
}

.timeline-content p {
    font-size: var(--fs-sm);
    color: var(--text-light);
}

/* Agenda Card */
.agenda-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    padding-top: 48px;
    transition: var(--transition);
}

.agenda-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.agenda-badge {
    position: absolute;
    top: 0;
    left: 0;
    font-size: var(--fs-xs);
    font-weight: 800;
    padding: 8px 18px;
    border-bottom-right-radius: var(--radius-md);
    letter-spacing: 0.5px;
    color: #ffffff;
}

.agenda-badge.badge-primary { background-color: var(--primary); }
.agenda-badge.badge-accent { background-color: var(--accent); }
.agenda-badge.badge-secondary { background-color: var(--text-light); }

.agenda-card h3 {
    font-size: var(--fs-md);
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 700;
}

.agenda-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agenda-list li {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 16px;
}

.agenda-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.agenda-list li strong {
    font-size: var(--fs-sm);
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.agenda-list li p {
    font-size: var(--fs-xs);
    color: var(--text-light);
    line-height: 1.5;
}

/* 10. PENDAFTARAN & TATA TERTIB STYLES */
.download-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.download-banner.border-accent {
    border-left: 5px solid var(--accent);
}

.banner-icon {
    font-size: 2rem;
    color: var(--accent);
}

.banner-text {
    flex: 1;
    min-width: 250px;
}

.banner-text h3 {
    font-size: var(--fs-md);
    color: var(--primary);
    margin-bottom: 4px;
    font-weight: 700;
}

.banner-text p {
    font-size: var(--fs-sm);
    color: var(--text-light);
}

/* Accordion */
.accordion-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.accordion-item:hover {
    border-color: var(--primary-light);
}

.accordion-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 28px;
    text-align: left;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.accordion-icon {
    font-size: 1.1rem;
    color: var(--accent-hover);
    transition: var(--transition-fast);
}

[data-theme="dark"] .accordion-icon {
    color: var(--accent);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 28px 28px 28px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.test-lisan h5, .test-tulis h5 {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-lisan h5 i { color: var(--accent); }
.test-tulis h5 i { color: var(--primary); }

.test-lisan ul, .test-tulis ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-lisan li, .test-tulis li {
    font-size: var(--fs-sm);
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.test-lisan li::before, .test-tulis li::before {
    content: '•';
    color: var(--accent);
    font-weight: bold;
}

/* Rules / Tatib navigation */
.tatib-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.tatib-nav-btn {
    background-color: var(--bg-cream-dark);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.tatib-nav-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tatib-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    padding: 40px;
}

.tatib-content-wrapper.border-accent {
    border-top: 4px solid var(--accent);
}

.tatib-tab-pane {
    display: none;
}

.tatib-tab-pane.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.tatib-tab-pane h3 {
    font-size: var(--fs-lg);
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 700;
}

.styled-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.styled-bullet-list li {
    font-size: var(--fs-sm);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    padding-left: 24px;
}

.styled-bullet-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--primary);
    font-weight: bold;
}

.styled-bullet-list li strong {
    color: var(--text-dark);
}

/* Danger / Warning box rules */
.danger-box {
    border: 1px solid var(--red-alert);
    border-left: 5px solid var(--red-alert);
    background-color: var(--red-bg);
    padding: 24px;
    border-radius: var(--radius-md);
}

.danger-box h4 {
    color: var(--red-alert);
    margin-bottom: 12px;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.danger-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.danger-list li {
    font-size: var(--fs-sm);
    color: var(--text-dark);
    position: relative;
    padding-left: 18px;
}

.danger-list li::before {
    content: '✖';
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--red-alert);
    font-size: 0.75rem;
}

.warning-box {
    border: 1px solid var(--accent);
    border-left: 5px solid var(--accent);
    background-color: var(--gold-bg);
    padding: 24px;
    border-radius: var(--radius-md);
}

.warning-box h4 {
    color: var(--accent-hover);
    margin-bottom: 12px;
    font-size: var(--fs-sm);
    font-weight: 700;
}

[data-theme="dark"] .warning-box h4 {
    color: var(--accent);
}

.warning-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warning-list li strong {
    color: var(--text-dark);
    display: block;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.warning-list li p {
    font-size: var(--fs-xs);
    color: var(--text-light);
    line-height: 1.5;
}

/* 11. KONTAK SECTION STYLES */
.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.c-info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.c-icon {
    font-size: 1.4rem;
    color: var(--primary);
    background-color: var(--primary-ultra-light);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.c-text h4 {
    font-size: var(--fs-sm);
    color: var(--primary);
    font-weight: 700;
}

.c-text p {
    font-size: var(--fs-sm);
    color: var(--text-light);
}

.border-lines-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.border-lines-list li {
    font-size: var(--fs-sm);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    color: var(--text-dark);
}

.border-lines-list li:last-child {
    border-bottom: none;
}

.map-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Inputs & Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

form label {
    display: block;
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--text-dark);
    margin-bottom: 8px;
}

form input, form select, form textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: var(--fs-sm);
    outline: none;
    transition: var(--transition-fast);
}

form input:focus, form select:focus, form textarea:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-ultra-light);
}

/* Modal overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-success-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-card h3 {
    font-size: var(--fs-lg);
    color: var(--primary);
    margin-bottom: 12px;
}

.modal-card p {
    font-size: var(--fs-sm);
    color: var(--text-light);
    margin-bottom: 24px;
}

/* 12. FOOTER STYLES */
.main-footer {
    background-color: hsl(164, 85%, 6%);
    color: #ffffff;
    padding: 80px 0 0 0;
    border-top: 4px solid var(--accent);
}

[data-theme="dark"] .main-footer {
    background-color: hsl(220, 24%, 3%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.8fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-logo i {
    color: var(--accent);
}

.footer-col-about p {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-sm);
    margin-bottom: 24px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.footer-col-links h3, .footer-col-contact h3 {
    font-size: var(--fs-sm);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--accent);
    position: relative;
    padding-bottom: 8px;
}

.footer-col-links h3::after, .footer-col-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background-color: var(--primary-light);
}

.footer-col-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-links ul a {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.footer-col-links ul a:hover {
    color: var(--accent);
    padding-left: 6px;
}

.footer-col-contact p {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-sm);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-col-contact p i {
    color: var(--accent);
    margin-top: 4px;
}

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

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

.footer-bottom p {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.55);
}

/* 13. PRINT LAYOUT */
@media print {
    .main-header, 
    .mobile-nav-toggle, 
    .mobile-nav-overlay,
    .main-footer,
    #theme-toggle,
    .btn,
    .download-banner,
    .branch-switcher,
    .profil-tabs-nav,
    .tatib-tabs-nav,
    .table-filters-container,
    .map-wrapper,
    #success-modal,
    #contact-form,
    .stats-bar-section,
    .hero-section,
    .quote-section,
    .summary-image-container,
    .image-wrapper {
        display: none !important;
    }

    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    .page-section {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        padding-top: 0 !important;
    }

    #beranda, #profil, #kontak {
        display: none !important;
    }

    #akademik, #pendaftaran {
        display: block !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .accordion-content {
        max-height: none !important;
        display: block !important;
        padding: 10px 0 !important;
    }

    .accordion-item {
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }

    .accordion-header {
        font-size: 13pt !important;
        border-bottom: 2px solid #000000 !important;
        padding: 6px 0 !important;
        color: #000000 !important;
    }

    .accordion-icon {
        display: none;
    }

    .test-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 0 0 0 !important;
        border: none !important;
    }

    .tatib-tab-pane {
        display: block !important;
        margin-bottom: 30px;
        page-break-inside: avoid;
    }

    .tatib-content-wrapper {
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .grid-2col {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .card {
        border: 1px solid #bbbbbb !important;
        padding: 16px !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .curriculum-table {
        min-width: auto !important;
    }

    .curriculum-table th {
        background-color: #eaeaea !important;
        color: #000000 !important;
        border: 1px solid #bbbbbb !important;
        padding: 6px !important;
    }

    .curriculum-table td {
        border: 1px solid #bbbbbb !important;
        padding: 6px !important;
    }
}

/* 14. RESPONSIVE MEDIA QUERIES (MOBILE DESIGN) */
@media (max-width: 1024px) {
    .grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-col-about {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .grid-3col {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .grid-4col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .reverse-mobile {
        display: flex;
        flex-direction: column-reverse;
    }

    .section-heading {
        font-size: var(--fs-xxl);
    }

    .desktop-nav, .nav-actions .btn-cta {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    /* Hero Section adjustments */
    .hero-section {
        height: auto;
        padding: 130px 0 60px 0;
    }

    .hero-title {
        font-size: var(--fs-3xl);
    }

    .hero-subtitle {
        font-size: var(--fs-sm);
        margin-bottom: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Stats Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-card .stat-number {
        font-size: var(--fs-xl);
    }

    /* Silsilah */
    .branch-switcher {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .wife-tab-btn {
        width: 100%;
        max-width: 320px;
    }

    .children-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .family-couple-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .family-couple-card .spouse {
        text-align: center;
    }

    .couple-divider {
        transform: rotate(90deg);
        padding: 6px 0;
    }

    /* Curriculum Filters */
    .table-filters-container {
        flex-direction: column;
        gap: 14px;
    }

    .filter-group, .search-group {
        width: 100%;
    }

    /* Schedules timeline */
    .sch-tab-btn {
        font-size: var(--fs-xs);
        padding: 10px 14px;
    }

    .timeline-wrapper {
        padding-left: 24px;
    }

    .timeline-wrapper::after {
        left: 5px;
    }

    .timeline-node::before {
        left: -24px;
        width: 12px;
        height: 12px;
        border-width: 2px;
        top: 8px;
    }

    /* Rules Tabs */
    .tatib-tabs-nav {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .tatib-nav-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .tatib-content-wrapper {
        padding: 20px;
    }

    .test-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 16px 16px;
    }

    /* Contact Form row */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Image summary */
    .rounded-image {
        height: 280px;
    }

    .est-badge {
        bottom: -10px;
        right: 0px;
        padding: 12px 20px;
    }

    .est-badge .number {
        font-size: var(--fs-lg);
    }

    .est-badge .label {
        font-size: 0.7rem;
    }

    .compass-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .north, .west, .east, .south {
        grid-column: span 1;
        grid-row: auto;
    }

    .compass-center {
        display: none;
    }
}

/* --- Badges for Foundation Roles --- */
.role-badge {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: max-content;
    border: 1px solid transparent;
}

.role-badge.organ-pendiri {
    background-color: var(--accent-light);
    color: var(--accent-hover);
    border-color: hsla(38, 85%, 50%, 0.25);
}

.role-badge.organ-pembina {
    background-color: hsl(200, 70%, 94%);
    color: hsl(200, 85%, 30%);
    border-color: hsla(200, 85%, 30%, 0.2);
}

.role-badge.organ-pengurus {
    background-color: var(--primary-ultra-light);
    color: var(--primary);
    border-color: hsla(164, 85%, 13%, 0.15);
}

.role-badge.organ-pengawas {
    background-color: hsl(0, 75%, 95%);
    color: hsl(0, 75%, 35%);
    border-color: hsla(0, 75%, 35%, 0.15);
}

/* Dark mode theme overrides */
[data-theme="dark"] .role-badge.organ-pendiri {
    background-color: rgba(217, 119, 6, 0.15);
    color: var(--accent);
    border-color: rgba(217, 119, 6, 0.3);
}

[data-theme="dark"] .role-badge.organ-pembina {
    background-color: rgba(14, 165, 233, 0.15);
    color: hsl(195, 85%, 65%);
    border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .role-badge.organ-pengurus {
    background-color: rgba(16, 185, 129, 0.12);
    color: hsl(164, 75%, 60%);
    border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .role-badge.organ-pengawas {
    background-color: rgba(239, 68, 68, 0.15);
    color: hsl(0, 85%, 70%);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Align right spouse badges */
.member.spouse .role-badge {
    margin-left: auto;
}

/* --- 9. NEWS SECTION STYLES --- */
.news-section {
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: hsla(164, 60%, 24%, 0.15);
}

.news-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.news-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: var(--fs-xs);
    color: var(--text-light);
    margin-bottom: 12px;
}

.news-meta i {
    color: var(--accent);
    margin-right: 4px;
}

.news-title {
    font-size: var(--fs-base);
    line-height: 1.4;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.news-title a:hover {
    color: var(--accent-hover);
}

.news-excerpt {
    font-size: var(--fs-sm);
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.news-readmore {
    margin-top: auto;
    font-size: var(--fs-sm);
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    width: max-content;
}

.news-readmore:hover {
    color: var(--accent-hover);
    transform: translateX(4px);
}

/* Responsive adjust for News Section */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-image-wrapper {
        height: 200px;
    }
}
