/* ==========================================================================
   GNARLY MTB NEPAL - High-Octane Tour Design System
   Visual Identity: Blue Canvas + Warm Beige Accent (#F5EFEB)
   ========================================================================== */

:root {
  /* Brand Color Tokens */
  --brand: #F5EFEB;
  --brand-hover: #E8DFD8;
  --brand-dark: #D8CEC4;
  --brand-glow: rgba(245, 239, 235, 0.25);

  /* Background Palette */
  --bg-canvas: #2A4E7A;
  --bg-surface-primary: #1E3A5F;
  --bg-surface-secondary: #162E4D;
  --bg-surface-elevated: #345C8C;
  --bg-frosted-nav: rgba(42, 78, 122, 0.85);

  /* Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(255, 255, 255, 0.20);
  --border-strong: rgba(255, 255, 255, 0.35);
  --border-brand: #F5EFEB;

  /* Typography Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #D1D5DB;
  --text-muted: #9CA3AF;
  --text-accent: #F5EFEB;

  /* Fonts */
  --font-display: "Anton", -apple-system, BlinkMacSystemFont, "Impact", sans-serif;
  --font-heading: "Oswald", -apple-system, BlinkMacSystemFont, "Arial Narrow", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, Menlo, Monaco, Consolas, monospace;
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 6rem;
}

#tours,
#tour-cards,
#crew,
#reviews,
#contact,
#about {
  scroll-margin-top: 6rem;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-canvas);
  min-height: 100vh;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #162E4D;
}
::-webkit-scrollbar-thumb {
  background: #345C8C;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

/* Typography Utility Classes */
.font-display { font-family: var(--font-display); }
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.tracking-tactical { letter-spacing: 0.15em; }
.tracking-widest-plus { letter-spacing: 0.25em; }

/* Sticky Frosted Header */
.navbar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-transparent {
  background: linear-gradient(180deg, rgba(22, 46, 77, 0.7) 0%, rgba(42, 78, 122, 0) 100%);
  border-bottom: none;
}

.navbar-scrolled {
  background-color: var(--bg-frosted-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: none;
  box-shadow: 0 10px 30px rgba(10, 25, 45, 0.5);
}

/* Mobile Drawer & Overlay */
#mobile-drawer-backdrop {
  z-index: 1040;
}

#mobile-drawer {
  z-index: 1050;
}

/* Hero Section Styles */
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  opacity: 0.95;
  transition: opacity 0.8s ease-in-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  transform: translateY(8px);
  background: linear-gradient(
    180deg,
    rgba(42, 78, 122, 0) 0%,
    rgba(42, 78, 122, 0.005) 20%,
    rgba(42, 78, 122, 0.02) 35%,
    rgba(42, 78, 122, 0.05) 45%,
    rgba(42, 78, 122, 0.10) 55%,
    rgba(42, 78, 122, 0.17) 64%,
    rgba(42, 78, 122, 0.28) 72%,
    rgba(42, 78, 122, 0.42) 79%,
    rgba(42, 78, 122, 0.58) 85%,
    rgba(42, 78, 122, 0.74) 91%,
    rgba(42, 78, 122, 0.88) 95%,
    rgba(42, 78, 122, 0.96) 98%,
    rgba(42, 78, 122, 1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Hero Title Overlap */
.hero-title-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  transform: translateY(50%);
  z-index: 30;
  text-align: center;
}



/* Running Marquee Ticker */
.marquee-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background-color: #1E3A5F;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
}

.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: marqueeLoop 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Button Ecosystem */
.btn-tactical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 12px 28px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand);
  color: #000000;
  border: 1px solid var(--brand);
}
.btn-primary:hover {
  background-color: #000000;
  color: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 20px var(--brand-glow);
}

.btn-outline {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid #FFFFFF;
}
.btn-outline:hover {
  background-color: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
}

.btn-sold-out {
  background-color: transparent !important;
  color: #FFFFFF !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Tour Card Video Hover */
.tour-card {
  position: relative;
  background-color: var(--bg-surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.tour-media-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #000000;
}

.tour-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.tour-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

.tour-card:hover .tour-video-preview {
  opacity: 1;
}

/* Tour Card Automated Slideshow */
.tour-slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tour-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 1;
  transform: scale(1);
  transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
  pointer-events: none;
}

.tour-slide-img.active {
  opacity: 1 !important;
  z-index: 2 !important;
  transform: scale(1.01);
  pointer-events: auto;
}

.tour-card:hover .tour-slide-img.active {
  transform: scale(1.05);
}

/* Slideshow Indicators */
.slideshow-indicators {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
}

.slideshow-indicators .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 0 1px rgba(0, 0, 0, 0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.slideshow-indicators .indicator-dot.active {
  width: 8px !important;
  background-color: #F5EFEB !important;
  box-shadow: 0 0 8px rgba(245, 239, 235, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8) !important;
  transform: scale(1.25);
}

/* Interactive Schedule Grid */
.schedule-table-wrap {
  position: relative;
  width: 100%;
}

.schedule-header-row {
  display: grid;
  grid-template-columns: minmax(260px, max-content) minmax(260px, max-content) 1fr max-content;
  column-gap: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(260px, max-content) minmax(260px, max-content) 1fr max-content;
  column-gap: 32px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}

.schedule-row:first-of-type {
  border-top: 0;
}

.schedule-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

@media (max-width: 1024px) {
  .schedule-header-row {
    display: none;
  }
  .schedule-row {
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 16px;
    row-gap: 10px;
    padding: 16px 0;
  }
  .schedule-col-end {
    display: none;
  }
}

@media (max-width: 590px) {
  .schedule-row {
    grid-template-columns: 1fr;
    row-gap: 14px;
    padding: 16px 0;
    justify-items: start;
  }
  .schedule-row .btn-tactical {
    width: 100%;
    max-width: 280px;
    min-height: 46px;
  }
}

/* Accordion Component */
.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}
.accordion-trigger:hover {
  color: var(--brand);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.accordion-item.active .accordion-content {
  max-height: 800px;
  padding-bottom: 20px;
}
.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--brand);
}

/* Viewport Scrollspy Reveal Animations */
.reveal-init {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-init.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.05s; }
.delay-200 { transition-delay: 0.1s; }
.delay-300 { transition-delay: 0.15s; }
.delay-400 { transition-delay: 0.2s; }
.delay-500 { transition-delay: 0.25s; }

/* Testimonials Slider (Horizontal slide layout to eliminate text overlapping) */
#reviews {
  overflow-anchor: none;
}

.testimonial-track-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.testimonial-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  align-items: center;
}

.testimonial-slide {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  opacity: 0.25;
  transform: scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.testimonial-slide.active {
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: auto;
}

/* ==========================================================================
   Meet The Crew Horizontal Scroll Track & Cards
   ========================================================================== */
.crew-scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #333333 transparent;
  padding-bottom: 12px;
  gap: 1.5rem;
  cursor: grab;
}

.crew-scroll-container.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.crew-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.crew-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.crew-scroll-container::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 3px;
}

.crew-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

.crew-card {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background-color: var(--bg-surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.crew-card:hover {
  border-color: rgba(245, 239, 235, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 239, 235, 0.06);
}

.crew-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  background-color: var(--bg-surface-primary);
  border: 1px solid var(--border-medium);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.crew-nav-btn:hover:not(:disabled) {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #000000;
  transform: scale(1.05);
}

.crew-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.crew-dot {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}


/* Modal Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 25, 45, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: #1E3A5F;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 60px rgba(10, 25, 45, 0.6);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Form Input Theming */
.form-input-dark {
  width: 100%;
  background-color: #162E4D;
  border: 1px solid var(--border-medium);
  border-radius: 2px;
  padding: 12px 16px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input-dark:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

/* ==========================================================================
   Gallery Grid & Interactive Lightbox Viewer
   ========================================================================== */
.gallery-grid {
  column-count: 1;
  column-gap: 16px;
}
@media (min-width: 640px) {
  .gallery-grid {
    column-count: 2;
  }
}
@media (min-width: 1024px) {
  .gallery-grid {
    column-count: 3;
  }
}
@media (min-width: 1280px) {
  .gallery-grid {
    column-count: 4;
  }
}

.gallery-grid-standard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 239, 235, 0.4);
  box-shadow: 0 12px 30px rgba(10, 25, 45, 0.7);
}

.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}
.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 45, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

/* Tactical Filter Pill Buttons */
.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface-primary);
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}
.gallery-filter-btn:hover {
  border-color: var(--brand);
  color: #FFFFFF;
  background-color: var(--bg-surface-secondary);
}
.gallery-filter-btn.active {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #000000;
  box-shadow: 0 0 15px rgba(245, 239, 235, 0.3);
}
.gallery-filter-btn .count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.1);
  color: inherit;
}
.gallery-filter-btn.active .count-badge {
  background-color: rgba(0, 0, 0, 0.2);
  color: #000000;
}

/* Lightbox Modal */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 35, 60, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-header {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 58, 95, 0.85);
}

.lightbox-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.lightbox-image-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(10, 25, 45, 0.9);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: rgba(30, 58, 95, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.lightbox-nav-btn:hover {
  background: var(--brand);
  color: #000000;
  border-color: var(--brand);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 58, 95, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================================
   ACCESSIBILITY (WCAG 2.1 AA) & FOCUS STATES
   ========================================================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

.focus\:not-sr-only:focus {
  position: fixed !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 18px !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  top: 16px !important;
  left: 16px !important;
  z-index: 9999 !important;
  background-color: var(--brand) !important;
  color: #000000 !important;
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  border-radius: 4px !important;
  outline: 3px solid #FFFFFF !important;
  outline-offset: 2px !important;
}

/* Tactical Keyboard Focus Rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand) !important;
  outline-offset: 2px !important;
}


