/* =========================================================
   style.css
   Dinas Sosial Kota Bogor - SOLID v3
   (Gabungan dari style.css v1 dan v2 + revisi FAB & hero)
   ========================================================= */

@layer base {
  html, body { margin: 0; padding: 0; }
  body { overscroll-behavior: none; }
  main > :first-child { margin-top: 0 !important; }
  main > :last-child { margin-bottom: 0 !important; }
}

::-webkit-scrollbar { display: none; }

/* =========================================================
   Header: transparan menimpa hero di posisi paling atas,
   berubah solid + shadow begitu halaman discroll.
   ========================================================= */
header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
    backdrop-filter 0.3s ease;
}

/* Kondisi awal (belum discroll): transparan, menimpa hero */
header:not(.header-scrolled) {
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
header:not(.header-scrolled) .bg-surface-container-low {
  background-color: transparent !important;
  border-bottom-color: transparent !important;
}

/* Teks & ikon top-bar + menu jadi putih supaya kebaca di atas hero gelap */
header:not(.header-scrolled) .h-9,
header:not(.header-scrolled) .h-9 * {
  color: #ffffff !important;
}
header:not(.header-scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}
header:not(.header-scrolled) .nav-link:hover,
header:not(.header-scrolled) .nav-link.active {
  color: #ffffff !important;
}
header:not(.header-scrolled) .nav-link::after {
  background: #ffffff !important;
}
header:not(.header-scrolled) .nav-link .material-symbols-outlined {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Logo & judul dinas tetap putih di kondisi transparan */
header:not(.header-scrolled) .text-primary,
header:not(.header-scrolled) .text-secondary {
  color: #ffffff !important;
}

/* Search box & tombol hamburger ikut menyesuaikan warna teks */
header:not(.header-scrolled) #nav-search-toggle,
header:not(.header-scrolled) .mobile-menu-toggle {
  color: #ffffff !important;
}
header:not(.header-scrolled) #nav-search-toggle:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}
header:not(.header-scrolled) #nav-search {
  border-left-color: rgba(255, 255, 255, 0.3) !important;
}

/* Kondisi setelah discroll: solid seperti semula */
header.header-scrolled {
  background-color: rgba(247, 249, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
header.header-scrolled .bg-surface-container-low {
  background-color: #edf4ff !important;
  border-bottom-color: rgba(194, 199, 207, 0.2) !important;
}

/* Navbar — underline tumbuh dari tengah untuk item aktif/hover */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 9999px;
  background: #136299;
  transition: left 0.25s ease, right 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  left: 0.75rem;
  right: 0.75rem;
}
.nav-link.active::after {
  background: #003b62;
}

/* Navbar — search yang expand saat diklik */
.nav-search-input {
  width: 0;
  height: 2.25rem;
  opacity: 0;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  background: #edf4ff;
  border-radius: 9999px;
  font-size: 14px;
  color: #121d26;
  transition: width 0.3s ease, opacity 0.2s ease, padding 0.3s ease, margin 0.3s ease;
}
.nav-search-input::placeholder { color: #72777f; }
#nav-search.open .nav-search-input {
  width: 200px;
  opacity: 1;
  padding: 0 1rem;
  margin-right: 0.5rem;
}

/* Akses Cepat — bulatan ikon dengan label muncul saat hover (desktop) */
.quick-action-circle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 64px;
  text-decoration: none;
}
.quick-action-circle-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.quick-action-circle-icon .material-symbols-outlined {
  font-size: 20px;
}
.quick-action-circle:hover .quick-action-circle-icon {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  background: #003b62;
  color: #ffffff !important;
}
.quick-action-circle-label {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  width: 140px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  background: #003b62;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  text-align: center;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 30;
}
.quick-action-circle-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #003b62;
}
.quick-action-circle:hover .quick-action-circle-label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =========================================================
   Akses Cepat Layanan — REVISI
   ---------------------------------------------------------
   Sebelumnya: tombol FAB bulat yang harus diklik dulu untuk
   membuka panel berisi 4 ikon (radial menu).

   Sekarang: 4 bulatan ikon langsung tampil berjejer (row),
   tanpa tombol toggle dan tanpa panel tersembunyi. Sama seperti
   posisinya dulu — diletakkan tepat di bawah tombol "Cek Status
   Permohonan" di dalam wrapper CTA hero (flex-col), jadi mengikuti
   alur konten hero, bukan floating/fixed.

   Label nama layanan tetap muncul saat hover/tap-hold ke icon
   masing-masing (class .show-label dipakai di layar sentuh).
   ========================================================= */
.fab-radial {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.fab-radial-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.fab-radial-item-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-radial-item:hover .fab-radial-item-icon,
.fab-radial-item:focus-visible .fab-radial-item-icon {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}
.fab-radial-item:active .fab-radial-item-icon { transform: scale(0.95); }

/* Label tersembunyi, hanya tampil saat hover/focus/tap ke icon */
.fab-radial-item-label {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  width: 140px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  background: #003b62;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  text-align: center;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 30;
}
.fab-radial-item-label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #003b62;
}
.fab-radial-item:hover .fab-radial-item-label,
.fab-radial-item:focus-visible .fab-radial-item-label {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* Di layar sentuh (tanpa hover asli), tampilkan label saat item ditekan/aktif via JS class .show-label */
.fab-radial-item.show-label .fab-radial-item-label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* =========================================================
   Hero Carousel indicator dots
   ========================================================= */
.hero-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.hero-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
}
.hero-indicator.is-active {
  background: #ffffff;
  width: 1.5rem;
}

/* =========================================================
   Berita — kartu grid ala kategori
   ========================================================= */
.berita-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.berita-card:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.berita-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e4effd;
}
.berita-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.berita-card:hover .berita-card-img img {
  transform: scale(1.05);
}
.berita-card-date {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0,59,98,0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 0.35rem;
  backdrop-filter: blur(4px);
}
.berita-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.berita-card-tag {
  font-size: 12px;
  font-weight: 700;
  color: #136299;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.berita-card-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #121d26;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.berita-card:hover .berita-card-title {
  color: #136299;
}

/* =========================================================
   Kolaborasi & Integrasi — carousel logo mitra (grayscale -> warna)
   ========================================================= */
.mitra-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.mitra-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.mitra-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0.5rem 0;
}
.mitra-logo {
  width: 150px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.mitra-logo.mitra-logo-empty {
  background: #e4e7ec;
  box-shadow: none;
}
.mitra-logo.mitra-logo-empty:hover {
  background: #d9dde3;
  box-shadow: none;
  transform: none;
}
.mitra-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.mitra-logo:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.mitra-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}
.mitra-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  border: none;
  background: #c2c7cf;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.mitra-dot.is-active {
  background: #003b62;
  width: 1.5rem;
  border-radius: 9999px;
}

/* =========================================================
   Floating Social Media Bar
   (kartu putih, icon bulat berwarna biru)
   ========================================================= */
.social-fab {
  position: fixed; top: 50%; right: 0; z-index: 58;
  transform: translateY(-50%);
  pointer-events: none;
}
.social-fab > * { pointer-events: auto; }

.social-fab-icons {
  position: fixed; top: 50%; right: 0;
  transform: translateY(-50%) translateX(0);
  display: flex; flex-direction: column;
  gap: 0.75rem;
  background: #ffffff;
  padding: 0.75rem 0.6rem;
  border-radius: 1rem 0 0 1rem;
  box-shadow: -2px 4px 18px rgba(0,0,0,0.18);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 58;
}
.social-fab.closed .social-fab-icons { transform: translateY(-50%) translateX(100%); }

.social-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  color: #ffffff; background: #003b62; flex-shrink: 0;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,59,98,0.25);
}
.social-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0,59,98,0.35);
}
/* Semua icon tetap biru solid seperti referensi (tidak ganti warna platform saat hover) */
.social-icon.fb:hover,
.social-icon.ig:hover,
.social-icon.tiktok:hover,
.social-icon.web:hover { background: #136299; }

.social-fab-toggle {
  position: fixed; top: 50%; right: 4.6rem;
  transform: translateY(-50%);
  width: 1.85rem; height: 3.25rem;
  border: none; border-radius: 0.6rem;
  background: #136299; color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1), background 0.25s ease;
  z-index: 59;
}
.social-fab-toggle:hover { background: #003b62; }
.social-fab-toggle span { transition: transform 0.25s ease; }
.social-fab.closed .social-fab-toggle { right: 0.5rem; }
.social-fab.closed .social-fab-toggle span { transform: rotate(180deg); }

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsif mobile: sedikit perkecil agar tetap rapi */
@media (max-width: 640px) {
  .social-fab-icons { padding: 0.6rem 0.5rem; gap: 0.6rem; }
  .social-icon { width: 2.4rem; height: 2.4rem; }
  .social-fab-toggle {
    width: 1.6rem; height: 2.75rem;
    right: 3.9rem;
  }
  .social-fab.closed .social-fab-toggle { right: 0.4rem; }

  /* Akses Cepat: 4 ikon row, perkecil sedikit agar tetap rapi
     berdampingan dengan "Cek Status Permohonan" di layar sempit. */
  .fab-radial {
    gap: 0.5rem;
  }
  .fab-radial-item-icon {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* Floating WhatsApp Button */
.wa-fab {
  position: fixed; right: 1rem;
  bottom: calc(1rem + 1.5rem + 0.75rem + 3.25rem + 0.75rem);
  z-index: 57; width: 3.25rem; height: 3.25rem;
  border-radius: 9999px; background: #25d366; color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, background 0.2s ease;
}
.wa-fab:hover { background: #1ebe5b; transform: scale(1.05); }
.wa-fab svg { width: 26px; height: 26px; fill: #ffffff; }

/* Floating accessibility button */
.a11y-fab { position: fixed; right: 1rem; bottom: calc(1rem + 1.5rem + 0.75rem); z-index: 60; }
.a11y-fab-panel { display: none; position: absolute; right: 0; bottom: 4.75rem; }
.a11y-fab.open .a11y-fab-panel { display: block; }
#a11y-fab-toggle { width: 3.25rem; height: 3.25rem; }
#a11y-fab-toggle .material-symbols-outlined { font-size: 26px !important; }

/* Back to top button */
.back-to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 55;
  width: 1.5rem; height: 1.5rem; border-radius: 9999px; border: none;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff; color: #003b62;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.back-to-top:hover { background: #edf4ff; }
.back-to-top .material-symbols-outlined { font-size: 13px !important; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* =========================================================================
   PERBAIKAN & PENAMBAHAN UNTUK TAMPILAN MOBILE (aman dibuka di HP)
   ========================================================================= */

/* -------------------------------------------------
   1. Top bar (telepon/email) - rapikan di layar kecil
   ------------------------------------------------- */
@media (max-width: 480px) {
  header .h-9 {
    height: auto;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
}

/* -------------------------------------------------
   2. Tombol Hamburger (muncul di bawah breakpoint xl)
   ------------------------------------------------- */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #003b62;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-menu-toggle .material-symbols-outlined { font-size: 26px; }

@media (max-width: 1279px) {
  .mobile-menu-toggle { display: inline-flex; }
}

/* Sembunyikan search & menu desktop di layar sempit supaya tidak dobel */
@media (max-width: 1279px) {
  header nav.hidden.xl\:flex { display: none !important; }
}

/* -------------------------------------------------
   3. Panel menu mobile (slide-in dari kanan)
   ------------------------------------------------- */
.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(18, 29, 38, 0.45);
}
.mobile-nav-panel.open { display: block; }

.mobile-nav-sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(88vw, 340px);
  background: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -6px 0 24px rgba(0,0,0,0.2);
  padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mobile-nav-panel.open .mobile-nav-sheet { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e4e7ec;
}
.mobile-nav-header-title {
  font-weight: 700;
  color: #003b62;
  font-size: 15px;
}
.mobile-nav-close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: none;
  background: #edf4ff;
  color: #003b62;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.25rem;
  font-size: 15px;
  font-weight: 600;
  color: #121d26;
  text-decoration: none;
  border-bottom: 1px solid #f1f3f6;
}
.mobile-nav-link.active { color: #003b62; }

.mobile-nav-group { border-bottom: 1px solid #f1f3f6; }
.mobile-nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.25rem;
  font-size: 15px;
  font-weight: 600;
  color: #121d26;
  background: none;
  border: none;
  cursor: pointer;
}
.mobile-nav-group-toggle .material-symbols-outlined {
  transition: transform 0.2s ease;
  color: #72777f;
  font-size: 20px;
}
.mobile-nav-group-toggle[aria-expanded="true"] .material-symbols-outlined,
.mobile-nav-group.open .mobile-nav-group-toggle .material-symbols-outlined {
  transform: rotate(180deg);
}
.mobile-nav-submenu {
  display: none;
  padding: 0 0 0.5rem 0.75rem;
}
.mobile-nav-group.open .mobile-nav-submenu { display: block; }
.mobile-nav-submenu > a {
  display: block;
  padding: 0.6rem 0.25rem;
  font-size: 14px;
  color: #42474e;
  text-decoration: none;
}
.mobile-nav-subgroup-toggle {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0.6rem 0.25rem;
  font-size: 14px;
  color: #42474e;
  cursor: pointer;
}
.mobile-nav-subgroup-toggle .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.2s ease;
}
.mobile-nav-subgroup-toggle[aria-expanded="true"] .material-symbols-outlined {
  transform: rotate(180deg);
}
.mobile-nav-subgroup {
  padding-left: 0.75rem;
  display: none;
}
.mobile-nav-subgroup.open { display: block; }
.mobile-nav-subgroup a {
  display: block;
  padding: 0.55rem 0.25rem;
  font-size: 13.5px;
  color: #42474e;
  text-decoration: none;
}

.mobile-nav-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.75rem 0;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  background: #edf4ff;
}
.mobile-nav-search .material-symbols-outlined {
  font-size: 20px;
  color: #72777f;
}
.mobile-nav-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #121d26;
}
.mobile-nav-search input::placeholder { color: #72777f; }

/* Cegah body scroll saat menu mobile terbuka */
body.mobile-nav-locked { overflow: hidden; }

/* =========================================================
   Media Sosial saat menu mobile terbuka
   ---------------------------------------------------------
   Semua tombol mengambang (Media Sosial, WA, Aksesibilitas,
   Back-to-Top) otomatis disembunyikan selama panel menu mobile
   terbuka (class body.mobile-nav-locked), lalu muncul lagi
   begitu menu ditutup.
   ========================================================= */
body.mobile-nav-locked .social-fab,
body.mobile-nav-locked .wa-fab,
body.mobile-nav-locked .a11y-fab,
body.mobile-nav-locked .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* -------------------------------------------------
   4. Floating buttons — rapikan spacing & safe-area mobile
   ------------------------------------------------- */
@media (max-width: 640px) {
  .back-to-top {
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  .a11y-fab {
    right: 0.75rem;
    bottom: calc(0.75rem + 1.25rem + 0.5rem + env(safe-area-inset-bottom, 0px));
  }
  .wa-fab {
    right: 0.75rem;
    bottom: calc(0.75rem + 1.25rem + 0.5rem + 2.75rem + 0.5rem + env(safe-area-inset-bottom, 0px));
    width: 2.85rem;
    height: 2.85rem;
  }
  .wa-fab svg { width: 22px; height: 22px; }

  .social-icon {
    width: 2.4rem;
    height: 2.4rem;
  }
  .social-fab-toggle {
    right: 2.55rem;
  }
  .social-fab.closed .social-fab-toggle { right: 0.4rem; }
}

/* =========================================================
   Footer — responsive mobile: grid 2 kolom rapi (ala KPPU)
   ---------------------------------------------------------
   REVISI: "Alamat Kantor" sekarang ikut alur grid 2 kolom
   biasa (sejajar dengan "Tentang Kami"), bukan lagi dipaksa
   full-width. Supaya tetap rapi meski isinya paragraf panjang,
   ukuran font/line-height sedikit diperkecil khusus untuk blok
   alamat di breakpoint mobile ini (lihat rule
   .footer-address-block di bawah).

   Susunan akhir (2 kolom):
   [ Logo & Play Store (full width, center) ]
   [ Pelayanan        ] [ Informasi          ]
   [ Tentang Kami      ] [ Alamat Kantor      ]
   ========================================================= */
@media (max-width: 767px) {
  footer .grid.lg\:grid-cols-5 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }

  /* Logo & badge Play Store: full-width, tetap center */
  footer .grid.lg\:grid-cols-5 > div:first-child {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
    margin: 0 auto 0.5rem auto;
  }

  /* Alamat Kantor: sekarang ikut grid 2 kolom, sejajar dengan Tentang Kami */
  footer .grid.lg\:grid-cols-5 > div:last-child {
    grid-column: auto;
    text-align: left;
  }
  footer .grid.lg\:grid-cols-5 > div:last-child > h4 {
    text-align: left;
  }

  /* Pelayanan, Informasi, Tentang Kami, Alamat Kantor: rata kiri semua */
  footer .grid.lg\:grid-cols-5 > div:not(:first-child) {
    text-align: left;
  }
  footer .grid.lg\:grid-cols-5 > div:not(:first-child) > h4 {
    text-align: left;
  }
  footer .grid.lg\:grid-cols-5 > div:not(:first-child) > ul {
    display: block;
    text-align: left;
  }

  /* Alamat Kantor: perkecil sedikit teksnya karena kolomnya sempit
     (setengah lebar layar), supaya paragraf & baris kontak tetap
     rapi dan tidak terlalu banyak wrap. */
  .footer-address-block p,
  .footer-address-block span {
    font-size: 12.5px;
    line-height: 1.5;
  }
  .footer-address-block .material-symbols-outlined {
    font-size: 14px !important;
  }
}

/* =========================================================
   Footer mobile — jarak bawah & rapi di HP
   ---------------------------------------------------------
   Tambah padding-bottom pada footer di layar HP supaya baris
   copyright/alamat paling bawah tidak tertutup oleh tumpukan
   tombol mengambang (WA, aksesibilitas, back-to-top). Baris
   copyright & link dibuat menumpuk rapi ke bawah dan rata
   tengah di layar sempit.
   ========================================================= */
@media (max-width: 767px) {
  footer {
    padding-bottom: 9rem;
  }
  footer .flex.flex-col.md\:flex-row {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}