/* Gaya bersama halaman form: /bantuan dan /kendala */
:root {
    --biru-tua: #0E2E4C;
    --biru: #0592BA;
    --biru-muda: #e8f5fa;
    --latar: #f3f6f9;
    --garis: #d5dee6;
    --teks: #2b3440;
    --redup: #6b7885;
    --hijau: #25D366;
    --oranye: #E65100;
    --merah: #c0392b;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Lora', Georgia, serif;
    color: var(--teks);
    background: var(--latar);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--biru-tua) 0%, var(--biru) 100%);
    color: #fff;
    text-align: center;
    padding: 1.2rem 16px 6.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}
.hero::before { width: 320px; height: 320px; top: -120px; right: -80px; }
.hero::after  { width: 220px; height: 220px; bottom: -90px; left: -60px; }

.hero .logo {
    display: inline-block;
    background: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    margin-bottom: 1.8rem;
    position: relative;
    z-index: 1;
}
.hero .logo img { display: block; height: 34px; width: auto; }

.hero .ikon-kunci {
    width: 76px;
    height: 76px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    line-height: 1.2;
    margin: 0 0 0.6rem;
    position: relative;
    z-index: 1;
}

.hero p {
    max-width: 520px;
    margin: 0 auto;
    font-size: 1.05rem;
    opacity: 0.92;
    position: relative;
    z-index: 1;
}

/* ---------- Kartu utama ---------- */
.kartu {
    max-width: 600px;
    margin: -5rem auto 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(14, 46, 76, 0.15);
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Langkah-langkah */
.langkah {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    counter-reset: langkah;
}

.langkah li {
    background: var(--biru-muda);
    border-radius: 14px;
    padding: 1rem 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--biru-tua);
}

.langkah .no {
    width: 34px;
    height: 34px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: var(--biru);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Peringatan */
.peringatan {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #FFF4E5;
    border: 2px solid #FF8A00;
    border-left-width: 7px;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.8rem;
    color: #5a3200;
}

.peringatan > i {
    flex-shrink: 0;
    font-size: 1.8rem;
    color: var(--oranye);
    margin-top: 0.1rem;
    animation: goyang 2.5s ease-in-out infinite;
}

.peringatan .judul {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--merah);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.3rem;
}

.peringatan p { margin: 0 0 0.5rem; font-size: 0.95rem; }

.peringatan ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.92rem;
}

.peringatan ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.25rem;
}

.peringatan ul li i {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: var(--oranye);
    font-size: 0.85rem;
}

@keyframes goyang {
    0%, 88%, 100% { transform: rotate(0); }
    92% { transform: rotate(-12deg); }
    96% { transform: rotate(12deg); }
}

/* ---------- Form ---------- */
.judul-form {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--biru-tua);
    margin: 0 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--biru-muda);
}

.grup { margin-bottom: 1.3rem; border: 0; padding: 0; min-width: 0; }

.grup > label,
.grup > legend {
    display: block;
    font-weight: 600;
    color: var(--biru-tua);
    margin-bottom: 0.45rem;
    padding: 0;
}

.wajib { color: var(--merah); }
.opsional { font-weight: 400; color: var(--redup); font-size: 0.9rem; }

.isian {
    position: relative;
}

.isian > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--redup);
    pointer-events: none;
    transition: color 0.2s;
}

.isian.area > i { top: 1.05rem; transform: none; }

.isian input,
.isian textarea {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--teks);
    background: #fafcfd;
    border: 1.5px solid var(--garis);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.isian textarea { min-height: 110px; resize: vertical; }

.isian input:focus,
.isian textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--biru);
    box-shadow: 0 0 0 4px rgba(5, 146, 186, 0.15);
}

.isian:focus-within > i { color: var(--biru); }

.hint {
    display: block;
    font-size: 0.85rem;
    color: var(--redup);
    margin-top: 0.35rem;
}

/* Pilihan program berbentuk kotak */
.pilihan-program {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.pilihan-program label {
    position: relative;
    cursor: pointer;
}

.pilihan-program input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pilihan-program span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border: 1.5px solid var(--garis);
    border-radius: 12px;
    background: #fafcfd;
    font-weight: 600;
    color: var(--biru-tua);
    transition: all 0.2s;
}

.pilihan-program span::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #b5c2cd;
    background: #fff;
    transition: all 0.2s;
}

.pilihan-program label:hover span { border-color: var(--biru); }

.pilihan-program input:checked + span {
    border-color: var(--biru);
    background: var(--biru-muda);
    box-shadow: 0 0 0 3px rgba(5, 146, 186, 0.12);
}

.pilihan-program input:checked + span::before {
    border-color: var(--biru);
    background: var(--biru);
    box-shadow: inset 0 0 0 3px #fff;
}

.pilihan-program input:focus-visible + span {
    outline: 3px solid rgba(5, 146, 186, 0.4);
    outline-offset: 2px;
}

/* Tombol kirim */
.tombol-kirim {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--hijau);
    color: #fff;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tombol-kirim i { font-size: 1.4rem; }

.tombol-kirim:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.5);
}

.tombol-kirim:active { transform: translateY(0); }

.form-info {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    text-align: center;
}
.form-info:empty { display: none; }
.form-info.ok { background: #e6f5ec; color: #1a7f45; }
.form-info.error { background: #fdecea; color: var(--merah); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.kembali {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--biru);
    font-weight: 600;
    text-decoration: none;
}
.kembali i { margin-right: 0.4rem; transition: transform 0.2s; }
.kembali:hover i { transform: translateX(-4px); }

footer {
    text-align: center;
    padding: 1.5rem 16px 2rem;
    color: var(--redup);
    font-size: 0.9rem;
}

/* ---------- HP ---------- */
@media (max-width: 600px) {
    .hero { padding-bottom: 5.5rem; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.98rem; }
    .hero .ikon-kunci { width: 64px; height: 64px; font-size: 1.6rem; }

    .kartu {
        margin: -4rem 12px 1.5rem;
        padding: 1.4rem 1.1rem;
        border-radius: 18px;
    }

    .langkah { grid-template-columns: 1fr; gap: 0.5rem; }
    .langkah li {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        text-align: left;
        padding: 0.7rem 0.9rem;
    }
    .langkah .no { margin: 0; flex-shrink: 0; width: 30px; height: 30px; }

    .peringatan { padding: 1rem; gap: 0.7rem; }
    .peringatan > i { font-size: 1.5rem; }

    .pilihan-program span { padding: 0.75rem; font-size: 0.95rem; }
}

@media (max-width: 360px) {
    .pilihan-program { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .peringatan > i { animation: none; }
}

/* ---------- Tema halaman Kendala Belajar ---------- */
.tema-kendala .hero {
    background: linear-gradient(135deg, var(--biru-tua) 0%, #0f766e 100%);
}

.tema-kendala .langkah li { background: #e7f6f3; }
.tema-kendala .langkah .no { background: #0f766e; }

.info-biru {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    background: var(--biru-muda);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
    color: var(--biru-tua);
}

.info-biru > i {
    font-size: 1.4rem;
    color: var(--biru);
    margin-top: 0.15rem;
}

.info-biru a { color: var(--biru); font-weight: 700; }


/* ---------- Pengingat: tekan Kirim di WhatsApp ---------- */
.ingat-kirim {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: #e9fbef;
    border: 2px dashed var(--hijau);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin: 0.5rem 0 1rem;
    font-size: 0.95rem;
    color: #14532d;
    line-height: 1.5;
}

.ingat-kirim .ikon-kirim {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hijau);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ingat-kirim strong { color: #b91c1c; }

/* Layar pengingat sebelum membuka WhatsApp */
.layar-wa {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(14, 46, 76, 0.75);
    backdrop-filter: blur(3px);
    animation: muncul 0.2s ease-out;
}

.layar-wa .kotak {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 1.8rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.layar-wa .tiruan-kirim {
    width: 84px;
    height: 84px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--hijau);
    color: #fff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: denyut-kirim 1.2s ease-in-out infinite;
}

.layar-wa h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--biru-tua);
    margin: 0 0 0.5rem;
}

.layar-wa p {
    margin: 0 0 1.2rem;
    color: var(--teks);
    font-size: 1rem;
}

.layar-wa p strong { color: #b91c1c; }

.layar-wa .buka {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    border-radius: 14px;
    background: var(--hijau);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}

.layar-wa .hitung {
    display: block;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: var(--redup);
}

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

@keyframes denyut-kirim {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    50% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .layar-wa .tiruan-kirim { animation: none; }
}

/* ---------- Kode negara + nomor WhatsApp ---------- */
.isian-wa {
    display: flex;
    gap: 0.5rem;
}

.isian-wa select {
    flex: 0 0 9.5rem;
    min-width: 0;
    padding: 0.85rem 0.6rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--teks);
    background: #fafcfd;
    border: 1.5px solid var(--garis);
    border-radius: 12px;
    cursor: pointer;
}

.isian-wa select:focus {
    outline: none;
    border-color: var(--biru);
    box-shadow: 0 0 0 4px rgba(5, 146, 186, 0.15);
}

.isian-wa .isian { flex: 1; min-width: 0; }

@media (max-width: 600px) {
    .isian-wa { flex-direction: column; }
    .isian-wa select { flex-basis: auto; width: 100%; }
}
