/* ==========================================================================
   Super Travels - site header (top bar + main nav + search)
   Self-contained: uses only .site-header / .topbar / .mainbar / .nav-* classes
   so it does not clash with the legacy Bootstrap #header rules in main.css.
   ========================================================================== */

:root {
  --st-navy: #0b2240;      /* main */
  --st-blue: #458ccb;      /* accent blue */
  --st-blue-dark: #2f6fa8; /* darker shade of the blue, for small text and hover states */
  --st-gold: #d4af37;      /* accent: highlights and calls to action */
  --st-gold-dark: #b8962e; /* gold hover */
  --st-sky: #f3f8fc;       /* very light sky blue: soft section background */
  --st-grey: #808080;      /* borders, icons, disabled and other non-text details */
  --st-ink: #0b2240;
  --st-muted: #666666;     /* secondary text (a darker grey than --st-grey, for readability) */
  --st-line: #e5eaf1;
  --st-wa: #25d366;
  --st-wa-dark: #1ebe5a;
  --st-topbar-h: 36px;
  --st-mainbar-h: 72px;
  --st-header-h: calc(var(--st-topbar-h) + var(--st-mainbar-h));
}

/* The header is position:fixed (html/body are height:100% site-wide, which
   breaks position:sticky), so pages that use it reserve its height here. */
body.has-site-header { padding-top: var(--st-header-h); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  font-family: Montserrat, "Open Sans", Arial, sans-serif;
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(11, 34, 64, .14); }

.site-header .wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
}

.site-header a { text-decoration: none; }
.site-header ul { list-style: none; margin: 0; padding: 0; }
.site-header :focus-visible {
  outline: 2px solid var(--st-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Top bar ---------- */
.topbar {
  height: var(--st-topbar-h);
  background: var(--st-navy);
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  letter-spacing: .02em;
}
.topbar .wrap { justify-content: space-between; }
.topbar-tag { font-weight: 500; }
.topbar-links { display: flex; gap: 22px; }
.topbar-links a { color: #fff; font-weight: 500; }
.topbar-links a:hover { color: var(--st-gold); }
.topbar-links .fa { margin-right: 6px; color: var(--st-gold); }

/* ---------- Main bar ---------- */
.mainbar { height: var(--st-mainbar-h); border-bottom: 1px solid var(--st-line); }
.mainbar .wrap { gap: 24px; }

.brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.brand img { height: 48px; width: auto; max-width: 100%; object-fit: contain; display: block; }

.nav { margin-left: auto; height: 100%; }
.nav-menu { display: flex; align-items: stretch; height: 100%; }

.nav-item { position: relative; display: flex; align-items: stretch; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--st-ink);
  font: 600 12.5px/1 Montserrat, "Open Sans", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  position: relative;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 2px;
  background: var(--st-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover,
.nav-item.is-open > .nav-link,
.nav-link[aria-current="page"] { color: var(--st-blue-dark); }
.nav-link:hover::after,
.nav-item.is-open > .nav-link::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-link .fa { font-size: 13px; transition: transform .2s ease; }
.nav-item.is-open > .nav-link .fa { transform: rotate(180deg); }

/* ---------- Dropdown panels ---------- */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  padding: 10px;
  background: #fff;
  border-top: 3px solid var(--st-gold);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 18px 40px rgba(11, 34, 64, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-item.is-open > .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (hover: hover) and (min-width: 992px) {
  .nav-item:hover > .nav-panel,
  .nav-item:focus-within > .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-item:hover > .nav-link,
  .nav-item:focus-within > .nav-link { color: var(--st-blue-dark); }
  .nav-item:hover > .nav-link::after,
  .nav-item:focus-within > .nav-link::after { transform: scaleX(1); }
}

.nav-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--st-ink);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-panel a:hover,
.nav-panel a:focus-visible { background: #eaf3fa; color: var(--st-blue-dark); }

.nav-group-title {
  margin: 8px 12px 4px;
  padding-top: 10px;
  border-top: 1px solid var(--st-line);
  color: var(--st-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav-panel-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
.nav-panel-grid a { padding-left: 12px; }
.nav-panel-wide { min-width: 360px; }

/* ---------- Actions: search, CTA, burger ---------- */
.nav-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f8fc;
  border: 0;
  border-radius: 50%;
  color: var(--st-navy);
  font-size: 15px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover,
.icon-btn[aria-expanded="true"] { background: var(--st-navy); color: #fff; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--st-gold);
  color: var(--st-navy) !important;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(212, 175, 55, .4);
  transition: background .2s ease, transform .2s ease;
}
.btn-cta:hover { background: var(--st-gold-dark); transform: translateY(-1px); }
.btn-cta i { font-size: 17px; }

.nav-burger { display: none; }

/* ---------- Search popover ---------- */
.search-pop {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--st-line);
  box-shadow: 0 18px 40px rgba(11, 34, 64, .18);
  padding: 18px 0 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.search-pop.is-open { opacity: 1; visibility: visible; transform: none; }
.search-pop .wrap { display: block; height: auto; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  height: 48px;
  border: 2px solid var(--st-line);
  border-radius: 999px;
  color: var(--st-grey);
}
.search-field:focus-within { border-color: var(--st-blue); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  font: 500 15px Montserrat, "Open Sans", Arial, sans-serif;
  color: var(--st-ink);
}
.search-results { max-width: 640px; margin: 10px auto 0; }
.search-results a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--st-ink);
  font-size: 14px;
  font-weight: 500;
}
.search-results a small { color: var(--st-muted); font-size: 12px; }
.search-results a:hover,
.search-results a:focus-visible,
.search-results a.is-first { background: #eaf3fa; }
.search-empty { padding: 10px 16px; color: var(--st-muted); font-size: 14px; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1199px) {
  .nav-link { padding: 0 10px; font-size: 12px; }
  .nav-link::after { left: 10px; right: 10px; }
  .btn-cta span { display: none; }
  .btn-cta { width: 40px; padding: 0; justify-content: center; }
}

@media (max-width: 991px) {
  :root { --st-mainbar-h: 64px; --st-header-h: var(--st-mainbar-h); }
  .topbar { display: none; }
  .brand img { height: 42px; }
  .mainbar .wrap { padding: 0 16px; }
  .nav-actions { margin-left: auto; }
  .nav-burger { display: inline-flex; }

  .nav {
    position: fixed;
    top: var(--st-mainbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    height: auto;
    padding: 8px 16px 32px;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s ease, visibility .3s;
  }
  .site-header.nav-open .nav { transform: none; visibility: visible; }
  body.nav-lock { overflow: hidden; }

  .nav-menu { flex-direction: column; height: auto; }
  .nav-item { flex-direction: column; border-bottom: 1px solid var(--st-line); }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 14px;
  }
  .nav-link::after { display: none; }

  .nav-panel {
    position: static;
    min-width: 0;
    padding: 0 0 12px 8px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .nav-item.is-open > .nav-panel { display: block; }
  .nav-panel-wide { min-width: 0; }
  .nav-panel-grid { grid-template-columns: 1fr; }
  .nav-panel a { padding: 11px 12px; font-size: 14px; }

  .search-pop { position: fixed; top: var(--st-mainbar-h); }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::before,
  .site-header *::after { transition: none !important; }
}
/* ---------- Current page markers (set by build.js) ---------- */
.nav-link.is-current { color: var(--st-blue-dark); }
.nav-link.is-current::after { transform: scaleX(1); }
.nav-panel a[aria-current="page"] { background: #eaf3fa; color: var(--st-blue-dark); font-weight: 700; }

/* ==========================================================================
   Shared site chrome: floating WhatsApp button + footer (used on every page)
   ========================================================================== */

/* ---------- WhatsApp floating button ---------- */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--st-wa, #25d366);
  color: #fff;
  font-size: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.wa-fab:hover { background: var(--st-wa-dark, #1ebe5a); color: #fff; transform: scale(1.08); text-decoration: none; }
@media (max-width: 767px) {
  .wa-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
}

/* ---------- Footer ---------- */
/* base: previously supplied by the legacy main.css, so the footer now stands on its own */
footer.footer { display: grid; background: #0b2240; }
.has-site-header footer.footer {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px max(24px, calc((100% - 1200px) / 2)) 48px;
}
.has-site-header .footer-content { margin: 0; color: rgba(255, 255, 255, .85); font-size: 14px; line-height: 1.7; }
.has-site-header .footer-content img { max-width: 220px; height: auto; margin-bottom: 14px; }
.has-site-header .footer-content h4 { margin: 0 0 14px; color: var(--st-gold); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.has-site-header .footer-content h4 b { font-weight: 700; }
.has-site-header .footer-content ul { margin: 0; padding: 0; }
.has-site-header .footer-content li a,
.has-site-header .footer-content p a { display: inline-block; padding: 4px 0; color: rgba(255, 255, 255, .85); text-decoration: none; transition: color .2s ease; }
.has-site-header .footer-content li a:hover,
.has-site-header .footer-content p a:hover { color: var(--st-gold); }
.has-site-header .footer-content > a.px-3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 8px 0 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 16px;
  transition: background .2s ease, transform .2s ease;
}
.has-site-header .footer-content > a.px-3:hover { background: var(--st-gold); color: var(--st-navy); transform: translateY(-2px); }

.copyright {
  padding: 18px 24px;
  background: #07162a;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  text-align: center;
}
.copyright p { margin: 0; }
.copyright b { color: #fff; }

@media (max-width: 991px) {
  .has-site-header footer.footer { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 48px; }
}
@media (max-width: 575px) {
  .has-site-header footer.footer { grid-template-columns: 1fr; gap: 28px; padding: 40px 24px 32px; }
  .copyright { padding-bottom: 84px; } /* clear the floating WhatsApp button */
}
/* Keep content images inside their container on small screens. :where() gives
   this zero specificity, so any existing class-based image sizing still wins. */
:where(body.has-site-header) img { max-width: 100%; height: auto; }
/* Legacy page banner: its 15px side padding plus Bootstrap's fixed 750px container
   made it 12px wider than a 768px viewport. The container already pads itself. */
.has-site-header #page-breadcrumb { padding-left: 0; padding-right: 0; }
