/* ================================================================
   HEARTLAND CYCLING GRAZ
   Color scheme: #000000 + #ffffff only
   Fonts: BOLDSTROM Regular (display, all caps) / SOLEIL (body)
================================================================ */

/* ----------------------------------------------------------------
   FONTS (self-hosted)
---------------------------------------------------------------- */
@font-face {
  font-family: 'BOLDSTROM';
  src: url('assets/fonts/Boldstrom-D.woff2') format('woff2'),
       url('assets/fonts/Boldstrom D.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SOLEIL';
  src: url('assets/fonts/Soleil-Light.woff2') format('woff2'),
       url('assets/fonts/Soleil-W02-Light.ttf') format('truetype');
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SOLEIL';
  src: url('assets/fonts/Soleil-Bold.woff2') format('woff2'),
       url('assets/fonts/Soleil-W02-Bold.ttf') format('truetype');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------
   TOKENS & RESET
---------------------------------------------------------------- */
:root {
  --black: #000000;
  --white: #ffffff;
  --font-display: 'BOLDSTROM', sans-serif;
  --font-body: 'SOLEIL', sans-serif;
  --nav-h: 72px;
  --container: 1280px;
  --pad: 48px;
  --pad-sm: 24px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* BOLDSTROM font defaults */
.hero-title, .section-title, .page-hero-title, .rider-name,
.ride-day, .ride-name, .route-card-title, .blog-card-title,
.modal-title, .benefit-title, .join-step-title {
  font-weight: 500;
  text-transform: uppercase;
}

/* Mobile-friendly headings — let long words (esp. German compounds like
   "Jugendförderung") wrap and hyphenate instead of overflowing the viewport */
.hero-title, .section-title, .page-hero-title, .page-hero-sub, .rider-name,
.ride-day, .ride-name, .route-card-title, .blog-card-title,
.modal-title, .benefit-title, .join-step-title,
.highlight-title, .disciplines-title, .imprint-sub, .footer-tagline {
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* iOS scroll lock — applied via JS when nav or modal is open */
body.scroll-locked {
  position: fixed;
  width: 100%;
  overflow-y: scroll; /* keeps scrollbar width so layout doesn't shift */
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

sup {
  font-size: 0.45em;
  vertical-align: super;
}

/* ----------------------------------------------------------------
   UTILITY
---------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------------------
   BUTTONS
---------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid currentColor;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
  white-space: nowrap;
}

.btn-white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn-white:hover {
  background: transparent;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

.btn-black {
  background: var(--black);
  color: var(--white);
  border-color: var(--white);
}
.btn-black:hover {
  background: var(--white);
  color: var(--black);
}

/* ----------------------------------------------------------------
   NAV
---------------------------------------------------------------- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  transition: background 0.35s ease, border-bottom 0.35s ease;
}

#nav.scrolled {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 46px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.55;
}

.nav-cta {
  border: 1px solid var(--white);
  padding: 9px 22px;
  letter-spacing: 0.12em;
}

.nav-cta:hover {
  background: var(--white) !important;
  color: var(--black) !important;
  opacity: 1 !important;
}

.nav-social-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-social-link {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-social-link:hover {
  opacity: 1 !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile drawer */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100svh - var(--nav-h));
    background: var(--black);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 800;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links li a,
  .nav-links li .nav-dropdown-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px var(--pad);
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  /* CTA sits flush like a regular row on mobile */
  .nav-links .nav-cta {
    display: block;
    width: calc(100% - var(--pad) * 2);
    max-width: 100%;
    box-sizing: border-box;
    margin: 24px var(--pad);
    border: 1px solid var(--white);
    padding: 16px;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Routes dropdown inside mobile menu — show inline */
  .nav-links .nav-dropdown-menu {
    position: static;
    display: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-links .nav-dropdown-menu li a {
    padding-left: calc(var(--pad) + 16px);
    opacity: 0.65;
  }

  .nav-links .nav-dropdown-divider {
    display: none;
  }

  /* Language switcher in mobile drawer */
  .nav-lang-item {
    display: flex;
    align-items: center;
    padding: 16px var(--pad);
  }

  .nav-lang-item .language-switcher {
    width: auto;
  }

  /* Social icon links in mobile drawer */
  .nav-links .nav-social-links {
    padding: 20px var(--pad);
    justify-content: flex-start;
    gap: 28px;
  }

  .nav-links .nav-social-link {
    width: auto;
    padding: 0;
    opacity: 0.7;
  }
}

/* ----------------------------------------------------------------
   HERO
---------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh; /* iOS: excludes browser chrome */
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.06);
  animation: heroZoom 22s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}

/* Mobile: stack the hero instead of overlaying text on the photo. A wide group
   shot can't fill a tall phone frame with `cover` without cropping riders off
   the sides, so we show the whole image on top and give the copy its own solid
   block below it. Desktop keeps the full-bleed cover crop above. */
@media (max-width: 767px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding-top: var(--nav-h);   /* push the image below the fixed navbar */
    padding-bottom: 44px;
  }

  /* Image block sizes to the photo's natural height — nothing cropped.
     Scoped to the index hero only: page-hero images stay a cover background
     behind their headline on mobile too (see .page-hero below). */
  .hero > .hero-bg {
    position: relative;
    height: auto;
  }

  .hero > .hero-bg img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: none;   /* drop the zoom — it only cropped more */
    animation: none;
  }

  /* Darkening overlay is unnecessary once the text lives on the solid bg below. */
  .hero-overlay {
    display: none;
  }

  /* Photo credit hugs the bottom-right corner of the image. */
  .hero .img-credit {
    position: static;
    align-self: flex-end;
    margin-top: -26px;   /* overlap onto the image bottom */
    margin-right: 8px;
  }

  /* Text block sits below the image on the hero's black background.
     Scoped to `.hero .hero-content` so it outranks the base `.hero-content`
     padding shorthand that's declared later in the file. */
  .hero .hero-content {
    padding-top: 52px;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.55) 50%,
    rgba(0,0,0,0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

.hero-location {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 15rem);
  line-height: 0.87;
  letter-spacing: 0em;
  font-weight: 500;
  display: block;
}

.hero-title-line {
  display: block;
}

.hero-tagline {
  font-size: clamp(0.78rem, 1.3vw, 0.98rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 22px;
  margin-bottom: 38px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  right: var(--pad);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-scroll-label {
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  opacity: 0.4;
}

.hero-scroll-line {
  width: 1px;
  height: 56px;
  background: var(--white);
  opacity: 0.3;
  transform-origin: top;
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  45%  { transform: scaleY(1); transform-origin: top;    opacity: 0.3; }
  55%  { transform: scaleY(1); transform-origin: bottom; opacity: 0.3; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ----------------------------------------------------------------
   MARQUEE
---------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  background: var(--white);
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 14px 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  animation: marqueeScroll 24s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--black);
  text-transform: uppercase;
}

.marquee-dot {
  width: 5px !important;
  height: 5px !important;
  background: var(--black);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  font-size: 0 !important;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------
   SECTION BASE
---------------------------------------------------------------- */
.section {
  padding: 128px 0;
}

.section-header {
  margin-bottom: 72px;
}

.section-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 14px;
  color: var(--black);
}

.section-label-white {
  color: var(--white);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8.5vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0em;
  color: inherit;
}

.section-title--smaller {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

/* ----------------------------------------------------------------
   CLUB SECTION (white background)
---------------------------------------------------------------- */
.section-club {
  background: var(--white);
  color: var(--black);
}

.section-club .section-label {
  color: var(--black);
}

.facts-grid {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  margin-bottom: 72px;
}

.fact-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 32px 14px 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.fact-item + .fact-item {
  padding-left: 32px;
  border-left: 1px solid var(--black);
}

.fact-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--black);
}

.fact-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.45;
  color: var(--black);
}

.club-body {
  max-width: 620px;
}

.club-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 300;
  color: var(--black);
  margin-bottom: 18px;
}

.club-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Club two-column layout */
.club-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
}

.club-body {
  max-width: none;
}

/* Club Gallery Slider */
.club-gallery {
  display: flex;
  justify-content: flex-end;
}

.gallery-slider {
  width: 100%;
  max-width: 500px;
  position: relative;
}

.gallery-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--black);
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
  will-change: filter;
}

.gallery-slider:hover .gallery-slide img {
  filter: grayscale(0%);
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.gallery-btn {
  background: none;
  border: 1px solid var(--black);
  color: var(--black);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s, color 0.2s;
}

.gallery-btn:hover {
  background: var(--black);
  color: var(--white);
}

.gallery-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.2s;
}

.gallery-dot.active {
  background: var(--black);
}

.img-credit {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  pointer-events: none;
  z-index: 2;
  line-height: 1.4;
}

.gallery-caption {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  opacity: 0.6;
  color: var(--black);
  text-align: center;
  min-height: 1.2rem;
}

/* Responsive club layout */
@media (max-width: 1024px) {
  .club-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .club-gallery {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .gallery-slider {
    max-width: 100%;
  }

  .gallery-caption {
    font-size: 0.75rem;
  }
}

.btn-outline-black {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-outline-black:hover {
  background: var(--black);
  color: var(--white);
}

/* ----------------------------------------------------------------
   PAGE HERO (inner pages — riders.html, nextgen.html)
---------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  padding: calc(var(--nav-h) + 40px) 0 80px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-hero > .container {
  position: relative;
  z-index: 2;
}

.page-hero .hero-bg img {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.page-hero .hero-bg img.loaded {
  opacity: 1;
}

/* Darken the photo so the white headline stays legible over any image,
   on desktop and mobile. Only present where a .hero-bg image exists
   (blog/404/imprint heroes are solid black and need no overlay). */
.page-hero .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.page-hero .section-label {
  color: var(--white);
  margin-bottom: 18px;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 4vw, 4rem);
  line-height: 0.88;
  letter-spacing: 0em;
  color: var(--white);
  margin-bottom: 28px;
  font-weight: 500; 
}

.page-hero-sub {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
  font-weight: 400;
}

/* ----------------------------------------------------------------
   RIDER ROSTER (black background)
---------------------------------------------------------------- */
.section-roster {
  background: var(--black);
  color: var(--white);
}

/* NextGen page roster - white background */
.section-roster#nextgen-roster {
  background: var(--white);
  color: var(--black);
}

.section-roster#nextgen-roster .section-label {
  color: var(--black);
}

.section-roster .section-label {
  color: var(--white);
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
  gap: 24px;
  background: transparent;
  justify-content: center;
}

.rider-card {
  background: var(--white);
  display: grid;
  grid-template-rows: 1fr auto;
  cursor: default;
  transition: background 0.22s ease, transform 0.22s ease;
}

.section-roster#nextgen-roster .rider-card {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.rider-card:hover {
  background: var(--black);
  transform: translateY(-2px);
}

.rider-photo {
  position: relative;
  overflow: hidden;
  background: var(--black);
  min-height: 220px;
}

.rider-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
  transition: transform 0.5s ease;
}

.rider-card:hover .rider-photo img {
  transform: scale(1.04);
}

.rider-info {
  padding: 20px 22px 24px;
  border-top: 1px solid var(--black);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rider-card:hover .rider-info {
  border-top-color: rgba(255,255,255,0.2);
}

.rider-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--black);
  line-height: 1;
  transition: color 0.22s ease;
}

.rider-card:hover .rider-name {
  color: var(--white);
}

.rider-discipline {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
  color: var(--black);
  transition: color 0.22s ease, opacity 0.22s ease;
}

.rider-card:hover .rider-discipline {
  color: var(--white);
  opacity: 0.55;
}

/* Responsive roster */
@media (max-width: 1024px) {
  .roster-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 640px) {
  .roster-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
}

/* ----------------------------------------------------------------
   NEXT RIDE SECTION (black background)
---------------------------------------------------------------- */
.section-ride {
  background: var(--black);
  color: var(--white);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.section-ride .section-label {
  color: var(--white);
}

/* Strava event card */
.ride-card {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 64px;
}

.ride-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.ride-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

.ride-day {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 1;
  color: var(--white);
}

.ride-month-year {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: 4px;
}

.ride-details {
  flex: 1;
  min-width: 200px;
}

.ride-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 14px;
  color: var(--white);
}

.ride-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Fallback */
.ride-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 56px 64px;
  flex-wrap: wrap;
}

.ride-fallback .section-label {
  color: var(--white);
  margin-bottom: 10px;
}

.ride-fallback-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1;
}

.ride-fallback p {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  opacity: 0.5;
  text-transform: uppercase;
}

.ride-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 32px 0;
}

/* ----------------------------------------------------------------
   NEXTGEN SECTION (white background)
---------------------------------------------------------------- */
.section-nextgen {
  background: var(--white);
  color: var(--black);
  border-top: 1px solid rgba(0,0,0,0.08);
}

.section-nextgen .section-label {
  color: var(--black);
}

.nextgen-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}

.nextgen-text .section-title {
  margin-bottom: 36px;
  color: var(--black);
}

.nextgen-text p {
  font-size: 1rem;
  line-height: 1.78;
  font-weight: 300;
  opacity: 0.72;
  color: var(--black);
  margin-bottom: 20px;
}

.nextgen-text .btn {
  margin-top: 16px;
}

.nextgen-visual {
  display: flex;
  justify-content: flex-end;
}

.nextgen-img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.nextgen-img.loaded {
  opacity: 1;
}

/* ----------------------------------------------------------------
   FOOTER
---------------------------------------------------------------- */
.footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 72px 0 56px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-logo {
  height: 80px;
  width: auto;
  margin: 0 auto;
}

.footer-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.35;
}

.footer-nav {
  display: flex;
  gap: 36px;
}

.footer-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  opacity: 0.25;
}

.footer-copy a {
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
}

.footer-copy a:hover {
  opacity: 1;
}

.footer-sponsor {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  opacity: 0.25;
  margin-top: 6px;
}

.footer-sponsor a {
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
}

.footer-sponsor a:hover {
  opacity: 1;
}

/* ----------------------------------------------------------------
   IMPRINT
---------------------------------------------------------------- */
.page-hero--flat {
  background: var(--black);
}

.section-imprint {
  background: var(--white);
  color: var(--black);
}

.imprint-content {
  max-width: 640px;
  padding: 80px 0;
}

.imprint-block {
  margin-bottom: 56px;
}

.imprint-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.imprint-intro {
  font-size: 0.85rem;
  opacity: 0.5;
  font-weight: 300;
}

.imprint-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 20px;
}

.imprint-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px 24px;
}

.imprint-list dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.45;
  padding-top: 2px;
}

.imprint-list dd {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
}

.imprint-list dd a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.imprint-list dd a:hover {
  opacity: 0.6;
}

.imprint-block > p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.7;
}

.imprint-block > p + p {
  margin-top: 14px;
}

.imprint-block > p a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.imprint-block > p a:hover {
  opacity: 0.6;
}

.imprint-block > p code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

.imprint-sub--major {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: 0.05em;
  text-transform: none;
  opacity: 1;
  margin-top: 24px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .imprint-list {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .imprint-list dt {
    margin-top: 12px;
  }
}

/* ----------------------------------------------------------------
   SCROLL REVEAL
---------------------------------------------------------------- */
/* Mobile-first: a short, quick reveal that feels snappy on a phone and keeps
   transitions cheap on low-powered devices. Only opacity + transform animate,
   so this stays on the compositor and off the main thread. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Tighter stagger on mobile — items stack in a single column, so long
   cumulative delays would make the list feel slow to appear. */
.d1 { transition-delay: 0.05s; }
.d2 { transition-delay: 0.1s; }
.d3 { transition-delay: 0.15s; }
.d4 { transition-delay: 0.2s; }

/* Progressive enhancement for larger screens: more travel, a longer duration,
   and a more pronounced stagger — the original desktop feel. */
@media (min-width: 768px) {
  .reveal {
    transform: translateY(28px);
    transition: opacity 0.72s ease, transform 0.72s ease;
  }

  .d1 { transition-delay: 0.1s; }
  .d2 { transition-delay: 0.2s; }
  .d3 { transition-delay: 0.32s; }
  .d4 { transition-delay: 0.44s; }
}

/* Respect a reduced-motion preference: no movement, no fade, no delay. */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .d1, .d2, .d3, .d4 { transition-delay: 0s; }
}

/* ----------------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --pad: 36px;
  }

  .nextgen-inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .nextgen-visual {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --pad: var(--pad-sm);
  }

  .section {
    padding: 80px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .ride-card,
  .ride-fallback {
    padding: 36px 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    text-align: center;
  }
}

/* ================================================================
   EXTENDED COMPONENTS
================================================================ */

/* ----------------------------------------------------------------
   NAV DROPDOWN (Routes)
---------------------------------------------------------------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: opacity 0.2s;
}

.nav-dropdown-trigger:hover {
  opacity: 0.55;
}

.nav-arrow {
  font-size: 0.6em;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.12);
  min-width: 220px;
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(-6px);
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li a {
  display: block;
  padding: 10px 22px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}

.nav-dropdown-menu li a:hover {
  opacity: 1;
  background: rgba(255,255,255,0.05);
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 6px 0;
}

/* Mobile dropdown */
@media (max-width: 860px) {
  .nav-dropdown-trigger {
    font-size: 1rem;
    letter-spacing: 0.18em;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    margin: 8px 0 0 12px;
    padding: 0;
    opacity: 1;
    pointer-events: all;
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
    transform: none;
  }

  .nav-dropdown-menu li a {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

/* ----------------------------------------------------------------
   FLAG / TAG CHIPS
---------------------------------------------------------------- */
.flag-chip {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 3px 10px;
  line-height: 1.4;
}

/* ----------------------------------------------------------------
   FILTER BAR (blog, team, nextgen)
---------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 56px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--black);
  color: var(--white);
}

/* On-black background overrides */
.filter-bar.on-black .filter-btn {
  border-color: var(--white) !important;
  color: var(--white) !important;
  background: transparent !important;
}

.section-roster .filter-bar.on-black .filter-btn:hover,
.section-roster .filter-bar.on-black .filter-btn.active,
.filter-bar.on-black .filter-btn:hover,
.filter-bar.on-black .filter-btn.active {
  background: var(--white) !important;
  color: var(--black) !important;
  border-color: var(--white) !important;
}

/* ----------------------------------------------------------------
   ROSTER WITH SOCIAL LINKS (team + nextgen)
---------------------------------------------------------------- */
.rider-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.rider-social a {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.4;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s;
}

.rider-social a:hover {
  opacity: 1;
}

.rider-card:hover .rider-social a {
  color: var(--white);
  opacity: 0.5;
}

.rider-card:hover .rider-social a:hover {
  opacity: 1;
}

.rider-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.rider-flag {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--black);
  padding: 2px 8px;
  color: var(--black);
  transition: border-color 0.22s, color 0.22s;
}

.rider-card:hover .rider-flag {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.6);
}

/* ----------------------------------------------------------------
   SPONSORS SLIDER (Powered By)
---------------------------------------------------------------- */
.section-sponsors {
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 80px 0;
}

.section-sponsors .section-label {
  color: var(--black);
  text-align: center;
  display: block;
  margin-bottom: 48px;
}

.sponsors-track-wrap {
  overflow: hidden;
  position: relative;
}

.sponsors-track {
  display: flex;
  align-items: center;
  gap: 80px;
  width: max-content;
  animation: sponsorScroll 20s linear infinite;
}

.sponsors-track:hover {
  animation-play-state: paused;
}

.sponsors-track--static {
  animation: none;
  justify-content: center;
  width: 100%;
}

@keyframes sponsorScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sponsor-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  opacity: 0.5;
  transition: opacity 0.2s;
  filter: grayscale(100%);
}

.sponsor-item a:hover {
  opacity: 1;
}

.sponsor-item img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.sponsor-item .sponsor-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--black);
  white-space: nowrap;
}

/* Responsive sponsors */
@media (max-width: 768px) {
  .section-sponsors {
    padding: 60px 0;
  }

  .section-sponsors .section-label {
    margin-bottom: 32px;
  }

  .sponsors-track {
    gap: 40px;
    animation: sponsorScroll 15s linear infinite;
  }

  .sponsor-item a {
    height: 32px;
  }

  .sponsor-item img {
    max-width: 120px;
  }

  .sponsor-item .sponsor-name {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .section-sponsors {
    padding: 40px 0;
  }

  .sponsors-track {
    gap: 24px;
    animation: sponsorScroll 12s linear infinite;
  }

  .sponsor-item a {
    height: 24px;
  }

  .sponsor-item img {
    max-width: 80px;
  }

  .sponsor-item .sponsor-name {
    font-size: 1rem;
  }
}

/* ----------------------------------------------------------------
   INSTAGRAM FEED SLIDER
---------------------------------------------------------------- */
.section-insta {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 96px 0;
}

.section-insta .section-label {
  color: var(--white);
}

.insta-slider-wrap {
  position: relative;
  overflow: hidden;
}

.insta-track {
  display: flex;
  gap: 2px;
  transition: transform 0.4s ease;
}

.insta-card {
  flex: 0 0 calc(25% - 2px);
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--black);
}

.insta-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.4s ease, filter 0.3s ease;
}

.insta-card:hover img {
  transform: scale(1.05);
  filter: grayscale(60%);
}

.insta-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.insta-card:hover .insta-card-overlay {
  opacity: 1;
}

.insta-caption {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.insta-link {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.6;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  align-self: flex-start;
}

.slider-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.slider-btn:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.slider-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.slider-dot.active {
  background: var(--white);
  border-color: var(--white);
}

/* ----------------------------------------------------------------
   BLOG PAGE
---------------------------------------------------------------- */
.section-blog {
  background: var(--white);
  color: var(--black);
}

.section-blog .section-label,
.section-blog .filter-btn {
  color: var(--black);
}

.section-blog .filter-btn:hover,
.section-blog .filter-btn.active {
  background: var(--black);
  color: var(--white);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--white);
}

.blog-card {
  background: var(--white);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.22s;
  border: 1px solid var(--black);
}

.blog-card:hover {
  background: var(--black);
}

.blog-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
  overflow: hidden;
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.5s;
}

.blog-card:hover .blog-card-cover img {
  transform: scale(1.04);
}

.blog-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-cover-placeholder .flag-chip {
  color: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.2);
  font-size: 0.7rem;
}

.blog-card-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.blog-card-flag {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--black);
  padding: 2px 8px;
  color: var(--black);
  transition: border-color 0.22s, color 0.22s;
}

.blog-card:hover .blog-card-flag {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.6);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--black);
  transition: color 0.22s;
}

.blog-card:hover .blog-card-title {
  color: var(--white);
}

.blog-card-subtitle {
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 300;
  color: var(--black);
  opacity: 0.65;
  transition: color 0.22s, opacity 0.22s;
}

.blog-card:hover .blog-card-subtitle {
  color: var(--white);
  opacity: 0.55;
}

.blog-card-date {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0.4;
  margin-top: auto;
  transition: color 0.22s;
}

.blog-card:hover .blog-card-date {
  color: var(--white);
}

.blog-card.hidden {
  display: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination-btn {
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pagination-btn:hover,
.pagination-btn-active {
  background: var(--black);
  color: var(--white);
}

.pagination-prev,
.pagination-next {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pagination-num {
  min-width: 40px;
}

/* ----------------------------------------------------------------
   LANGUAGE SWITCHER
---------------------------------------------------------------- */
.language-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.active {
  background: var(--white);
  color: var(--black);
}

/* Blog modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-inner {
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.12);
  max-width: 860px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--white);
  color: var(--black);
}

.modal-photo-slider {
  position: relative;
  background: var(--black);
}

/* Blog post modal carousel — reuse the index gallery slider, restyled for the
   dark modal background and full modal width. */
.blog-modal-gallery.gallery-slider {
  max-width: none;
}

.blog-modal-gallery .gallery-track {
  border-radius: 0;              /* full-bleed across the top of the modal */
  aspect-ratio: 4 / 3;          /* balanced frame for mixed portrait/landscape */
  background: #000;
}

/* Show the whole photo (no cropped-off riders) in full colour — the modal is a
   viewer, unlike the decorative cover-cropped gallery on the home page. */
.blog-modal-gallery .gallery-slide img {
  object-fit: contain;
  filter: none;
}

.blog-modal-gallery .gallery-controls {
  padding: 0 24px 4px;
}

.blog-modal-gallery .gallery-btn {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}

.blog-modal-gallery .gallery-btn:hover {
  background: var(--white);
  color: var(--black);
}

.blog-modal-gallery .gallery-dot {
  background: rgba(255,255,255,0.3);
}

.blog-modal-gallery .gallery-dot.active {
  background: var(--white);
}

.modal-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
}

.modal-body {
  padding: 40px 48px 56px;
}

.modal-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.modal-flag {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 3px 10px;
}

.modal-dates {
  display: flex;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.modal-date-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modal-date-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.4;
}

.modal-date-value {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.92;
  color: var(--white);
  margin-bottom: 14px;
}

.modal-subtitle {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
  opacity: 0.65;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 28px;
}

.modal-text {
  font-size: 0.95rem;
  line-height: 1.78;
  font-weight: 300;
  opacity: 0.8;
}

.modal-text p {
  margin-bottom: 16px;
}

/* ----------------------------------------------------------------
   ROUTES PAGE
---------------------------------------------------------------- */
.section-routes {
  background: var(--white);
  color: var(--black);
  padding: 0;
}

.routes-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

/* ---- Left panel ---- */
.routes-list-panel {
  position: sticky;
  top: var(--nav-h);
  height: min(80vh, calc(100vh - var(--nav-h)));
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
}

.routes-filter {
  padding: 24px 28px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.routes-filter .filter-bar {
  justify-content: flex-start;
  margin-bottom: 0;
}

.routes-list {
  flex: 1;
  overflow-y: auto;
}

.route-card {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 28px 32px;
  cursor: pointer;
  transition: background 0.2s;
}

.route-card.hidden {
  display: none;
}

.route-card:hover,
.route-card.active {
  background: rgba(0,0,0,0.04);
}

.route-card.active {
  border-left: 2px solid var(--black);
  padding-left: 30px;
}

.route-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.route-flag {
  font-size: 0.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 2px;
  color: var(--black);
}

.route-flag--hill         { border-color: rgba(0,0,0,0.4); background: rgba(0,0,0,0.06); }
.route-flag--intermediate { border-color: rgba(0,0,0,0.25); }
.route-flag--flat         { border-color: rgba(0,0,0,0.15); opacity: 0.7; }

.route-stars {
  margin-left: auto;
  display: flex;
  gap: 1px;
}

.route-star {
  font-size: 0.75rem;
  color: rgba(0,0,0,0.15);
  line-height: 1;
}

.route-star--on {
  color: var(--black);
}

.route-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--black);
  margin-bottom: 6px;
}

.route-card-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.45;
  margin-bottom: 14px;
}

.route-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.route-card-actions .btn {
  font-size: 0.65rem;
  padding: 8px 16px;
  letter-spacing: 0.12em;
}

/* ---- Right panel (map) ---- */
.routes-map-panel {
  position: sticky;
  top: var(--nav-h);
  height: min(80vh, calc(100vh - var(--nav-h)));
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

#routes-map {
  flex: 0 0 58%;
  min-height: 0;
  width: 100%;
  position: relative;
}

.map-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.map-fullscreen-btn:hover {
  background: rgba(0,0,0,0.95);
}

/* Fullscreen state */
.routes-map-panel.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  height: 100dvh;
}

.routes-map-panel.map-fullscreen #routes-map {
  flex: 1;
}

.routes-map-panel.map-fullscreen .route-name-header,
.routes-map-panel.map-fullscreen .route-detail {
  display: none !important;
}

.routes-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 500;
}

.routes-map-placeholder p {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.route-name-header {
  padding: 16px 28px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
  background: var(--black);
  color: var(--white);
}

.route-name-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--white);
  margin: 0;
}

.route-name-header p {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.4;
  margin: 4px 0 0;
}

.route-detail {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 20px 28px;
  display: none;
}

.route-detail.visible {
  display: block;
}

.route-detail p {
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0.7;
}

@media (max-width: 860px) {
  .routes-layout {
    grid-template-columns: 1fr;
  }

  .routes-map-panel {
    order: -1;
    position: static;
    height: auto;
    flex-direction: column;
  }

  #routes-map {
    flex: none;
    height: 55vw;
    min-height: 260px;
    max-height: 400px;
  }

  .route-detail {
    flex: none;
    overflow-y: visible;
    max-height: none;
  }

  .routes-list-panel {
    border-right: none;
    border-top: 1px solid rgba(0,0,0,0.1);
  }

  .route-card {
    padding: 22px 20px;
  }

  .route-detail {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  #routes-map {
    height: 60vw;
  }

  .route-card-actions {
    flex-direction: column;
  }

  .route-card-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ----------------------------------------------------------------
   NEXTGEN — Benefits + How to Join
---------------------------------------------------------------- */
.section-benefits {
  background: var(--white);
  color: var(--black);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--black);
  border: 1px solid var(--black);
  margin-bottom: 0;
}

.benefits-text {
  max-width: 600px;
}

.benefits-text p {
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 24px;
  color: var(--black);
}

.benefits-text p:last-child {
  margin-bottom: 0;
}

.benefits-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.benefits-gallery {
  max-width: 500px;
}

.benefit-item {
  background: var(--white);
  padding: 40px 32px;
}

.benefits-list .benefit-item {
  background: transparent;
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 18px;
}

.benefits-list .benefit-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.benefit-number {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--black);
  opacity: 0.12;
  margin-bottom: 12px;
}

.benefit-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--black);
  margin-bottom: 10px;
}

.benefit-text {
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0.65;
  color: var(--black);
}

.section-join {
  background: var(--black);
  color: var(--white);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.section-join .section-label {
  color: var(--white);
}

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.join-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.join-step-num {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--white);
  opacity: 0.15;
}

.join-step-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
}

.join-step-text {
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0.6;
}

/* ----------------------------------------------------------------
   HIGHLIGHTS / WHAT WE DO (dark background, home page)
---------------------------------------------------------------- */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 56px;
  margin-bottom: 80px;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.highlight-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--white);
}

.highlight-text {
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0.6;
}

.disciplines-block {
  max-width: 720px;
}

.disciplines-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 16px;
}

.disciplines-text {
  font-size: 1.05rem;
  line-height: 1.75;
  font-weight: 300;
  opacity: 0.75;
  margin-bottom: 18px;
}

.disciplines-signoff {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--white);
}

@media (max-width: 980px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 56px;
  }
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .benefits-text p {
    margin-bottom: 20px;
  }

  .benefits-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .join-steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 28px 24px 40px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 28px;
  }
}

@media (max-width: 640px) {
  .insta-card {
    flex: 0 0 calc(50% - 2px);
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .pagination {
    margin-top: 32px;
    gap: 6px;
  }

  .pagination-btn {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .pagination-prev,
  .pagination-next {
    padding: 6px 10px;
  }

  .pagination-num {
    min-width: 36px;
  }
}

@media (max-width: 480px) {
  .insta-card {
    flex: 0 0 calc(100% - 2px);
  }
}

