/* ══════════════════════════════════════════════════════════════════════════
   Header Component — header.css
   Depends on: main.css (for :root custom properties)
   ══════════════════════════════════════════════════════════════════════════ */


/* ── Wrap — positioning context for mega menu ────────────────────────────── */
.header-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* ── Skip link ───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ── Site header — white always ──────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
  width: 100vw;
}


/* ══════════════════════════════════════════════════════════════════════════
   ROW 1 — PROMO BAR
   ══════════════════════════════════════════════════════════════════════════ */

.promo-bar {
  background: rgb(0, 0, 0);
  color: var(--white);
  height: 44px;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  transition: height 0.25s ease, opacity 0.25s ease;
}

.promo-bar.is-hidden {
  height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.promo-bar__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--white);
  white-space: nowrap;
  margin: 0;
  pointer-events: none;
}

.promo-bar__actions {
  display: flex;
  align-items: stretch;
}

/* Promo CTA buttons */
.promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  min-width: 220px;
}

.promo-btn--call { background: var(--grey-btn-hover); }
.promo-btn--book { background: var(--gold); }

.promo-btn__fill {
  position: absolute;
  inset: 0;
  background: var(--grey-btn);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 0;
}

.promo-btn__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}

.promo-btn--call {
  .promo-btn__content {
    color: var(--gold);
  }
}

.promo-btn:hover .promo-btn__fill {
  transform: translateY(0%);
}

.promo-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}


/* ══════════════════════════════════════════════════════════════════════════
   ROW 2 — MOBILE CTA BAR
   Hidden on desktop (>=1198px), shown on tablet/mobile
   ══════════════════════════════════════════════════════════════════════════ */

.mobile-cta-bar {
  display: none; /* shown via media query */
  height: 48px;
  align-items: stretch;
}

.mobile-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: var(--white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.mobile-cta-btn--call { background: var(--grey-btn-hover); }
.mobile-cta-btn--book { background: var(--gold); }

.mobile-cta-btn__fill {
  position: absolute;
  inset: 0;
  background: var(--grey-btn);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 0;
}

.mobile-cta-btn__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.mobile-cta-btn--call {
  .mobile-cta-btn__content {
    color: var(--gold); 
  }
}

.mobile-cta-btn:hover .mobile-cta-btn__fill {
  transform: translateY(0%);
}

.mobile-cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Icon-only on mobile (hide label text) */
@media (max-width: 768px) {
  .mobile-cta-btn__label {
    display: none;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   ROW 3 — NAV BAR
   ══════════════════════════════════════════════════════════════════════════ */

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 32px;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

/* Desktop nav left */
.nav-bar__left {
  display: flex;
  justify-content: flex-end;
  padding-right: 52px;
}

/* Desktop nav right */
.nav-bar__right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 52px;
  gap: 36px;
}

.nav-bar__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-bar__link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-bar__link:hover  { color: var(--gold); }
.nav-bar__link.is-active { color: var(--gold); }

.nav-bar__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--gold);
}

/* Mobile right slot — hidden on desktop, shown via media query */
.nav-bar__mobile-right {
  display: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   LOGO (text-based)
   ══════════════════════════════════════════════════════════════════════════ */

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.site-logo__name {
  font-family: var(--font-sans);
  font-size: 24px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}

.site-logo__sub {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dark);
  font-weight: 400;
  line-height: 1;
}

.site-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}


/* ══════════════════════════════════════════════════════════════════════════
   HAMBURGER TOGGLE
   ══════════════════════════════════════════════════════════════════════════ */

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Hamburger bars */
.menu-toggle__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-toggle__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
}

/* Close X icon */
.menu-toggle__close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6) rotate(45deg);
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: var(--dark);
}

/* Open state — swap hamburger to X */
.menu-toggle.is-open .menu-toggle__hamburger {
  opacity: 0;
  transform: scale(0.6);
}

.menu-toggle.is-open .menu-toggle__close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}


/* ══════════════════════════════════════════════════════════════════════════
   MEGA MENU
   position: absolute inside .header-wrap (which is position: fixed)
   slides down below the header
   ══════════════════════════════════════════════════════════════════════════ */

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out-expo),
              transform 0.35s var(--ease-out-expo);
  pointer-events: none;
  z-index: 99;
  max-height: calc(100vh - var(--header-height, 120px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100vw;
}

.mega-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu:focus {
  outline: none;
}

.mega-menu__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 52px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  gap: 0 40px;
  align-items: start;
}

/* Column label */
.mega-menu__col-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 20px;
}

/* Gold dividers */
.mega-menu__divider {
  background: rgba(168, 134, 46, 0.2);
  align-self: stretch;
  width: 1px;
}

/* Page links */
.mega-menu__page-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu__page-link {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dark);
  text-decoration: none;
  line-height: 1.25;
  margin-bottom: 10px;
  transition: color 0.2s ease;
  font-optical-sizing: auto;
}

.mega-menu__page-link:hover {
  color: var(--gold);
}

.mega-menu__page-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--gold);
}

.mega-menu__page-link.is-active {
    color: var(--gold);
}

/* Info blocks */
.mega-menu__info-block {
  margin-bottom: 22px;
}

.mega-menu__info-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 7px;
}

.mega-menu__address {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 14px;
  color: var(--dark);
  line-height: 1.75;
  font-style: normal;
  margin: 0;
}

/* Contact links */
.mega-menu__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-menu__contact-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--dark);
  text-decoration: none;
  line-height: 1.75;
  transition: color 0.2s ease;
}

.mega-menu__contact-link:hover { color: var(--gold); }

.mega-menu__contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Social icons */
.mega-menu__social {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.mega-menu__social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.mega-menu__social-link:hover {
  background: var(--gold);
  color: var(--white);
}

.mega-menu__social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Office tour thumbnail */
/* Office tour thumbnail */
.mega-menu__tour {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 0;
  max-width: 300px;
}

.mega-menu__tour:hover { background: rgba(0, 0, 0, 0.12); }

.mega-menu__tour:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mega-menu__tour-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

canvas.mega-menu__tour-thumb {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.mega-menu__tour-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  z-index: 1;
}

.mega-menu__tour-play svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.mega-menu__tour-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--brown);
  margin-bottom: 28px;
}

/* Copyright */
.mega-menu__copyright {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--dark);
  opacity: 0.6;
  letter-spacing: 0.06em;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

/* Tablet + Mobile — below 1198px */
@media (max-width: 1401px) {
  /* Show mobile CTA bar */
  .mobile-cta-bar { display: flex; }

  /* Promo bar text — reflow for mobile (no longer absolutely centred) */
  .promo-bar__text {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: 11px;
    white-space: normal;
    text-align: center;
    padding: 0 16px;
    display: flex;
    align-items: center;
    margin: 0 auto;
  }

  /* Promo bar — hide only the Book button on mobile (Call stays visible) */
  /* Book button is already in mobile-cta-bar; Call gives a quick phone link */
  .promo-bar__actions .promo-btn--book,  .promo-bar__actions .promo-btn--call { display: none; }

  .nav-bar { 
    display: flex;
    justify-content: flex-end;
  }

  /* Hide desktop nav lists */
  .nav-bar__left { display: none; }
  .nav-bar__right .nav-bar__list { display: none; }

  /* Hide desktop hamburger — use mobile slot instead */
  .nav-bar__right .menu-toggle { display: none; }

  /* Show mobile hamburger slot */
  .nav-bar__mobile-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  /* Logo left-aligned on mobile */
  .site-logo { 
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Mega menu — single column */
  .mega-menu__inner {
    grid-template-columns: 1fr;
    gap: 32px 0;
    padding: 32px 20px 40px;
  }

  .mega-menu__page-link { font-size: 20px; }
}

/* Mobile — below 768px */
@media (max-width: 768px) {
  .site-logo__name { font-size: 18px; }
  .site-logo__sub  { font-size: 11px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mega-menu,
  .promo-bar,
  .promo-btn__fill,
  .mobile-cta-btn__fill,
  .menu-toggle__hamburger,
  .menu-toggle__close {
    transition: none;
  }
}
