/* ===== RESET & VARIABEL ===== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    font-size: 16px; /* dasar ukuran - karena hampir semua font-size di seluruh
                         situs (publik, admin, caleg) pakai satuan rem, angka
                         dasar ini otomatis ikut menentukan ukuran SEMUA teks
                         di situs. Diperkecil khusus mobile di bawah. */
}

@media (max-width: 767px) {
    html {
        font-size: 16px; /* [Update] sebelumnya 14px (~12.5% lebih kecil dari
                             desktop) - dinaikkan ke 16px (sama dengan desktop)
                             karena banyak elemen di mobile-optimize.css sudah
                             punya rem kecil sendiri untuk mobile, jadi kalau
                             ditambah pengecilan 14px di sini teksnya jadi
                             dobel kecil dan susah dibaca. Ukuran per elemen
                             tetap diatur lewat rem masing-masing di bawah. */
    }
}

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

#home,
#daerah-pemilihan,
#tentang {
    scroll-margin-top: 64px;
}

:root {
    --navy-dark: #0b2340;
    --navy-darker: #081a30;
    --navy-light: #16345c;
    --orange: #d97a2f;
    --gold: #d4a94c;
    --text-light: #f5f5f5;
    --gray-bg: #f4f6f8;
    --bg-soft: #eef2fb;
    --dapil-1: #8bc471;
    --dapil-2: #b9a2e0;
    --dapil-3: #7fbde8;
    --shadow-sm: 0 2px 8px rgba(11,35,64,0.08);
    --shadow-md: 0 10px 28px rgba(11,35,64,0.12);
    --shadow-lg: 0 20px 48px rgba(11,35,64,0.18);
    --radius-md: 14px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--navy-dark);
    color: #fff;
}

/* Scrollbar custom biar terasa lebih premium (Chrome/Edge/Safari) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--gray-bg);
}
::-webkit-scrollbar-thumb {
    background: #c7d0da;
    border-radius: 999px;
    border: 2px solid var(--gray-bg);
}
::-webkit-scrollbar-thumb:hover {
    background: #a9b6c4;
}

a, button {
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}

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

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

/* ===== BINGKAI UTAMA SITUS ===== */
.site-shell {
    width: 100%;
    max-width: 100%;
    background: #fff;
    min-height: 105vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Dipakai khusus di homepage: navbar melayang transparan di atas hero,
   supaya foto pesisir kelihatan penuh di belakangnya. */
.navbar--transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    box-shadow: none;
    z-index: 50;
}

.navbar--transparent .brand-text {
    color: #fff;
}

.navbar--transparent .nav-menu a {
    color: #fff;
}

.navbar--transparent .nav-menu a::after {
    background: #fff;
}

.navbar--transparent .nav-toggle span {
    background: #fff;
}

.navbar--transparent .btn-login {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: none;
}

.navbar--transparent .btn-login:hover {
    background: rgba(255,255,255,0.24);
    box-shadow: none;
}

.navbar-inner {
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto; /* [Update] supaya brand (logo+judul) yang boleh menyusut
                        duluan kalau ruang sempit, BUKAN menu/tombol Login -
                        sebelumnya perlindungan ini cuma ada di mode HP
                        (mobile-optimize.css), padahal di lebar tablet/iPad
                        (768-1024px) yang dipakai justru CSS desktop ini,
                        jadi tombol Login bisa tetap terdorong keluar layar
                        di lebar segitu kalau tidak ditangani di sini juga. */
    min-width: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    max-width: none; /* cegah bug lonjong yang sama seperti di foto tabel admin -
                         tanpa ini, logo bisa mengecil lebarnya saja (bukan
                         tingginya) kalau baris brand menyempit di layar kecil */
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 50%;
}

.brand-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-dark);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0; /* menu + tombol Login jangan sampai ikut menyusut/terpotong -
                        .brand di atas yang mengalah duluan kalau ruang sempit */
}

.nav-menu a {
    position: relative;
    font-size: 1.05rem;
    color: #333;
    font-weight: 500;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--navy-dark), #1d4ed8);
    transition: width 0.25s var(--ease);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1d4ed8;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.btn-login {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-darker));
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 999px;
    border-bottom: none !important;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 14px rgba(11,35,64,0.28);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--navy-darker), #051121);
    border-bottom: none !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11,35,64,0.35);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--navy-dark);
    border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 600px; /* dikembalikan ke ukuran awal sesuai referensi gambar */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-bottom: 70px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    animation: heroZoom 16s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,26,48,0.65) 0%, rgba(8,26,48,0.3) 45%, rgba(8,26,48,0.1) 75%, rgba(8,26,48,0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 900px;
    padding: 150px 24px 0; /* dikembalikan ke ukuran awal sesuai referensi gambar */
    animation: fadeUp 0.8s var(--ease) both;
}

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.hero-content h1 {
    font-size: 2.8rem; /* dikembalikan ke ukuran awal */
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.hero-content h2.hero-sub {
    font-size: 1.8rem; /* dikembalikan ke ukuran awal */
    font-weight: 700;
    color: #bcd4ff;
    text-transform: uppercase;
    margin-top: 6px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--navy-dark), #123a63);
    color: #fff;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(11,35,64,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-darker), #051121);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(11,35,64,0.4);
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* Lengkung putih pemisah antara hero dan konten di bawahnya */
.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 3;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 90px;
    display: block;
}

/* Garis aksen pendek di bawah judul section (Kenali Daerah Pemilihan, Tentang Sistem) */
.section-heading {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 6px;
}

.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--navy-dark);
    border-radius: 2px;
}

/* ===== FITUR SINGKAT (4 ikon di bawah hero) ===== */
.features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 30px 5% 60px;
    background: #fff;
}

.feature {
    text-align: center;
    max-width: 230px;
    padding: 0 40px;
    position: relative;
    color: inherit;
}

.feature + .feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #e3e6f0;
}

/* Reset tampilan default <button>, dipakai supaya "Cari Caleg" tetap
   terlihat sama seperti feature lain meski sekarang berupa tombol
   (bukan link) yang membuka modal pencarian, bukan pindah halaman. */
.feature-btn {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

.feature-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--navy-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 14px;
    transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.feature:hover .feature-icon {
    background: var(--navy-darker);
    transform: translateY(-3px);
}

.feature h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 6px;
}

.feature p {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
}

/* ===== DAERAH PEMILIHAN (index.php) ===== */
.dapil-section {
    background: var(--bg-soft);
    border-radius: 22px;
    margin: 0 5% 60px;
    padding: 44px 44px 20px;
}

.dapil-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 20px;
}

.dapil-left p {
    font-size: 0.92rem;
    color: #5b6178;
    line-height: 1.7;
    margin: 16px 0 24px;
}

.dapil-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.dapil-item-ic {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.dapil-item h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 3px;
}

.dapil-item p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
}

/* Peta interaktif (Leaflet) menyatu langsung di background section, tanpa kartu terpisah */
.map-visual {
    position: relative;
    height: 480px;
}

.map-visual #peta-dapil {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: var(--bg-soft);
}

/* Kontrol zoom bawaan Leaflet, distyle ulang supaya jadi kotak putih bulat seperti desain */
.map-visual .leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}
.map-visual .leaflet-control-zoom a {
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    background: #fff !important;
    color: #333 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    margin-bottom: 4px !important;
    border: none !important;
}
.map-visual .leaflet-control-attribution {
    background: transparent !important;
    font-size: 10px !important;
    color: #8b93ab !important;
}

/* Legenda Dapil, mengambang di atas peta */
.legenda-dapil {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 700;
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transition: box-shadow 0.25s var(--ease);
}

.legenda-dapil h3 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--navy-dark);
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #333;
}

.legenda-item:last-child {
    margin-bottom: 0;
}

.legenda-warna {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .dapil-grid {
        grid-template-columns: 1fr;
    }
    .map-visual {
        height: 380px;
    }
}

/* Label nama kecamatan yang tampil permanen di atas tiap wilayah pada peta.
   !important dipakai karena leaflet.css dimuat setelah file ini, jadi style
   kotak/border bawaan Leaflet untuk tooltip perlu ditimpa paksa di sini. */
.label-kecamatan {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.68rem;
    font-weight: 700;
    color: #1a1a1a;
    text-shadow:
        -1px -1px 0 #fff, 1px -1px 0 #fff,
        -1px 1px 0 #fff, 1px 1px 0 #fff,
        0 0 3px #fff;
    white-space: nowrap;
    pointer-events: none;
}
.label-kecamatan::before {
    display: none !important;
}

@media (max-width: 767px) {
    .label-kecamatan {
        font-size: 0.58rem;
    }
}

/* [Update] Sebelumnya pakai "display:flex", tapi karena isi kotak ini diganti
   lewat JS jadi campuran teks biasa + beberapa <strong> (nama kecamatan, nama
   dapil, dst - lihat js/script.js), flex membuat tiap potongan teks dianggap
   "kotak" terpisah sehingga tulisan tampak terpotong-potong/bertumpuk di HP.
   Diganti ke alur teks normal (block) supaya kalimatnya mengalir & membungkus
   baris seperti paragraf biasa, tidak peduli sepanjang apa isinya. */
.info-dapil-box {
    margin-bottom: 24px;
    background: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20,30,70,0.06);
    font-size: 0.85rem;
    line-height: 1.55;
    color: #555;
}
.info-dapil-box i {
    color: var(--navy-dark);
    margin-right: 8px;
}

/* ===== TENTANG (ringkas di index) ===== */
.section-tentang {
    background: linear-gradient(180deg, #eef2fb, #e3ebfb);
    padding: 60px 5% 0;
    position: relative;
    overflow: hidden;
}

.tentang-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: end;
}

.tentang-text {
    padding-bottom: 50px;
}

.section-tentang h2 {
    color: var(--navy-dark);
    font-size: 2rem;
    line-height: 1.25;
}

.section-tentang p {
    color: #5b6178;
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 16px 0 22px;
}

.tentang-item {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.tentang-item-ic {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--navy-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.tentang-item h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 2px;
}

.tentang-item p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.tentang-image {
    align-self: end;
}

.tentang-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== FOOTER ===== */
.footer-wave {
    line-height: 0;
    margin-top: -1px;
    background: #ffffff; /* default: menyatu dengan latar putih polos di sebagian besar halaman */
}
.footer-wave svg {
    width: 100%;
    height: 70px;
    display: block;
}

.site-footer {
    background: var(--navy-dark);
    color: #cdd6f0;
    padding: 50px 5% 20px;
    margin-top: -1px;
    flex-shrink: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.footer-brand img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.footer-brand h4 {
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.76rem;
    line-height: 1.6;
    color: #a9b3d6;
}

.footer-col h5 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: #a9b3d6;
    text-decoration: none;
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #fff;
}

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

.social-icons a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-icons a:hover {
    background: var(--gold);
    color: var(--navy-darker);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 16px;
    text-align: center;
    font-size: 0.78rem;
    color: #93a0c9;
}

@media (max-width: 767px) {
    .site-footer {
        padding: 32px 6% 16px; /* dikecilkan dari 50px atas / 20px bawah, khusus mobile - desktop tetap 50px/20px */
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 22px; /* dikecilkan dari 40px, supaya 3 bagian yang ditumpuk (Brand, Menu, Ikuti Kami) tidak jadi kepanjangan di HP */
        margin-bottom: 18px;
    }
    .footer-brand img {
        width: 38px;
        height: 38px;
    }
    .footer-brand h4 {
        font-size: 0.8rem;
    }
    .footer-brand p {
        font-size: 0.74rem;
    }
    .footer-col h5 {
        margin-bottom: 8px; /* dari 14px */
    }
    .footer-col a {
        margin-bottom: 6px; /* dari 10px */
    }
    .footer-bottom {
        padding-top: 12px; /* dari 16px */
    }
}

/* ===== LOGIN PAGE (split-screen: foto di kiri, panel login di kanan) ===== */
.login-split {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: calc(100vh - 78px);
}

/* ---- KIRI: foto Kantor KPU ---- */
.login-split-photo {
    position: relative;
    overflow: hidden;
}
.login-split-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.login-split-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,26,48,.15), rgba(8,26,48,.5) 100%);
}

.login-split-back {
    position: absolute;
    left: 32px;
    top: 32px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-dark);
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.login-split-back:hover {
    transform: translateX(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.24);
}

.login-split-caption {
    position: absolute;
    left: 40px;
    bottom: 40px;
    z-index: 2;
    color: #fff;
    max-width: 420px;
}
.login-split-caption h3 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.login-split-caption p {
    margin-top: 10px;
    font-size: .88rem;
    opacity: .92;
    line-height: 1.6;
}

/* ---- KANAN: panel login ---- */
.login-split-panel {
    background: linear-gradient(160deg, #f3f7ff 0%, #e9f0ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 64px;
    position: relative;
    overflow: hidden;
}
.login-split-panel::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(60,120,230,.18), rgba(60,120,230,.02) 70%);
    pointer-events: none;
}

.login-panel-eyebrow {
    color: #2f7bf0;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.login-panel-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--navy-dark);
    line-height: 1.2;
}
.login-panel-title .accent {
    color: #2f7bf0;
}
.login-panel-lead {
    margin: 14px 0 32px;
    color: #5b6178;
    font-size: .95rem;
    line-height: 1.7;
    max-width: 420px;
}

/* ---- Kartu login: tetap kaca putih transparan ---- */
.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(20,30,70,.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 30px 28px;
    max-width: 440px;
}
.login-card h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-dark);
    margin-bottom: 4px;
}
.login-card > p {
    font-size: .85rem;
    color: #5b6178;
    margin-bottom: 20px;
}

.login-error {
    display: none;
    background: #fdeeee;
    color: #c22b2b;
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}
.login-error:not(:empty) {
    display: block;
}

.login-success {
    display: none;
    background: #eafaf0;
    color: #1c7a45;
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
}
.login-success:not(:empty) {
    display: block;
}

.login-lupa-password {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1c3a5c;
    margin: 8px 0 16px;
    text-decoration: none;
}
.login-lupa-password:hover {
    text-decoration: underline;
}

/* ---- Daftar pilihan Admin / Caleg ---- */
.login-tabs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.login-tabs.is-hidden {
    display: none;
}

.login-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: none;
    border-radius: 14px;
    padding: 15px 18px;
    box-shadow: 0 6px 18px rgba(20,30,70,.08);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.login-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20,30,70,.14);
}

.choice-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy-darker));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.choice-label {
    flex: 1;
    font-weight: 700;
    color: var(--navy-dark);
    font-size: .92rem;
}
.choice-arrow {
    color: var(--navy-dark);
    font-size: 14px;
}

/* ---- Form login (tampil setelah salah satu pilihan diklik) ---- */
.login-forms-wrap {
    display: none;
    animation: fadeUp 0.35s var(--ease) both;
}
.login-forms-wrap.is-visible {
    display: block;
}

.login-form-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #2f7bf0;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 16px;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.login-form {
    display: none;
}
.login-form.active {
    display: block;
}

.login-card label {
    display: block;
    font-size: 0.82rem;
    color: #444;
    margin: 14px 0 6px;
    font-weight: 600;
}
.login-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e6f0;
    background: rgba(255,255,255,.85);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.login-card input:focus {
    border-color: #2f7bf0;
    box-shadow: 0 0 0 3px rgba(47,123,240,0.15);
}

/* Wadah input password + tombol mata (tampilkan/sembunyikan) di sudut kanan */
.login-password-wrap {
    position: relative;
}
.login-password-wrap input {
    padding-right: 44px;
}
.login-toggle-password {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #8891a3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.login-toggle-password:hover {
    color: var(--navy-dark);
    background: rgba(11,35,64,0.06);
}

.login-card .btn-primary {
    margin-top: 22px;
}

@media (max-width: 767px) {
    .login-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .login-split-photo {
        min-height: 260px;
    }
    .login-split-panel {
        padding: 40px 24px 56px;
    }
    .login-panel-title {
        font-size: 1.7rem;
    }
    /* Di mobile layout jadi satu kolom (foto di atas, panel di bawah),
       jadi yang bersentuhan dengan footer cuma panel terangnya saja --
       timpa gradasi dua-warna dari PHP dengan warna panel polos. */
    body.page-login .footer-wave {
        background: #e9f0ff !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .hero-content {
        padding: 130px 24px 0; /* dikembalikan ke ukuran awal */
        max-width: 100%;
    }
    .dapil-section,
    .section-tentang {
        padding-left: 24px;
        padding-right: 24px;
    }
    .tentang-inner {
        grid-template-columns: 1fr;
    }
    .tentang-text {
        padding-bottom: 20px;
    }
}

@media (max-width: 700px) {
    .brand-text .judul-break-desktop {
        display: none;
    }
    /* Ikon hamburger dihilangkan di halaman publik - menu ditampilkan
       langsung mendatar (baris kedua di bawah brand), bisa digeser ke
       samping kalau tidak muat. */
    .nav-toggle {
        display: none;
    }
    .navbar-inner {
        flex-wrap: wrap;
        row-gap: 8px;
    }
    .nav-menu {
        position: static;
        flex: 1 0 100%; /* selalu jadi baris sendiri di bawah brand */
        flex-direction: row;
        align-items: center;
        gap: 18px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        background: transparent;
        box-shadow: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox: sembunyikan scrollbar, tetap bisa digeser */
    }
    .nav-menu::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge: sembunyikan scrollbar, tetap bisa digeser */
    }
    .nav-menu a {
        width: auto;
        padding: 4px 2px;
        border-bottom: none;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .btn-login {
        margin: 0 0 4px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .navbar--transparent .btn-login {
        background: linear-gradient(135deg, var(--navy-dark), var(--navy-darker));
        border: none;
    }
    .feature {
        max-width: 100%;
        padding: 0 16px;
        flex: 1 1 45%;
    }
    /* Hero disesuaikan KHUSUS untuk layar HP (desktop tidak tersentuh sama
       sekali, karena semua ini di dalam @media max-width: 700px) - tinggi &
       ukuran teks dikecilkan supaya proporsional di layar sempit, tapi
       tampilan desktop tetap seperti aslinya. */
    .hero {
        min-height: 460px;
        padding-bottom: 36px;
    }
    .hero-content {
        padding: 90px 20px 0;
    }
    .hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content h2.hero-sub {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    /* HP kecil (contoh: iPhone SE, Android layar sempit) - dikecilkan
       sedikit lagi supaya "CALON LEGISLATIF" tidak terlalu mepet ke tepi. */
    .hero {
        min-height: 400px;
    }
    .hero-content {
        padding: 70px 18px 0;
    }
    .hero-content h1 {
        font-size: 1.6rem;
    }
    .hero-content h2.hero-sub {
        font-size: 1.05rem;
    }
}
