/* ==========================================================================
   Cipressa Cycling Club — Master Stylesheet
   Modern Pure HTML5 / CSS3 / Vanilla JS
   ========================================================================== */

/* Self-hosted fonts (variable woff2 files in /fonts, from Google Fonts, SIL Open Font Licence).
   One file per font covers every weight the site uses. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

::selection {
  background-color: #02BE64;
  color: white;
}

:root {
  --color-teal: #005050;
  --color-teal-dark: #003636;
  --color-teal-light: #006b6b;
  --color-teal-tint: rgba(0, 80, 80, 0.06);
  --color-green: #02BE64;
  --color-green-dark: #019950;
  --color-green-light: #20d47b;
  --color-green-tint: rgba(2, 190, 100, 0.1);
  --color-orange: #ff810f;
  --color-orange-dark: #de6d0a;
  --color-yellow: #f5dd3c; /* FFEA5F */
  --color-yellow-dark: #e8d348;
  --color-grey: #949AA9;
  --color-grey-light: #f5f7fa;
  --color-grey-border: #e2e6ea;
  --color-white: #FFFFFF;
  --color-black: #11171a;

  --header-gradient: linear-gradient(90deg, #005050 15%, #02BE64 100%);
  --hero-gradient: linear-gradient(135deg, rgba(0, 80, 80, 0.95) 0%, rgba(0, 54, 54, 0.9) 100%);

  --font-headings: 'Archivo', sans-serif;
  --font-subtitles: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-content: 1rem;
  --line-height-content: 1.5;

  --header-height: 80px;
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 50px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.14);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  color: #333333;
  background-color: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

p {
  font-size: 1.05rem;
}

img,
picture,
video,
iframe {
  display: block;
  max-width: 100%;
}

/* Images carry width/height attributes (added by the build) so the page doesn't jump while they load.
   This keeps their proportions whenever a rule sets only the width. */
img {
  height: auto;
}

/* Keyboard users: a clear outline on whatever has focus */
:focus-visible {
  outline: 3px solid var(--color-green);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 12px 20px;
  background-color: var(--color-teal);
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 16px;
}

/* Page areas that only receive focus from a script (skip link, back to top) don't need an outline */
[tabindex="-1"]:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visitors who ask their device for less motion: no zooms, slides or smooth scrolling.
   (main.js also stops the slideshows from moving on their own.) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* --------------------------------------------------------------------------
   Typography Utilities
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  font-weight: 900;
  color: var(--color-teal);
  line-height: 1.2;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 10px;
}

.section-tag.light {
  color: var(--color-yellow);
}

.section-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--color-teal);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.section-title.light {
  color: var(--color-white);
}

.section-subtitle {
  font-family: var(--font-subtitles);
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-grey);
  margin-bottom: 30px;
}

.section-subtitle.light {
  color: rgba(255, 255, 255, 0.8);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-headings);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-green);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  border-color: var(--color-yellow);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 190, 100, 0.35);
}

.btn-teal {
  background-color: var(--color-teal);
  color: var(--color-white);
}

.btn-teal:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  border-color: var(--color-yellow);
  transform: translateY(-2px);
}

.btn-green {
  background-color: var(--color-green);
  color: var(--color-white);
}

.btn-green:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn-white {
  background-color: var(--color-white);
  color: var(--color-teal);
}

.btn-white:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  transform: translateY(-2px);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-teal);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Shared Sticky Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--header-gradient);
  border-bottom: 0px solid var(--color-white);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

body.home-page .site-header {
  position: fixed;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

body.home-page .hero-split {
  min-height: 100vh;
}

body.home-page .site-header.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 62px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-headings);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-block;
  padding: 8px 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--color-yellow);
}

/* A slight lift on hover (no underline) */
.nav-link:hover,
.nav-link:focus-visible {
  transform: translateY(-2px);
}

.header-cta {
  margin-left: 20px;
}

.header-cta .btn {
  padding: 10px 18px;
  font-size: 0.82rem;
  white-space: nowrap;
  border: 0px solid var(--color-white);
  background-color: var(--color-teal);
  color: var(--color-white);
}

.header-cta .btn:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  border-color: var(--color-yellow);
}

/* No header animations while the window is being resized (set by main.js), so the menu doesn't flash at the breakpoint */
.is-resizing .site-header,
.is-resizing .site-header *,
.is-resizing .site-header *::before {
  transition: none !important;
}

/* Mobile Hamburger */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 26px;
  background: transparent;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

/* No blinking text cursor when the menu button or menu is clicked (e.g. with caret browsing on) */
.mobile-nav-toggle,
.main-nav,
.hero-split {
  caret-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.mobile-nav-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-nav-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Floating Social Icons
   -------------------------------------------------------------------------- */
.floating-social {
  position: fixed;
  left: 0;
  top: 35%;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--color-green);
  color: var(--color-white);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.social-pill svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.social-pill:hover {
  background-color: var(--color-teal-light);
  color: var(--color-white);
  transform: translateY(-2px);
}

.social-pill:hover svg {
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Hero Split (Homepage)
   -------------------------------------------------------------------------- */
.hero-split {
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  background-color: var(--color-teal);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 8%;
  background: linear-gradient(135deg, #005050 0%, #003e3e 100%);
  color: var(--color-white);
  z-index: 2;
  position: relative;
}

.hero-crest {
  width: 190px;
  height: auto;
  margin-bottom: 40px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 12px;
  text-align: center;
}

.hero-title span {
  color: var(--color-green);
  display: block;
}

.hero-subtitle {
  font-family: var(--font-subtitles);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 7.5px;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: 50px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-slider-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.hero-slider-wrap:active {
  cursor: grabbing;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 6s ease-out;
  transform: scale(1.08);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 80, 80, 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.hero-slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--color-white);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background-color: var(--color-green);
  width: 28px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Subpage Page Banner
   -------------------------------------------------------------------------- */
.page-banner {
  background: linear-gradient(135deg, #005050 0%, #003636 100%);
  padding: 60px 0;
  border-bottom: 5px solid var(--color-green);
  color: var(--color-white);
  text-align: center;
  position: relative;
}

.page-banner-title {
  font-size: 2.8rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 10px;
}

.page-banner-subtitle {
  font-family: var(--font-subtitles);
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: 5px;
  color: var(--color-yellow);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Values / Why Our Club Is Different
   -------------------------------------------------------------------------- */
.section-values {
  padding: 90px 0;
  background-color: var(--color-white);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 50px;
}

.values-col {
  display: contents;
}

.value-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 1;
  padding: clamp(20px, 1.2vw, 18px);
  overflow: hidden;
  background-color: var(--color-green-tint);
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  transition: background-color var(--transition);
}

.value-card:hover {
  transform: none;
}

.values-col--left .value-card:first-child {
  order: 1;
}

.values-col--left .value-card:last-child {
  order: 3;
}

.values-col--right .value-card:first-child {
  order: 6;
}

.values-col--right .value-card:last-child {
  order: 8;
}

.value-tile-photo-one {
  order: 2;
}

.value-tile-photo-two {
  order: 4;
}

.value-tile-photo-three {
  order: 5;
}

.value-tile-photo-four {
  order: 7;
}

.values-photo-tile {
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
}

.values-photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.value-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.value-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  flex-shrink: 0;
}

.value-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.value-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-teal);
}

.value-text {
  font-size: var(--font-size-content);
  color: #4a5568;
  line-height: var(--line-height-content);
}

.value-card .value-title {
  text-transform: capitalize;
  font-size: 1.5rem;
}

.value-card .value-card-header {
  gap: 8px;
  margin-bottom: 8px;
}

.value-card .value-icon {
  width: 30px;
  height: 30px;
}

.value-card .value-text {
  font-size: var(--font-size-content);
  line-height: var(--line-height-content);
}

.values-center-image {
  text-align: center;
}

.values-center-image img {
  width: 100%;
  border-radius: 15px;
  border: 5px solid var(--color-white);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 1/1.1;
}

/* --------------------------------------------------------------------------
   What We Stand For Section
   -------------------------------------------------------------------------- */
.section-stand-for {
  padding: 70px 0;
  background: linear-gradient(135deg, #005050 0%, #004141 100%);
  color: var(--color-white);
}

.stand-for-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 40px;
}

.stand-for-carousel {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.stand-for-carousel:active {
  cursor: grabbing;
}

.stand-for-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: opacity 0.8s ease, left 0.8s ease;
}

.stand-for-slide.active {
  opacity: 1;
}

.stand-for-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 54, 54, 0.35);
  color: var(--color-white);
  cursor: pointer;
  transform: translateY(-50%);
}

.stand-for-carousel-control:hover {
  background: var(--color-green);
}

.stand-for-carousel-prev {
  left: 16px;
}

.stand-for-carousel-next {
  right: 16px;
}

.stand-for-carousel-dots {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.stand-for-carousel-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-white);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.stand-for-carousel-dot.active {
  background: var(--color-green);
  width: 28px;
  border-radius: 8px;
}

.stand-for-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
  min-width: 0;
  box-shadow: var(--shadow-md);
}

.stand-for-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 24px;
}

.stand-for-highlight {
  font-family: var(--font-headings);
  font-weight: 800;
  color: var(--color-yellow);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   Member Benefits (Section)
   -------------------------------------------------------------------------- */
.section-benefits {
  padding: 90px 0;
  background-color: var(--color-grey-light);
}

.benefits-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 40px;
}

.benefits-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-white);
}

.benefits-image-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.benefits-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--header-gradient);
  color: var(--color-white);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--color-white);
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 20px;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-left: 4px solid var(--color-green);
}

.benefit-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--color-teal);
}

.benefit-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-green);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.benefit-check svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.benefit-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-teal);
}

/* --------------------------------------------------------------------------
   Sponsors & Partners Sections
   -------------------------------------------------------------------------- */
.section-sponsors {
  padding: 70px;
  background-color: #f0f2f5;
  border-top: 1px solid var(--color-grey-border);
}

.section-partners {
  padding: 70px;
  background: linear-gradient(135deg, #005050 0%, #003e3e 100%);
  color: var(--color-white);
}

.sponsors-partners-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sponsors-partners-layout > section {
  min-width: 0;
}

.logo-carousel {
  --logo-visible-count: 3;
  overflow: hidden;
  margin-top: 36px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.logo-carousel:active {
  cursor: grabbing;
}

.logo-carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.65s ease;
  will-change: transform;
}

.logo-carousel-slide {
  display: grid;
  flex: 0 0 calc(100% / var(--logo-visible-count));
  min-width: 0;
  place-items: center;
  padding: 0 24px;
}

.logo-carousel-slide img {
  display: block;
  width: min(100%, 180px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  -webkit-user-drag: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-teal-dark);
  color: var(--color-white);
  padding-top: 70px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-widget-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--color-green);
  border-radius: 2px;
}

.strava-wrap {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: stretch;
}

.strava-wrap iframe {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background-color: #ffffff;
  max-width: 100%;
}

.instagram-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  width: 100%;
}

.instagram-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  margin-bottom: 18px;
}

.instagram-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.instagram-handle {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 8px;
}

.instagram-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Latest Instagram posts (images are copies kept on this server; see project-notes.md) */
.instagram-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.instagram-feed[hidden] {
  display: none;
}

.instagram-post {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.08);
}

.instagram-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.instagram-post:hover img {
  transform: scale(1.06);
}

.instagram-post-type {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  color: var(--color-white);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.instagram-post-type svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Once the posts are showing, the big "Follow" card shrinks to one row under them:
   the handle on the left, the button on the right. Without a feed, the full card shows. */
.instagram-feed:not([hidden]) + .instagram-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
}

.instagram-feed:not([hidden]) + .instagram-card .instagram-icon,
.instagram-feed:not([hidden]) + .instagram-card .instagram-desc {
  display: none;
}

.instagram-feed:not([hidden]) + .instagram-card .instagram-handle {
  margin: 0;
  font-size: 1.1rem;
}

/* Footer quick links */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-nav a.active,
.footer-nav a:hover {
  color: var(--color-yellow);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-bottom {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  font-size: inherit;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-links a:hover {
  color: var(--color-yellow);
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-teal);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: var(--transition);
}

.back-to-top:hover {
  background-color: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
  transform: translateY(-2px);
}

/* Desktop: the button floats in the bottom-right corner once the visitor has scrolled down a screen (main.js adds .is-shown).
   Tablets and phones keep it in the footer. */
@media (min-width: 1025px) {
  .back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 998;
    padding: 13px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s, background-color 0.25s ease, border-color 0.25s ease;
  }

  .back-to-top.is-shown {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.25s ease, border-color 0.25s ease;
  }

  .back-to-top.is-shown:hover,
  .back-to-top.is-docked:hover {
    transform: translateY(-2px);
  }

  /* Keeps the button's footer spot free while it floats, so Privacy Policy doesn't shift when it settles back in */
  .footer-links:has(.back-to-top:not(.is-docked)) {
    padding-right: 52px;
  }

  /* At the bottom of the page it settles back into its footer spot, so it never covers the footer text */
  .back-to-top.is-docked {
    position: static;
    padding: 8px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  }
}

/* --------------------------------------------------------------------------
   More Info Page Styles
   -------------------------------------------------------------------------- */
.more-info-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--color-grey-border);
}

.more-info-section:nth-child(even) {
  background-color: var(--color-grey-light);
}

.info-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.info-block.reverse {
  direction: rtl;
}

.info-block.reverse .info-text {
  direction: ltr;
}

.info-block.reverse .info-image {
  direction: ltr;
}

.info-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--color-white);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.info-text p {
  font-size: var(--font-size-content);
  line-height: var(--line-height-content);
  color: #3f4753;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Training Page Styles
   -------------------------------------------------------------------------- */
.training-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.training-feature-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-grey-border);
  border-top: 5px solid var(--color-green);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.training-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--color-teal);
}

.feature-card-image {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.training-feature-card h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: var(--color-teal);
}

.training-feature-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.training-feature-card li {
  position: relative;
  padding-left: 22px;
  font-size: var(--font-size-content);
  color: #4a5568;
  line-height: var(--line-height-content);
}

.training-feature-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-green);
  font-weight: bold;
}

/* Routes Directory */
.routes-section {
  padding: 80px 0;
  background-color: var(--color-grey-light);
}

.training-cta-banner {
  margin-top: 60px;
  padding: 50px 30px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(0, 80, 80, 0.86) 0%, rgba(0, 54, 54, 0.7) 100%),
    url('../assets/gallery/general/8e9f7baf-cc08-4558-8b02-f7d154367d6d.jpg') center 48% / cover no-repeat;
  color: #fff;
  text-align: center;
}

.training-cta-banner h2,
.training-cta-banner h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 2rem;
  text-transform: uppercase;
}

.training-cta-banner p {
  max-width: 600px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

.routes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.routes-search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.routes-search-input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  border: 2px solid var(--color-grey-border);
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  background-color: var(--color-white);
  transition: var(--transition);
}

.routes-search-input:focus {
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px var(--color-green-tint);
}

.routes-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-grey);
}

.routes-count-badge {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-teal);
  background: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-grey-border);
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.routes-loading {
  grid-column: 1 / -1;
  color: #4a5568;
}

.route-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-grey-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
}

.route-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-green);
  box-shadow: var(--shadow-md);
}

.route-card-info {
  display: flex;
  align-items: top;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.route-pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-teal-tint);
  color: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.route-pin svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.route-title {
  font-family: var(--font-headings);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-teal);
  line-height: 1.3;
  white-space: pre-line;
}

.route-card-details {
  min-width: 0;
}

.route-file-size {
  display: block;
  font-size: 0.78rem;
  color: #888;
}

.route-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.route-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.route-view-btn {
  background-color: var(--color-teal);
}

.route-download-btn {
  background-color: var(--color-green);
}

.route-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.route-action-btn:hover {
  background-color: var(--color-yellow);
  color: var(--color-teal-dark);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Gallery Hub & Album Pages
   -------------------------------------------------------------------------- */
.gallery-albums-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.gallery-loading {
  grid-column: 1 / -1;
  color: #4a5568;
  text-align: center;
}

.album-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-grey-border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-green);
}

.album-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: #eee;
}

.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.album-card:hover .album-cover-img {
  transform: scale(1.06);
}

.album-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background-color: rgba(0, 80, 80, 0.85);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.album-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.album-title {
  font-size: 1.25rem;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 10px;
}

.album-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-green);
  text-transform: uppercase;
}

.album-card:hover .album-cta {
  color: var(--color-teal);
}

/* Photos Grid Inside Album */
.album-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
  border-bottom: 0px solid var(--color-grey-border);
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}


.photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 60px;
}

.album-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: #4a5568;
}

.photo-item {
  display: block;
  position: relative;
  aspect-ratio: 3/2;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background-color: #ddd;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.photo-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-item:hover img {
  transform: scale(1.08);
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 80, 80, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: var(--transition);
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.lightbox-content:active {
  cursor: grabbing;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: var(--color-green);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  font-size: 24px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* --------------------------------------------------------------------------
   Downloads Page
   -------------------------------------------------------------------------- */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.download-card {
  min-width: 0;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  border: 1px solid var(--color-grey-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition);
}

.download-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-green);
  box-shadow: var(--shadow-md);
}

.download-card-info {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.download-card-info>div {
  min-width: 0;
}

.download-card>.btn {
  flex-shrink: 0;
}

.doc-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--color-teal-tint);
  color: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.doc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-teal);
  margin-bottom: 4px;
}

.doc-type {
  font-size: 0.8rem;
  color: var(--color-grey);
  text-transform: uppercase;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Contact Page
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 50px;
  margin-bottom: 80px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-person-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 10px 24px;
  border-left: 4px solid var(--color-green);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-grey-border);
  border-left-width: 4px;
  transition: var(--transition);
}

.contact-person-card:hover {
  transform: translateX(4px);
  border-left-color: var(--color-green);
  box-shadow: var(--shadow-md);
}

.contact-person-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-teal);
  margin-bottom: 2px;
}

.contact-person-role {
  font-size: 0.85rem;
  color: var(--color-grey);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-person-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-green);
}

.contact-person-phone:hover {
  color: var(--color-teal);
}

.contact-form-card {
  background-color: var(--color-grey-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-grey-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-grey-border);
  background-color: var(--color-white);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px var(--color-green-tint);
}

.contact-form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form-status {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.contact-form-status[data-state="success"] {
  color: #155724;
  background-color: #d4edda;
}

.contact-form-status[data-state="error"] {
  color: #721c24;
  background-color: #f8d7da;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.contact-form-privacy {
  margin: -6px 0 18px;
  font-size: 0.88rem;
  color: #5a6470;
}

.contact-form-privacy a {
  color: var(--color-teal);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   FAQ page
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 70px 0 90px;
  background-color: var(--color-grey-light);
}

.faq-group {
  max-width: 860px;
  margin: 0 auto 50px;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.faq-group-title {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--color-teal);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--color-green);
  display: inline-block;
}

.faq-list {
  display: grid;
  gap: 14px;
}

/* "Questions? See our FAQs" link at the bottom of the Training page */
.faq-teaser {
  max-width: 860px;
  margin: 60px auto 0;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--color-white);
  border: 1px solid var(--color-grey-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.faq-teaser p {
  margin: 0;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-teal);
}

.faq-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-grey-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-teal);
  list-style-position: inside;
}

.faq-item[open] summary {
  color: var(--color-green-dark);
}

.faq-answer {
  padding: 0 22px 20px;
}

.faq-answer a {
  color: var(--color-teal);
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Privacy Policy Page
   -------------------------------------------------------------------------- */
.policy-content {
  padding: 70px 0;
  max-width: 860px;
  margin: 0 auto;
}

.policy-block {
  margin-bottom: 32px;
}

.policy-block a {
  color: var(--color-green-dark);
  font-weight: 600;
  text-decoration: underline;
}

.policy-block h2,
.policy-block h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--color-teal);
}

.policy-block p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .logo-carousel {
    --logo-visible-count: 3;
  }

  .stand-for-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .stand-for-carousel {
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 60px 24px;
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-slider-wrap {
    height: 400px;
    min-height: 400px;
  }

  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .values-col--right .value-card:first-child {
    order: 5;
  }

  .values-col--left .value-card:last-child {
    order: 4;
  }

  .values-col--right .value-card:last-child {
    order: 8;
  }

  .value-tile-photo-two {
    order: 6;
  }

  .value-tile-photo-three {
    order: 3;
  }

  .value-tile-photo-four {
    order: 7;
  }

  .benefits-layout {
    grid-template-columns: 1fr;
  }

  .training-cards-grid {
    grid-template-columns: 1fr;
  }

  .photos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-albums-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-block,
  .info-block.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .more-info-section .info-text {
    text-align: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .stand-for-carousel {
    aspect-ratio: 3 / 2;
  }

  .stand-for-slide {
    position: absolute;
    inset: 0 auto 0 0;
    width: 50%;
    height: 100%;
  }

  
  .section-sponsors {
    padding: 70px 0;
  }

  .section-partners {
    padding: 70px 0;
  }
}

/* Menu switches to the hamburger at tablet width, before the links run out of room */
@media (max-width: 1024px) {
  .mobile-nav-toggle {
    display: flex;
    flex: 0 0 32px;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-teal);
    flex-direction: column;
    padding: 24px;
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  /* No lift in the dropdown: the full-width rows would just shift */
  .nav-link:hover,
  .nav-link:focus-visible {
    transform: none;
  }

  /* Dims the page behind the open menu (the header sits above it) */
  body.nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 25, 25, 0.6);
  }

  .header-cta {
    margin: 22px 0 4px;
    text-align: center;
  }

  .header-cta .btn {
    min-width: 200px;
    background-color: var(--color-green);
  }
}

@media (max-width: 768px) {
  body.home-page .site-header {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    position: fixed;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
  }

  body.home-page .site-header::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--header-gradient);
    content: '';
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  body.home-page .header-inner {
    position: relative;
    z-index: 1;
  }

  body.home-page .site-header.is-visible {
    pointer-events: auto;
    border-color: var(--color-white);
    box-shadow: var(--shadow-sm);
  }

  body.home-page .site-header.is-visible::before {
    opacity: 1;
  }

  body.home-page .site-header .logo-link {
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  body.home-page .site-header.is-visible .logo-link {
    opacity: 1;
  }

  body.home-page .mobile-nav-toggle {
    pointer-events: auto;
  }

  body.home-page .site-header:not(.is-visible) .main-nav.open {
    pointer-events: auto;
  }

  .floating-social {
    display: none;
    /* Hide on mobile so it doesn't obstruct view, icons accessible in footer */
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-actions {
    justify-content: center;
    width: 100%;
  }

  .section-tag {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-sponsors {
    padding: 70px 0;
  }

  .section-partners {
    padding: 70px 0;
  }

  .logo-carousel {
    --logo-visible-count: 1;
  }

  .logo-carousel-slide {
    padding: 0 12px;
  }

  .logo-carousel-slide img {
    width: min(100%, 240px);
  }

  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-albums-grid {
    grid-template-columns: 1fr;
  }

  .downloads-grid {
    grid-template-columns: 1fr;
  }

  body.downloads-page .download-card {
    flex-direction: column;
    align-items: stretch;
  }

  body.downloads-page .download-card>.btn {
    align-self: center;
  }

  /* FAQ group headings centred on phones (the questions stay left-aligned) */
  .faq-group-title {
    display: table;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  /* Strava and Instagram headings centred on phones (the feeds themselves stay full width) */
  .footer-widget-title {
    display: table;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-widget-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* The @cipressacycling / Follow row under the posts: stacked and centred */
  .instagram-feed:not([hidden]) + .instagram-card {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  /* Footer links, contact details and copyright centred on phones */
  .footer-nav {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav ul,
  .footer-contact {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .back-to-top {
    align-self: center;
  }

  .value-card .value-title {
    font-size: 1.8rem;
  }

  /* Value boxes (Respect, Accountability...) centred on phones */
  .value-card {
    text-align: center;
  }

  .value-card .value-card-header {
    justify-content: center;
  }

  /* Album pages: "Back to Albums" and the photo count centred on phones */
  .album-header-bar {
    flex-direction: column;
    justify-content: center;
  }

  .contact-form-card {
  padding: 30px 20px;
}
}

@media (max-width: 600px) {
  .values-grid {
    grid-template-columns: 1fr;
  }

  .value-card {
    aspect-ratio: auto;
  }

  .values-col--left .value-card:first-child {
    order: 1;
  }

  .value-tile-photo-one {
    order: 2;
  }

  .values-col--left .value-card:last-child {
    order: 3;
  }

  .value-tile-photo-two {
    order: 4;
  }

  .values-col--right .value-card:first-child {
    order: 5;
  }

  .value-tile-photo-three {
    order: 6;
  }

  .values-col--right .value-card:last-child {
    order: 7;
  }

  .value-tile-photo-four {
    order: 8;
  }

  .sponsors-partners-layout {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}