/* ============================================================
   IMI JATIM — Halaman publik
   File : public/assets/css/site.css (setelah base/components/akun)
   Beranda, konten, kalender, hasil, direktori, verifikasi, Mulai Balap.
   ============================================================ */

/* ── Hero slider ── */
.hero { position: relative; background: var(--brand-dark); color: #fff; }
.hb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hb-track::-webkit-scrollbar { display: none; }
.hb-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; min-height: 340px; display: flex; align-items: flex-end; }
@media (min-width: 900px) { .hb-slide { min-height: 480px; align-items: center; } }
.hb-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hb-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 12, 42, .92) 0%, rgba(13, 12, 42, .55) 55%, rgba(13, 12, 42, .15) 100%); }
.hb-content { position: relative; z-index: 1; padding: 40px 12px 48px; }
.hb-content > * { max-width: 660px; }
.hb-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hb-content h1, .hb-content h2 { color: #fff; font-size: clamp(28px, 4.5vw, 48px); line-height: 1.1; margin-bottom: 12px; }
.hb-content p { font-size: clamp(15px, 1.6vw, 18px); color: rgba(255, 255, 255, .85); margin-bottom: 20px; }
.hb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hb-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.hb-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; background: rgba(255, 255, 255, .45); padding: 0; transition: width .2s; }
.hb-dots button.active { width: 24px; background: var(--accent); }
.hero-default { background: radial-gradient(circle at 80% 20%, rgba(242, 217, 0, .18), transparent 40%), var(--brand-grad); }
.hb-slide > img.hb-logo { position: absolute; inset: auto; left: auto; right: 6%; top: 50%; transform: translateY(-50%); width: auto; height: 78%; object-fit: contain; opacity: .16; display: none; z-index: 1; }
@media (min-width: 900px) { .hb-slide > img.hb-logo { display: block; } }

/* ── Layanan cepat (menempel di bawah hero) ── */
.quick { position: relative; z-index: 3; margin-top: -28px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }
.quick-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; background: var(--surface); text-align: center; font-size: 13px; font-weight: 600; }
.quick-grid a:hover { background: var(--brand-50); color: var(--brand); }
.quick-grid .qi { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.quick-grid .qi .ic { width: 24px; height: 24px; }
.quick-grid small { font-size: 11px; font-weight: 400; color: var(--muted); display: none; }
@media (min-width: 900px) { .quick-grid small { display: block; } }

/* ── Seksi ── */
.sec { padding: 40px 0 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(20px, 2.6vw, 28px); }
.sec-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sec-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); display: block; margin-bottom: 4px; }
.sec-head .lnk { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
.grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.layout-side { display: grid; gap: 24px; }
@media (min-width: 1000px) { .layout-side { grid-template-columns: 1fr 340px; align-items: start; } }

/* ── Kartu event ── */
.ev { display: flex; gap: 14px; padding: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); transition: box-shadow .15s, transform .15s; }
.ev:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.ev-date { width: 62px; flex-shrink: 0; border-radius: var(--r-sm); background: var(--brand); color: #fff; text-align: center; padding: 8px 0; align-self: flex-start; }
.ev-date b { display: block; font-size: 24px; line-height: 1; }
.ev-date span { display: block; font-size: 12px; text-transform: uppercase; margin-top: 2px; }
.ev-date small { display: block; font-size: 10px; color: var(--accent); }
.ev-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-body strong { font-size: 15px; line-height: 1.3; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.ev-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev-meta .ic { width: 14px; height: 14px; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--brand-50); color: var(--brand); }
.chip-y { background: #FFF8C2; color: #6B5B00; }
.chip-g { background: #E9F8F4; color: #11705F; }

/* ── Kartu berita ── */
.nc { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); transition: box-shadow .15s; }
.nc:hover { box-shadow: var(--shadow-2); }
.nc-img { aspect-ratio: 16 / 9; background: var(--brand-50); overflow: hidden; }
.nc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.nc:hover .nc-img img { transform: scale(1.04); }
.nc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nc-body strong { font-size: 16px; line-height: 1.35; }
.nc-body p { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nc-meta { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.nc-big { grid-row: span 2; }
.nc-big .nc-img { aspect-ratio: 16 / 10; }
.nc-big .nc-body strong { font-size: 20px; }

/* ── Halaman dalam ── */
.page-hero { background: var(--brand-grad); color: #fff; padding: 28px 0 30px; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(242, 217, 0, .1); }
.page-hero h1 { color: #fff; font-size: clamp(24px, 3.4vw, 36px); margin: 6px 0 4px; }
.page-hero p { color: rgba(255, 255, 255, .82); font-size: 15px; max-width: 720px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.crumb a:hover { color: var(--accent); }
.crumb .ic { width: 14px; height: 14px; }
.page-body { padding: 24px 0 8px; }

.prose { font-size: 16px; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 22px; margin-top: 1.4em; }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); }
.card-pad { padding: 20px; }
@media (min-width: 768px) { .card-pad { padding: 28px 32px; } }

/* ── Sidebar ── */
.side-box { padding: 18px; }
.side-box h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.side-box h3 .ic { color: var(--brand); }
.side-links a { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.side-links a:last-child { border-bottom: 0; }
.side-links a:hover, .side-links a.active { color: var(--brand); }

/* ── Filter bar ── */
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; margin-bottom: 16px; }
.fbar select, .fbar input { height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; background: var(--surface); font-size: 14px; min-width: 0; }
.fbar input[type=search] { flex: 1 1 200px; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; white-space: nowrap; }
.pills a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Pengurus ── */
.person { text-align: center; padding: 18px 12px; }
.person-img { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; background: var(--brand-50); border: 3px solid var(--accent); display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 30px; font-weight: 700; }
.person-img img { width: 100%; height: 100%; object-fit: cover; }
.person strong { display: block; font-size: 15px; }
.person span { font-size: 13px; color: var(--muted); }

/* ── Galeri ── */
.gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 768px) { .gal { grid-template-columns: repeat(4, 1fr); } }
.gal a { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--brand-50); }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .3); color: #fff; }
.gal .play .ic { width: 42px; height: 42px; }
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; max-width: 100%; border-radius: var(--r-sm); }
.lightbox button { position: absolute; top: 14px; right: 14px; border: 0; background: none; color: #fff; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── FAQ ── */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 600; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--muted); flex-shrink: 0; }
.faq details[open] summary .ic { transform: rotate(180deg); color: var(--brand); }
.faq .ans { padding: 0 20px 18px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }

/* ── Layanan (halaman info) ── */
.svc { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.svc-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.svc-ic .ic { width: 26px; height: 26px; }
.svc h3 { font-size: 18px; }
.svc p { color: var(--ink-2); font-size: 14px; }
.svc .btn2 { align-self: flex-start; margin-top: auto; }
.flow { counter-reset: s; display: grid; gap: 12px; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(5, 1fr); } }
.flow li { counter-increment: s; padding: 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); font-size: 14px; color: var(--ink-2); }
.flow li::before { content: counter(s); display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 8px; }
.flow li b { display: block; color: var(--ink); margin-bottom: 2px; }
.price-tbl td:last-child, .price-tbl th:last-child { text-align: right; white-space: nowrap; }

/* ── Unduhan ── */
.dl { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dl:last-child { border-bottom: 0; }
.dl-ic { width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-main { flex: 1; min-width: 0; }
.dl-main strong { display: block; font-size: 15px; }
.dl-main span { font-size: 12px; color: var(--muted); }

/* ── Kalender bulanan ── */
.cal { width: 100%; table-layout: fixed; }
.cal th { padding: 10px 4px; font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.cal td { height: 92px; vertical-align: top; border: 1px solid var(--line); padding: 4px; font-size: 12px; }
.cal td.off { background: var(--bg); color: var(--muted); }
.cal td.today .d { background: var(--brand); color: #fff; }
.cal .d { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 600; }
.cal .e { display: block; margin-top: 2px; padding: 2px 5px; border-radius: 4px; background: var(--brand-50); color: var(--brand); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .e.y { background: #FFF8C2; color: #6B5B00; }
@media (max-width: 640px) { .cal td { height: 56px; } .cal .e { font-size: 0; height: 6px; padding: 0; } }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cal-nav strong { font-size: 17px; }

/* ── Hasil & klasemen ── */
.res-tbl td:first-child { width: 48px; text-align: center; font-weight: 700; }
.pos-1 { color: #B8860B; } .pos-2 { color: #7C7C96; } .pos-3 { color: #A0522D; }
.medal { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.medal-1 { background: #D4A017; } .medal-2 { background: #9CA3AF; } .medal-3 { background: #B87333; }

/* ── Direktori & peta ── */
.map { height: 380px; border-radius: var(--r); overflow: hidden; background: var(--brand-50); z-index: 1; }
@media (min-width: 900px) { .map { height: 460px; } }
.dir { display: flex; gap: 12px; padding: 14px; }
.dir-logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--r); background: var(--brand-50); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 700; font-size: 20px; }
.dir-logo img { width: 100%; height: 100%; object-fit: cover; }
.dir-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); }
.dir-main strong { font-size: 15px; color: var(--ink); }

/* ── Profil pembalap ── */
.rider-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rider-photo { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; border: 4px solid var(--accent); background: rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: #fff; }
.rider-photo img { width: 100%; height: 100%; object-fit: cover; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.stat-row div { background: var(--surface); padding: 14px; text-align: center; }
.stat-row b { display: block; font-size: 24px; color: var(--brand); }
.stat-row span { font-size: 12px; color: var(--muted); }

/* ── Verifikasi dokumen ── */
.vf { max-width: 560px; margin: 0 auto; text-align: center; padding: 28px 22px; }
.vf-badge { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.vf-badge .ic { width: 44px; height: 44px; }
.vf-ok .vf-badge { background: #E9F8F4; color: var(--success); }
.vf-warn .vf-badge { background: #FFF6E0; color: var(--warning); }
.vf-bad .vf-badge { background: #FFF1F1; color: var(--danger); }
.vf h1 { font-size: 22px; margin-bottom: 4px; }
.vf .kv { text-align: left; margin-top: 18px; }
.vf-form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.vf-form input { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; font-size: 16px; text-transform: uppercase; letter-spacing: .08em; background: var(--surface); }

/* ── Mulai Balap (wizard) ── */
.mb-step { padding: 22px; }
.mb-step h2 { font-size: 20px; margin-bottom: 4px; }
.mb-step > p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.mb-choices { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .mb-choices { grid-template-columns: repeat(4, 1fr); } }
.mb-choices .opt > span { align-items: center; text-align: center; padding: 18px 10px; }
.mb-choices .opt .ic { width: 30px; height: 30px; color: var(--brand); }
.mb-result h3 { font-size: 16px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.mb-result h3 .ic { color: var(--brand); }
.checklist li { display: flex; gap: 8px; padding: 6px 0; font-size: 14px; }
.checklist .ic { color: var(--success); width: 18px; height: 18px; margin-top: 2px; }

/* ── CTA bawah ── */
.cta-band { margin-top: 40px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-lg); padding: 26px 22px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--accent-ink); font-size: 22px; }
.cta-band p { font-size: 14px; opacity: .8; }
.cta-band .btn2-primary { background: var(--accent-ink); }

/* ── Sponsor ── */
.sponsors { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 32px; align-items: center; padding: 10px 0; }
.sponsors img { height: 44px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.sponsors a:hover img { filter: none; opacity: 1; }

/* ── Paginasi ── */
.pager { display: flex; justify-content: center; gap: 6px; margin: 24px 0 8px; }
.pager a, .pager span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-size: 14px; padding: 0 10px; }
.pager .active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .off { opacity: .4; pointer-events: none; }

/* ── Banner pengumuman ── */
.notice-bar { background: var(--accent); color: var(--accent-ink); font-size: 13px; text-align: center; padding: 8px 12px; font-weight: 500; }
.notice-bar a { text-decoration: underline; font-weight: 700; }
