/* =========================================================
   PILKETOS 2026 - Halaman Beranda
   Lokasi: public/assets/css/home.css

   Urutan:
   1. Variabel & reset
   2. Komponen dasar (tampilan stacked / mobile)
   3. Tablet  (560px - 859px)
   4. Phone   (maks 559px)
   5. Desktop (min 860px)
   ========================================================= */

/* ---------- 1. VARIABEL & RESET ---------- */
:root{
  --red:#DC3B33;
  --red-dark:#B42A22;
  --red-tint:#FDECEB;
  --green-tint:#E8F5EC; --green-text:#2F855A;
  --blue-tint:#EAF1FB;  --blue-text:#2B6CB0;
  --ink:#1B2430;
  --muted:#6B7280;
  --line:#EDEAEA;
  --paper:#FFFFFF;
  --paper-soft:#FBF7F7;
}
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Plus Jakarta Sans', sans-serif;
  background:var(--paper);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{ margin:0; }
a{ text-decoration:none; color:inherit; }
img{ max-width:100%; }
svg{ display:block; }
.wrap{ max-width:1160px; margin:0 auto; padding:0 20px; }

a:focus-visible, button:focus-visible{ outline:2px solid var(--red); outline-offset:2px; }
.btn, .see-all, .profile-link{
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

/* ---------- 2. KOMPONEN DASAR ---------- */

/* header */
.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(255,255,255,0.97);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
  padding-top:env(safe-area-inset-top);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 16px; max-width:1160px; margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:10px; flex:1 1 auto; min-width:0; }
.brand-icon{
  width:36px; height:36px; border-radius:10px;
  background:var(--red); display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.brand-logo{ width:40px; height:40px; object-fit:contain; flex-shrink:0; display:block; }
.brand-text{ min-width:0; }
.brand-title{ font-weight:800; font-size:14.5px; line-height:1.1; white-space:nowrap; }
.brand-title .yr{ color:var(--red); }
.brand-sub{
  font-size:12px; color:var(--muted); margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.topbar-right{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.status-pill{
  display:inline-flex; align-items:center; gap:7px;
  font-size:12px; font-weight:600; padding:6px 12px; border-radius:999px;
  border:1.5px solid var(--red); color:var(--red); white-space:nowrap;
}
.status-pill .dot{ width:6px; height:6px; border-radius:50%; background:var(--red); flex-shrink:0; }
.status-pill.open{ color:var(--green-text); border-color:var(--green-text); }
.status-pill.open .dot{ background:var(--green-text); }
.status-pill-label{ display:none; }

/* hero */
.hero{ position:relative; background:var(--paper-soft); overflow:hidden; }
.hero .hero-bg{ display:none; }
.hero-bg{ position:absolute; inset:0; z-index:0; }
.hero-bg img{ width:100%; height:100%; object-fit:cover; object-position:74% 40%; display:block; }
.hero-bg-mobile{ position:relative; width:100%; height:180px; overflow:hidden; }
.hero-bg-mobile img{ width:100%; height:100%; object-fit:cover; object-position:70% 40%; display:block; }

/* catatan: padding atas/bawah dipisah supaya padding samping .wrap tidak tertimpa */
.hero-grid{
  position:relative; z-index:2;
  display:grid; grid-template-columns:1fr; gap:24px;
  width:100%; padding-top:28px; padding-bottom:32px;
}
.eyebrow{ font-size:12px; font-weight:700; letter-spacing:0.03em; color:var(--red); margin-bottom:12px; }
.hero-text h1{
  font-size:clamp(28px, 7.5vw, 44px); font-weight:800; line-height:1.14; letter-spacing:-0.01em;
  color:var(--ink);
}
.hero-text h1 .accent{ color:var(--red); display:block; }
.hero-text p.sub{ margin:14px 0 0; max-width:480px; color:var(--muted); font-size:15px; line-height:1.65; }
.cta-row{ display:flex; flex-direction:column; gap:10px; margin-top:22px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 22px; min-height:48px; border-radius:10px; font-weight:700; font-size:14.5px;
  border:1.5px solid transparent; cursor:pointer; width:100%;
}
.btn-primary{ background:var(--red); color:#fff; box-shadow:0 8px 20px -8px rgba(220,59,51,0.55); }
.btn-ghost{ background:#fff; color:var(--red); border-color:var(--red); }
.btn:active, .see-all:active, .profile-link:active{ transform:scale(0.98); }

/* kartu statistik (horizontal di mobile/tablet) */
.hero-visual{ display:block; }
.stat-card{
  background:#fff; border-radius:14px; padding:16px 18px;
  box-shadow:0 14px 34px -14px rgba(20,20,30,0.25);
  border:1px solid var(--line);
  width:100%; text-align:left;
  display:grid; grid-template-columns:auto 1fr; column-gap:16px; align-items:center;
}
.stat-icon{
  width:44px; height:44px; border-radius:50%; background:var(--red-tint);
  display:flex; align-items:center; justify-content:center; color:var(--red);
  grid-row:1 / span 3; margin:0;
}
.stat-card .num{ font-size:28px; font-weight:800; color:var(--ink); line-height:1; }
.stat-card .lbl{ font-size:10.5px; font-weight:700; letter-spacing:0.04em; color:var(--muted); margin-top:5px; }
.stat-card .desc{ font-size:12.5px; color:var(--muted); margin:6px 0 0; line-height:1.55; }

/* info strip: satu kolom, dipisah garis tipis */
.info-strip{
  margin-top:28px;
  background:#fff; border:1px solid var(--line); border-radius:14px;
  padding:4px 16px;
  display:grid; grid-template-columns:1fr;
}
.info-item{ display:flex; align-items:flex-start; gap:12px; padding:16px 0; border-top:1px solid var(--line); }
.info-item:first-child{ border-top:none; }
.info-icon{
  width:40px; height:40px; border-radius:50%; background:var(--red-tint);
  display:flex; align-items:center; justify-content:center; color:var(--red); flex-shrink:0;
}
.info-item h4{ font-size:14px; font-weight:700; margin:0 0 3px; }
.info-item p{ margin:0; font-size:13px; color:var(--muted); line-height:1.5; }
.info-item p.hl{ color:var(--red); font-weight:700; }

/* kandidat */
.candidates-section{ margin-top:44px; padding-bottom:8px; scroll-margin-top:84px; }
.section-head{
  display:flex; flex-direction:column; align-items:flex-start; gap:14px;
  margin-bottom:20px;
}
.section-head h2{ font-size:21px; font-weight:800; display:flex; align-items:center; gap:10px; }
.section-head h2 .dash{ width:30px; height:3px; background:var(--red); border-radius:2px; display:inline-block; flex-shrink:0; }
.section-head p{ margin:6px 0 0; color:var(--muted); font-size:14px; line-height:1.5; }
.see-all{
  display:inline-flex; align-items:center; gap:6px;
  padding:10px 18px; min-height:44px; border-radius:999px; border:1.5px solid var(--red);
  color:var(--red); font-weight:700; font-size:13.5px; white-space:nowrap;
}

.candidates{ display:grid; grid-template-columns:1fr; gap:14px; }
.card{
  background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden;
  transition:box-shadow .15s ease;
}
.card-photo{ position:relative; aspect-ratio:3/3.4; background:var(--paper-soft); }
.card-photo img{ width:100%; height:100%; object-fit:cover; display:block; }
.card-photo .placeholder{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.badge{
  position:absolute; left:14px; top:14px;
  min-width:30px; height:30px; padding:0 8px; border-radius:9px;
  background:var(--red); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px;
}
.card-body{ padding:18px; min-width:0; }
.card-body h3{ font-size:16.5px; font-weight:800; margin-bottom:6px; }
.card-body .slogan{ font-size:13px; color:var(--muted); line-height:1.5; margin:0 0 14px; min-height:38px; }
.tags{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.tag{
  font-size:11px; font-weight:700; padding:5px 11px; border-radius:14px; line-height:1.35; max-width:100%;
  background:#fff; border:1.3px solid currentColor;
}
.tag.c0{ color:var(--red); }
.tag.c1{ color:var(--green-text); }
.tag.c2{ color:var(--blue-text); }
.profile-link{
  display:flex; align-items:center; justify-content:center; gap:6px;
  border:1.5px solid var(--line); border-radius:10px; padding:11px; min-height:44px;
  font-weight:700; font-size:13.5px; color:var(--ink);
}
.empty{
  text-align:center; padding:48px 20px; color:var(--muted);
  border:1.5px dashed var(--line); border-radius:14px;
}

/* banner keamanan */
.security-banner{
  margin-top:36px; background:var(--paper-soft); border-radius:14px;
  padding:20px 16px; display:flex; align-items:center; gap:14px;
  border:1px solid var(--line);
}
.security-banner .s-icon{
  width:44px; height:44px; border-radius:50%; background:var(--red-tint);
  display:flex; align-items:center; justify-content:center; color:var(--red); flex-shrink:0;
}
.security-banner .s-text{ flex:1; min-width:0; }
.security-banner h4{ font-size:14.5px; font-weight:800; margin:0 0 4px; }
.security-banner p{ margin:0; font-size:13px; color:var(--muted); line-height:1.5; }
.security-banner .s-deco{ display:none; margin-left:auto; opacity:0.9; }

/* footer */
.footer-wave{ display:block; margin-top:36px; margin-bottom:-6px; width:100%; height:auto; }
footer.site-footer{
  background:var(--red); color:#fff;
  padding:26px 16px calc(26px + env(safe-area-inset-bottom));
}
.footer-inner{ display:flex; flex-direction:column; gap:14px; max-width:1160px; margin:0 auto; }
.footer-brand{ display:flex; align-items:center; gap:10px; }
.footer-icon{
  width:34px; height:34px; border-radius:9px; background:rgba(255,255,255,0.18);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.footer-title{ font-weight:800; font-size:14px; }
.footer-sub{ font-size:11.5px; opacity:0.85; }
.footer-copy{ display:flex; flex-direction:column; gap:2px; font-size:12.5px; line-height:1.5; opacity:0.9; }

/* ---------- 3. TABLET (560px - 859px) ---------- */
@media (min-width:560px) and (max-width:859px){
  .wrap{ padding-left:24px; padding-right:24px; }
  .topbar-inner{ padding:12px 24px; }
  .status-pill{ font-size:12.5px; }
  .hero-bg-mobile{ height:230px; }
  .hero-grid{ padding-top:34px; padding-bottom:40px; }
  .hero-text p.sub{ font-size:15.5px; }
  .cta-row{ flex-direction:row; flex-wrap:wrap; }
  .cta-row .btn{ flex:1 1 220px; width:auto; }
  .info-strip{ grid-template-columns:repeat(2, 1fr); gap:22px; padding:24px 22px; margin-top:36px; }
  .info-item{ padding:0; border-top:none; }
  .candidates-section{ margin-top:56px; }
  .section-head{ flex-direction:row; align-items:flex-end; justify-content:space-between; }
  .candidates{ grid-template-columns:repeat(2, 1fr); gap:18px; }
  .security-banner{ padding:24px 22px; margin-top:48px; }
  .security-banner .s-deco{ display:block; }
  footer.site-footer{ padding-left:24px; padding-right:24px; }
}

@media (min-width:700px) and (max-width:859px){
  .candidates{ grid-template-columns:repeat(3, 1fr); }
}

/* ---------- 4. PHONE (maks 559px) ---------- */
@media (max-width:559px){
  .wrap{ padding-left:16px; padding-right:16px; }

  /* kartu kandidat horizontal: foto kiri, info kanan */
  .card{ display:grid; grid-template-columns:112px 1fr; }
  .card-photo{ aspect-ratio:auto; min-height:176px; }
  .card-photo img{ position:absolute; inset:0; }
  .badge{ left:8px; top:8px; min-width:26px; height:26px; font-size:12px; border-radius:8px; }
  .card-body{ padding:14px; display:flex; flex-direction:column; }
  .card-body h3{ font-size:15.5px; }
  .card-body .slogan{ min-height:0; margin-bottom:10px; }
  .tags{ gap:6px; margin-bottom:12px; }
  .profile-link{ margin-top:auto; padding:10px; }
}

/* ---------- 5. DESKTOP (min 860px) ---------- */
@media (min-width:860px){
  /* topbar */
  .topbar-inner{ padding:14px 20px; gap:24px; }
  .brand{ flex:0 1 auto; }
  .brand-icon{ width:38px; height:38px; }
  .brand-logo{ width:44px; height:44px; }
  .brand-title{ font-size:15px; }

  /* hero */
  .hero{ min-height:520px; display:flex; align-items:center; }
  .hero .hero-bg{ display:block; }
  .hero-bg-mobile{ display:none; }
  .hero-grid{ grid-template-columns:1.15fr 1fr; align-items:end; padding-top:70px; padding-bottom:64px; gap:20px; }
  .eyebrow{ font-size:12.5px; margin-bottom:14px; }
  .hero-text p.sub{ font-size:15.5px; margin-top:16px; }
  .cta-row{ flex-direction:row; flex-wrap:wrap; gap:12px; margin-top:26px; }
  .btn{ width:auto; }
  .hero-visual{ display:flex; justify-content:flex-end; }
  .stat-card{ display:block; width:190px; max-width:none; text-align:center; padding:20px 22px; }
  .stat-icon{ margin:0 auto 10px; grid-row:auto; }
  .stat-card .lbl{ margin-top:8px; }
  .stat-card .desc{ margin-top:10px; font-size:12px; }

  /* info strip */
  .info-strip{ grid-template-columns:repeat(4, 1fr); gap:22px; padding:28px 30px; margin-top:56px; border-radius:16px; }
  .info-item{ padding:0; border-top:none; }

  /* kandidat */
  .candidates-section{ margin-top:64px; }
  .section-head{ flex-direction:row; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:26px; }
  .section-head h2{ font-size:24px; }
  .candidates{ grid-template-columns:repeat(4, 1fr); gap:20px; }
  .card{ border-radius:16px; }
  .card:hover{ box-shadow:0 16px 30px -18px rgba(20,20,30,0.25); }
  .profile-link:hover{ border-color:var(--red); color:var(--red); }

  /* banner keamanan & footer */
  .security-banner{ margin-top:56px; padding:26px 22px; border-radius:16px; }
  .security-banner .s-deco{ display:block; }
  .footer-wave{ margin-top:56px; }
  footer.site-footer{ padding:30px 0; }
  .footer-inner{ flex-direction:row; align-items:center; justify-content:space-between; padding:0 20px; }
  .footer-copy{ align-items:flex-end; }
}

/* teks status penuh tampil dari 560px; di HP kecil cukup "Dibuka/Ditutup" */
@media (min-width:560px){
  .status-pill-label{ display:inline; }
  .status-short{ display:none; }
}