/* ============================================
   SHARED COMPONENTS: Top Bar, Header, Nav, Mega Menus, Footer
   Single source of truth for all universal elements
   ============================================ */

html, body { overflow-x: clip; max-width: 100%; }

/* ============ TOP BAR ============ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--primary);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  height: 44px;
  overflow: hidden;
}
.top-bar__container {
  max-width: none;
  margin: 0;
  padding: 0 60px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.top-bar__left { display: flex; gap: 28px; align-items: center; }
.top-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.top-bar__item:hover { color: var(--white); }
.top-bar__item svg { color: rgba(255,255,255,0.7); }
.top-bar__hours {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.top-bar__right { display: flex; gap: 20px; align-items: center; }
.top-bar__land-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-bar__land-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
.top-bar__land-btn svg:last-child {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-bar__land-btn:hover svg:last-child {
  transform: translateX(4px);
}
.top-bar__social {
  display: flex;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.top-bar__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.top-bar__social a:hover { color: var(--gold); }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.header .container {
  max-width: none;
  margin: 0;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.header__logo {
  display: flex;
  align-items: center;
}
.header__logo img {
  height: 100px;
  width: auto;
  display: block;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Shrunk state — triggered by .header--solid class on scroll */
.header--solid .container { height: 80px; }
.header--solid .header__logo img { height: 60px; }

.header__nav { display: flex; gap: 36px; align-items: stretch; align-self: stretch; }
.header__nav > a,
.header__nav > .nav-item > a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
  transition: color 0.3s;
  position: relative;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.header__nav > a:hover,
.header__nav > .nav-item > a:hover { color: var(--primary); }
.header__nav > a::after,
.header__nav > .nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 5px;
  background: var(--gold);
  transition: width 0.3s;
}
.header__nav > a:hover::after,
.header__nav > .nav-item:hover > a::after,
.header__nav > .nav-item.open > a::after,
.header__nav > a.active::after,
.header__nav > .nav-item.active > a::after { width: 100%; }

.header__cta { display: flex; align-items: center; gap: 14px; }
.header__search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.header__search-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
}
.header__search-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

/* Search Panel */
.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}
.search-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.search-panel__inner {
  max-width: none;
  margin: 0;
  padding: 40px 60px 48px;
}
.search-panel__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.search-panel__icon {
  color: var(--primary);
  margin-right: 16px;
  flex-shrink: 0;
}
.search-panel__input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--dark);
  outline: none;
  padding: 8px 0;
}
.search-panel__input-wrap input::placeholder { color: #aaa; }
.search-panel__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--off-white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.search-panel__close:hover {
  background: var(--primary);
  color: var(--white);
}
.search-panel__empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  font-style: italic;
}
.search-panel__group { margin-bottom: 32px; }
.search-panel__group:last-child { margin-bottom: 0; }
.search-panel__group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 14px;
  padding-left: 32px;
  position: relative;
}
.search-panel__group-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--primary);
}
.search-panel__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 8px;
}
.search-panel__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.search-panel__item:hover {
  background: var(--off-white);
  transform: translateX(4px);
}
.search-panel__item-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--off-white);
}
.search-panel__item-img img { width: 100%; height: 100%; object-fit: cover; }
.search-panel__item-img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.search-panel__item-info { min-width: 0; flex: 1; }
.search-panel__item-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-panel__item-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  padding: 16px 36px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.header__cta .btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ============ NAV ITEMS + MEGA MENUS ============ */
.nav-item { position: static; display: flex; align-items: stretch; }
.nav-item > a {
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-item__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.nav-item.open .nav-item__chevron { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
  clip-path: inset(100% 0 0 0);
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.1)) drop-shadow(0 4px 12px rgba(0,0,0,0.04));
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.85s;
}
/* Reveal wrapper spans full width of mega menu */
.mega-menu__reveal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
/* Layer 1: light blue panel sweeps up through */
.mega-menu__reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #04A4CC;
  clip-path: inset(100% 0 0 0);
}
/* Layer 2: primary blue panel sweeps up right behind */
.mega-menu__reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  clip-path: inset(100% 0 0 0);
}
.nav-item.open .mega-menu__reveal::before {
  animation: mega-sweep-up 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.nav-item.open .mega-menu__reveal::after {
  animation: mega-sweep-up 1s cubic-bezier(0.76, 0, 0.24, 1) 0.12s forwards;
}
@keyframes mega-sweep-up {
  0%   { clip-path: inset(100% 0 0 0); }
  45%  { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 100% 0); }
}
/* Layer 3 (front): white content panel reveals up last */
.mega-menu__inner {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 40px;
  background: #fff;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1) 0.2s;
}
.nav-item.open .mega-menu {
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0s;
}
.nav-item.open .mega-menu__inner {
  clip-path: inset(0 0 0 0);
}
/* Top CTA bar that links to the parent page */
.mega-menu__top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary);
  color: var(--white);
  padding: 18px 32px;
  border-radius: 6px;
  margin-bottom: 2px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  grid-column: 1 / -1;
}
.mega-menu__top-bar:hover {
  background: var(--primary-dark);
  transform: translateX(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.mega-menu__top-bar svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.mega-menu__top-bar:hover svg { transform: translateX(6px); }

.mega-menu--small .mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
}
.mega-menu__main .mega-menu__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-left: 32px;
  position: relative;
}
.mega-menu__main .mega-menu__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--primary);
}
.mega-menu__heading {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--dark);
  margin-bottom: 16px;
}
.mega-menu__heading em { font-style: italic; font-weight: 400; }
.mega-menu__text {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 340px;
}
.mega-menu__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: gap 0.3s;
  text-decoration: none;
}
.mega-menu__cta:hover { gap: 12px; color: var(--accent); }

.mega-menu__side {
  display: grid;
  gap: 16px;
  align-self: center;
}
.mega-menu__stat {
  padding: 20px 24px;
  background: var(--off-white);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.mega-menu__stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.mega-menu__stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.mega-menu__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: center;
}
.mega-menu__links--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-self: center;
  border: 2px solid var(--primary);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
.mega-menu__links--grid .mega-menu__link-item {
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
  border-radius: 0;
  border-right: 1px solid var(--primary);
  border-bottom: 1px solid var(--primary);
  min-height: 140px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  isolation: isolate;
  background: transparent;
}
.mega-menu__links--grid .mega-menu__link-item:nth-child(2n) { border-right: none; }
.mega-menu__links--grid .mega-menu__link-item:nth-last-child(-n+2) { border-bottom: none; }
.mega-menu__links--grid .mega-menu__link-item > * {
  position: relative;
  z-index: 2;
}
.mega-menu__links--grid .mega-menu__link-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  font-style: italic;
}

.mega-menu__links--grid .mega-menu__link-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hover-bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.mega-menu__links--grid .mega-menu__link-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(21,40,73,0.9), rgba(50,103,173,0.85));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.mega-menu__links--grid .mega-menu__link-item:hover {
  background: transparent;
  transform: none;
}
.mega-menu__links--grid .mega-menu__link-item:hover::before {
  opacity: 1;
  transform: scale(1);
}
.mega-menu__links--grid .mega-menu__link-item:hover::after {
  opacity: 1;
}
.mega-menu__links--grid .mega-menu__link-item:hover svg {
  color: var(--gold);
}
.mega-menu__links--grid .mega-menu__link-item:hover .mega-menu__link-title {
  color: var(--white);
}
.mega-menu__links--grid .mega-menu__link-item:hover .mega-menu__link-desc {
  color: rgba(255,255,255,0.8);
}
.mega-menu__links--grid .mega-menu__link-title,
.mega-menu__links--grid .mega-menu__link-desc {
  transition: color 0.4s;
}
.mega-menu__link-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  transition: all 0.3s;
  color: var(--text);
  text-decoration: none;
}
.mega-menu__link-item svg { color: var(--accent); flex-shrink: 0; }
.mega-menu__link-item:hover {
  background: var(--off-white);
  transform: translateX(4px);
}
.mega-menu__link-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}
.mega-menu__link-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.mega-menu__featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-self: center;
}
.mega-menu__featured-item {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.mega-menu__featured-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: transparent;
}
.mega-menu__featured-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__featured-item:hover img { transform: scale(1.06); }
.mega-menu__featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--dark);
  color: var(--white);
  z-index: 2;
}
.mega-menu__featured-info {
  padding: 18px 20px 20px;
}
.mega-menu__featured-price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.mega-menu__featured-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: var(--dark);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-menu__featured-meta {
  display: flex;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-light);
}
.mega-menu__featured-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mega-menu--large .mega-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 25px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.mega-menu__communities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mega-menu__community {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.mega-menu__community img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__community:hover img { transform: scale(1.08); }
.mega-menu__community::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.3) 100%);
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mega-menu__community:hover::after {
  background: linear-gradient(0deg, rgba(50,103,173,0.95) 0%, rgba(50,103,173,0.55) 40%, rgba(50,103,173,0.35) 100%);
}
.mega-menu__community-name {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  z-index: 2;
}

/* ============ MOBILE MENU ============ */
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  cursor: pointer;
  z-index: 1001;
  transition: background 0.3s;
}
.mobile-toggle:hover { background: var(--primary-dark); }
.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  position: relative;
  transition: all 0.3s;
}
.mobile-toggle span::before,
.mobile-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}
.mobile-toggle span::before { top: -6px; }
.mobile-toggle span::after { top: 6px; }
.mobile-toggle.active { background: transparent; }
.mobile-toggle.active span { background: transparent; }
.mobile-toggle.active span::before,
.mobile-toggle.active span::after { background: var(--white); }
.mobile-toggle.active span::before { top: 0; transform: rotate(45deg); }
.mobile-toggle.active span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #152849;
  z-index: 999;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 130px 0 40px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  font-style: italic;
  color: var(--white);
  background: transparent;
  padding: 18px 32px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  text-decoration: none;
  text-align: left;
  display: block;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.mobile-nav a:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
.mobile-nav a:hover,
.mobile-nav a:focus,
.mobile-nav a:active,
.mobile-nav a.is-active,
.mobile-nav a.is-pressed {
  background: #1a3a6b !important;
  color: var(--gold) !important;
  padding-left: 40px;
}

/* ============ NEWSLETTER CTA ============ */
.newsletter-cta {
  background: var(--primary);
  color: var(--white);
  padding: 56px 60px;
  position: relative;
  overflow: hidden;
}
.newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #04A4CC, var(--primary-dark), #04A4CC, transparent);
}
.newsletter-cta__container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.newsletter-cta__text { flex: 1; min-width: 0; }
.newsletter-cta__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 10px;
}
.newsletter-cta__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin: 0;
}
.newsletter-cta__title em {
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
}
.newsletter-cta__form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  min-width: 420px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 6px;
  transition: border-color 0.3s;
}
.newsletter-cta__form:focus-within {
  border-color: var(--gold);
}
.newsletter-cta__form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 18px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  min-width: 0;
}
.newsletter-cta__form input::placeholder {
  color: rgba(255,255,255,0.55);
}
.newsletter-cta__form button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--dark);
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}
.newsletter-cta__form button:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.newsletter-cta__form button svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.newsletter-cta__form button:hover svg {
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .newsletter-cta { padding: 40px 24px; }
  .newsletter-cta__container { flex-direction: column; align-items: stretch; gap: 28px; }
  .newsletter-cta__form { min-width: 0; width: 100%; }
}

/* ============ FOOTER ============ */
.footer {
  background: #152849;
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}
.footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}
.footer__brand { max-width: 300px; }
.footer__logo {
  height: 120px;
  margin-bottom: 20px;
  display: block;
}
.footer__desc { font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.footer__heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
}
.footer__links { list-style: none; padding: 0; margin: 0; }
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  text-decoration: none;
}
.footer__links a:hover { color: var(--gold); }
.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.footer__contact-item svg { flex-shrink: 0; color: var(--accent); }
.footer__contact-item a { color: rgba(255,255,255,0.7); transition: color 0.2s; text-decoration: none; }
.footer__contact-item a:hover { color: var(--gold); }
.footer__social { display: flex; gap: 12px; margin-top: 24px; }
.footer__social a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.footer__social a:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: rgba(249,160,34,0.15);
}
.footer__bottom {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
}
.footer__bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; text-decoration: none; }
.footer__bottom a:hover { color: var(--gold); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header__nav { display: none; }
  .mobile-toggle { display: flex; }
  .nav-item .mega-menu { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .header .container { padding: 0 32px; }
  .top-bar__container { padding: 0 32px; }
  /* Hide bulkier top bar items on tablet */
  .top-bar__hours,
  .top-bar__land-btn { display: none; }
}
@media (max-width: 900px) {
  /* Top bar stays visible but slimmer */
  .top-bar { font-size: 12px; height: 38px; }
  .top-bar__container { padding: 0 20px; gap: 16px; }
  .top-bar__left { gap: 18px; }
  .top-bar__left .top-bar__item:first-child { display: none; } /* hide address on mobile */
  .top-bar__right { gap: 14px; }
  .top-bar__social { padding-left: 16px; }
  /* Header shifts down to sit below the shorter top bar */
  .header { top: 38px; }
  .header .container {
    height: 72px;
    padding: 0 20px;
    justify-content: flex-start;
    gap: 10px;
  }
  .header__logo { margin-right: auto; }
  .header--solid .container { height: 62px; }
  .header__logo img { height: 78px; }
  .header--solid .header__logo img { height: 54px; }
  /* Icon-only circular Contact button on mobile */
  .header__cta .btn {
    padding: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    gap: 0;
    font-size: 0;
    line-height: 0;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
  }
  .header__cta .btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: none;
  }
  .header__cta .btn svg {
    width: 18px;
    height: 18px;
  }
  .header__cta { gap: 10px; }
  /* Smaller search button to match */
  .header__search-btn { width: 42px; height: 42px; }
  .mobile-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }
  /* Larger mobile nav typography */
  .mobile-nav a { font-size: 28px; padding: 20px 32px; }
  .mobile-nav a:hover,
  .mobile-nav a:active,
  .mobile-nav a.is-active { padding-left: 40px; }
  /* Adjust sticky offsets for shorter top bar */
  .mega-menu { top: 100%; }
  .breadcrumb { margin-top: 110px; padding: 14px 0; }
  .breadcrumb .container {
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    line-height: 1.4;
  }
  .breadcrumb__current {
    word-break: break-word;
    flex-basis: 100%;
  }
  .hero { padding-top: 110px; }
  .page-hero { padding-top: 110px; min-height: calc(400px + 110px); }
  .community-hero { padding-top: 110px; min-height: calc(500px + 110px); }
  /* Search panel — fit narrow viewports */
  .search-panel__inner { padding: 24px 20px 32px; }
  .search-panel__input-wrap { padding-bottom: 16px; margin-bottom: 20px; }
  .search-panel__input-wrap input { font-size: 18px; }
  .search-panel__icon { margin-right: 10px; }
  .search-panel__close { width: 36px; height: 36px; }
  .search-panel__items { grid-template-columns: 1fr; gap: 4px; }
  .search-panel__item { padding: 10px 12px; gap: 12px; }
  .search-panel__item-img { width: 48px; height: 48px; }
  .search-panel__group { margin-bottom: 24px; }
  .search-panel__group-label { padding-left: 24px; font-size: 10px; }
  .search-panel__group-label::before { width: 16px; }
}
@media (max-width: 640px) {
  /* Very small screens — further compress top bar */
  .top-bar__left .top-bar__hours { display: none; }
  .top-bar__left .top-bar__item:nth-child(3) { display: none; } /* hide email */
  .top-bar__social { display: none; }
  .top-bar__right { gap: 0; }
  .header .container { padding: 0 16px; }
  .header__logo img { height: 68px; }
  .header--solid .header__logo img { height: 48px; }
  /* Tighten icon spacing */
  .header__cta { gap: 6px; }
  .header__search-btn,
  .header__cta .btn,
  .mobile-toggle {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer .container { padding: 0 24px; }
  .footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============ CTA BANNER (with blue duotone image bg) ============ */
.cta-banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  background: #152849;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../../images/uploads/2020/03/DSC0380-copy-2048x1360.jpg');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.1) brightness(0.5);
  z-index: -2;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(50,103,173,0.75), rgba(21,40,73,0.95));
  mix-blend-mode: multiply;
  z-index: -1;
}
.cta-banner .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}
.cta-banner__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.cta-banner__title em {
  font-style: italic;
  font-weight: 400;
}
.cta-banner__text {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ============ SCROLL ANIMATIONS (re-triggering) ============ */
/* All reveal classes use IntersectionObserver in components.js that toggles
   the .is-visible class on/off so animations replay when scrolling back up. */

/* Base reveal — fade + rise */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Fade only */
.reveal-fade {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity;
}
.reveal-fade.is-visible { opacity: 1; }

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Scale up */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Blur to clear */
.reveal-blur {
  opacity: 0;
  filter: blur(20px);
  transform: translateY(30px);
  transition: opacity 3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, filter, transform;
}
.reveal-blur.is-visible { opacity: 1; filter: blur(0); transform: translateY(0); }

/* Clip-path mask reveal — from bottom */
.reveal-mask {
  clip-path: inset(0 0 100% 0);
  transform: translateY(40px);
  transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: clip-path, transform;
}
.reveal-mask.is-visible { clip-path: inset(0 0 0 0); transform: translateY(0); }

/* Clip-path mask — from left (image/container slides in) */
.reveal-mask-left {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: clip-path;
}
.reveal-mask-left.is-visible { clip-path: inset(0 0 0 0); }

/* Clip-path mask — from right */
.reveal-mask-right {
  clip-path: inset(0 0 0 100%);
  transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: clip-path;
}
.reveal-mask-right.is-visible { clip-path: inset(0 0 0 0); }

/* Zoom reveal — starts large and scales down */
.reveal-zoom {
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-zoom.is-visible { opacity: 1; transform: scale(1); }

/* Stagger — each child animates in with delay based on index */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.56s; }

/* Image mask — overlay wipes away from the image */
.reveal-image {
  position: relative;
  overflow: hidden;
}
.reveal-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: translateX(0);
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 2;
  pointer-events: none;
}
.reveal-image.is-visible::after { transform: translateX(101%); }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-fade, .reveal-left, .reveal-right, .reveal-scale,
  .reveal-blur, .reveal-mask, .reveal-mask-left, .reveal-mask-right,
  .reveal-zoom, .reveal-stagger > *, .reveal-image::after {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    transition: none !important;
  }
}
