
/* =========================================
   SANDHILL ADVENTURES — MEGA NAVIGATION
   ========================================= */

:root {
  --sa-cream: #f7f0df;
  --sa-ink: #24201d;
  --sa-wine: #651d35;
  --sa-gold: #c78332;
  --sa-shadow: 0 18px 48px rgba(25, 20, 15, 0.18);
}

.sa-header,
.sa-header * {
  box-sizing: border-box;
}

.sa-header {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  min-height: 84px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: var(--sa-cream);
  color: var(--sa-ink);
  font-family: Arial, Helvetica, sans-serif;
}

/* BRAND */

.sa-brand {
  display: flex;
  align-items: center;
  flex: 0 0 145px;
  color: inherit;
  text-decoration: none;
}

.sa-brand img {
  display: block;
  width: 138px;
  max-height: 58px;
  object-fit: contain;
}

.sa-brand-fallback {
  display: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 2px;
  text-align: center;
}

.sa-brand-fallback small {
  display: block;
  font-size: 9px;
  letter-spacing: 4px;
}

/* MAIN NAVIGATION */

.sa-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.65vw, 26px);
  flex: 1;
}

.sa-nav-link,
.sa-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font: 600 13px/1.25 Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.sa-nav-link:hover,
.sa-nav-trigger:hover {
  color: var(--sa-wine);
}

.sa-nav-item {
  position: static;
}

.sa-chevron {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}

.sa-nav-trigger[aria-expanded="true"] .sa-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

/* BUILD YOUR TRIP BUTTON */

.sa-build-trip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 3px;
  background: var(--sa-wine);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sa-build-trip:hover {
  background: #421123;
}

/* DESKTOP MEGA MENU */

.sa-mega {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: clamp(12px, 4vw, 58px);
  right: clamp(12px, 4vw, 58px);
  padding: 18px;
  background: #fffdf8;
  border: 1px solid rgba(40, 30, 20, 0.08);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--sa-shadow);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sa-nav-item.is-open > .sa-mega {
  display: block;
  animation: saDrop 0.18s ease-out;
}

@keyframes saDrop {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MEGA MENU GRID */

.sa-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(190px, 1.08fr);
  gap: 12px;
}

/* IMAGE CARDS */

.sa-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #f5f1e9;
  color: var(--sa-ink);
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s;
}

.sa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.sa-card img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
}

.sa-card span {
  display: flex;
  align-items: center;
  min-height: 51px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
}

/* FEATURED IMAGE CARD */

.sa-feature {
  position: relative;
  grid-column: 4;
  grid-row: 1 / span 2;
  min-height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #34302b;
  color: #fff;
  text-decoration: none;
}

.sa-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.sa-feature:hover img {
  transform: scale(1.04);
}

.sa-feature:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.05) 90%
  );
}

.sa-feature-copy {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 16px;
  bottom: 22px;
}

.sa-feature-copy strong {
  display: block;
  font: 700 clamp(21px, 2.1vw, 31px)/1.12 Georgia, serif;
}

.sa-feature-copy small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
}

/* MEGA MENU CTA */

.sa-mega-cta {
  display: table;
  margin: 16px auto 2px;
  padding: 12px 20px;
  border-radius: 30px;
  background: var(--sa-gold);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
}

.sa-mega-cta:hover {
  background: #a76620;
}

/* MOBILE HAMBURGER */

.sa-mobile-toggle {
  display: none;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 9px;
  cursor: pointer;
}

.sa-mobile-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px;
  background: var(--sa-ink);
}

/* DESKTOP HOVER */

@media (min-width: 901px) {
  .sa-nav-item:hover > .sa-mega,
  .sa-nav-item:focus-within > .sa-mega {
    display: block;
  }
}

/* MEDIUM SCREENS */

@media (min-width: 901px) and (max-width: 1100px) {
  .sa-header {
    gap: 14px;
    padding-inline: 18px;
  }

  .sa-brand {
    flex-basis: 115px;
  }

  .sa-brand img {
    width: 112px;
  }

  .sa-nav {
    gap: 12px;
  }

  .sa-nav-link,
  .sa-nav-trigger {
    font-size: 11px;
    letter-spacing: 0.8px;
  }

  .sa-build-trip {
    padding: 12px;
    font-size: 10px;
  }
}

/* =========================================
   MOBILE NAVIGATION AND SCROLLING
   ========================================= */

@media (max-width: 900px) {

  /* Header stays above page content */
  .sa-header {
    position: relative;
    z-index: 10000;
    min-height: 72px;
    height: auto;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
  }

  .sa-brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .sa-brand img {
    width: 138px;
    max-width: 100%;
    max-height: 48px;
  }

  .sa-mobile-toggle {
    display: block;
  }

  /* Main menu scrolls independently of the page */
 
.sa-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  margin: 0;
  padding: 10px 18px 30px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: var(--sa-cream);
  box-shadow: var(--sa-shadow);
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  z-index: 9999;
}

.sa-header.sa-mobile-open .sa-nav {
  display: flex;
}


  /* Top-level navigation links */
  .sa-nav-link,
  .sa-nav-trigger {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 15px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 13px;
    letter-spacing: 1px;
    white-space: normal;
  }

  .sa-nav-item {
    position: static;
    flex: 0 0 auto;
  }

  /* Expanded image mega menus */
  .sa-mega {
    display: none;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 12px 0 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    animation: none;
  }

  .sa-nav-item.is-open > .sa-mega {
    display: block;
  }

  /* Stack all image cards vertically */
  .sa-mega-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sa-card {
    display: flex;
    align-items: center;
    flex-direction: row;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f1e9;
  }

  .sa-card img {
    display: block;
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    height: 64px;
    object-fit: cover;
  }

  .sa-card span {
    display: block;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
  }

  /* Featured card keeps its image and text side by side */
  .sa-feature {
    display: flex;
    position: relative;
    grid-column: auto;
    grid-row: auto;
    align-items: center;
    flex-direction: row;
    width: 100%;
    min-width: 0;
    min-height: 80px;
    overflow: hidden;
    border-radius: 6px;
    background: #34302b;
  }

  .sa-feature img {
    position: static;
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    max-width: 84px;
    height: 80px;
    object-fit: cover;
  }

  .sa-feature:after {
    display: none;
  }

  .sa-feature-copy {
    position: static;
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    color: #fff;
  }

  .sa-feature-copy strong {
    display: block;
    font: 700 13px/1.3 Arial, Helvetica, sans-serif;
  }

  .sa-feature-copy small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
  }

  /* Buttons below each image menu */
  .sa-mega-cta {
    display: table;
    max-width: 100%;
    margin: 12px auto 8px;
    padding: 11px 16px;
    font-size: 13px;
  }

  .sa-build-trip {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding: 15px;
    font-size: 12px;
  }
}

/* REDUCED MOTION ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .sa-mega,
  .sa-card,
  .sa-feature img,
  .sa-chevron {
    animation: none;
    transition: none;
  }
}


/* Mobile and tablet: improve featured menu text contrast */
@media (max-width: 1024px) {
  .sa-header .sa-feature {
    background: #f5f1e9 !important;
  }

  .sa-header .sa-feature-copy {
    color: #24201d !important;
  }

  .sa-header .sa-feature-copy strong,
  .sa-header .sa-feature-copy small {
    color: #24201d !important;
  }
}