/* ==========================================================
   Ilustrasi berwarna (ikon SVG orisinal di sprite index.html)
   + Hero foto penuh
   ========================================================== */
.ill { display: block; width: 44px; height: 44px; flex: none; }

/* ---------- Hero foto penuh ---------- */
.hero--photo { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; z-index: -2; }
.hero--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero--photo .hero-grid { grid-template-columns: minmax(0, 1fr); }
.hero--photo .hinomaru { display: none; }

@media (max-width: 1040px) {
  [data-view="beranda"] .hero--photo {
    min-height: clamp(560px, 86svh, 780px); display: flex; align-items: flex-end;
    padding-top: 0; padding-bottom: clamp(5.5rem, 4rem + 4vw, 7rem);
  }
  .hero--photo .hero-grid { width: min(100% - 2.5rem, var(--container)); }
  .hero-bg { object-position: 68% 20%; height: 62%; }
  .hero--photo::before {
    background: linear-gradient(180deg, rgb(251 188 5 / 0) 0%, rgb(251 188 5 / 0) 34%, rgb(251 188 5 / .75) 50%, var(--yellow-500) 62%);
  }
}
@media (min-width: 1041px) {
  [data-view="beranda"] .hero--photo { min-height: 640px; display: flex; align-items: center; padding-block: 5rem 8rem; }
  .hero--photo .hero-grid { width: min(100% - 2.5rem, var(--container)); }
  .hero--photo .hero-copy { max-width: 600px; }
  .hero--photo::before {
    background: linear-gradient(90deg, var(--yellow-500) 0%, rgb(251 188 5 / .94) 32%, rgb(251 188 5 / .45) 52%, rgb(251 188 5 / 0) 68%);
  }
}

/* ---------- Kartu pintasan ---------- */
.quick-icon { width: 64px; height: 64px; border-radius: 18px; background: rgb(255 255 255 / .65); }
.quick-icon .ill { width: 46px; height: 46px; }

/* ---------- Kartu program ---------- */
.card-ill { width: 60px; height: 60px; margin-bottom: .75rem; padding: 8px; box-sizing: content-box; border-radius: 18px; background: rgb(255 255 255 / .65); }
.home-programs .ill-lg { width: 64px; height: 64px; }
.home-programs a { justify-content: flex-start !important; gap: .9rem !important; }
.why-grid .ill-lg { width: 60px; height: 60px; margin-bottom: .9rem; }

/* ---------- Alur (tab Program → Alur) ---------- */
.steps--ill { counter-reset: step; }
.steps--ill li { display: grid; grid-template-columns: 68px 1fr; gap: 1rem; align-items: center; padding: 1rem 1.1rem; }
.steps--ill li::before { display: none; }
.step-ill { position: relative; width: 68px; height: 68px; border-radius: 18px; background: rgb(255 255 255 / .7); display: grid; place-items: center; counter-increment: step; }
.step-ill .ill { width: 46px; height: 46px; }
.step-ill::after {
  content: counter(step); position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue-700); color: #fff; font: 800 .75rem var(--font-body);
  box-shadow: 0 0 0 3px var(--tint, #fff);
}
.steps--ill li:nth-child(4n+2) .step-ill::after { background: var(--red-600); }
.steps--ill li:nth-child(4n+3) .step-ill::after { background: var(--green-600); }
.steps--ill li:nth-child(4n+4) .step-ill::after { background: var(--blue-ink); }
.steps--ill h2 { margin-bottom: .15rem; }

/* ---------- Garis waktu beranda (komputer) ---------- */
@media (min-width: 1041px) {
  .timeline li { gap: .6rem; }
  .timeline li::before { display: none !important; }
  .timeline::before { top: 46px; }
  .tl-ill {
    --tint: var(--tint-blue);
    position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
    background: var(--tint); box-shadow: 0 0 0 6px var(--page-bg);
  }
  .timeline li:nth-child(4n+2) .tl-ill { --tint: var(--tint-red); }
  .timeline li:nth-child(4n+3) .tl-ill { --tint: var(--tint-yellow); }
  .timeline li:nth-child(4n+4) .tl-ill { --tint: var(--tint-green); }
  .tl-ill .ill { width: 54px; height: 54px; }
  .tl-ill::after {
    content: counter(t); position: absolute; top: -2px; right: -2px; width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; background: var(--blue-700); color: #fff; font: 800 .8rem var(--font-body);
    box-shadow: 0 0 0 3px var(--page-bg);
  }
  .timeline li:nth-child(4n+2) .tl-ill::after { background: var(--red-600); }
  .timeline li:nth-child(4n+3) .tl-ill::after { background: var(--green-600); }
  .timeline li:last-child .tl-ill::after { background: var(--red-600); }

  .why-grid li { background: var(--tint-yellow) !important; }
  .why-grid li:nth-child(1) { background: var(--tint-blue) !important; }
  .why-grid li:nth-child(2) { background: var(--tint-red) !important; }
  .why-grid li:nth-child(3) { background: var(--tint-green) !important; }
}

/* ---------- Hiasan kepala setiap halaman ---------- */
.view-head .container { position: relative; }
.head-ill { position: absolute; right: 0; top: -.25rem; width: 76px; height: 76px; pointer-events: none; opacity: .95; }
.view-head h1 { padding-right: 84px; }
@media (min-width: 1041px) {
  .head-ill { width: 168px; height: 168px; top: .25rem; right: 1rem; transform: rotate(-6deg); }
  .view-head h1 { padding-right: 200px; }
}

/* ---------- CTA ---------- */
.cta-ill { width: 170px; height: 106px; flex: none; }
@media (min-width: 1041px) { .home-cta { justify-content: flex-start; } .home-cta > div { flex: 1; } }
.steps--ill li { counter-increment: none; }

/* ==========================================================
   Panah alur (biar terbaca sebagai urutan)
   ========================================================== */
:root { --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.2h12.6l-4.3-4.3 2.5-2.5 8.6 8.6-8.6 8.6-2.5-2.5 4.3-4.3H3z' fill='%233C4043'/%3E%3C/svg%3E"); }

/* Tab Alur — HP: satu kolom, panah ke bawah */
.steps--ill li::before {
  content: ""; display: block !important; position: absolute; width: 24px; height: 24px;
  background: var(--arrow) center / contain no-repeat; left: 50%; bottom: calc(-1rem - 12px);
  transform: translateX(-50%) rotate(90deg); z-index: 2;
}
.steps--ill li:last-child::before { display: none !important; }
@media (max-width: 1040px) { .steps--ill { grid-template-columns: 1fr; row-gap: 2rem; } }

/* Tab Alur — komputer: 4 kolom berkelok (1→4, turun, 5→8 dari kanan ke kiri) */
@media (min-width: 1041px) {
  .steps--ill { grid-template-columns: repeat(4, 1fr); column-gap: 2.6rem; row-gap: 2.8rem; }
  .steps--ill li { grid-template-columns: 1fr; align-content: start; gap: .75rem; padding: 1.25rem 1.1rem; }
  .steps--ill li:nth-child(5) { grid-column: 4; grid-row: 2; }
  .steps--ill li:nth-child(6) { grid-column: 3; grid-row: 2; }
  .steps--ill li:nth-child(7) { grid-column: 2; grid-row: 2; }
  .steps--ill li:nth-child(8) { grid-column: 1; grid-row: 2; }
  .steps--ill li::before { width: 28px; height: 28px; left: auto; bottom: auto; top: 50%; right: calc(-1.3rem - 14px); transform: translateY(-50%); }
  .steps--ill li:nth-child(4)::before { top: auto; right: auto; left: 50%; bottom: calc(-1.4rem - 14px); transform: translateX(-50%) rotate(90deg); }
  .steps--ill li:nth-child(5)::before,
  .steps--ill li:nth-child(6)::before,
  .steps--ill li:nth-child(7)::before { right: auto; left: calc(-1.3rem - 14px); transform: translateY(-50%) rotate(180deg); }

  /* Garis waktu beranda: garis lurus diganti panah antar langkah */
  .timeline::before { display: none; }
  .timeline li { position: relative; }
  .timeline li::after {
    content: ""; position: absolute; top: 34px; right: -13px; width: 26px; height: 26px;
    background: var(--arrow) center / contain no-repeat;
  }
  .timeline li:last-child::after { display: none; }
}
/* panah menimpa gaya lingkaran nomor lama */
.steps--ill li::before { background: var(--arrow) center / contain no-repeat !important; border-radius: 0 !important; box-shadow: none !important; color: transparent !important; }
@media (max-width: 1040px) { .steps--ill li::before { top: auto !important; bottom: calc(-1rem - 12px) !important; } }

/* Perbaikan: gambar di kepala halaman tidak boleh menabrak teks */
.view-head .view-sub, .view-head .view-branch { margin-right: 88px; }
.view-head .view-branch { margin-right: 0; }
.view-head h1 { padding-right: 88px; }
@media (min-width: 1041px) {
  .view-head .view-sub { margin-right: 210px; }
  .view-head h1 { padding-right: 210px; }
}
@media (max-width: 1040px) {
  .head-ill { width: 64px; height: 64px; top: 0; }
  .view-head h1 { min-height: 68px; padding-right: 76px; }
  .view-head .view-sub { margin-right: 76px; }
  .view-head .view-branch { max-width: calc(100% - 76px); }
}
