/* ppdb.css — PPDB MA Al Hikmah (tema oranye, struktur mengikuti MA Darul Fikri) */
:root {
    --orange: #f97316;
    --orange-d: #ea580c;
    --orange-dd: #c2410c;
    --orange-l: #ffedd5;
    --cream: #fff7ed;
    --yellow: #facc15;
    --ink: #111827;
    --muted: #4b5563;
    --line: #e5e7eb;
    --blue: #3b82f6;
    --green: #16a34a;
    --red: #dc2626;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(194, 65, 12, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font-family: inherit; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== Section ===== */
.ppdb {
    position: relative;
    min-height: 100vh;
    padding: 56px 0 72px;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    overflow: hidden;
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.blob-1 { width: 380px; height: 380px; background: #fdba74; top: -120px; right: -100px; animation: drift 14s ease-in-out infinite; }
.blob-2 { width: 320px; height: 320px; background: #fde68a; bottom: -120px; left: -100px; animation: drift 17s ease-in-out infinite reverse; }

.ppdb-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--yellow); color: #422006;
    font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    padding: 8px 18px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(250, 204, 21, .4);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange-d); animation: pulse 1.6s infinite; }
.ppdb-head h1 { margin: 18px 0 4px; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.ppdb-head h2 { margin: 0; font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 700; color: var(--orange-d); }
.divider { display: block; width: 90px; height: 4px; border-radius: 4px; background: var(--orange); margin: 18px auto; }
.ppdb-head p { margin: 0 auto; color: var(--muted); font-size: 1.05rem; max-width: 640px; }

/* ===== Grid ===== */
.ppdb-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.info-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* Poster / gambar (rata tengah vertikal, rasio asli gambar) */
.poster { margin: 0; min-width: 0; }
.poster-frame {
    position: relative; display: block; width: 100%; padding: 0; border: 6px solid #fff;
    border-radius: 22px; overflow: hidden; cursor: zoom-in; background: #fff;
    box-shadow: 0 18px 45px rgba(194, 65, 12, .22);
    animation: float 6s ease-in-out infinite;
    transition: box-shadow .35s ease;
}
.poster-frame:hover { box-shadow: 0 26px 60px rgba(194, 65, 12, .32); animation-play-state: paused; }
.poster-frame:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.poster-frame img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.poster-frame:hover img { transform: scale(1.05); }
.poster-frame::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%);
    transform: translateX(-120%); transition: transform .9s ease;
}
.poster-frame:hover::after { transform: translateX(120%); }
.poster-zoom {
    position: absolute; right: 12px; bottom: 12px; z-index: 2;
    background: rgba(17, 24, 39, .72); color: #fff; font-size: .78rem; font-weight: 600;
    padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(4px);
    opacity: 0; transform: translateY(8px); transition: .3s;
}
.poster-frame:hover .poster-zoom, .poster-frame:focus-visible .poster-zoom { opacity: 1; transform: none; }

/* ===== Cards ===== */
.card {
    background: #fff; border-radius: var(--radius); padding: 24px 26px;
    border-left: 5px solid var(--orange); box-shadow: var(--shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(194, 65, 12, .18); }
.card-blue { border-left-color: var(--blue); }
.card h3 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card h3 i { color: var(--orange); font-size: 1.1rem; }
.card-blue h3 i { color: var(--blue); }

.sched {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px;
    transition: transform .25s ease, background .25s ease;
}
.sched:last-child { margin-bottom: 0; }
.sched:hover { transform: translateX(5px); background: var(--cream); }
.sched strong { display: block; font-size: 1rem; }
.sched small { color: var(--muted); font-size: .85rem; }
.chip {
    flex-shrink: 0; background: var(--orange-l); color: var(--orange-dd);
    font-weight: 700; font-size: .82rem; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.sched:nth-child(3) .chip { background: #fef3c7; color: #92400e; }

.req { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.req li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.req li i { color: var(--orange); font-size: 1rem; flex-shrink: 0; transition: transform .3s; }
.req li:hover i { transform: scale(1.3) rotate(-8deg); }

/* ===== Tombol ===== */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 22px; border-radius: 12px; border: 2px solid transparent;
    font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(249, 115, 22, .38); }
.btn-primary:hover { background: var(--orange-d); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(249, 115, 22, .5); }
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -70%; width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg); animation: shine 3.5s infinite;
}
.btn-outline { background: #fff; color: var(--green); border-color: var(--orange); }
.btn-outline:hover { background: var(--cream); transform: translateY(-3px); box-shadow: 0 10px 22px rgba(249, 115, 22, .22); }
.btn-outline i { font-size: 1.25rem; }
.btn-wa { background: #22c55e; color: #fff; box-shadow: 0 8px 20px rgba(34, 197, 94, .35); }
.btn-wa:hover { background: #16a34a; transform: translateY(-3px); }
.btn-ghost { background: #f3f4f6; color: #374151; }
.btn-ghost:hover { background: #e5e7eb; }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.foot { text-align: center; padding: 22px 16px; font-size: .88rem; color: var(--muted); background: #fff; border-top: 1px solid var(--orange-l); }

/* ===== Reveal on scroll ===== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.from-left { transform: translateX(-36px); }
.js .reveal.in { opacity: 1; transform: none; }

/* ===== Modal ===== */
.modal {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(17, 24, 39, .6); backdrop-filter: blur(5px);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-box {
    width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    transform: translateY(30px) scale(.96); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal-box { transform: none; }
.modal-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 22px 26px; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-dd));
}
.modal-head h3 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.modal-head p { margin: 2px 0 0; font-size: .9rem; opacity: .92; }
.modal-close {
    flex-shrink: 0; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .2); color: #fff; font-size: 1.6rem; line-height: 1; transition: .25s;
}
.modal-close:hover { background: rgba(255, 255, 255, .35); transform: rotate(90deg); }
.modal-body { padding: 24px 26px 26px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.note { display: flex; gap: 10px; align-items: flex-start; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 12px 14px; border-radius: 12px; font-size: .9rem; margin-bottom: 18px; }
.note i { margin-top: 3px; font-size: 1.1rem; }
.alert { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin-bottom: 16px; }
.alert[hidden] { display: none; }

.fs-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--orange-l); font-size: 1rem; font-weight: 700; color: var(--orange-dd); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fg { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fg.full { grid-column: 1 / -1; }
.fg label { font-size: .88rem; font-weight: 600; }
.fg label b { color: var(--red); }
.fg input, .fg select {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.fg input:focus, .fg select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249, 115, 22, .15); }
.fg.invalid input, .fg.invalid select { border-color: var(--red); background: #fffafa; }
.err { min-height: 0; font-size: .8rem; color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.warn { margin-top: 22px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: 14px 16px; border-radius: 12px; font-size: .9rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.form-actions.center { justify-content: center; flex-wrap: wrap; }

.step[hidden], #ppdbForm[hidden] { display: none; }
.review { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.review div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 11px 16px; font-size: .92rem; }
.review div:nth-child(odd) { background: #f9fafb; }
.review dt { color: var(--muted); font-weight: 500; }
.review dd { margin: 0; font-weight: 600; word-break: break-word; }

.success { text-align: center; padding: 10px 0 4px; }
.done-icon { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: #dcfce7; color: var(--green); display: grid; place-items: center; font-size: 2rem; animation: popIn .6s cubic-bezier(.2, 1.4, .4, 1); }
.success h4 { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; }
.success p { margin: 0 0 8px; color: var(--muted); }
.success p.small { font-size: .9rem; max-width: 420px; margin: 12px auto 0; }
.no-daftar { display: inline-block; margin: 4px 0; padding: 8px 22px; border-radius: 12px; background: var(--orange-l); color: var(--orange-dd); font-size: 1.5rem; font-weight: 800; letter-spacing: .06em; }

/* ===== Lightbox ===== */
.lightbox {
    position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(0, 0, 0, .88); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; cursor: zoom-out;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transform: scale(.92); transition: transform .35s ease; }
.lightbox.open img { transform: none; }
.lb-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.8rem; cursor: pointer; }
body.lock { overflow: hidden; }

/* ===== Keyframes ===== */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 24px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .6); } 70% { box-shadow: 0 0 0 9px rgba(234, 88, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); } }
@keyframes shine { 0%, 60% { left: -70%; } 100% { left: 130%; } }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .ppdb-grid { grid-template-columns: 1fr; gap: 28px; }
    .poster { max-width: 680px; margin: 0 auto; width: 100%; }
    .js .reveal.from-left { transform: translateY(28px); }
}
@media (max-width: 600px) {
    .ppdb { padding: 36px 0 48px; }
    .container { padding: 0 16px; }
    .ppdb-head { margin-bottom: 32px; }
    .card { padding: 20px 18px; }
    .req { grid-template-columns: 1fr; }
    .actions { grid-template-columns: 1fr; }
    .sched { flex-wrap: wrap; }
    .poster-frame { border-width: 4px; border-radius: 16px; }
    .poster-zoom { opacity: 1; transform: none; }

    .modal { padding: 0; align-items: flex-end; }
    .modal-box { max-width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; transform: translateY(100%); }
    .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
    .fgrid { grid-template-columns: 1fr; }
    .review div { grid-template-columns: 1fr; gap: 2px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}
