/* =====================================================================
   FILE: assets/css/style.css
   BARIS INI: Seluruh gaya visual website (warna, tipografi, layout, grid,
              navbar, kartu, footer, dan semua breakpoint responsive).
   JIKA DIUBAH: Berlaku untuk seluruh halaman karena semua halaman memuat
                file CSS ini lewat includes/header.php.
   CARA GANTI:
     - Warna utama & aksen: ubah variabel di dalam :root di bagian paling atas.
     - Breakpoint responsive: cari komentar "BREAKPOINT" di bagian bawah file.
   ===================================================================== */

/* ---------- 1. VARIABEL & RESET DASAR ---------- */
:root {
    --navy-900: #0a1f44;
    --navy-800: #0f2c5c;
    --navy-700: #14356e;
    --gold-500: #f4b400;
    --gold-400: #ffcc33;
    --ink: #1c2333;
    --muted: #5c6579;
    --bg-soft: #f5f7fb;
    --border: #e3e7f0;
    --white: #ffffff;
    --radius: 14px;
    --shadow-sm: 0 2px 10px rgba(10, 31, 68, 0.06);
    --shadow-md: 0 10px 30px rgba(10, 31, 68, 0.12);
    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden; /* BARIS INI: mencegah horizontal scroll di layar sempit */
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy-900); line-height: 1.25; }

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

.section { padding: 60px 0; }
.section-alt { background: var(--bg-soft); }

.section-label {
    display: inline-block;
    color: var(--gold-500);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.section-title { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; }

.section-desc { color: var(--muted); max-width: 620px; margin-top: 10px; }

.section-head { margin-bottom: 34px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .section-desc { margin-left: auto; margin-right: auto; }

/* ---------- 2. TOMBOL ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-height: 46px; /* BARIS INI: memastikan tombol nyaman disentuh di HP (touch-friendly) */
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }

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

.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: 0.85rem; }
.btn-danger { background: #fde8e8; color: #b42318; }
.btn-danger:hover { background: #fbd5d5; }

/* ---------- 3. TOPBAR & NAVBAR ---------- */
.topbar { background: var(--navy-900); color: rgba(255,255,255,0.85); font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding: 8px 20px; flex-wrap: wrap; }
.topbar-inner i { color: var(--gold-500); margin-right: 4px; }

.site-header {
    position: sticky;
    /* topbar ikut tergulung ke atas, hanya navbar yang menempel. Nilai --topbar-h diisi otomatis oleh main.js */
    top: calc(var(--topbar-h, 36px) * -1);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
/* Navbar disembunyikan saat scroll ke bawah, muncul lagi saat scroll ke atas */
.site-header.nav-hidden { transform: translateY(-100%); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 14px 20px;
    gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge {
    width: 42px; height: 42px;
    background: var(--navy-900);
    color: var(--gold-500);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
/* Logo Tut Wuri Handayani + lambang Nias Selatan (navbar & footer) */
.brand-logos { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-logos img { height: 40px; width: auto; display: block; }
.footer-brand .brand-logos img { height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-heading); color: var(--navy-900); font-size: 1.02rem; }
.brand-text small { color: var(--muted); font-size: 0.72rem; }
.footer-brand { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { color: var(--white); }

/* Menu (mobile-first: default disembunyikan sebagai dropdown) */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(78vw, 320px);
    height: 100dvh;
    background: var(--navy-900);
    display: flex;
    flex-direction: column;
    padding: 90px 26px 26px;
    gap: 6px;
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}
.nav-menu.open { right: 0; }

.nav-menu li a {
    display: block;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    padding: 13px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 44px; /* touch-friendly */
}
.nav-menu li a.active { color: var(--gold-500); }
.nav-menu li a.btn-admin {
    margin-top: 14px;
    background: var(--gold-500);
    color: var(--navy-900);
    border-radius: 8px;
    text-align: center;
    border-bottom: none;
    font-weight: 700;
}

.hamburger {
    background: none; border: none; cursor: pointer;
    width: 44px; height: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    z-index: 1002;
}
.hamburger span { width: 24px; height: 2.5px; background: var(--navy-900); border-radius: 2px; transition: 0.25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =====================================================================
   MENU TITIK TIGA (⋮) — akses admin di navbar
   ===================================================================== */
.navbar { position: relative; }
.nav-actions { display: flex; align-items: center; gap: 2px; }

.kebab-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent;
    color: var(--muted); cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
/* Tiga titik vertikal dibuat murni dengan CSS: satu titik + dua bayangan di atas & bawahnya */
.kebab-dots {
    display: block; width: 4px; height: 4px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}
.kebab-btn:hover { background: var(--bg-soft); color: var(--navy-800); }
.kebab-btn:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.admin-access.open .kebab-btn { background: var(--navy-900); color: var(--gold-500); }

.admin-menu {
    position: absolute; top: calc(100% - 6px); right: 20px;
    width: min(288px, calc(100vw - 32px));
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(10, 31, 68, 0.2), 0 2px 8px rgba(10, 31, 68, 0.06);
    padding: 8px;
    z-index: 1003;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px) scale(0.97); transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.admin-access.open .admin-menu {
    opacity: 1; visibility: visible; transform: none;
    transition-delay: 0s;
}

.admin-menu-head { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.admin-menu-eyebrow {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--navy-700);
}
.admin-menu-eyebrow::before { content: ''; width: 16px; height: 3px; border-radius: 2px; background: var(--gold-500); }
.admin-menu-eyebrow.admin-status::before {
    width: 8px; height: 8px; border-radius: 50%; background: #22a05a;
    box-shadow: 0 0 0 3px rgba(34, 160, 90, 0.18);
}
.admin-menu-head p { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

.admin-menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 12px;
    color: var(--navy-900);
    transition: background 0.15s ease;
}
.admin-menu-item:hover, .admin-menu-item:focus-visible { background: var(--bg-soft); outline: none; }
.admin-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--gold-500); }
.ami-icon {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--navy-900); color: var(--gold-500); font-size: 1rem;
    transition: background 0.2s ease;
}
.admin-menu-item:hover .ami-icon { background: var(--navy-700); }
.ami-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.ami-text strong { font-size: 0.92rem; font-weight: 600; }
.ami-text small { color: var(--muted); font-size: 0.76rem; }
.ami-icon svg { width: 20px; height: 20px; }
.ami-arrow { width: 14px; height: 14px; flex-shrink: 0; color: var(--muted); transition: transform 0.2s ease; }
.admin-menu-item:hover .ami-arrow { transform: translateX(3px); }
.admin-menu-item.danger .ami-icon { background: #fde8e8; color: #b42318; }
.admin-menu-item.danger:hover .ami-icon { background: #fbd5d5; }
.admin-menu-item.danger .ami-text strong { color: #b42318; }

@media (prefers-reduced-motion: reduce) {
    .admin-menu, .kebab-btn, .ami-arrow { transition: none; }
}

/* Layar HP sangat sempit: sembunyikan teks kecil di bawah nama sekolah supaya navbar tetap satu baris */
@media (max-width: 360px) {
    .navbar { padding-left: 14px; padding-right: 14px; gap: 8px; }
    .brand-text small { display: none; }
    .admin-menu { right: 14px; }
}

.nav-overlay {
    position: fixed; inset: 0; background: rgba(10,31,68,0.5);
    z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.nav-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- 4. HERO ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    padding: 56px 0 70px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.5;
}
.hero-inner { position: relative; display: grid; gap: 34px; align-items: center; }
.hero-eyebrow { color: var(--gold-500); font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; display: block; }
.hero h1 { color: var(--white); font-size: clamp(1.8rem, 5.5vw, 2.7rem); }
.hero h1 span { color: var(--gold-500); }
.hero p { color: rgba(255,255,255,0.82); margin: 16px 0 26px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 40px;
    position: relative;
}
.hero-stats .stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.hero-stats .stat i { color: var(--gold-500); font-size: 1.3rem; margin-bottom: 8px; }
.hero-stats .stat strong { display: block; color: var(--white); font-size: 0.92rem; }

.hero-media {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
    background: rgba(255,255,255,0.08);
}

.page-hero {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    padding: 46px 0;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.5rem, 5vw, 2.1rem); }
.breadcrumb { margin-top: 8px; color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.breadcrumb a { color: rgba(255,255,255,0.9); }
.breadcrumb .sep { margin: 0 6px; }

/* ---------- 5. KARTU / GRID UMUM ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.icon-card { text-align: center; padding: 26px 16px; }
.icon-card .icon-wrap {
    width: 58px; height: 58px;
    margin: 0 auto 14px;
    border-radius: 14px;
    background: var(--navy-900);
    color: var(--gold-500);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.icon-card h3 { font-size: 1rem; }

/* Sambutan kepala sekolah */
.welcome-grid { grid-template-columns: 1fr; align-items: center; }
.welcome-photo {
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}
.welcome-photo i { display:block; font-size: 2.4rem; margin-bottom: 10px; color: var(--navy-800); }
blockquote.pull-quote {
    border-left: 4px solid var(--gold-500);
    background: var(--bg-soft);
    padding: 16px 18px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: var(--navy-800);
    margin: 18px 0;
}

/* Prestasi */
.prestasi-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
}
.prestasi-item + .prestasi-item { margin-top: 12px; }
.prestasi-thumb {
    width: 56px; height: 56px; border-radius: 12px;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-500); font-size: 1.3rem;
    flex-shrink: 0; overflow: hidden;
}
.prestasi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
    display: inline-block;
    background: var(--navy-900);
    color: var(--gold-500);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 4px;
}
.prestasi-meta { color: var(--muted); font-size: 0.85rem; }

/* Galeri */
.filter-bar { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 26px; -webkit-overflow-scrolling: touch; }
.filter-chip {
    flex: 0 0 auto;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-800);
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
}
.filter-chip.active { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--white); }
.gallery-photo { aspect-ratio: 4/3; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative; }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery-tag { position: absolute; top: 10px; left: 10px; background: var(--navy-900); color: var(--gold-500); font-size: 0.68rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.gallery-caption { padding: 12px 14px; font-weight: 600; font-size: 0.9rem; }
.gallery-caption small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* Kontak */
.contact-grid { grid-template-columns: 1fr; }
.contact-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: none; }
.contact-icon {
    width: 46px; height: 46px; border-radius: 10px;
    background: var(--bg-soft); color: var(--navy-800);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: var(--white);
    border-radius: var(--radius);
    padding: 40px 26px;
    text-align: center;
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,0.8); margin: 12px auto 22px; max-width: 480px; }

/* ---------- 5b. KARTU GURU & PRATINJAU FOTO PENGATURAN ---------- */
.guru-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.guru-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.guru-photo {
    width: 84px; height: 84px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    font-size: 1.6rem;
    border: 3px solid var(--bg-soft);
}
.guru-photo img { width: 100%; height: 100%; object-fit: cover; }
.guru-card h3 { font-size: 0.98rem; margin-bottom: 4px; }
.guru-card .guru-mapel { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.guru-card .badge { background: var(--bg-soft); color: var(--navy-800); }

.settings-preview {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    overflow: hidden;
    margin-bottom: 12px;
    font-size: 0.85rem;
    text-align: center;
}
.settings-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 5c. KARTU BERITA & HALAMAN DETAIL BERITA ---------- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.news-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.news-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    position: relative;
    overflow: hidden;
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-kategori {
    position: absolute; top: 10px; left: 10px;
    background: var(--navy-900); color: var(--gold-500);
    font-size: 0.68rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
}
.news-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-date { color: var(--muted); font-size: 0.78rem; }
.news-date i { color: var(--gold-500); margin-right: 4px; }
.news-body h3 { font-size: 1.02rem; }
.news-excerpt { color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.news-readmore { font-weight: 600; font-size: 0.85rem; color: var(--navy-800); margin-top: auto; }
.news-readmore i { margin-left: 4px; font-size: 0.78rem; }

.news-detail-head { margin-bottom: 20px; }
.news-detail-head h1 { font-size: clamp(1.35rem, 4vw, 1.9rem); margin: 10px 0; }
.news-detail-photo {
    width: 100%; aspect-ratio: 16/9;
    border-radius: var(--radius); overflow: hidden;
    background: var(--bg-soft);
    margin-bottom: 22px;
}
.news-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.news-detail-content { color: var(--ink); line-height: 1.8; font-size: 1rem; }
.news-detail-content p { margin-bottom: 14px; }

/* ---------- 6. FOOTER ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; padding-bottom: 34px; }
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid p { font-size: 0.88rem; line-height: 1.6; }
.footer-links li { margin-bottom: 10px; font-size: 0.88rem; }
.footer-links a:hover { color: var(--gold-500); }
.footer-links i { color: var(--gold-500); width: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; text-align: center; font-size: 0.82rem; }

#backToTop {
    position: fixed; bottom: 22px; right: 22px;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--navy-900); color: var(--gold-500);
    border: none; cursor: pointer; box-shadow: var(--shadow-md);
    display: none; align-items: center; justify-content: center;
    font-size: 1rem; z-index: 500;
}
#backToTop.show { display: flex; }

/* ---------- 7. FORM (dipakai di admin) ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    min-height: 46px;
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-control:focus { outline: 2px solid var(--navy-700); outline-offset: 1px; }

/* ----- Halaman Akun Admin (ganti username & password) ----- */
.akun-wrap { max-width: 640px; display: grid; gap: 22px; }
.akun-judul { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.akun-ikon {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy-900); color: var(--gold-500); font-size: 0.9rem;
}
.pw-field { position: relative; }
.pw-field .form-control { padding-right: 116px; }
.pw-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--navy-700); font-weight: 600; font-size: 0.78rem;
    padding: 6px 8px; border-radius: 8px;
}
.pw-toggle:hover { background: var(--bg-soft); }
.pw-meter { height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 10px; }
.pw-meter-bar { height: 100%; width: 0; border-radius: 99px; transition: width 0.25s ease, background 0.25s ease; }
.pw-label { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.pw-checks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.pw-checks li::before { content: '○'; margin-right: 8px; }
.pw-checks li.ok { color: #1c6b3a; }
.pw-checks li.ok::before { content: '✓'; font-weight: 700; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.akun-tips {
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; font-size: 0.86rem; color: var(--muted);
}
.akun-tips strong { color: var(--navy-900); display: block; margin-bottom: 6px; }
.akun-tips ul { margin: 0 0 0 18px; display: grid; gap: 3px; }

/* Bagian-bagian form di halaman Pengaturan admin */
.form-section-title { font-size: 1.05rem; margin: 26px 0 4px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-hint { color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.alert ul { margin: 6px 0 0 18px; }
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 0.9rem; }
.alert-success { background: #e6f6ec; color: #1c6b3a; }
.alert-error { background: #fde8e8; color: #b42318; }

/* ---------- 8. ADMIN LAYOUT ---------- */
.admin-login-wrap {
    min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    padding: 20px;
}
.admin-login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px 26px;
    width: 100%; max-width: 380px;
    box-shadow: var(--shadow-md);
}
.admin-login-card .brand-badge { margin: 0 auto 16px; }
.admin-login-card h1 { text-align: center; font-size: 1.3rem; }
.admin-login-card p.sub { text-align: center; color: var(--muted); font-size: 0.88rem; margin-bottom: 22px; }

.admin-shell { display: flex; flex-direction: column; min-height: 100dvh; background: var(--bg-soft); }
.admin-topbar {
    background: var(--navy-900); color: var(--white);
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    position: sticky; top: 0; z-index: 100;
}
.admin-topbar .brand-text strong { color: var(--white); }
.admin-topbar .brand-text small { color: rgba(255,255,255,0.6); }
.admin-topbar-actions { display: flex; align-items: center; gap: 14px; }
.admin-menu-btn { background: none; border: none; color: var(--white); font-size: 1.2rem; cursor: pointer; }

.admin-body { display: flex; flex: 1; position: relative; }
.admin-sidebar {
    position: fixed; top: 0; bottom: 0; left: -100%;
    width: 250px; background: var(--navy-900);
    padding: 90px 16px 20px;
    transition: left 0.25s ease;
    z-index: 200;
    overflow-y: auto;
}
.admin-sidebar.open { left: 0; }
.admin-sidebar a {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.8);
    padding: 12px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 4px;
    min-height: 44px;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-sidebar a i { width: 20px; }

.admin-main { flex: 1; padding: 22px 16px 60px; width: 100%; }
.admin-page-title { margin-bottom: 4px; }
.admin-page-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }

.admin-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.admin-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th, .data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.data-table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.5px; }
.data-table .thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--bg-soft); }
.action-btns { display: flex; gap: 8px; }

.stat-cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.stat-card .icon-wrap { width: 50px; height: 50px; border-radius: 12px; background: var(--navy-900); color: var(--gold-500); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-card strong { font-size: 1.4rem; display: block; }
.stat-card span { color: var(--muted); font-size: 0.85rem; }

/* =====================================================================
   BREAKPOINT: TABLET (>= 640px)
   ===================================================================== */
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .guru-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   BREAKPOINT: DESKTOP (>= 769px) — navbar berubah dari hamburger ke menu mendatar
   ===================================================================== */
/* NAVBAR DESKTOP: menu penuh hanya tampil mulai 1000px. Di bawah itu (HP & tablet)
   dipakai tombol hamburger + menu geser, karena logo + 9 menu tidak muat di layar sempit. */
@media (min-width: 1000px) {
    .hamburger { display: none; }
    .nav-menu {
        position: static;
        width: auto; height: auto;
        flex-direction: row;
        background: transparent;
        padding: 0;
        gap: clamp(14px, 2vw, 26px);
        align-items: center;
        overflow: visible;
    }
    .nav-menu li a {
        color: var(--navy-800);
        border-bottom: none;
        padding: 8px 2px;
        font-size: 0.94rem;
        position: relative;
        white-space: nowrap;
        min-height: 0;
    }
    .nav-menu li a.active { color: var(--navy-900); font-weight: 700; }
    .nav-menu li a.active::after {
        content: '';
        position: absolute; left: 0; right: 0; bottom: -4px;
        height: 3px; background: var(--gold-500); border-radius: 2px;
    }
    .nav-menu li a.btn-admin {
        background: var(--navy-900); color: var(--white);
        padding: 10px 18px; margin-top: 0;
    }
    .nav-menu li a.btn-admin:hover { background: var(--navy-700); }
    .brand-text { white-space: nowrap; }
}

@media (min-width: 769px) {
    .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
    .welcome-grid { grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: 30px; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .guru-grid { grid-template-columns: repeat(4, 1fr); }
    .news-grid { grid-template-columns: repeat(3, 1fr); }

    .admin-sidebar { position: sticky; left: 0; top: 64px; height: calc(100dvh - 64px); padding-top: 24px; }
    .admin-menu-btn { display: none; }
    .admin-main { padding: 28px 32px 60px; }
}

@media (min-width: 1024px) {
    .section { padding: 80px 0; }
}
