/* ============================================
   SMAN 68 JAKARTA — PREMIUM CSS v4.0
   Luxury Modern Education Website 2026
   ============================================ */

/* === CSS VARIABLES === */
:root {
    /* Emerald Green Primary */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    /* Gold Accent */
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;

    /* Blue Modern */
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;

    /* Neutrals */
    --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;
    --black: #0a0a0a;

    /* Font scale — lebih besar & readable di semua device */
    --fs-xs:   0.8rem;
    --fs-sm:   0.9rem;
    --fs-base: 1rem;
    --fs-md:   1.05rem;
    --fs-lg:   1.15rem;
    --fs-xl:   1.3rem;
    --fs-2xl:  1.6rem;
    --fs-3xl:  2rem;

/* Semantic */
    --primary: var(--emerald-600);
    --primary-dark: var(--emerald-800);
    --primary-light: var(--emerald-400);
    --accent: var(--gold-400);
    --accent-dark: var(--gold-600);

    /* Light Theme (Default) */
    --bg: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --text: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border: var(--gray-200);
    --border-strong: var(--gray-300);
    --card-bg: var(--white);
    --card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 32px rgba(6,95,70,.08);
    --card-shadow-hover: 0 4px 6px rgba(0,0,0,.07), 0 20px 60px rgba(6,95,70,.15);

    /* Glass */
    --glass: rgba(255,255,255,0.7);
    --glass-border: rgba(255,255,255,0.3);
    --glass-blur: blur(8px);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-800) 100%);
    --grad-accent: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
    --grad-hero: linear-gradient(180deg, rgba(6,95,70,0.15) 0%, rgba(6,95,70,0.7) 60%, rgba(6,95,70,0.92) 100%);

    /* Spacing */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Typography */
    --font-heading: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Navbar */
    --navbar-h: 72px;
    --topbar-h: 40px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --border: #30363d;
    --border-strong: #484f58;
    --card-bg: #161b22;
    --card-shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 32px rgba(0,0,0,.4);
    --card-shadow-hover: 0 4px 6px rgba(0,0,0,.4), 0 20px 60px rgba(16,185,129,.2);
    --glass: rgba(22,27,34,0.8);
    --glass-border: rgba(255,255,255,0.08);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 96px 0; position: relative; overflow: hidden; }

/* === CURSOR === */
.cursor-dot, .cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    border-radius: 50%;
    transition: opacity 0.3s;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--emerald-500);
    transform: translate(-50%, -50%);
}
.cursor-ring {
    width: 36px; height: 36px;
    border: 2px solid var(--emerald-500);
    transform: translate(-50%, -50%);
    opacity: 0.5;
    transition: transform 0.15s, width 0.3s, height 0.3s, opacity 0.3s;
}
@media (max-width: 768px) { .cursor-dot, .cursor-ring { display: none; } }

/* === SCROLL PROGRESS === */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--emerald-500), var(--gold-400));
    z-index: 10000;
    transition: width 0.1s linear;
}

/* === PRELOADER === */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--emerald-900);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner {
    text-align: center;
    z-index: 2;
    position: relative;
}
.preloader-logo {
    width: 100px; height: 100px;
    margin: 0 auto 24px;
    animation: preloaderPulse 2s ease-in-out infinite;
}
.preloader-logo img { width: 100%; filter: drop-shadow(0 0 24px rgba(52,211,153,0.6)); }
.preloader-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 4px;
    margin-bottom: 4px;
}
.preloader-sub {
    display: block;
    font-size: 0.875rem;
    color: var(--emerald-300, #6ee7b7);
    letter-spacing: 2px;
    margin-bottom: 32px;
}
.preloader-bar {
    width: 240px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto 12px;
}
.preloader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--emerald-400), var(--gold-400));
    border-radius: var(--radius-full);
    transition: width 0.1s ease;
}
.preloader-percent {
    font-size: 0.75rem;
    color: var(--emerald-300, #6ee7b7);
    letter-spacing: 1px;
}
.preloader-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
@keyframes preloaderPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* === FLOATING ANNOUNCEMENT === */
/* === NOTIF BUTTON (navbar) === */
.notif-btn {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    z-index: 1003;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.notif-btn:hover { background: var(--primary); color: white; }
.notif-btn.has-notif { color: var(--primary); }
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg);
    animation: badgePop 0.4s var(--spring);
    line-height: 1;
}
@keyframes badgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* === NOTIF PANEL === */
.notif-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 8900;
    background: transparent;
    display: none;
}
.notif-panel-overlay.active { display: block; }

.notif-panel {
    position: fixed;
    top: calc(var(--navbar-h) + var(--topbar-h) + 8px);
    right: 16px;
    width: 340px;
    max-height: 480px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    z-index: 9100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.92) translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transform-origin: top right;
    transition: transform 0.3s var(--spring), opacity 0.25s ease;
}
.notif-panel.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
.notif-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}
.notif-panel-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 700; color: var(--text);
}
.notif-panel-title i { color: var(--primary); font-size: 1rem; }
.notif-panel-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.notif-panel-close:hover { background: #fee2e2; color: #ef4444; }
.notif-panel-list {
    overflow-y: auto;
    flex: 1;
    padding: 8px;
}
.notif-panel-list::-webkit-scrollbar { width: 4px; }
.notif-panel-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* Notif item di panel */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
}
.notif-item:hover { background: var(--bg-secondary); border-color: var(--border); }
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 4px; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
}
.notif-item-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--emerald-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
[data-theme="dark"] .notif-item-icon { background: rgba(16,185,129,0.1); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-item-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-date { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; }
.notif-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}
.notif-empty i { font-size: 2rem; margin-bottom: 10px; display: block; opacity: 0.3; }
.notif-empty p { font-size: 0.82rem; }

/* === SURAT MODAL === */
.notif-letter-modal .modal-card { max-width: 580px; padding: 0; overflow: hidden; }
.notif-letter-card {
    position: relative;
    overflow: hidden;
}
.letter-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 260px; height: 260px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}
.letter-watermark img { width: 100%; height: 100%; object-fit: contain; }

.letter-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.letter-logo {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 2px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}
.letter-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.letter-school { font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: var(--text); }
.letter-label {
    display: inline-block;
    background: var(--emerald-50);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}
[data-theme="dark"] .letter-label { background: rgba(16,185,129,0.1); }
.letter-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold-400), var(--primary));
    background-size: 200% 100%;
    animation: glowSweepLine 3s linear infinite;
    position: relative; z-index: 1;
}
@keyframes glowSweepLine {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.letter-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    padding: 20px 28px 4px;
    position: relative; z-index: 1;
    line-height: 1.3;
}
.letter-date {
    padding: 0 28px 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
    position: relative; z-index: 1;
}
.letter-body {
    padding: 0 28px 24px;
    position: relative; z-index: 1;
    max-height: 380px;
    overflow-y: auto;
}
.letter-body::-webkit-scrollbar { width: 4px; }
.letter-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.letter-paragraph {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 14px;
    text-align: justify;
    text-indent: 0;
}
.letter-paragraph:last-child { margin-bottom: 0; }
.letter-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 16px 28px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    position: relative; z-index: 1;
    flex-wrap: wrap;
    gap: 4px;
}
.letter-footer strong { color: var(--primary); font-weight: 700; }

/* mobile notif panel */
@media (max-width: 480px) {
    .notif-panel {
        width: calc(100vw - 24px);
        right: 12px;
    }
    .letter-title { font-size: 1rem; padding: 16px 20px 4px; }
    .letter-body  { padding: 0 20px 20px; }
    .letter-header { padding: 18px 20px 16px; }
    .letter-footer { padding: 14px 20px; font-size: 0.72rem; }
    .letter-paragraph { font-size: 0.85rem; text-indent: 0; }
}

/* === ANNOUNCEMENT LEGACY CLEANUP === */
.floating-announcement { display: none !important; }
@keyframes slideInLeft { from { opacity:0; } to { opacity:1; } }
@keyframes slideOutLeft { to { opacity:0; } }

/* === TOP BAR === */
.top-bar {
    background: var(--emerald-900);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
}
.top-bar-container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 12px;
}
.top-bar-left, .top-bar-right {
    display: flex; align-items: center; gap: 20px;
}
.top-bar-left a, .top-bar-right a {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    display: flex; align-items: center; gap: 6px;
    transition: var(--transition);
    white-space: nowrap;
}
.top-bar-left a:hover, .top-bar-right a:hover { color: white; }
.top-bar-right a.highlight {
    background: var(--gold-500);
    color: var(--emerald-900);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
}
.top-clock { font-size: 0.75rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 6px; }
.nav-disabled { opacity: 0.5; pointer-events: none !important; }
.pulse-btn { animation: pulseBadge 2s infinite; }
@keyframes pulseBadge {
    0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}

/* === NAVBAR === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-h);
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
    contain: layout style;
}
.navbar.scrolled {
    box-shadow: 0 4px 32px rgba(6,95,70,0.12);
    background: var(--glass);
}
.navbar.hide-nav { transform: translateY(-100%); }
.nav-container {
    max-width: 1280px; margin: 0 auto; padding: 0 24px;
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo-wrap { position: relative; }
.nav-logo { width: 44px; height: 44px; object-fit: contain; position: relative; z-index: 1; }
.logo-glow-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, transparent 70%);
    animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1rem; font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: 0.5px;
}
.brand-text span { font-size: 0.65rem; color: var(--text-secondary); letter-spacing: 1px; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-tertiary); }
.nav-link.active {
    color: var(--primary);
    background: var(--emerald-50);
    font-weight: 600;
}
[data-theme="dark"] .nav-link.active { background: rgba(16,185,129,0.1); }
.nav-special {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--emerald-900) !important;
    font-weight: 700 !important;
    border-radius: var(--radius-full);
    padding: 6px 14px;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1002;
}
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    transition: var(--transition);
}
.theme-toggle:hover { background: var(--primary); color: white; }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    transition: var(--transition);
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO SECTION === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}
.hero-video-container {
    transform: translateZ(0);
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--emerald-900);
}
.youtube-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.youtube-bg iframe {
    position: absolute;
    top: 50%; left: 50%;
    width: max(100vw, 177.78vh);
    height: max(100vh, 56.25vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
}
.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: var(--grad-hero);
    z-index: 1;
}
.hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 2;
}
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.hero-particle {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    animation: float linear infinite;
    will-change: transform, opacity;
    contain: layout style size;
}
@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.sound-toggle {
    position: absolute;
    top: 24px; right: 24px;
    z-index: 10;
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.sound-toggle:hover { background: rgba(255,255,255,0.22); }
.sound-icon-wrap { font-size: 0.875rem; }

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold-400);
    animation: pulseBadge 2s infinite;
}
.hero-title {
    font-family: var(--font-heading);
    color: white;
    line-height: 0.95;
    margin-bottom: 20px;
    font-weight: 900;
}
.title-line {
    display: block;
    font-size: clamp(2.5rem, 8vw, 7rem);
    letter-spacing: -2px;
}
.hero-num {
    font-size: clamp(5rem, 18vw, 16rem);
    letter-spacing: -8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, var(--gold-400) 50%, var(--emerald-300, #6ee7b7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 0.85;
}
.hero-slogan {
    display: flex; align-items: center; justify-content: center;
    gap: 16px;
    margin-bottom: 36px;
}
.slogan-item {
    font-size: clamp(0.75rem, 2vw, 1rem);
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.9);
}
.slogan-sep { color: var(--gold-400); font-size: 0.625rem; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 48px; }
.btn-hero-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--spring);
}
.btn-hero-primary:hover { background: var(--emerald-700); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(5,150,105,0.4); }
.btn-hero-secondary {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--spring);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.hero-stats {
    display: flex; align-items: center; justify-content: center;
    gap: 24px;
}
.hero-stat { text-align: center; }
.stat-num { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; color: white; }
.stat-unit { font-size: 1rem; color: var(--gold-400); font-weight: 700; }
.stat-label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.65); letter-spacing: 1px; }
.hero-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }
.hero-scroll-cta {
    position: absolute;
    bottom: 40px; left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: bounceScroll 2s ease-in-out infinite;
    transition: var(--transition);
}
.hero-scroll-cta:hover { color: white; }
.scroll-wheel {
    width: 24px; height: 36px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    position: relative;
}
.scroll-wheel::after {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: white;
    border-radius: 50%;
    animation: scrollDot 1.5s ease-in-out infinite;
}
@keyframes scrollDot {
    0%,100% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}
@keyframes bounceScroll {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* === MARQUEE === */
.marquee-section {
    background: var(--emerald-800);
    overflow: hidden;
    height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 35s linear infinite;
}
.marquee-content {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    white-space: nowrap;
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.marquee-content .sep { color: var(--gold-400); }
.marquee-section:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === FAB (Floating Action Button) === */
.floating-fab {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 810;
}
.fab-toggle {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 32px rgba(6,95,70,0.35);
    transition: var(--spring);
}
.fab-toggle:hover { transform: scale(1.1); }
.floating-fab.active .fab-toggle { background: var(--gray-700); transform: rotate(45deg); }
.fab-items {
    position: absolute;
    bottom: 64px; right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}
.floating-fab.active .fab-items { opacity: 1; transform: translateY(0); pointer-events: all; }
.fab-item {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    box-shadow: var(--card-shadow);
    transition: var(--spring);
    position: relative;
}
.fab-item::before {
    content: attr(data-tip);
    position: absolute;
    right: 52px;
    background: var(--gray-900);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.fab-item:hover::before { opacity: 1; }
.fab-item:hover { background: var(--primary); color: white; transform: scale(1.1); }
.fab-highlight { background: var(--gold-500); color: var(--emerald-900); }

/* === CHAT WIDGET === */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    z-index: 900;
}
.chat-toggle {
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-primary);
    color: white;
    width: 52px; height: 52px;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(6,95,70,0.4);
    transition: var(--spring);
    position: relative;
}
.chat-toggle:hover { transform: translateY(-2px) scale(1.08); box-shadow: 0 16px 48px rgba(6,95,70,0.5); }
.chat-toggle-icon { font-size: 1.15rem; }
.chat-toggle-label { display: none; }
.chat-status-indicator {
    position: absolute;
    top: -3px; right: -3px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--emerald-400);
    border: 2px solid var(--emerald-800);
}
.chat-status-indicator.offline { background: #ef4444; }
.chat-toggle-label { font-size: 0.875rem; font-weight: 600; }
.chat-window {
    position: fixed;
    bottom: 84px; right: 24px;
    left: auto;
    width: 340px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0,0,0,0.2);
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: var(--spring);
    z-index: 901;
}
.chat-window.active { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-header {
    background: var(--grad-primary);
    padding: 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-agent-info { display: flex; align-items: center; gap: 12px; }
.agent-avatar-wrap { position: relative; }
.agent-avatar {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    color: white;
}
.agent-avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    animation: rotateRing 4s linear infinite;
}
@keyframes rotateRing { 100% { transform: rotate(360deg); } }
.agent-details h4 { font-size: 0.9rem; font-weight: 700; color: white; }
.agent-details span { font-size: 0.75rem; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 6px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; display: inline-block; }
.status-dot.offline { background: #ef4444; }
.chat-close { color: rgba(255,255,255,0.8); font-size: 1rem; padding: 4px 8px; border-radius: 6px; transition: var(--transition); }
.chat-close:hover { color: white; background: rgba(255,255,255,0.15); }
.chat-body {
    min-height: 200px;
    max-height: 360px;
    height: 360px;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.chat-offline { text-align: center; padding: 24px 16px; overflow-y: auto; flex: 1; }
.offline-visual {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    position: relative;
}
.offline-icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px dashed var(--border);
}
.chat-offline h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.chat-offline p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 16px; }
.btn-email-chat {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-email-chat:hover { background: var(--emerald-700); }
.chat-registration { padding: 16px 18px; overflow-y: auto; flex: 1; }
.reg-intro { text-align: center; margin-bottom: 16px; }
.reg-intro-icon {
    width: 48px; height: 48px;
    background: var(--emerald-50);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 10px;
}
[data-theme="dark"] .reg-intro-icon { background: rgba(16,185,129,0.1); }
.reg-intro h5 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.reg-intro p { font-size: 0.75rem; color: var(--text-secondary); }
.chat-input-field { margin-bottom: 10px; }
.chat-input-field label { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.chat-input-field input, .chat-input-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}
.chat-input-field input:focus, .chat-input-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.btn-start-chat {
    width: 100%;
    background: var(--grad-primary);
    color: white;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: var(--spring);
    margin-top: 12px;
}
.btn-start-chat:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(6,95,70,0.3); }
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 10px;
    /* Scrollbar tipis */
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.message-bot, .message-user div, .message-operator div {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    line-height: 1.65;
    max-width: 80%;
    word-break: break-word;
    animation: msgIn 0.25s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.message-bot {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}
.message-user {
    display: flex;
    justify-content: flex-end;
    align-self: flex-end;
}
.message-user div {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}
.message-operator {
    display: flex;
    align-self: flex-start;
}
.message-operator div {
    background: var(--bg-secondary);
    color: var(--text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}
/* Label waktu di setiap grup pesan */
.msg-time {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-align: right;
}
.message-operator .msg-time { text-align: left; }
.chat-ended { text-align: center; padding: 24px 16px; overflow-y: auto; flex: 1; }
.ended-icon { font-size: 2rem; color: var(--primary); margin-bottom: 12px; }
.chat-ended h5 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.chat-ended p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 16px; }
.btn-new-chat {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-new-chat:hover { background: var(--emerald-700); }
.chat-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    background: var(--card-bg);
}
.chat-footer input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    background: var(--bg-secondary);
    color: var(--text);
    transition: var(--transition);
}
.chat-footer input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.send-btn {
    width: 38px; height: 38px;
    background: var(--primary); color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: var(--spring);
}
.send-btn:hover { background: var(--emerald-700); transform: scale(1.08); }
.end-btn {
    width: 38px; height: 38px;
    background: #fee2e2; color: #ef4444;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.end-btn:hover { background: #ef4444; color: white; }

/* === TUTORIAL FAB === */
.tutorial-fab {
    position: fixed;
    /* KIRI: sejajar dengan chat widget (kiri bawah) */
    bottom: 88px;
    left: 24px;
    right: auto;
    top: auto;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 9px 16px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition);
    z-index: 810;
    white-space: nowrap;
}
.tutorial-fab:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(6,95,70,0.3);
}

/* === MODALS === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: var(--spring);
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
}
.modal-overlay.active .modal-card { transform: scale(1) translateY(0); }
.modal-header {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    background: var(--emerald-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
[data-theme="dark"] .modal-header-icon { background: rgba(16,185,129,0.1); }
.modal-header h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.modal-header p { font-size: 0.8rem; color: var(--text-secondary); }
.modal-close-x {
    margin-left: auto;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    font-size: 0.875rem;
}
.modal-close-x:hover { background: #fee2e2; color: #ef4444; }

/* Tutorial */
.tutorial-steps { display: flex; flex-direction: column; gap: 12px; }
.tutorial-step {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.step-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tutorial-step p { font-size: 0.875rem; color: var(--text); }

/* News Modal */
.news-modal-card {
    max-width: 700px;
    position: relative;
    padding-top: 20px;
}
.news-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 1rem;
    width: 34px;
    height: 34px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    /* Tengah sempurna — flex center */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: var(--transition);
    z-index: 10;
    cursor: pointer;
    padding: 0;
}
.news-modal-close:hover { background: #fee2e2; color: #ef4444; border-color: #fecaca; }
.news-modal-body { line-height: 1.8; color: var(--text); }

/* History */
.history-search { display: flex; gap: 10px; margin-bottom: 16px; }
.btn-load-history {
    background: var(--primary);
    color: white;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-load-history:hover { background: var(--emerald-700); }
.history-item {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: var(--bg-secondary);
}

/* Privacy */
.privacy-content ol { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.privacy-content li { font-size: 0.875rem; color: var(--text); line-height: 1.6; }
.privacy-content strong { color: var(--text); }

/* === SECTION COMMON === */
.section-header { text-align: center; margin-bottom: 64px; }
.section-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 16px;
}
.eyebrow-line { display: block; width: 24px; height: 2px; background: var(--primary); }
.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.section-heading em { font-style: normal; color: var(--primary); }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; }
.section-bg-mesh {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 80% 50%, rgba(16,185,129,0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* === PRINCIPAL SECTION === */
.principal-section {
    background: var(--bg);
    padding: 96px 0;
}
.principal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.principal-visual { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.principal-photo-wrap { position: relative; }
.photo-glow-ring {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
    animation: logoGlow 3s ease-in-out infinite;
}
.photo-frame {
    width: 280px; height: 360px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 3px solid var(--border);
    position: relative;
    box-shadow: var(--card-shadow-hover);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.photo-credential {
    position: absolute;
    bottom: 16px; left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--emerald-700);
    white-space: nowrap;
}
[data-theme="dark"] .photo-credential { color: var(--emerald-400); }
.principal-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
.bento-stat {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
}
.bento-wide { grid-column: span 1; }
.bento-val { display: block; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.bento-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 4px; }
.principal-content { display: flex; flex-direction: column; gap: 24px; }
.quote-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 24px;
}
.quote-mark { font-size: 2rem; color: var(--primary); opacity: 0.4; margin-bottom: 8px; }
.quote-block p { font-size: 0.95rem; line-height: 1.85; color: var(--text-secondary); }
.principal-signature { padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.signature-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--text); }
.signature-img {
    width: 140px;
    height: auto;
    object-fit: contain;
    margin: 6px 0 2px;
    /* Blend agar bg transparan / putih tetap menyatu di light & dark mode */
    mix-blend-mode: multiply;
    filter: contrast(1.1);
    pointer-events: none;
    user-select: none;
}
[data-theme="dark"] .signature-img {
    mix-blend-mode: screen;
    filter: invert(1) contrast(1.1);
}
.signature-title { font-size: 0.875rem; color: var(--primary); font-weight: 500; }

/* === ABOUT SECTION === */
.about-section { background: var(--bg-secondary); }
.about-bento {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    margin-bottom: 48px;
}

/* Foto — kolom 1, span 2 baris */
.bento-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    min-height: 380px;
    position: relative;
}

/* Tentang Kami — kolom 2-3, baris 1 */
.bento-about-desc {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
}

/* Akreditasi A — kolom 2, baris 2 */
.bento-card.bento-accent:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* Peringkat #10 — kolom 3, baris 2 */
.bento-card.bento-accent:nth-child(4) {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

/* Keunggulan Kami — row bawah, penuh lebar */
.bento-keunggulan {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
}
.bento-wide-text {
    grid-column: 1 / -1;
    padding: 28px 32px;
}

/* Keunggulan card styles */
.keunggulan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.keunggulan-header i {
    font-size: 1.2rem;
    color: var(--primary);
}
.keunggulan-header h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.bento-keunggulan-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.bento-keunggulan-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: var(--spring);
}
.bento-keunggulan-list li:hover {
    border-color: var(--primary);
    background: var(--emerald-50);
    transform: translateY(-2px);
}
.bento-keunggulan-list li i {
    color: var(--primary);
    font-size: 0.7rem;
    margin-top: 3px;
    flex-shrink: 0;
}
.bento-keunggulan-list li span { flex: 1; }
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--spring);
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.bento-card-inner { position: relative; height: 100%; min-height: 380px; }
.bento-bg-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,95,70,0.95) 0%, rgba(6,95,70,0.4) 60%, transparent 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}
.bento-tag {
    display: inline-block;
    background: var(--gold-400);
    color: var(--emerald-900);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    width: fit-content;
}
.bento-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    line-height: 1.1;
    letter-spacing: 1px;
}
.bento-text { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.bento-icon-row { font-size: 1.5rem; color: var(--primary); }
.bento-text h4 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text); }
.bento-text p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }
.bento-accent {
    padding: 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--primary);
    gap: 4px;
    text-align: center;
}
.bento-green { background: var(--emerald-700); }
.bento-accent-icon { font-size: 1.5rem; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.bento-accent-num { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: white; }
.bento-accent-label { font-size: 0.7rem; color: rgba(255,255,255,0.8); font-weight: 500; letter-spacing: 1px; text-align: center; }

/* Tombol unduh sertifikat akreditasi */
.btn-akreditasi-dl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    white-space: nowrap;
}
.btn-akreditasi-dl:hover {
    background: rgba(255,255,255,0.32);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.btn-akreditasi-dl i { font-size: 0.75rem; }
.bento-wide-text h4 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.bento-wide-text h4 i { color: var(--primary); }
.bento-list { display: flex; flex-direction: column; gap: 8px; }
.bento-list li { font-size: 0.8rem; color: var(--text-secondary); padding-left: 12px; border-left: 2px solid var(--border); }

/* Vision Mission */
.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}
.vm-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--card-shadow);
    transition: var(--spring);
}
.vm-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.vm-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: var(--emerald-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}
[data-theme="dark"] .vm-icon { background: rgba(16,185,129,0.1); }
.vm-card h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.vm-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.75; }
.mission-card ul { display: flex; flex-direction: column; gap: 10px; }
.mission-card li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.92rem; color: var(--text-secondary);
    line-height: 1.7;
}
.mission-card li i { color: var(--primary); flex-shrink: 0; margin-top: 3px; }

/* === ALUMNI SECTION === */
.alumni-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px; background: var(--bg); }
.alumni-filter-bar {
    display: flex; align-items: center; gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}
.filter-label { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.premium-select {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: var(--transition);
    cursor: pointer;
}
.premium-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.ptn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.ptn-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: var(--spring);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.ptn-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); border-color: var(--emerald-200); }
.ptn-card img { width: 64px; height: 64px; object-fit: contain; }
.ptn-card h4 { font-size: 0.75rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.ptn-count {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.ptn-count::after { content: ' Alumni'; font-size: 0.65rem; font-weight: 500; color: var(--text-muted); }

/* === RANKING SECTION === */
.ranking-section { background: var(--bg-secondary); }
.section-bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 70% at 50% 100%, rgba(16,185,129,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.ranking-cards {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}
.ranking-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--spring);
}
.ranking-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.ranking-card-glow {
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: var(--transition);
}
.ranking-card:hover .ranking-card-glow { opacity: 0.3; }
.ranking-featured { border-color: var(--primary); }
.ranking-icon {
    width: 72px; height: 72px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 20px;
}
.ranking-uniranks { background: var(--blue-500); color: white; }
.ranking-card:nth-child(1) .ranking-card-glow { background: var(--blue-500); }
.ranking-edurank { background: var(--primary); color: white; }
.ranking-card:nth-child(2) .ranking-card-glow { background: var(--primary); }
.ranking-qs { background: var(--gold-500); color: var(--emerald-900); }
.ranking-card:nth-child(3) .ranking-card-glow { background: var(--gold-500); }
.ranking-card h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.ranking-card p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.ranking-badge {
    display: inline-block;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.ranking-cta {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
}
.btn-ranking {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--grad-primary);
    color: white;
    padding: 15px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--spring);
    box-shadow: 0 8px 32px rgba(6,95,70,0.3);
    white-space: nowrap;
}
.btn-ranking:hover { transform: translateY(-2px); box-shadow: 0 16px 48px rgba(6,95,70,0.4); }
.btn-ranking-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600)) !important;
    color: var(--emerald-900) !important;
    box-shadow: 0 8px 32px rgba(245,158,11,0.3) !important;
}
.btn-ranking-gold:hover { box-shadow: 0 16px 48px rgba(245,158,11,0.45) !important; }

/* === PROGRAM SECTION === */
.program-section { background: var(--bg); }
.program-hero-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
}
.program-hero-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.kurikulum-logo { width: 140px; height: auto; }
.program-description h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.program-description p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
.subjects-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; }
.subject-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--card-shadow);
    transition: var(--spring);
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.subject-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.subject-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.5;
}
.subject-card-header h4 { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.subject-list { display: flex; flex-direction: column; gap: 6px; }
.subject-list li { font-size: 0.88rem; color: var(--text-secondary); padding: 5px 0; border-bottom: 1px solid var(--border); }
.subject-list li:last-child { border-bottom: none; }
.p5-card p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.p5-pillars { display: flex; flex-wrap: wrap; gap: 8px; }
.p5-pillars span {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--emerald-50);
    color: var(--emerald-700);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
[data-theme="dark"] .p5-pillars span { background: rgba(16,185,129,0.1); color: var(--emerald-400); }

/* === NEWS SECTION === */
.news-section { background: var(--bg-secondary); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--spring);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.news-card:hover .news-image { transform: scale(1.05); }
.news-image-wrap { overflow: hidden; aspect-ratio: 2118 / 963; width: 100%; position: relative; }
.news-image { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s ease; }

/* Badge NEW — berita ≤7 hari */
.news-new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(239,68,68,.4);
    animation: newBadgePulse 2s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
}
@keyframes newBadgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239,68,68,.4); }
    50%       { box-shadow: 0 2px 18px rgba(239,68,68,.7); }
}
.news-content { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.news-date { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.news-title { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.news-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; flex: 1; }
.btn-readmore {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
    transition: var(--transition);
    width: fit-content;
}
.btn-readmore:hover { gap: 10px; }

/* === AGENDA SECTION === */
.agenda-section { background: var(--bg); }
.section-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.agenda-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--spring);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.agenda-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--grad-primary);
    border-radius: 4px 0 0 4px;
}
.agenda-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.agenda-category {
    display: inline-block;
    background: var(--emerald-50);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}
[data-theme="dark"] .agenda-category { background: rgba(16,185,129,0.1); }
.agenda-title { font-family: var(--font-heading); font-size: 1.02rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.agenda-detail, .agenda-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.agenda-detail i, .agenda-date i { color: var(--primary); width: 12px; }

/* === GALLERY === */
.gallery-section { background: var(--bg-secondary); }

/* Grid seragam 4 kolom, semua kotak sama besar */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1 / 1;   /* semua kotak, tidak ada yang lebih tinggi/pendek */
    transition: var(--spring);
    background: var(--bg-tertiary);
}

/* Hapus override aspect-ratio yang bikin berantakan */
.gallery-item:nth-child(3n+1) { aspect-ratio: 1 / 1; }

.gallery-item:hover { transform: scale(1.03); z-index: 2; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6,95,70,0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: white;
    text-align: center;
    padding: 16px;
    gap: 8px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay i { font-size: 1.4rem; }
.gallery-item-overlay p { font-size: 0.75rem; font-weight: 600; line-height: 1.4; max-width: 120px; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    z-index: 99000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-close {
    position: absolute;
    top: 24px; right: 24px;
    color: white;
    font-size: 1.25rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-body { text-align: center; max-width: 90vw; }
.lightbox-body img { max-height: 80vh; border-radius: var(--radius); }
.lightbox-body p { color: rgba(255,255,255,0.8); margin-top: 16px; font-size: 0.9rem; }

/* === TESTIMONIALS === */
.testimonial-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px; background: var(--bg); }
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.testimonial-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--spring);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.testimonial-stars { color: var(--gold-400); font-size: 0.875rem; letter-spacing: 2px; }
.testimonial-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.75; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}
.author-info h4 { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.author-info p { font-size: 0.82rem; color: var(--text-secondary); }

/* === FACILITY === */
.facility-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px; background: var(--bg-secondary); }
.facility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.facility-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--spring);
}
.facility-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.facility-card img { width: 100%; height: 180px; object-fit: cover; }
.facility-info { padding: 20px; }
.facility-info h4 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.facility-info p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* === CONTACT === */
.contact-section { background: var(--bg); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.contact-info-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.map-embed-wrap { height: 240px; overflow: hidden; }
.map-embed-wrap iframe { width: 100%; height: 100%; border: none; }
.contact-details-list { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.contact-detail-item { display: flex; align-items: flex-start; gap: 14px; }
.contact-detail-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--emerald-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}
[data-theme="dark"] .contact-detail-icon { background: rgba(16,185,129,0.1); }
.contact-detail-item h5 { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.contact-detail-item p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.op-hours-list { display: flex; flex-direction: column; gap: 4px; }
.op-hours-list div { font-size: 0.75rem; color: var(--text-secondary); }
.op-hours-list strong { color: var(--text); }
.contact-form-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--card-shadow);
}
.form-panel-header { margin-bottom: 24px; }
.form-panel-header h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.form-panel-header p { font-size: 0.85rem; color: var(--text-secondary); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.required-star { color: #ef4444; }
.field-input-wrap { position: relative; }
.field-input-wrap i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
    pointer-events: none;
}
.field-input-wrap input, .field-input-wrap select {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}
.field-input-wrap input:focus, .field-input-wrap select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    transition: var(--transition);
}
.form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.form-actions { display: flex; gap: 12px; align-items: center; }
.btn-submit {
    flex: 1;
    background: var(--grad-primary);
    color: white;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: var(--spring);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(6,95,70,0.3); }
.btn-history {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    transition: var(--transition);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.btn-history:hover { background: var(--bg-secondary); color: var(--text); }

/* === DOWNLOAD SECTION === */
.download-section { background: var(--bg-secondary); }
.download-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.download-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--spring);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.download-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.download-card-glow {
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: var(--transition);
}
.download-card:hover .download-card-glow { opacity: 0.15; }
.android-glow { background: #3ddc84; }
.ios-glow { background: #666; }
.win-glow { background: var(--blue-500); }
.dl-icon {
    width: 72px; height: 72px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.android-icon { background: linear-gradient(135deg, #3ddc84, #1a8c4e); color: white; }
.ios-icon { background: linear-gradient(135deg, #555, #111); color: white; }
.win-icon { background: var(--blue-500); color: white; }
.download-card h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: var(--text); }
.download-card p { font-size: 0.8rem; color: var(--text-secondary); }
.dl-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.dl-badge.available { background: var(--emerald-50); color: var(--primary); }
.dl-badge.coming { background: #fef3c7; color: var(--gold-600); }
[data-theme="dark"] .dl-badge.available { background: rgba(16,185,129,0.1); }
[data-theme="dark"] .dl-badge.coming { background: rgba(245,158,11,0.1); color: var(--gold-400); }
.btn-download {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--grad-primary);
    color: white;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--spring);
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(6,95,70,0.3); }
.btn-disabled { background: var(--bg-tertiary); color: var(--text-muted); cursor: not-allowed; }
.btn-disabled:hover { transform: none; box-shadow: none; }
.dl-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dl-meta span { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.app-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.benefit-item > i {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--emerald-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
[data-theme="dark"] .benefit-item > i { background: rgba(16,185,129,0.1); }
.benefit-item h5 { font-size: 0.875rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.benefit-item p { font-size: 0.775rem; color: var(--text-secondary); line-height: 1.5; }

/* === TOAST === */
.toast-stack {
    position: fixed;
    top: 24px; right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
    font-size: 0.875rem;
    color: var(--text);
    max-width: 340px;
    pointer-events: all;
    animation: toastIn 0.4s var(--spring);
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast.success i { color: var(--primary); }
.toast.error i { color: #ef4444; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* === MOBILE BOTTOM NAV === */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition);
}
.mob-nav-item i { font-size: 1.2rem; }
.mob-nav-item.active { color: var(--primary); }

/* === FOOTER === */
.footer-mega { background: var(--gray-900); position: relative; }
[data-theme="dark"] .footer-mega { background: #0a0a0a; }
.footer-wave {
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 40px;
    background: var(--bg-secondary);
    clip-path: ellipse(55% 100% at 50% 0%);
}
[data-theme="dark"] .footer-wave { background: #161b22; }
.footer-body { padding: 80px 0 48px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
}
.footer-logo { width: 56px; margin-bottom: 16px; }
.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-pill {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem;
    transition: var(--spring);
}
.social-pill:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.65);
    transition: var(--transition);
}
.footer-col ul li a:hover { color: white; gap: 12px; }
.footer-col ul li a i { font-size: 0.5rem; }
.footer-contact-list { display: flex; flex-direction: column; gap: 12px; }
.footer-contact-list li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}
.footer-contact-list i { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.footer-made { color: rgba(255,255,255,0.25) !important; }

/* === EMPTY STATE === */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.875rem; }

/* === ANIMATIONS === */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
    to { transform: translateX(100%); opacity: 0; }
}

/* === MAGNETIC BUTTON === */
.magnetic-btn { transition: transform 0.2s ease; }

/* === SMOOTH SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .principal-grid { grid-template-columns: 1fr; gap: 40px; }
    .principal-visual { flex-direction: row; align-items: center; gap: 32px; }
    /* Tablet: 2 kolom */
    .about-bento {
        grid-template-columns: 1fr 1fr;
    }
    .bento-main {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
        min-height: 280px;
    }
    .bento-about-desc {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    .bento-card.bento-accent:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
    .bento-card.bento-accent:nth-child(4) {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
    .bento-keunggulan { grid-column: 2 / 3; grid-row: 3 / 4; }
    .bento-keunggulan-list { grid-template-columns: 1fr 1fr; }
    .bento-wide-text { grid-column: 1 / -1; padding: 22px; }
    .vision-mission-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .ranking-cards { grid-template-columns: 1fr; gap: 16px; }
    .subjects-grid { grid-template-columns: 1fr 1fr; }
    .p5-card { grid-column: span 2; }
    .contact-grid { grid-template-columns: 1fr; }
    .download-cards { grid-template-columns: 1fr; }
    .app-benefits { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .gallery-masonry { grid-template-columns: repeat(3, 1fr); }
    .gallery-item { aspect-ratio: 1 / 1; }
    .gallery-item:nth-child(3n+1) { aspect-ratio: 1 / 1; }
    .top-bar { display: none; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --navbar-h: 60px; }
    section { padding: 64px 0; }
    .container { padding: 0 16px; }

    .nav-menu {
        position: fixed;
        top: var(--navbar-h); left: 0; right: 0;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        z-index: 999;
    }
    .nav-menu.active { transform: translateY(0); opacity: 1; pointer-events: all; }
    .nav-toggle { display: flex; }
    .nav-link { padding: 12px 16px; border-radius: var(--radius-sm); display: block; width: 100%; }
    .brand-text h1 { font-size: 0.875rem; }
    .brand-text span { display: none; }

    .hero-title .title-line { font-size: clamp(2rem, 12vw, 4rem); }
    .hero-num { font-size: clamp(6rem, 28vw, 10rem); letter-spacing: -4px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-stats { flex-direction: column; gap: 8px; }
    .hero-stat-divider { width: 60px; height: 1px; }
    .hero-badge { font-size: 0.65rem; }

    .section-heading { font-size: clamp(1.75rem, 6vw, 2.5rem); }

    .principal-visual { flex-direction: column; }
    .photo-frame { width: 200px; height: 260px; }
    .principal-bento { grid-template-columns: 1fr 1fr; }

    /* About bento mobile — layout rapi 1 kolom */
    .about-bento {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .bento-main,
    .bento-about-desc,
    .bento-card.bento-accent:nth-child(3),
    .bento-card.bento-accent:nth-child(4),
    .bento-keunggulan {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    .bento-card-inner { min-height: 220px; }
    .bento-text {
        padding: 18px;
    }
    .bento-text p { font-size: 0.8rem; }
    .bento-accent {
        padding: 20px 16px;
        min-height: 100px;
    }
    .bento-accent-num { font-size: 1.5rem; }
    .bento-wide-text {
        grid-column: 1 / -1;
        padding: 18px;
    }
    .bento-list li { font-size: 0.78rem; padding-left: 10px; }
    /* Tampilkan 2 kolom untuk accent cards supaya tidak terlalu panjang */
    .about-bento .bento-accent {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .bento-keunggulan-list { grid-template-columns: 1fr; }

    .news-grid, .agenda-grid, .testimonial-grid, .facility-grid { grid-template-columns: 1fr; }
    .gallery-masonry { grid-template-columns: repeat(2, 1fr); }
    .gallery-item { aspect-ratio: 1 / 1; }
    .gallery-item:nth-child(3n+1) { aspect-ratio: 1 / 1; }

    .subjects-grid { grid-template-columns: 1fr; }
    .p5-card { grid-column: span 1; }
    .program-hero-inner { grid-template-columns: 1fr; }

    .form-row-2 { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .btn-history { width: 100%; justify-content: center; }

    .app-benefits { grid-template-columns: 1fr; }
    .download-cards { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom .container { flex-direction: column; gap: 8px; text-align: center; }

    .mobile-bottom-nav { display: flex; }
    /* ── Mobile kanan bawah: Chat paling bawah, FAB di atasnya ──
       Bottom nav = 56px
       Chat   : bottom 72px
       FAB    : bottom 134px
       Info   : tengah layar secara vertikal (top 50%)
    ── */
    .chat-widget {
        bottom: 72px;
        right: 16px;
        left: auto;
    }
    .floating-fab {
        bottom: 134px;
        right: 16px;
    }
    .tutorial-fab {
        /* Kiri bawah, di atas chat widget */
        bottom: 134px;
        top: auto;
        left: 16px;
        right: auto;
        transform: none;
        padding: 8px 13px;
        font-size: 0.72rem;
    }
    /* floating-announcement disabled, replaced by notif panel */
    .ptn-grid { grid-template-columns: repeat(3, 1fr); }

    .ranking-cards { grid-template-columns: 1fr; }
    .chat-window { width: 300px; }
    .vision-mission-grid { grid-template-columns: 1fr; }
    .sound-toggle span { display: none; }
}

@media (max-width: 480px) {
    .hero-slogan { gap: 8px; }
    .slogan-item { font-size: 0.65rem; letter-spacing: 2px; }
    .ptn-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-masonry { grid-template-columns: 1fr 1fr; }
    .gallery-item { aspect-ratio: 1 / 1; }
    .hero-stats { gap: 4px; }
    .marquee-section { height: 36px; }
    .marquee-content { font-size: 0.7rem; }
}

/* Ultra-wide */
@media (min-width: 1440px) {
    .container { max-width: 1400px; }
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   MOBILE VIDEO + ABOUT BENTO EXTRA FIXES
   ============================================ */
@media (max-width: 768px) {
    /* Video hero tidak melar */
    .hero-video-container {
    transform: translateZ(0); overflow: hidden; }
    .youtube-bg iframe {
        width: 177.78vh;
        height: 100vh;
        min-width: unset;
        min-height: unset;
    }

    /* About bento: single column di layar kecil */
    .about-bento {
        grid-template-columns: 1fr;
    }
    .bento-main,
    .bento-about-desc,
    .bento-card.bento-accent:nth-child(3),
    .bento-card.bento-accent:nth-child(4),
    .bento-keunggulan {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    .bento-card-inner { min-height: 200px; }
    .bento-keunggulan-list { grid-template-columns: 1fr; }
}
/* === NEWS LOAD MORE === */
.news-load-more {
    text-align: center;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--spring);
    box-shadow: var(--card-shadow);
}
.btn-load-more:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6,95,70,0.25);
}
.btn-load-more:hover i { color: white; }
.btn-load-more i:first-child { color: var(--primary); font-size: 0.9rem; transition: color 0.3s; }
.btn-load-more i:last-child {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s;
}
.btn-load-more.loading i:last-child { animation: spinChevron 1s linear infinite; }
.btn-load-more.all-loaded {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}
.load-more-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-height: 18px;
}
@keyframes spinChevron {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === TESTIMONIAL LOAD MORE === */
.testimonial-load-wrap {
    text-align: center;
    margin-top: 40px;
}

/* ============================================
   TABLET / IPAD RESPONSIVE (1024px ke bawah)
   Font & layout menyesuaikan agar terbaca
   ============================================ */
@media (max-width: 1024px) {
    html { font-size: 15.5px; }

    .section-heading { font-size: clamp(1.85rem, 4vw, 2.8rem); }
    .section-desc    { font-size: 1rem; }
    .section-eyebrow { font-size: 0.78rem; }

    /* Nav */
    .nav-link        { font-size: 0.875rem; padding: 7px 11px; }
    .brand-text h1   { font-size: 0.95rem; }

    /* Hero */
    .title-line      { font-size: clamp(2.2rem, 7vw, 5rem); }
    .hero-num        { font-size: clamp(5rem, 15vw, 12rem); }
    .hero-badge      { font-size: 0.7rem; }
    .slogan-item     { font-size: 0.8rem; letter-spacing: 3px; }
    .stat-num        { font-size: 1.5rem; }
    .stat-label      { font-size: 0.72rem; }

    /* Cards */
    .news-title      { font-size: 1rem; }
    .news-excerpt    { font-size: 0.875rem; }
    .agenda-title    { font-size: 0.98rem; }
    .testimonial-text { font-size: 0.9rem; }
    .bento-text p    { font-size: 0.875rem; }
    .vm-card p       { font-size: 0.92rem; }
    .mission-card li { font-size: 0.9rem; }
    .subject-list li { font-size: 0.875rem; }
    .quote-block p   { font-size: 0.92rem; }
    .facility-info p { font-size: 0.875rem; }
    .facility-info h4 { font-size: 1rem; }
    .ptn-card h4     { font-size: 0.78rem; }
    .ptn-count       { font-size: 1.35rem; }

    /* Footer */
    .footer-col ul li a { font-size: 0.875rem; }
    .footer-brand p     { font-size: 0.875rem; }

    /* Buttons */
    .btn-ranking     { font-size: 0.875rem; padding: 13px 22px; }
    .btn-hero-primary, .btn-hero-secondary { font-size: 0.875rem; padding: 12px 22px; }
}

/* ============================================
   MOBILE FONT SCALE
   ============================================ */
@media (max-width: 768px) {
    html { font-size: 15px; }

    .section-heading { font-size: clamp(1.6rem, 5.5vw, 2.2rem); }
    .section-desc    { font-size: 0.95rem; }

    /* Ranking CTA: tombol susun vertikal */
    .ranking-cta { flex-direction: column; align-items: center; gap: 12px; }
    .btn-ranking { width: 100%; max-width: 360px; justify-content: center; font-size: 0.875rem; }

    /* Chat: posisi di bawah FAB */
    .chat-toggle { width: 48px; height: 48px; }
    .chat-window { width: 300px; max-width: 300px; right: 16px; left: auto; }
}

/* ============================================
   CHAT MOBILE RESPONSIVE FIX
   Android, iPhone, iPad, Tablet
   ============================================ */
@media (max-width: 768px) {
    /* Chat window: compact popup di sudut kanan bawah, BUKAN full width */
    .chat-window {
        width: 300px !important;
        max-width: 300px !important;
        right: 16px !important;
        left: auto !important;
        bottom: 72px;
        max-height: 460px;
        position: fixed;
    }
    .chat-body {
        max-height: 280px;
        height: auto;
        min-height: 160px;
        overflow: hidden;
    }
    .chat-messages {
        padding: 10px 12px 6px;
        gap: 8px;
    }
    .message-bot, .message-user div, .message-operator div {
        font-size: 0.82rem;
        padding: 8px 12px;
        max-width: 85%;
    }
    .chat-registration {
        padding: 10px 14px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 300px;
    }
    .chat-footer {
        padding: 8px 10px;
    }
    .chat-footer input {
        font-size: 0.82rem;
        padding: 8px 12px;
    }
    .send-btn, .end-btn {
        width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: 290px !important;
        max-width: 290px !important;
        right: 12px !important;
        left: auto !important;
        max-height: 450px;
    }
    .chat-body {
        max-height: 260px;
        height: auto;
        min-height: 140px;
    }
    .chat-registration {
        max-height: 290px;
    }
}

/* iPad / Tablet landscape */
@media (min-width: 768px) and (max-width: 1024px) {
    .chat-window {
        width: 340px;
        right: 0;
        position: absolute;
    }
    .chat-body {
        max-height: 360px;
        height: 360px;
    }
}

/* ============================================
   NEWS MODAL CLOSE BUTTON — MOBILE FIX
   ============================================ */
@media (max-width: 768px) {
    .news-modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .news-modal-card {
        padding: 48px 18px 20px;
    }
    .news-modal-body {
        font-size: 0.875rem;
        line-height: 1.75;
    }
    .news-modal-body h2 {
        font-size: 1.15rem !important;
    }
}

/* ============================================
   COOKIES CONSENT BANNER
   Premium · Responsive · All Devices
   ============================================ */
.cookies-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99990;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 0 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.cookies-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.cookies-banner {
    width: 100%;
    max-width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
    padding: 20px 24px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    overflow: hidden;
}
.cookies-overlay.active .cookies-banner {
    transform: translateY(0);
}
.cookies-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald-500), var(--gold-400), var(--emerald-500));
    background-size: 200% 100%;
    animation: glowSweep 3s linear infinite;
}
.cookies-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cookies-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--emerald-50);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
[data-theme="dark"] .cookies-icon-wrap {
    background: rgba(16,185,129,0.1);
}
.cookies-text {
    flex: 1;
    min-width: 240px;
}
.cookies-text h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.cookies-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.cookies-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.cookies-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.btn-cookies-accept {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grad-primary);
    color: white;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    transition: var(--spring);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.btn-cookies-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6,95,70,0.3);
}
.btn-cookies-decline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.btn-cookies-decline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}
.btn-cookies-settings {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
    touch-action: manipulation;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-cookies-settings:hover {
    color: var(--emerald-700);
}

/* Cookies settings modal */
.cookies-settings-modal .modal-card {
    max-width: 520px;
}
.cookies-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.cookies-option:last-child { border-bottom: none; }
.cookies-option-info h5 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}
.cookies-option-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}
.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.cookies-save-btn {
    display: block;
    width: 100%;
    background: var(--grad-primary);
    color: white;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--spring);
}
.cookies-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6,95,70,0.3);
}

/* Responsive cookies */
@media (max-width: 768px) {
    .cookies-banner {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    }
    .cookies-inner {
        gap: 14px;
    }
    .cookies-icon-wrap {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    .cookies-text h4 { font-size: 0.88rem; }
    .cookies-text p  { font-size: 0.78rem; }
    .cookies-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    .btn-cookies-accept  { padding: 9px 20px; font-size: 0.82rem; }
    .btn-cookies-decline { padding: 9px 14px; font-size: 0.78rem; }
}
@media (max-width: 400px) {
    .cookies-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-cookies-accept,
    .btn-cookies-decline {
        width: 100%;
        justify-content: center;
    }
}

.cursor-dot, .cursor-ring { display: none !important; }
