/* ===========================================================
   UGO TRIP — layout.css
   Header, navigation, footer, floating actions, responsive shell
   =========================================================== */
/* The injected chrome lives inside wrapper divs; display:contents keeps
   sticky positioning relative to the page instead of a short wrapper. */
#site-header, #site-footer { display: contents; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(11, 31, 58, .07); }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--brand);
  color: #fff; font-weight: 900; font-size: 1.25rem; letter-spacing: -.06em;
  display: grid; place-items: center; position: relative;
}
.brand__mark::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 1.12rem; letter-spacing: -.04em; }
.brand__text strong span { color: var(--brand); }
.brand__text small { font-size: .6rem; color: var(--muted); letter-spacing: .02em; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.nav__link {
  padding: 9px 13px; border-radius: var(--r-sm); font-size: .87rem;
  font-weight: 650; color: var(--ink-2); white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.nav__link:hover { color: var(--brand); background: var(--brand-soft); }
.nav__link.is-active { color: var(--brand); background: var(--brand-soft); }

.header__actions { display: flex; align-items: center; gap: 9px; flex: none; }
.switch {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: var(--r-pill); padding: 7px 12px; font-size: .76rem; font-weight: 800;
  letter-spacing: .02em; transition: all .18s ease;
}
.switch:hover { border-color: var(--brand); color: var(--brand); }
.header__cta { padding: 9px 17px; }
.hamburger {
  display: none; width: 42px; height: 42px; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); background: #fff; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 18px 20px 24px;
  display: none; flex-direction: column; gap: 4px;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { padding: 13px 12px; border-radius: var(--r-sm); font-weight: 700; border-bottom: 1px solid var(--line); }
.mobile-nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.mobile-nav__actions { display: flex; gap: 10px; margin-top: 18px; }
.mobile-nav__actions .btn { flex: 1; }

/* Footer */
.site-footer { background: var(--brand-deep); color: #c3d0e2; padding: 66px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding-bottom: 48px; }
.footer__brand .brand__text strong { color: #fff; }
.footer__brand .brand__text small { color: #8fa3bf; }
.footer__brand p { margin: 18px 0 0; font-size: .87rem; max-width: 300px; color: #9fb1c9; }
.footer__col h4 { color: #fff; font-size: .9rem; margin-bottom: 16px; letter-spacing: .02em; }
.footer__col a { display: block; font-size: .85rem; padding: 5px 0; color: #9fb1c9; transition: color .18s ease; }
.footer__col a:hover { color: #fff; }
.footer__col p { font-size: .85rem; color: #9fb1c9; margin: 0 0 8px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: .78rem; color: #8497b1;
}
.footer__bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__bottom a:hover { color: #fff; }
.footer__badge { display: inline-block; padding: 4px 10px; border: 1px solid rgba(227,205,165,.55); color: var(--gold-light); border-radius: var(--r-pill); font-weight: 700; }

/* Floating actions */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37, 211, 102, .38);
  transition: transform .2s ease;
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 27px; height: 27px; }
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(30,44,56,.1);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center;
}
.mobile-cta__price { display: flex; flex-direction: column; line-height: 1.2; }
.mobile-cta__price strong { font-size: 1.05rem; }
.mobile-cta__price small { font-size: .68rem; color: var(--muted); }
.mobile-cta .btn { flex: 1; padding: 11px 14px; }

@media (max-width: 1180px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .header__inner { gap: 16px; }
  .footer__grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
  .footer__col:last-child { grid-column: 2 / -1; }
}
@media (max-width: 1024px) {
  .header__cta { display: none; }
  .switch { padding: 7px 10px; }
}
@media (max-width: 720px) {
  :root { --header-h: 66px; }
  .brand__text small { display: none; }
  .brand__mark { width: 34px; height: 34px; font-size: 1.1rem; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer__brand, .footer__col:last-child { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .fab { width: 46px; height: 46px; right: 14px; bottom: 86px; }
  .fab svg { width: 23px; height: 23px; }
  .mobile-cta { display: flex; }
  body.has-mobile-cta { padding-bottom: 70px; }
}

/* Release pass: five-column footer (navigation + social) */
@media (min-width: 1181px) {
  .footer__grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
}
@media (max-width: 1180px) {
  .footer__grid { grid-template-columns: 1.4fr repeat(4, 1fr); }
  .footer__col:nth-last-child(2), .footer__col:last-child { grid-column: auto; }
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__brand, .footer__col:last-child { grid-column: 1 / -1; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); right: 16px; left: 16px; max-width: none; }
}
@media (min-width: 721px) {
  .toast { bottom: 92px; }
}
