/* =========================================================
   components.css — Komponen reusable: tombol, kartu, list
   proses, breadcrumb, feature card, FAQ, inline link.
========================================================= */

/* --- Buttons --- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
  white-space: nowrap; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.button:hover  { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button:focus-visible { outline-offset: 4px; }

/* CTA emas standar — SEMUA tombol CTA memakai style ini (gradien mengalir + kilau, teks navy).
   Keyframes cta-flow/cta-shine didefinisikan di sections.css (global). */
.button--primary {
  position: relative; overflow: hidden; color: var(--on-cta);
  background: linear-gradient(90deg, #f5c518, #ff8c1a, #ff9500, #ffcc33, #f5c518);
  background-size: 300% 100%; animation: cta-flow 4s linear infinite;
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.4);
}
.button--primary::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-130%); animation: cta-shine 3.4s ease-in-out infinite;
}
.button--primary:hover { filter: brightness(1.06); box-shadow: 0 14px 40px rgba(245, 197, 24, 0.5); }
@media (prefers-reduced-motion: reduce) { .button--primary, .button--primary::after { animation: none; } }
@keyframes cta-flow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes cta-shine { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(230%); } }
.button--secondary {
  background: var(--tile-bg); border-color: var(--line-strong); color: var(--text);
}
.button--secondary:hover {
  border-color: rgba(245, 197, 24, 0.5); background: var(--primary-soft); color: var(--primary);
}
.button:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* --- Cards --- */
.section-card, .feature-card, .faq-item {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.section-card {
  padding: 36px; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  overflow: hidden; position: relative; border-color: var(--card-border);
  background:
    radial-gradient(ellipse 62% 52% at right top, var(--card-glow-a), transparent 56%),
    radial-gradient(ellipse 42% 38% at left bottom, var(--card-glow-b), transparent 60%),
    var(--card-bg);
}
.section-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--card-glow-b) 52%, transparent);
  pointer-events: none;
}
.section-card > * { position: relative; z-index: 1; }

/* Content lists inside cards */
.section-card ul, .section-card ol { margin: 0 0 1.15em; padding-left: 1.5em; list-style-position: outside; }
.section-card ul { list-style: disc; }
.section-card ol { list-style: decimal; }
.section-card li { margin: .5em 0; line-height: 1.6; }
.section-card li::marker { color: var(--primary); }
.section-card li > b, .section-card li > strong { color: var(--text); }

/* --- Process / ordered list --- */
.process-list { list-style: none; counter-reset: step; display: grid; gap: 12px; }
.process-list li {
  counter-increment: step; display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--primary-soft); color: var(--muted); line-height: 1.6;
}
.process-list li::before {
  content: counter(step); flex: 0 0 auto; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--on-primary); font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
}

/* --- Action row --- */
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- Inline links (di dalam konten utama) — aksen cyan seperti "Kredit" di logo --- */
main a:not(.button):not(.site-brand) { color: var(--link); font-weight: 500; }
main a:not(.button):not(.site-brand):hover { color: var(--primary); }

/* --- Promo card (hub browse): banner thumbnail + CTA beranimasi --- */
.promo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.promo-card__banner { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.promo-card__banner img { width: 100%; height: 100%; object-fit: cover; }
.promo-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.promo-card__body h3 { margin-bottom: 6px; font-size: 1.05rem; }
.promo-card__body p { margin: 0 0 16px; flex: 1; }
/* promo-cta pakai .button.button--primary (style CTA standar); ini hanya layout */
.promo-cta { margin-top: auto; width: 100%; text-transform: uppercase; letter-spacing: 0.02em; }
@media (prefers-reduced-motion: reduce) { .promo-card__banner img { transition: none; } }

/* --- List table (crawlable) — daftar promo/child untuk internal linking di hub --- */
.list-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.list-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.list-table thead th {
  text-align: left; padding: 14px 18px; font-family: var(--font-display); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); background: var(--tile-bg);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.list-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.list-table tbody tr:last-child td { border-bottom: 0; }
.list-table tbody tr:hover { background: var(--primary-soft); }
.list-table a.list-name { font-family: var(--font-display); font-weight: 700; color: var(--text); }
.list-table a.list-name:hover { color: var(--primary); }
.list-table .list-tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--tile-bg);
  border: 1px solid var(--line); color: var(--muted-soft); font-size: 0.74rem; font-weight: 600; font-family: var(--font-display);
}
.list-table .list-go { color: var(--primary); font-weight: 700; font-family: var(--font-display); white-space: nowrap; }
.list-table .list-go:hover { color: var(--secondary); }
@media (max-width: 680px) { .list-table .col-hide { display: none; } .list-table td, .list-table thead th { padding: 12px 12px; } }

/* --- Related links (chips) — dipakai di halaman spoke/child untuk internal linking --- */
.chip-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.1rem; }
.chip-links a {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px;
  background: var(--tile-bg); border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.chip-links a:hover { border-color: var(--card-border); background: var(--primary-soft); color: var(--primary); }

/* Judul kartu hub = anchor SEO; ::after meregang menutupi kartu agar seluruh kartu klik-able */
.feature-card .card-link { color: var(--text); }

/* --- Breadcrumb --- */
.section-breadcrumb { padding: 10px 0; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0;
  list-style: none; color: var(--muted-soft); font-size: 0.875rem;
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb a:hover { color: var(--primary); }

/* --- Feature card grid --- */
.card-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px; margin-top: 1.1rem; align-items: stretch;
}
.card-grid > article:last-child:nth-child(odd) {
  grid-column: 1 / -1; max-width: calc(50% - 10px); margin-left: auto; margin-right: auto; width: 100%;
}
/* Grid 3 kolom untuk halaman HUB (daftar spoke/offer yang banyak) */
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--3 > article:last-child:nth-child(odd) { grid-column: auto; max-width: none; }
@media (max-width: 900px) { .card-grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .card-grid--3 { grid-template-columns: 1fr; } }
.feature-card {
  position: relative; min-height: 100%; padding: 28px; display: flex; flex-direction: column;
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover { border-color: rgba(245, 197, 24, 0.24); transform: translateY(-2px); }
.feature-card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.feature-card .card-link:hover { color: var(--primary); }
.feature-card .card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.feature-card > span {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.feature-card .action-row { margin-top: auto; }

/* --- FAQ (flat: tanpa kotak/border kartu, hanya garis pemisah tipis) --- */
:root { interpolate-size: allow-keywords; }
.faq-list { display: grid; gap: 0; }
.faq-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);   /* hanya garis pemisah antar item */
  border-radius: 0;
}
.faq-item:last-child { border-bottom: 0; }
.faq-question { list-style: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question {
  width: 100%; padding: 18px 6px; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; background: transparent; color: var(--text); font-family: var(--font-display);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; user-select: none;
  transition: color 0.15s ease;
}
.faq-question:hover { color: var(--primary); }
.faq-question span {
  flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary); font-size: 1rem; transition: transform 0.25s ease;
}
.faq-item[open] .faq-question span { transform: rotate(45deg); }
.faq-answer {
  padding: 0 6px 20px; color: var(--muted); font-weight: 400; line-height: 1.7;
  overflow: hidden; transition: height 0.32s ease;
}
details.faq-item[open] > .faq-answer { height: auto; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .card-grid > article:last-child:nth-child(odd) { grid-column: auto; max-width: 100%; }
}
@media (max-width: 560px) {
  .card-grid { gap: 12px; }
  .feature-card { padding: 20px; }
  .feature-card .button { width: 100%; min-height: 44px; font-size: 0.875rem; }
  .action-row, .action-row .button { width: 100%; }
}

/* ---------- Review block + spec (hub/child capability: review hub & APK) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.list-table th[scope="row"] { text-align: left; padding: 13px 18px; color: var(--muted); font-family: var(--font-display); font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list-table tbody tr:last-child th[scope="row"] { border-bottom: 0; }
.review-block { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-bg); box-shadow: var(--shadow-sm); }
.review-score { display: grid; place-items: center; gap: 2px; align-content: center; min-width: 150px; padding: 22px 26px; border-radius: 16px; background: var(--primary-soft); border: 1px solid var(--card-border); text-align: center; }
.review-score__num { font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; line-height: 1; color: var(--primary); }
.review-score__max { color: var(--muted-soft); font-weight: 700; font-size: .9rem; }
.review-score__label { margin-top: 6px; color: var(--muted); font-size: .74rem; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.review-verdict { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.review-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.review-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.review-list li { position: relative; padding-left: 26px; color: var(--muted); line-height: 1.5; }
.review-list li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.review-list--pros li::before { content: '\2713'; color: #35c26b; }
.review-list--cons li::before { content: '\2715'; color: var(--secondary); }
@media (max-width: 680px) {
  .review-block { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .review-score { min-width: 0; }
  .review-cols { grid-template-columns: 1fr; }
}

/* ---------- User reviews (ulasan beberapa user — placeholder, no schema) ---------- */
.user-reviews__avg { margin-top: 4px; color: var(--muted); font-weight: 600; font-family: var(--font-display); font-size: .9rem; }
.user-reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ureview { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-bg); box-shadow: var(--shadow-sm); }
.ureview__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ureview__avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); border: 1px solid var(--card-border); color: var(--primary); font-family: var(--font-display); font-weight: 800; font-size: .9rem; }
.ureview__meta { min-width: 0; }
.ureview__author { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: .95rem; }
.ureview__stars { display: inline-flex; gap: 2px; margin-top: 3px; }
.ureview__stars svg { width: 14px; height: 14px; fill: var(--line-strong); }
.ureview__stars svg.is-on { fill: var(--primary); }
.ureview__date { margin-left: auto; align-self: flex-start; color: var(--muted-soft); font-size: .78rem; white-space: nowrap; }
.ureview__title { font-size: 1rem; margin: 0 0 6px; color: var(--text); }
.ureview__body { margin: 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 680px) { .user-reviews { grid-template-columns: 1fr; } }
