/* =========================================
   shared_style.css
   Dipakai semua halaman index_*.php
   Bottom nav: position FIXED di bawah layar
========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: #f4a7b9; border-radius: 3px; }

:root {
  --rose:    #e85d8a;
  --rose2:   #d94878;
  --rose-lt: #fce4ec;
  --pink2:   #ffecf3;
  --gold:    #c9934a;
  --stone:   #2d1f2a;
  --stone2:  #5a3f52;
  --muted:   #9b7a8c;
  --bg:      #fdf9fa;
  --border:  rgba(232,93,138,.12);
  --border2: rgba(232,93,138,.24);
  --sh-xs:   0 1px 6px rgba(232,93,138,.07);
  --sh-sm:   0 4px 20px rgba(232,93,138,.11);
  --sh-md:   0 10px 40px rgba(232,93,138,.15);
  --sh-lg:   0 20px 60px rgba(232,93,138,.20);
  --r:  18px; --r2: 24px; --r3: 30px;
  --nav-h: 62px; /* tinggi bottom nav */
}

/* ── BODY ── */
body {
  background: var(--bg);
  color: var(--stone);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  /* Ruang bawah agar konten tidak tertutup nav */
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

/* Di desktop, beri background beda biar kelihatan */
@media (min-width: 540px) {
  body { background: #e8dde4; }
}

/* ── PAGE WRAPPER ── Semua konten di dalam max-width 500px, tengah */
.page-wrap {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}
@media (min-width: 540px) {
  .page-wrap {
    box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 20px 80px rgba(0,0,0,.15);
  }
}

/* ── TOP NAV ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rose);
}
.nav-back {
  display: flex; align-items: center; gap: 5px;
  font-size: .74rem; font-weight: 600; color: var(--rose);
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--border2);
  transition: background .2s;
}
.nav-back:hover { background: var(--rose-lt); }
.nav-back svg { width: 15px; height: 15px; }

.nav-clock { text-align: right; line-height: 1.4; }
.nav-clock b { display: block; font-size: .8rem; font-weight: 600; color: var(--stone); }
.nav-clock small { font-size: .55rem; font-weight: 500; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* ── SECTION & SPACING ── */
.section { padding: 0 16px; }
.mt  { margin-top: 10px; }
.mt2 { margin-top: 14px; }

.sh { display: flex; align-items: center; gap: 12px; padding: 26px 0 14px; }
.sh h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; color: var(--stone); white-space: nowrap; }
.sh h2 em { font-style: italic; color: var(--rose); }
.sh-line { flex: 1; height: 1px; background: var(--border); }
.sh-tag  { flex-shrink: 0; background: var(--rose-lt); border-radius: 100px; padding: 3px 10px; font-size: .57rem; font-weight: 600; color: var(--rose); letter-spacing: .08em; text-transform: uppercase; }
.sh-link { flex-shrink: 0; font-size: .62rem; font-weight: 600; color: var(--rose); display: flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 100px; border: 1px solid var(--border2); transition: background .2s; }
.sh-link:hover { background: var(--rose-lt); }

/* ── FADE-IN ANIMATION ── */
.fi { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.fi.v { opacity: 1; transform: none; }
.d1 { transition-delay: .07s; }
.d2 { transition-delay: .14s; }
.d3 { transition-delay: .21s; }
.d4 { transition-delay: .28s; }

/* ════════════════════════════════════════
   BOTTOM NAV — position: FIXED
   Selalu menempel di bawah layar
════════════════════════════════════════ */
.btm-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;

  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  background: rgba(255,255,255,.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1.5px solid var(--border);

  display: flex;
  align-items: stretch;
}

/*
  Di mobile (< 500px): nav full width → oke
  Di desktop (>= 500px): nav harus pas di tengah
  Cara paling andal: pakai margin auto + max-width,
  tapi fixed tidak ikut parent. Solusi: wrapper di dalam nav.
*/
.btm-nav-inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 0 6px;
  color: var(--muted);
  transition: color .2s;
  position: relative;
}
.nav-tab:active { opacity: .7; }
.nav-tab svg { width: 22px; height: 22px; }
.nav-tab span {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.nav-tab.active { color: var(--rose); }

/* Pip indicator di atas icon */
.nav-tab::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2.5px;
  background: var(--rose);
  border-radius: 0 0 3px 3px;
  transition: width .25s ease;
}
.nav-tab.active::before { width: 28px; }