/* ==========================================================
   DUA TAMPILAN
   - HP (≤1040px): gaya aplikasi (PWA) — menu bawah, halaman ringkas.
   - Komputer (≥1041px): web company profile profesional — baris info,
     breadcrumb, kotak bantuan di samping, beranda lebih lengkap, footer lengkap.
   ========================================================== */
@media (max-width: 1040px) { .desktop-only { display: none !important; } }
@media (min-width: 1041px) { .mobile-only { display: none !important; } }

/* ---------- Footer (dasar, berlaku di HP) ---------- */
.site-footer { padding-block: 1.75rem; }
.footer-grid-pro { display: grid; gap: 1.5rem; }
.footer-brand-col { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand-col p { margin: 0; }
.footer-brand-col strong { display: block; margin-bottom: .2rem; }
.footer-brand-col .brand-logo { height: 52px; width: auto; flex: none; background: #fff; border-radius: var(--radius-sm); padding: 5px 7px; }
.footer-bottom { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgb(32 33 36 / .15); }
.footer-bottom p { margin: 0; font-size: var(--fs-xs); }

/* ---------- Ajakan pasang aplikasi (HP) ---------- */
.install-banner {
  position: fixed; z-index: 60; left: .75rem; right: .75rem;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: .75rem; padding: .75rem .75rem .75rem .9rem;
  border-radius: var(--radius); background: var(--tint-blue); color: var(--gray-900);
  box-shadow: 0 10px 30px -10px rgb(60 64 67 / .5);
  transform: translateY(20px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.install-banner.is-in { transform: none; opacity: 1; }
.install-banner img { border-radius: 10px; flex: none; }
.install-copy { flex: 1; min-width: 0; display: grid; line-height: 1.35; font-size: var(--fs-sm); }
.install-copy span { color: var(--gray-700); }
.install-banner .btn-sm { min-height: 38px; padding: 0 1rem; }
.install-close { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: rgb(32 33 36 / .08); font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--gray-900); }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: var(--fs-sm); }
.btn-block { width: 100%; }

/* Saat dibuka sebagai aplikasi terpasang */
.is-standalone body { -webkit-tap-highlight-color: transparent; }
.is-standalone .bottom-nav, .is-standalone .header-branch { user-select: none; -webkit-user-select: none; }

/* ==========================================================
   KOMPUTER
   ========================================================== */
@media (min-width: 1041px) {
  :root { --header-h: 84px; --container: 1200px; }

  /* Baris info atas */
  .utility { background: var(--blue-700); color: #E8F0FE; font-size: var(--fs-xs); }
  .utility-inner { display: flex; justify-content: space-between; gap: 2rem; padding-block: .5rem; }
  .utility-inner > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .utility strong { color: #fff; }
  .utility a { color: #fff; font-weight: 700; text-decoration: none; }
  .utility a:hover { text-decoration: underline; }

  .header-inner { height: var(--header-h); }
  .brand-logo { height: 60px; }
  .brand-text strong { font-size: 1.125rem; }
  .brand-text small { font-size: .78rem; }
  .main-nav { gap: 2rem; }
  .main-nav ul { gap: 1.75rem; }
  .main-nav ul a { font-size: .9375rem; font-weight: 600; padding-block: .6rem; }

  /* Beranda */
  [data-view="beranda"] .hero { padding-block: 4.5rem 7rem; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4.5rem; }
  .hero-copy h1 { font-size: 3.75rem; max-width: 13ch; }
  .hero-lead { font-size: 1.1875rem; max-width: 50ch; }
  .hero-media img { aspect-ratio: 5 / 4; }

  .home-more { padding-bottom: 4.5rem; }
  .home-sec { padding-top: 4rem; }
  .home-sec h2 { font-size: 2rem; margin: 0; }
  .home-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
  .more-link { color: var(--link); font-weight: 700; text-underline-offset: 4px; }

  .home-programs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
  .home-programs a {
    --tint: var(--tint-blue);
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; height: 100%; min-height: 150px;
    padding: 1.25rem; border-radius: var(--radius); background: var(--tint); color: var(--gray-900);
    text-decoration: none; border: 1px solid var(--edge); transition: transform .15s, box-shadow .15s;
  }
  .home-programs li:nth-child(4n+2) a { --tint: var(--tint-red); }
  .home-programs li:nth-child(4n+3) a { --tint: var(--tint-yellow); }
  .home-programs li:nth-child(4n+4) a { --tint: var(--tint-green); }
  .home-programs a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .home-programs strong { font-size: 1.125rem; line-height: 1.3; }
  .home-programs .tag-pill { margin: 0; }

  .home-why h2 { margin-bottom: 1.5rem; }
  .why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .why-grid li { padding: 1.5rem; border-radius: var(--radius); background: rgb(255 255 255 / .35); border-top: 5px solid var(--blue-500); }
  .why-grid li:nth-child(2) { border-top-color: var(--red-500); }
  .why-grid li:nth-child(3) { border-top-color: var(--green-500); }
  .why-grid li:nth-child(4) { border-top-color: var(--blue-700); }
  .why-grid h3 { font-size: 1.125rem; margin-bottom: .5rem; }
  .why-grid p { margin: 0; color: var(--gray-700); font-size: var(--fs-sm); }

  /* Garis waktu alur (memang berurutan → bernomor) */
  .timeline { display: grid; grid-template-columns: repeat(8, 1fr); counter-reset: t; position: relative; }
  .timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 22px; height: 3px; background: rgb(32 33 36 / .2); border-radius: 3px; }
  .timeline li { counter-increment: t; position: relative; display: grid; justify-items: center; gap: .75rem; text-align: center; font-weight: 700; font-size: var(--fs-sm); padding-inline: .25rem; }
  .timeline li::before {
    content: counter(t); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: var(--blue-500); color: #fff; font-weight: 800; box-shadow: 0 0 0 5px var(--page-bg);
  }
  .timeline li:nth-child(4n+2)::before { background: var(--red-500); }
  .timeline li:nth-child(4n+3)::before { background: var(--green-500); }
  .timeline li:nth-child(4n+4)::before { background: var(--blue-700); }
  .timeline li:last-child::before { background: var(--red-600); }

  .home-cta {
    margin-top: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
    padding: 2.5rem 3rem; border-radius: 24px; background: var(--blue-700); color: #fff;
  }
  .home-cta h2 { color: #fff; font-size: 2rem; margin-bottom: .35rem; }
  .home-cta p { margin: 0; color: #D2E3FC; font-size: 1.0625rem; }

  /* Kepala halaman */
  .view-head { padding-top: 2.75rem; }
  .crumbs { display: flex; gap: .5rem; font-size: var(--fs-sm); color: var(--gray-700); margin-bottom: .75rem; }
  .crumbs a { color: var(--gray-900); font-weight: 600; text-decoration: none; }
  .crumbs a:hover { text-decoration: underline; }
  .view-head h1 { font-size: 2.75rem; }
  .view-sub { font-size: 1.0625rem; }

  /* Tab bergaris bawah, khas web */
  .tabs { gap: 1.75rem; margin-top: 1.5rem; padding-bottom: 0; border-bottom: 2px solid rgb(32 33 36 / .12); overflow: visible; }
  .tabs a, .view-head .tabs a { padding: .9rem 0; border-radius: 0; background: none; font-size: 1rem; }
  .view-head .tabs a:hover { background: none; color: var(--blue-700); }
  .tabs a.is-active, .view-head .tabs a.is-active { background: none; color: var(--blue-700); box-shadow: inset 0 -3px 0 var(--blue-700); }

  /* Isi + kotak bantuan di kanan */
  .view-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; padding-block: 2.5rem 5rem; }
  .view-body > :not(.help-aside) { grid-column: 1; }
  .help-aside {
    grid-column: 2; grid-row: 1 / span 20; position: sticky; top: calc(var(--header-h) + 52px);
    padding: 1.5rem; border-radius: var(--radius); background: var(--tint-green); display: grid; gap: .75rem;
  }
  .help-aside h2 { font-size: 1.25rem; margin: 0; }
  .help-aside p { margin: 0; color: var(--gray-700); font-size: var(--fs-sm); }
  .help-kicker { font-weight: 800; color: var(--green-600) !important; }

  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .org-list { grid-template-columns: repeat(4, 1fr); }
  .activity-grid { grid-template-columns: 300px 1fr; gap: 2.5rem; }
  .job-cards { grid-template-columns: repeat(2, 1fr); }

  /* Footer lengkap */
  .site-footer { padding-block: 3.5rem 2rem; }
  .footer-grid-pro { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.5rem; }
  .footer-brand-col { flex-direction: column; }
  .footer-brand-col .brand-logo { height: 72px; padding: 6px 10px; }
  .footer-col h2 { font-size: var(--fs-base); margin-bottom: .9rem; color: var(--gray-900); }
  .footer-col ul { display: grid; gap: .55rem; font-size: var(--fs-sm); }
  .footer-col a { text-decoration: none; }
  .footer-col a:hover { text-decoration: underline; }
  .footer-offices li { display: grid; }
  .footer-offices strong { font-size: var(--fs-sm); }
  .footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; }
  .fab-wa, .install-banner { display: none !important; }
}

/* Perbaikan */
.site-footer::before { display: none; }
.site-footer { border-top: 4px solid transparent; border-image: var(--google-bar) 1; }
@media (min-width: 1041px) {
  .help-aside { grid-row: 1; }
  .tabs { margin-inline: 0; padding-inline: 0; }
}
@media (min-width: 1041px) {
  [data-view="cabang"] .help-aside { display: none !important; }
  [data-view="cabang"] .view-body { grid-template-columns: minmax(0, 860px); }
}

/* Perbaikan: banner yang tersembunyi tidak boleh menutupi tombol WhatsApp */
.install-banner[hidden] { display: none !important; }
.install-banner:not(.is-in) { pointer-events: none; }
