/* Shared across all pages: logo, top bar + slide-in menu, floating WhatsApp
   button, footer. Page-specific sizing/overrides live in each page's own
   <style> block. */

:root {
  --logo: url("logo-web.png");
  --topbar-h: 64px;
}

.logo { display: block; background-image: var(--logo); background-repeat: no-repeat;
  background-position: left center; background-size: contain; aspect-ratio: 2 / 1;
  text-decoration: none; }

html.menu-lock, body.menu-lock { overflow: hidden; }
body { padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }

/* ---------- Buttons (shared fallback; index.html/404.html define their own identical copy) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.75rem;
  font: 700 1.05rem var(--font); border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, filter .15s ease; }
.btn:active { transform: scale(.97); }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 80; background: #fff;
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top, 0px) + .65rem) 0 .65rem; }
.topbar-inner { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1rem; }
.hamburger { background: none; border: 0; color: var(--navy); padding: .4rem; margin: -0.4rem; cursor: pointer;
  display: flex; align-items: center; border-radius: 8px; }
.hamburger:hover { background: var(--mist); }
.topbar-logo { width: 110px; margin-right: auto; }
.topbar-cta { min-height: 2.6rem; padding: 0 1.1rem; font-size: .92rem; white-space: nowrap; }

/* ---------- Menu backdrop + panel ---------- */
.menu-backdrop { position: fixed; inset: 0; background: rgba(7,27,50,.55); z-index: 90;
  opacity: 0; transition: opacity .25s ease; }
.menu-backdrop.show { opacity: 1; }

.menu-panel { position: fixed; top: 0; left: 0; height: 100%; width: 100%; max-width: 100%;
  background: #fff; color: var(--navy); z-index: 95; transform: translateX(-100%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; display: flex; flex-direction: column;
  overflow-y: auto; }
.menu-panel.open { transform: translateX(0); visibility: visible;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0s; }
.menu-panel-head { display: flex; align-items: center; justify-content: flex-end;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.5rem .5rem; }
.menu-close { background: none; border: 0; color: var(--navy); padding: .4rem; margin: -.4rem;
  cursor: pointer; border-radius: 8px; }
.menu-close:hover { background: var(--mist); }
.menu-list { list-style: none; margin: 0; padding: .5rem 0 0; }
.menu-list li { border-top: 1px solid var(--line); }
.menu-list li:last-child { border-bottom: 1px solid var(--line); }
.menu-list a { display: block; padding: 1.15rem 1.5rem; font-weight: 700; font-size: 1.15rem;
  text-decoration: none; color: var(--navy); }
.menu-list a:hover { background: var(--mist); }
.menu-list a[aria-current="page"] { color: var(--teal); font-size: 1.2rem; }
.menu-bottom { margin-top: auto; background: var(--coral); color: var(--navy); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .85rem; }
.menu-bottom a { color: var(--navy); font-weight: 700; text-decoration: none; text-underline-offset: 4px; }
.menu-bottom a:hover { text-decoration: underline; }

@media (min-width: 640px) {
  .menu-panel { max-width: 380px; box-shadow: 0 0 40px rgba(0,0,0,.18); }
}

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 70; width: 3.5rem; height: 3.5rem;
  border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(7,27,50,.25); transition: transform .15s ease; }
.whatsapp-fab:hover { transform: scale(1.06); }
@media (max-width: 640px) {
  body.input-focused .whatsapp-fab { display: none; }
}

/* ---------- Shared footer ---------- */
.site-footer { background: var(--mist); color: var(--navy); padding: 1.75rem 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.75rem); font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; }
.site-footer .logo { width: 100px; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.footer-links a { color: var(--navy); text-underline-offset: 4px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .menu-panel { transition: none !important; }
  .menu-backdrop { transition: none !important; }
}
