/* Lokasi: public_html/assets/shared/layout.css */
/* Gaya mengikuti pedoman pemilik; warna tetap palet eomidman */

/* ===== Header & navbar ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
    background: var(--hdr-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  transition: background-color .3s;
}
.navbar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.logo {
  display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-head); font-size: 20px; line-height: 1;
  color: var(--text); text-decoration: none; white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none; transition: background-color .2s;
}
.site-header {
  --hover: color-mix(in srgb, var(--text) 8%, transparent);
  --hdr-bg: color-mix(in srgb, var(--bg) 50%, transparent);
}
@media (min-width: 861px) {
  .nav-links a { position: relative; }
  .nav-links a.active::after {
    content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px;
    margin-left: -2px; border-radius: 50%; background: var(--accent);
  }
}
@media (hover: hover) {
  .nav-links a:hover, .theme-toggle:hover, .menu-toggle:hover { background: var(--hover); }
}
.nav-links a:focus-visible, .theme-toggle:focus-visible, .menu-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .menu-toggle {
  align-items: center; justify-content: center; padding: 0; border: 0; background: none;
  color: var(--text); cursor: pointer; font: inherit;
}
.theme-toggle { display: none; width: 34px; height: 34px; border-radius: 50%; transition: background-color .2s; }
.theme-toggle:hover { color: var(--accent); }
html[data-theme] .theme-toggle { display: inline-flex; }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ikon menu dua garis */
.menu-toggle { display: none; width: 36px; height: 36px; place-items: center; border-radius: 50%; transition: background-color .2s; }
.menu-toggle span { position: relative; display: block; width: 16px; height: 0; }
.menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1.6px; background: var(--text);
  border-radius: 2px; transition: transform .3s, top .3s;
}
.menu-toggle span::before { top: -3.5px; }
.menu-toggle span::after { top: 3.5px; }
.menu-toggle.open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* ===== Footer minimalis ===== */
.site-footer { position: relative; margin-top: 3rem; background: #212121; color: rgba(255,255,255,.78); }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--teal));
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; font-size: 12px; }
.site-footer .logo { color: #ffffff; font-size: 18px; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: inherit; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: #ffffff; }

/* ===== Responsif ===== */
@media (max-width: 860px) {
  .site-header {
    top: 12px; margin: 16px 12px 0; border: 0; border-radius: 20px; background: var(--hdr-bg);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    box-shadow: var(--shadow), inset 0 0 0 1px var(--glass-border);
  }
  .navbar { width: auto; margin: 0; height: auto; flex-wrap: wrap; gap: 0; padding: 0 6px 0 18px; }
  .navbar .logo, .nav-actions { height: 52px; }
  .menu-toggle { display: grid; }

  .nav-links {
    order: 3; flex: 0 0 100%; flex-direction: column; align-items: stretch; gap: 0;
    margin-right: 12px; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height .35s ease, opacity .25s, visibility .35s;
  }
  .nav-links.open {
    max-height: min(440px, calc(100vh - 7.5rem)); overflow-y: auto;
    opacity: 1; visibility: visible; padding-bottom: 6px;
  }
  .nav-links li {
    position: relative;
    opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .3s;
  }
  .nav-links li::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(128,128,128,.4) 18%, rgba(128,128,128,.4) 82%, transparent);
  }
  .nav-links.open li { opacity: 1; transform: none; }
  .nav-links.open li:nth-child(1) { transition-delay: .04s; }
  .nav-links.open li:nth-child(2) { transition-delay: .08s; }
  .nav-links.open li:nth-child(3) { transition-delay: .12s; }
  .nav-links.open li:nth-child(4) { transition-delay: .16s; }
  .nav-links.open li:nth-child(5) { transition-delay: .20s; }
  .nav-links.open li:nth-child(6) { transition-delay: .24s; }
  .nav-links.open li:nth-child(7) { transition-delay: .28s; }
    .nav-links a { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; }
  .nav-links a::after {
    content: ""; flex: none; width: 7px; height: 7px; margin-right: 3px;
    border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor;
    transform: rotate(45deg); opacity: .45; transition: transform .2s, opacity .2s;
  }
  .nav-links a:hover::after { opacity: .9; transform: translateX(3px) rotate(45deg); }
  .nav-links a.active { font-weight: 600; }
  .nav-links a.active::after { opacity: 1; color: var(--accent); }

}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--surface); }
}
@media (max-width: 600px) {
  .footer-inner { flex-wrap: wrap; gap: 12px 16px; padding-top: 18px; padding-bottom: 18px; }
  .footer-inner .logo { order: 1; }
  .footer-copy { order: 2; margin-left: auto; font-size: 11px; opacity: .8; }
  .footer-links { order: 3; width: 100%; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
}

.error-page { text-align: center; padding-top: 4rem; }
.error-code { font-size: 4rem; font-weight: 800; margin: 0; color: var(--primary); }
.error-detail { text-align: left; overflow-x: auto; padding: 1rem; background: var(--surface); border-radius: var(--radius); }

/* ===== Tombol kontak melayang ===== */
.fab {
  position: fixed; right: 56px; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.fab svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* latar buram saat pilihan terbuka */
.fab-scrim {
  position: fixed; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s, visibility .3s;
}
.fab.open .fab-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fab-scrim { background: color-mix(in srgb, var(--bg) 78%, transparent); }
}

/* tombol utama: gradasi palet mengalir + cincin denyut, ikon putih */
.fab-main {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; font: inherit; color: #ffffff;
  background: linear-gradient(125deg, var(--accent), var(--gold), var(--teal), var(--accent)); background-size: 300% 300%;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow);
  animation: fabFlow 7s ease-in-out infinite;
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.2), box-shadow .3s;
}
.fab-main::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; pointer-events: none; animation: fabPulse 2.8s ease-out infinite;
}
.fab.open .fab-main::after { animation: none; }
.fab-main svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.fab-main .i-chat { fill: #ffffff; stroke: none; }
.fab-main .i-x { display: none; stroke: #ffffff; stroke-width: 2.4; }
.fab.open .fab-main .i-x { display: block; }
.fab.open .fab-main .i-chat { display: none; }

/* kartu pilihan kontak: judul + baris ramping */
.fab-panel {
  width: min(232px, calc(100vw - 56px)); padding: 6px; border-radius: 20px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .14), var(--shadow);
  transform-origin: 100% 100%; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.94);
  transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .3, 1.1), visibility .3s;
}
.fab.open .fab-panel { opacity: 1; visibility: visible; transform: none; }
.fab-head { padding: 8px 6px 10px; }
.fab-head b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.fab-head span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.fab-list { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 2px; border-top: 1px solid var(--border); }
.fab-list li { --t: var(--accent); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.fab-list .t-wa, .fab-list .t-fb { --t: var(--teal); }
.fab-list .t-tg { --t: var(--accent); }
.fab-list .t-ig { --t: var(--gold); }
.fab.open .fab-list li { opacity: 1; transform: none; }
.fab.open .fab-list li:nth-child(1) { transition-delay: .05s; }
.fab.open .fab-list li:nth-child(2) { transition-delay: .09s; }
.fab.open .fab-list li:nth-child(3) { transition-delay: .13s; }
.fab.open .fab-list li:nth-child(4) { transition-delay: .17s; }

/* baris: kotak ikon 30px kiri, kotak panah 30px kanan, padding kiri = kanan */
.fab-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; color: var(--text); text-decoration: none; transition: background-color .2s; }
.fab-ico, .fab-go { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; }
.fab-ico { border-radius: 10px; background: color-mix(in srgb, var(--t) 18%, transparent); transition: background-color .2s, transform .25s; }
.fab-ico svg { width: 16px; height: 16px; }
.fab-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1; }
.fab-go svg { width: 15px; height: 15px; opacity: .35; transition: transform .25s, opacity .2s; }

@media (hover: hover) {
  .fab-main:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 16px 32px color-mix(in srgb, var(--accent) 38%, transparent), var(--shadow); }
  .fab-item:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
  .fab-item:hover .fab-ico { background: var(--t); color: #212121; transform: scale(1.06) rotate(-4deg); }
  .fab-item:hover .fab-go svg { opacity: 1; transform: translateX(3px); }
}
.fab-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.fab-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes fabFlow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes fabPulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

/* footer tidak tertutup tombol */
.footer-inner { padding-right: 130px; }
@media (max-width: 860px) {
  .fab { right: 28px; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .footer-inner { padding-right: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .fab-main, .fab-main::after { animation: none; }
  .fab-main, .fab-panel, .fab-scrim, .fab-list li, .fab-ico, .fab-go svg { transition: none; }
}

/* hilangkan kotak biru saat menu/tombol disentuh atau diklik */
.site-header a, .site-header button, .fab a, .fab button { -webkit-tap-highlight-color: transparent; }
.nav-links a:focus:not(:focus-visible),
.theme-toggle:focus:not(:focus-visible),
.menu-toggle:focus:not(:focus-visible),
.fab-main:focus:not(:focus-visible) { outline: none; }
.nav-links a, .menu-toggle, .theme-toggle, .fab-main { -webkit-user-select: none; user-select: none; }

/* kotak .fab tembus sentuhan; hanya tombol, panel terbuka, dan scrim yang bisa diklik */
.fab { pointer-events: none; }
.fab-main, .fab.open .fab-panel { pointer-events: auto; }

.fab-main, .fab-main::after { animation: none !important; }

