/*
 * Canonical site header styles — SINGLE SOURCE OF TRUTH.
 *
 * This file styles the site header (topbar + sticky header + nav + mega menus +
 * mobile nav) for BOTH the React app (imported from src/main.tsx after
 * src/styles.css) and the pre-rendered location pages, which load the build copy
 * at /theme/header.css (see the copy step in package.json's dev/build scripts).
 *
 * Do not duplicate these rules anywhere else. Edit them here only.
 */

/* ---------- top bar ---------- */

.topbar {
  background: var(--teal);
  color: #e9e2d6;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.topbar-inner {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.topbar a {
  color: #fff;
  font-weight: 600;
}

.topbar a:hover {
  color: #cfe6ea;
}

.dot-sep {
  opacity: 0.5;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand img {
  width: 126px;
  height: auto;
  mix-blend-mode: multiply;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.nav a {
  position: relative;
  padding: 4px 0;
}

.nav a:hover {
  color: var(--blue);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.header-phone svg {
  color: var(--blue);
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--ink);
}

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 12px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--cream);
}

.mobile-nav a {
  padding: 12px 0;
  font-size: 15.5px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 600;
  border-bottom: 0 !important;
  margin-top: 6px;
}

.mobile-nav .btn {
  margin-top: 12px;
  border-bottom: 0;
}

/* ---------- locations mega menu ---------- */
.nav-item--mega {
  position: static;
}

.nav-caret {
  display: inline-block;
  font-size: 10px;
  margin-left: 3px;
  transform: translateY(-1px);
  color: var(--muted);
}

.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 45;
  padding: 8px 24px 22px;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.nav-item--mega:hover .mega,
.nav-item--mega:focus-within .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 28px 60px rgba(11, 34, 51, 0.16);
  padding: 18px;
}

.mega-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 6px 12px;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.mega-top a {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 12.5px;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mega-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b2233;
}

.mega-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.mega-card:hover img {
  transform: scale(1.05);
}

.mega-label {
  position: absolute;
  inset: auto 0 0 0;
  display: block;
  padding: 22px 10px 8px;
  background: linear-gradient(to top, rgba(6, 18, 28, 0.92), rgba(6, 18, 28, 0));
  color: #fff;
  line-height: 1.15;
}

.mega-label strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.mega-label em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1px;
}

.mobile-locations {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.mobile-locations > span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.mobile-locations > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.mobile-locations a {
  font-size: 13.5px;
  padding: 7px 0;
}

/* nav triggers + situations mega */
.nav-trigger {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-trigger:hover {
  color: var(--blue);
}

.chev {
  transition: transform 0.16s ease;
}

.nav-item--mega.is-open .chev {
  transform: rotate(180deg);
}

.nav-item--mega.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-inner--sit {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 22px;
  padding: 20px;
}

.mega-sit-aside {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mega-sit-aside > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 6px;
}

.mega-sit-hand {
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1.15;
  color: var(--blue-dark);
}

.mega-review {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.mega-review span {
  color: var(--amber);
  letter-spacing: 1px;
  font-size: 12px;
}

.mega-review p {
  margin: 3px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--body);
}

.mega-review em {
  font-style: normal;
  font-size: 12px;
}

.mega-sit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mega-sit-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b2233;
}

.mega-sit-card img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mega-sit-card:hover img {
  transform: scale(1.05);
}

.mega-sit-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 8px 7px;
  background: linear-gradient(to top, rgba(6, 18, 28, 0.9), rgba(6, 18, 28, 0));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

@media (max-width: 1100px) {
  .nav {
    gap: 18px;
  }
  .header-phone {
    display: none;
  }
  .mega-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mega-sit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .header-actions .btn {
    display: none;
  }
  .header-inner {
    height: 76px;
  }
  .nav-item--mega {
    display: none;
  }
  .mega--sit {
    display: none;
  }
}

@media (max-width: 920px) {
  /* the utility bar phone link is a real tap target on every page */
  .topbar a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .topbar {
    font-size: 12px;
  }
  .topbar-right .dot-sep,
  .topbar-right span:last-child {
    display: none;
  }
  .brand img {
    width: 108px;
  }
}

.nav-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 3px;
}

/* The header is shared with the pre-rendered location pages, whose page theme
   defines a taller .btn and shows .mobile-nav via flex. These three rules keep
   the shared header's button metrics identical on both page types. */
.mobile-nav[hidden] {
  display: none;
}

.mobile-nav .btn {
  gap: 9px;
}

.mega-sit-aside .btn {
  height: 24px;
  min-height: 0;
  padding: 4px 0;
  font-size: 13.5px;
  line-height: 1;
  border-radius: 8px;
  gap: 9px;
}
