/* ==========================================================================
   Home banner — merged cinematic hero.
   Slide images form the background layer; headline, search and CTAs sit on
   top. Namespaced `ne-` so it never collides with hero.css / carousel.css.
   ========================================================================== */

.ne-banner {
  --ne-ink: #0b1a12;
  --ne-gold: var(--gold-soft);
  --ne-glass: rgba(255, 255, 255, 0.12);
  --ne-glass-line: rgba(255, 255, 255, 0.22);
  --ne-header-h: 66px;

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  min-height: min(78svh, 620px);
  background: var(--ne-ink);
  /* Horizontal only: contains the mobile chip-row bleed without page scroll.
     `clip` (not `hidden`) leaves the vertical axis visible, so the search
     suggestions dropdown can still extend below the banner — `hidden` here
     was cutting it off mid-row. */
  overflow-x: clip;
}

/* ── Background layer ─────────────────────────────────────────────────── */

.ne-banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden; /* contains the Ken Burns scale */
}

.ne-banner-media .swiper,
.ne-banner-media .swiper-wrapper,
.ne-banner-media .swiper-slide {
  height: 100%;
}

.ne-banner-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.ne-banner-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.06);
  will-change: transform;
}

/* Ken Burns — only the slide currently on screen animates. */
.ne-banner-media .swiper-slide-active .ne-banner-img {
  animation: neKenBurns 6.5s ease-out forwards;
}

@keyframes neKenBurns {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.16) translate3d(0, -1.2%, 0);
  }
}

/* Photo-free fallback: a dusk ridgeline built entirely in CSS, so an empty
   slide still reads as a deliberate mountain scene rather than a grey box. */
.ne-banner-img.is-empty {
  background:
    radial-gradient(58% 42% at 74% 24%, rgba(255, 198, 122, 0.55), rgba(255, 198, 122, 0) 62%),
    linear-gradient(180deg, #142c3c 0%, #22485a 32%, #38665f 58%, #1b3728 100%);
}

.ne-banner-img.is-empty::before,
.ne-banner-img.is-empty::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
}

.ne-banner-img.is-empty::before {
  background: linear-gradient(180deg, #1d3f3d, #142a24);
  clip-path: polygon(0 62%, 14% 40%, 27% 55%, 41% 26%, 56% 48%, 70% 30%, 84% 52%, 100% 36%, 100% 100%, 0 100%);
  opacity: 0.85;
}

.ne-banner-img.is-empty::after {
  background: linear-gradient(180deg, #16302a, #0d1f1a);
  clip-path: polygon(0 78%, 12% 62%, 25% 76%, 38% 58%, 52% 74%, 66% 56%, 80% 72%, 92% 60%, 100% 70%, 100% 100%, 0 100%);
}

/* Scrim: dark at top (for the transparent header), open through the middle
   so the photo breathes, dark again at the base for the caption + trust bar. */
.ne-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(6, 16, 11, 0.78) 0%,
      rgba(6, 16, 11, 0.30) 26%,
      rgba(6, 16, 11, 0.38) 58%,
      rgba(6, 16, 11, 0.90) 100%),
    radial-gradient(125% 78% at 50% 44%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.46) 100%);
}

/* ── Foreground ───────────────────────────────────────────────────────── */

.ne-banner-inner {
  position: relative;
  /* Above .ne-banner-bottom and .ne-trustbar (both z-index 2 and later in
     the DOM) so the search suggestions dropdown is not painted over. */
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--ne-header-h) + 56px) 24px 40px;
  text-align: center;
  color: #fff;
}

.ne-banner-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ne-gold);
}

.ne-banner-kicker::before,
.ne-banner-kicker::after {
  content: '';
  width: clamp(20px, 6vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 0), var(--ne-gold));
}

.ne-banner-kicker::after {
  background: linear-gradient(90deg, var(--ne-gold), rgba(var(--gold-rgb), 0));
}

.ne-banner-heading {
  margin: 0;
  /* Was clamp(2.6rem, 6.4vw, 5.1rem) — 82px at 1280, which put the headline
     at 5:1 against the sub-line and pushed the search bar past halfway down
     the banner. ~3.5:1 is the readable range for a hero pair. */
  font-size: clamp(2.35rem, 5.4vw, 4.3rem);
  font-weight: 800;
  line-height: 1.06;
  /* Caps the measure so a two-sentence headline stacks instead of running
     edge to edge as one 1030px line. text-wrap: balance then evens the two
     lines. A shorter custom heading simply stays on one line. */
  max-width: 21ch;
  margin-inline: auto;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.42);
}

.ne-banner-sub {
  margin: 18px auto 0;
  /* Wide enough that the one-line sub is only ever wrapped by the viewport,
     never by its own measure. */
  max-width: 64ch;
  font-size: clamp(0.94rem, 1.1vw, 1.06rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}

/* ── Search ───────────────────────────────────────────────────────────── */

.ne-banner-search {
  position: relative;
  /* Own stacking context above the chips — the chips use backdrop-filter,
     which creates their own contexts and let them ghost through the
     suggestions dropdown otherwise. */
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(660px, 100%);
  margin: 34px auto 0;
  padding: 8px 8px 8px 22px;
  background: #fff;
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 18px 48px rgba(0, 0, 0, 0.34);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ne-banner-search:focus-within {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px rgba(var(--gold-rgb), 0.55),
    0 20px 54px rgba(0, 0, 0, 0.4);
}

.ne-banner-search-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #7d8a80;
}

.ne-banner-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 14px 0;
  font: inherit;
  font-size: 16px;
  color: #1c2b22;
  background: transparent;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ne-banner-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.ne-banner-search input::placeholder {
  color: #8b978d;
}

.ne-banner-search-btn {
  flex-shrink: 0;
  padding: 14px 30px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--accent, var(--accent));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.ne-banner-search-btn:hover {
  background: var(--accent-dark, var(--accent-dark));
}

.ne-banner-search-btn:active {
  transform: scale(0.97);
}

/* Cap the dropdown so a long result list can't run off the bottom of the
   screen; it scrolls internally instead. */
.ne-banner-search .search-suggestions {
  z-index: 30;
  max-height: min(46vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  text-align: left;
}

/* ── Quick filter chips ───────────────────────────────────────────────── */

.ne-banner-chips {
  position: relative;
  z-index: 1; /* explicitly below .ne-banner-search (20) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ne-banner-chips-label {
  margin-right: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.ne-banner-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  background: var(--ne-glass);
  border: 1px solid var(--ne-glass-line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ne-banner-chip svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

.ne-banner-chip:hover svg {
  transform: translateX(3px);
}

.ne-banner-chip:hover,
.ne-banner-chip:focus-visible {
  color: #0b1a12;
  background: #fff;
  border-color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ── Bottom row: slide caption · scroll cue · slider controls ─────────── */

.ne-banner-bottom {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 28px;
}

.ne-banner-captions {
  position: relative;
  min-height: 76px;
}

.ne-banner-caption {
  position: absolute;
  inset: auto auto 0 0;
  display: block;
  max-width: 360px;
  padding: 12px 18px;
  color: #fff;
  text-decoration: none;
  background: rgba(10, 22, 15, 0.42);
  border: 1px solid var(--ne-glass-line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.ne-banner-caption.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ne-banner-caption:hover {
  text-decoration: none;
  border-color: rgba(255, 255, 255, 0.45);
}

.ne-banner-caption-label {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ne-gold);
}

.ne-banner-caption-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.ne-banner-caption-title svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.ne-banner-caption:hover .ne-banner-caption-title svg {
  transform: translateX(4px);
}

/* Scroll cue */
.ne-banner-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ne-banner-cue:hover {
  color: #fff;
  text-decoration: none;
}

.ne-banner-cue-track {
  position: relative;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
}

.ne-banner-cue-track::after {
  content: '';
  position: absolute;
  inset: -60% auto auto 0;
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, rgba(var(--gold-rgb), 0), var(--ne-gold));
  animation: neCueFall 2s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes neCueFall {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(280%);
  }
}

/* Slider controls */
.ne-banner-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-bottom: 12px;
}

.ne-banner-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #fff;
  cursor: pointer;
  background: var(--ne-glass);
  border: 1px solid var(--ne-glass-line);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ne-banner-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.08);
}

.ne-banner-btn svg {
  width: 17px;
  height: 17px;
}

/* Swiper stretches its pagination to width:100% and positions it absolutely.
   This element lives in the bottom control cluster instead, so undo both. */
.ne-banner-dots,
.ne-banner-dots.swiper-pagination-horizontal,
.ne-banner-dots.swiper-pagination-bullets {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  inset: auto;
}

.ne-banner-dots .swiper-pagination-bullet {
  position: relative;
  width: 7px;
  height: 7px;
  margin: 0 !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  opacity: 1;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.ne-banner-dots .swiper-pagination-bullet::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
}

.ne-banner-dots .swiper-pagination-bullet-active {
  width: 38px;
  background: rgba(255, 255, 255, 0.26);
}

.ne-banner-dots .swiper-pagination-bullet-active::before {
  animation: neDotProgress var(--ne-dot-duration, 5200ms) linear forwards;
}

@keyframes neDotProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* ── Trust bar ────────────────────────────────────────────────────────── */

.ne-trustbar {
  position: relative;
  z-index: 2;
  background: rgba(7, 17, 11, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.ne-trustbar-inner {
  display: grid;
  /* Column-flow so the row stays even whether 2, 3 or 4 stats are set. */
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.ne-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 12px;
  text-align: center;
}

.ne-trust-item + .ne-trust-item {
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.1);
}

.ne-trust-value {
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

.ne-trust-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

/* ── Overlay header ───────────────────────────────────────────────────── */

.home-header.is-overlay {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.home-header.is-overlay.is-stuck {
  background: rgba(8, 18, 12, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.admin-bar .home-header.is-overlay {
  top: 32px;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .ne-banner-bottom {
    grid-template-columns: 1fr auto;
  }

  .ne-banner-cue {
    display: none;
  }
}

@media (max-width: 782px) {
  .admin-bar .home-header.is-overlay {
    top: 46px;
  }
}

@media (max-width: 720px) {
  .ne-banner {
    min-height: 520px;
    min-height: min(85svh, 600px);
  }

  .ne-banner-inner {
    padding: calc(var(--ne-header-h) + 36px) 18px 28px;
  }

  .ne-banner-kicker {
    font-size: 10px;
    letter-spacing: 0.24em;
  }

  .ne-banner-search {
    gap: 6px;
    padding: 6px 6px 6px 16px;
  }

  .ne-banner-search input[type="search"] {
    padding: 12px 0;
    font-size: 16px; /* keeps iOS from zooming on focus */
  }

  .ne-banner-search-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* The row becomes a horizontal scroller. It MUST be width-constrained:
     as a centred flex item it otherwise sizes to max-content (~713px on a
     390px screen) and hangs off both edges instead of scrolling. */
  .ne-banner-chips {
    width: calc(100% + 36px); /* bleed into .ne-banner-inner's 18px padding */
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-inline: -18px;
    padding-inline: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: 18px;
    /* Fade the trailing edge so it reads as scrollable. */
    -webkit-mask-image: linear-gradient(90deg, #000 0 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0 calc(100% - 34px), transparent 100%);
  }

  .ne-banner-chips::-webkit-scrollbar {
    display: none;
  }

  /* Less vertical room on a phone — keep the list shorter still. */
  .ne-banner-search .search-suggestions {
    max-height: min(38vh, 260px);
  }

  .ne-banner-chips::-webkit-scrollbar {
    display: none;
  }

  .ne-banner-chips-label {
    display: none;
  }

  .ne-banner-chip {
    flex-shrink: 0;
  }

  .ne-banner-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 18px 20px;
  }

  .ne-banner-captions {
    display: none;
  }

  .ne-banner-controls {
    justify-content: center;
    padding-bottom: 0;
  }

  .ne-trustbar-inner {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    padding: 0 18px;
  }

  .ne-trust-item {
    padding: 16px 8px;
  }

  .ne-trust-item + .ne-trust-item {
    box-shadow: none;
  }

  .ne-trust-item:nth-child(even) {
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.1);
  }

  .ne-trust-item:nth-child(n + 3) {
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1);
  }

  .ne-trust-item:nth-child(4) {
    box-shadow: -1px 0 0 rgba(255, 255, 255, 0.1), 0 -1px 0 rgba(255, 255, 255, 0.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ne-banner-media .swiper-slide-active .ne-banner-img {
    animation: none;
    transform: scale(1.02);
  }

  .ne-banner-cue-track::after,
  .ne-banner-dots .swiper-pagination-bullet-active::before {
    animation: none;
  }

  .ne-banner-dots .swiper-pagination-bullet-active::before {
    transform: scaleX(1);
  }

  .ne-banner-caption,
  .ne-banner-chip,
  .ne-banner-search {
    transition: none;
  }
}

/* Product-switch chip — filled, to read as a different product line rather
   than another filter on the current one. */
.ne-banner-chip-alt {
  color: var(--gold-ink);
  background: var(--ne-gold);
  border-color: var(--ne-gold);
}

.ne-banner-chip-alt:hover,
.ne-banner-chip-alt:focus-visible {
  color: var(--gold-ink);
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

/* Product chips ("All treks", "Tours") lead the row on mobile. Without this
   they sat ~700px into an 820px scroller on a 390px screen — invisible unless
   you happened to swipe. Filters keep their order behind them. */
@media (max-width: 720px) {
  .ne-banner-chips .is-product {
    order: -1;
  }

  .ne-banner-chips .is-tours {
    order: -2;
  }
}

.ne-banner-chip-product {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}
