/*!
 * Kojisha — blok homepage [kj_home] (kojisha-catalog 0.3.0)
 * Memakai token --kj-* dari site.css. Selektor diawali .kj-h agar menang dari gaya Astra/Elementor Kit tanpa !important.
 */

/* Elementor: hilangkan jarak antar widget di section homepage (jarak diatur oleh blok sendiri) */
body .kj-home-sec .elementor-widget:not(:last-child) { margin-block-end: 0; margin-bottom: 0; }
body .kj-home-sec .elementor-widget-wrap { padding: 0; }
/* 0.19.0: template "Kojisha – Beranda" (tanpa Elementor) — kontainer Astra selebar layar */
body.kj-page--kj-beranda #content > .ast-container { max-width: none; padding: 0; display: block; }

/* ---------- Dasar ---------- */
.kj-h { font-family: var(--kj-font-sans); color: var(--kj-ink); font-size: 16px; line-height: 1.6; }
.kj-h *, .kj-h *::before, .kj-h *::after { box-sizing: border-box; }
.kj-h p { margin: 0; }
.kj-h a { text-decoration: none; }
.kj-h a:focus-visible { outline: 3px solid var(--kj-red); outline-offset: 2px; }
.kj-h .kj-accent { color: var(--kj-red); }
.kj-h-wrap { max-width: var(--kj-container); margin: 0 auto; padding: 0 var(--kj-space-4); }
.kj-h-sec { background: var(--kj-bg); padding-top: var(--kj-space-7); scroll-margin-top: 80px; }
.kj-h-sec--last { padding-bottom: var(--kj-space-7); }

.kj-h .kj-h-h1 { margin: 0; max-width: 820px; font: 800 32px/1.05 var(--kj-font-display); letter-spacing: 0; text-transform: uppercase; color: var(--kj-surface); }
.kj-h .kj-h-h2 { margin: 0; font: 700 28px/1.1 var(--kj-font-display); letter-spacing: 0; text-transform: uppercase; color: var(--kj-ink); }
.kj-h .kj-h-h3 { margin: 0; font: 700 20px/1.2 var(--kj-font-display); letter-spacing: 0; text-transform: uppercase; color: var(--kj-ink); }

/* ---------- Hero ---------- */
.kj-h-hero { position: relative; overflow: hidden; background: var(--kj-ink); color: var(--kj-surface); border-bottom: var(--kj-border-accent) solid var(--kj-red); padding: var(--kj-space-7) 0 var(--kj-space-6); }
.kj-h-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
/* Foto latar (0.17.0; 0.25.0 tanpa arsir, lapisan gelap rata supaya foto tampil di tengah): foto → lapisan gelap → teks. */
.kj-h-hero__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.kj-h-hero.has-bg::before { z-index: 1; background: rgba(20,20,20,.8); }
/* Merah lebih terang di atas foto: kontras ≥ 3:1 untuk judul besar walau fotonya terang (0.25.1). */
.kj-h-hero.has-bg .kj-accent { color: #ff6b6b; }
.kj-h-hero .kj-h-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; gap: var(--kj-space-4); }
.kj-h-hero .kj-meta { margin: 0; color: var(--kj-hero-meta); }
.kj-h-lead { max-width: 680px; font-size: 17px; color: var(--kj-hero-text); }
.kj-h-actions { display: flex; flex-wrap: wrap; gap: var(--kj-space-3); max-width: 460px; padding-top: var(--kj-space-2); }
.kj-h-actions .kj-btn { flex: 1 1 200px; }
.kj-h .kj-btn--primary, .kj-h .kj-btn--primary:hover, .kj-h .kj-btn--primary:focus { color: var(--kj-on-red); }
.kj-h .kj-btn--ghost { background: transparent; color: var(--kj-surface); border-color: var(--kj-surface); }
.kj-h .kj-btn--ghost:hover { background: var(--kj-surface); color: var(--kj-ink); }
.kj-h-brandline { padding-top: var(--kj-space-2); }

/* ---------- Kepala section ---------- */
.kj-h-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--kj-space-2) var(--kj-space-5); margin-bottom: var(--kj-space-5); }
.kj-h-head__text { display: flex; flex-direction: column; gap: var(--kj-space-2); max-width: 680px; }
.kj-h-intro { color: var(--kj-muted); }
.kj-h .kj-h-more { display: inline-flex; align-items: center; min-height: var(--kj-tap); color: var(--kj-red-strong); font-weight: 600; }
.kj-h .kj-h-more:hover { color: var(--kj-red-deep); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Grid ---------- */
.kj-h-grid { display: grid; gap: var(--kj-space-4); grid-template-columns: minmax(0, 1fr); }
.kj-h-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--kj-space-3); }
.kj-h-grid--why { gap: var(--kj-space-5); }

/* ---------- Kartu (jalur & layanan) ---------- */
.kj-h .kj-h-card { position: relative; display: flex; flex-direction: column; gap: var(--kj-space-2); padding: var(--kj-space-5); background: var(--kj-surface); border: 1px solid var(--kj-line); color: var(--kj-ink); }
.kj-h-kicker { font: 400 12px/1.4 var(--kj-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--kj-red-strong); }
.kj-h-kicker--muted { color: var(--kj-muted); }
.kj-h-text { color: var(--kj-muted); }
.kj-h-go { margin-top: auto; padding-top: var(--kj-space-2); color: var(--kj-red-strong); font-weight: 600; }

/* Hover kartu: garis merah atas (design system) */
.kj-h .kj-h-card:hover, .kj-h .kj-h-part:hover, .kj-h .kj-h-brand:hover { border-color: var(--kj-ink); color: var(--kj-ink); box-shadow: inset 0 var(--kj-border-accent) 0 var(--kj-red); }

/* ---------- Kartu jenis part ---------- */
.kj-h .kj-h-part { display: flex; flex-direction: column; background: var(--kj-surface); border: 1px solid var(--kj-line); color: var(--kj-ink); overflow: hidden; }
.kj-h-part__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 2 / 1; background: var(--kj-bg); border-bottom: 1px solid var(--kj-line); color: var(--kj-muted); overflow: hidden; }
.kj-h .kj-h-part__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kj-h-part__media svg { width: 36px; height: 36px; }
.kj-h-part__body { display: flex; flex-direction: column; gap: var(--kj-space-2); padding: var(--kj-space-4); flex: 1; }
.kj-h-part .kj-h-text { font-size: 14px; line-height: 1.5; }
.kj-h-part .kj-h-go, .kj-h-brand .kj-h-go { padding-top: 0; font-size: 15px; }

/* ---------- Kartu merek ---------- */
.kj-h .kj-h-brand { display: flex; flex-direction: column; gap: var(--kj-space-3); padding: var(--kj-space-4); background: var(--kj-surface); border: 1px solid var(--kj-line); color: var(--kj-ink); }
.kj-h-brand__logo { height: 64px; display: flex; align-items: center; justify-content: center; padding: var(--kj-space-2); background: var(--kj-bg); font: 800 22px/1 var(--kj-font-display); text-transform: uppercase; text-align: center; color: var(--kj-ink); }
.kj-h-brand__logo.has-img { background: #fff; border: 1px solid var(--kj-line); }
.kj-h .kj-h-brand__logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 48px; object-fit: contain; }
.kj-h-brand__name { display: flex; flex-direction: column; gap: 2px; }
.kj-h-brand__origin { font-size: 14px; color: var(--kj-muted); }

/* ---------- Kota (memakai .kj-cities dari site.css) ---------- */
.kj-h .kj-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kj-h .kj-cities li { display: flex; margin: 0; }
.kj-h .kj-cities a { flex: 1; }
.kj-h .kj-cities a:hover { color: var(--kj-surface); }

/* ---------- Alasan ---------- */
.kj-h-why { display: flex; flex-direction: column; gap: var(--kj-space-2); padding-top: var(--kj-space-4); border-top: 1px solid var(--kj-line-strong); }
.kj-h-why svg { width: 24px; height: 24px; color: var(--kj-red); }

/* ---------- CTA ---------- */
.kj-h-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--kj-space-4) var(--kj-space-5); padding: var(--kj-space-6); background: var(--kj-surface); border: 1px solid var(--kj-line); border-top: var(--kj-border-accent) solid var(--kj-red); }
.kj-h-cta__text { display: flex; flex-direction: column; gap: var(--kj-space-1); max-width: 560px; }
.kj-h-cta .kj-btn { flex: 1 1 100%; }

/* ---------- Lebar layar ---------- */
@media (min-width: 600px) {
  .kj-h .kj-cities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kj-h-grid--why, .kj-h-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kj-h-cta .kj-btn { flex: 0 1 260px; }
}
@media (min-width: 768px) {
  .kj-h-wrap { padding: 0 var(--kj-space-5); }
  .kj-h-sec { padding-top: var(--kj-space-9); }
  .kj-h-sec--last { padding-bottom: var(--kj-space-9); }
  .kj-h-hero { padding: var(--kj-space-9) 0 var(--kj-space-8); }
  .kj-h .kj-h-h1 { font-size: 40px; }
  .kj-h-grid--4 { gap: var(--kj-space-4); }
}
@media (min-width: 1024px) {
  .kj-h .kj-h-h1 { font-size: 52px; }
  .kj-h-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kj-h-grid--4, .kj-h-grid--why { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kj-h .kj-cities { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
