/*  TCB Selous Marathon - Material Design 3 inspired theme */
/* Colours: Selous reserve green, warm amber, sand/cream surfaces */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  /* Primary: Selous reserve / wilderness */
  --md-sys-color-primary: #1B5E20;
  --md-sys-color-primary-container: #A5D6A7;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-on-primary-container: #00210B;
  /* Secondary: Marathon / energy / African sun */
  --md-sys-color-secondary: #E65100;
  --md-sys-color-secondary-container: #FFCCBC;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-on-secondary-container: #2C1600;
  /* Surface */
  --md-sys-color-surface: #FDFBF7;
  --md-sys-color-surface-dim: #F5F0E8;
  --md-sys-color-surface-bright: #FDFBF7;
  --md-sys-color-surface-container: #F0EBE3;
  --md-sys-color-on-surface: #1C1B18;
  --md-sys-color-on-surface-variant: #4A4639;
  --md-sys-color-outline: #7A7565;
  --md-sys-color-outline-variant: #CAC4B4;
  /* Elevation */
  --md-sys-color-surface-1: #F8F6F0;
  --md-sys-color-surface-2: #F3EFE8;
  --md-sys-color-surface-3: #EDE9E0;
  --md-sys-color-surface-4: #EBE6DC;
  --md-sys-color-surface-5: #E6E1D6;
  /* State */
  --md-sys-color-error: #BA1A1A;
  --md-sys-color-on-error: #FFFFFF;
  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  /* Shape */
  --shape-corner-extra-small: 4px;
  --shape-corner-small: 8px;
  --shape-corner-medium: 12px;
  --shape-corner-large: 16px;
  --shape-corner-extra-large: 28px;
  --shape-corner-full: 9999px;
  /* Elevation */
  --elevation-1: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .08);
  --elevation-2: 0 2px 6px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .08);
  --elevation-3: 0 4px 12px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .10);
  --elevation-4: 0 8px 24px rgba(0, 0, 0, .08), 0 16px 48px rgba(0, 0, 0, .12);
  /* Paragraph typography (consistent across all pages) */
  --p-font-size: 1rem;
  --p-line-height: 1.6;
  --p-lead-font-size: 1.0625rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface);
  background-color: var(--md-sys-color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base paragraph: same font-size & format across all pages */
p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  text-align: justify;
  margin: 0 0 1em;
  color: var(--md-sys-color-on-surface-variant);
}

p:last-child {
  margin-bottom: 0;
}

/* ----- Layout ----- */
.marathon-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----- Top app bar (Material) ----- */
.marathon-app-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--md-sys-color-surface);
  box-shadow: var(--elevation-1);
}

.marathon-app-bar .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.marathon-app-bar .logo-img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.marathon-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.marathon-nav a {
  padding: 10px 16px;
  border-radius: var(--shape-corner-full);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: background .2s, color .2s;
}

.marathon-nav a:hover,
.marathon-nav a:focus-visible {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.marathon-nav a.active {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

.marathon-nav a.active:hover,
.marathon-nav a.active:focus-visible {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.marathon-nav .btn-register {
  background: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
}

.marathon-nav .btn-register:hover,
.marathon-nav .btn-register:focus-visible {
  background: #D84300;
  color: #fff;
  filter: brightness(1.05);
}

.marathon-nav .btn-register.active {
  background: #D84300;
  color: #fff;
  box-shadow: 0 0 0 2px var(--md-sys-color-secondary);
}

.marathon-social-icon {
  padding: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
}

.marathon-social-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.marathon-social-icon:hover svg,
.marathon-social-icon:focus-visible svg {
  transform: scale(1.15);
}

.marathon-menu-toggle {
  display: none;
  padding: 8px;
  border: none;
  border-radius: var(--shape-corner-small);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  font-size: 1.5rem;
}

/* ----- Hero ----- */
.marathon-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72vh;
  padding: 64px 24px;
  background: linear-gradient(145deg, var(--md-sys-color-surface-3) 0%, var(--md-sys-color-surface-dim) 50%, rgba(27, 94, 32, 0.08) 100%);
  overflow: hidden;
}

.marathon-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(27, 94, 32, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.marathon-hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.marathon-hero .eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: var(--shape-corner-full);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.marathon-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 16px;
}

.marathon-hero h1 .accent {
  color: var(--md-sys-color-primary);
}

.marathon-hero .tagline {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 32px;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* Race date + countdown block on hero */
.marathon-hero-race-info {
  margin: 32px auto 40px;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.marathon-race-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 24px 22px;
  background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, #c8e6c9 100%);
  border-radius: var(--shape-corner-large);
  border: 1px solid rgba(27, 94, 32, 0.18);
  box-shadow: var(--elevation-2);
  position: relative;
  overflow: hidden;
}

.marathon-race-date::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
}

.marathon-race-date__icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.marathon-race-date__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--md-sys-color-on-primary-container);
  opacity: 0.85;
  margin-bottom: 6px;
}

.marathon-race-date__value {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--md-sys-color-primary);
  letter-spacing: 0.01em;
}

.marathon-race-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 16px;
}

.marathon-race-divider__line {
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--md-sys-color-outline-variant), transparent);
}

.marathon-race-divider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-sys-color-secondary);
  box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.15);
  flex-shrink: 0;
}

/* Countdown: days until race day */
.marathon-countdown {
  margin: 0;
  padding: 20px 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  border: 1px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--elevation-1);
  width: 100%;
}

.marathon-countdown-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 16px;
}

.marathon-countdown-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.marathon-countdown-item {
  flex: 1 1 0;
  min-width: 0;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-medium);
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-countdown-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--md-sys-color-primary);
}

.marathon-countdown-unit {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--md-sys-color-on-surface-variant);
  margin-top: 4px;
}

@media (max-width: 500px) {
  .marathon-hero-race-info {
    max-width: 100%;
  }

  .marathon-race-date {
    padding: 16px 18px 18px;
  }

  .marathon-race-date__value {
    font-size: 1.375rem;
  }

  .marathon-countdown {
    padding: 16px 12px 14px;
  }

  .marathon-countdown-grid {
    gap: 8px;
  }

  .marathon-countdown-item {
    padding: 12px 6px;
  }

  .marathon-countdown-value {
    font-size: 1.375rem;
  }

  .marathon-countdown-unit {
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
  }
}

.marathon-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Hero split: two columns — left content, right image slider */
.marathon-hero--split {
  padding: 48px 24px 64px;
}

.marathon-hero--split .marathon-hero-inner {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 48px;
  align-items: center;
  /* max-width: 1200px; */
  margin: 0 auto;
  width: 100%;
}

.marathon-hero--split .marathon-hero-left {
  min-width: 0;
}

.marathon-hero--split .marathon-hero-content {
  text-align: center;
  max-width: none;
}

.marathon-hero--split .marathon-hero-actions {
  justify-content: center;
}

.marathon-hero--split .marathon-hero-right {
  min-width: 0;
  position: relative;
}

/* Right-side image slider — best design */
.marathon-hero-slider {
  position: relative;
  border-radius: var(--shape-corner-extra-large);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(27, 94, 32, 0.12);
  aspect-ratio: 4/3;
  min-height: 300px;
  background: var(--md-sys-color-surface-container);
}

.marathon-hero-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.marathon-hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 20px;
}

.marathon-hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 45%, transparent 70%);
  pointer-events: none;
}

.marathon-hero-slide-caption {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.02em;
}

/* Slider dots */
.marathon-hero-slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.marathon-hero-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.2s;
}

.marathon-hero-slider-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.marathon-hero-slider-dot.is-active {
  background: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Slider arrows */
.marathon-hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--md-sys-color-on-surface);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.marathon-hero-slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.marathon-hero-slider-arrow--prev {
  left: 14px;
}

.marathon-hero-slider-arrow--next {
  right: 14px;
}

@media (max-width: 900px) {
  .marathon-hero--split .marathon-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .marathon-hero--split .marathon-hero-right {
    order: -1;
  }

  .marathon-hero--split .marathon-hero-content {
    text-align: center;
  }

  .marathon-hero--split .marathon-hero-actions {
    justify-content: center;
  }

  .marathon-hero-slider {
    aspect-ratio: 16/10;
    min-height: 240px;
  }
}

/* ----- Buttons (Material) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--shape-corner-full);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow .2s, transform .15s, background .2s;
}

.btn:focus-visible {
  outline: 2px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

.btn-filled {
  background: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
  box-shadow: var(--elevation-1);
}

.btn-filled:hover {
  box-shadow: var(--elevation-2);
  background: #D84300;
}

.btn-outline {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 2px solid var(--md-sys-color-primary);
}

.btn-outline:hover {
  background: rgba(27, 94, 32, 0.08);
}

/* ----- Sections ----- */
.marathon-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.marathon-section--alt {
  background: var(--md-sys-color-surface-1);
}

.marathon-section--full {
  max-width: none;
  width: 100%;
}

.marathon-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 8px;
}

.marathon-section-subtitle {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 40px;
  max-width: 560px;
}

.marathon-section-title--centered {
  text-align: center;
}

.marathon-section-subtitle--centered {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

/* ----- Cards (Material surface + elevation) ----- */
.marathon-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.marathon-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  padding: 24px;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: box-shadow .2s, transform .15s;
}

.marathon-card:hover {
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}

.marathon-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--shape-corner-medium);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.marathon-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 8px;
  color: var(--md-sys-color-on-surface);
}

.marathon-card .card-meta {
  font-size: 0.875rem;
  color: var(--md-sys-color-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.marathon-card p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

/* ----- Home: Vision & Mission cards ----- */
.marathon-vision-mission-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.marathon-vm-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .2s ease;
}

.marathon-vm-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-4px);
}

.marathon-vm-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.marathon-vm-card--vision .marathon-vm-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-vm-card--mission .marathon-vm-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-vm-card-inner {
  padding: 32px 28px 36px;
}

.marathon-vm-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.marathon-vm-card-heading .marathon-vm-card-icon {
  margin: 0;
  order: 1;
}

.marathon-vm-card-heading .marathon-vm-card-title {
  margin: 0;
  order: 2;
  flex: 1;
}

.marathon-vm-card-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.marathon-vm-card--vision .marathon-vm-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-vm-card--mission .marathon-vm-card-icon {
  background: var(--md-sys-color-secondary-container);
}

.marathon-vm-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 12px;
}

.marathon-vm-card-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

@media (max-width: 700px) {
  .marathon-vision-mission-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }

  .marathon-vm-card-inner {
    padding: 24px 20px 28px;
  }
}

/* ----- About block ----- */
.marathon-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.marathon-about-grid .marathon-section-title {
  margin-bottom: 16px;
}

.marathon-about-grid p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 1em;
}

.marathon-about-visual {
  border-radius: var(--shape-corner-large);
  background: linear-gradient(135deg, var(--md-sys-color-surface-3) 0%, var(--md-sys-color-primary-container) 100%);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary);
  font-size: 4rem;
  opacity: 0.9;
}

/* ----- CTA strip ----- */
.marathon-cta {
  padding: 64px 24px;
  text-align: center;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.marathon-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 12px;
}

.marathon-cta p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  margin: 0 0 24px;
  opacity: 0.95;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.marathon-cta .btn {
  background: var(--md-sys-color-on-primary);
  color: var(--md-sys-color-primary);
}

.marathon-cta .btn:hover {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

/* ----- About page: page hero, prose, lists ----- */
.marathon-hero--page {
  min-height: 42vh;
  padding: 48px 24px;
}

/* About page: compact layout (less empty space) */
.marathon-about-page .marathon-hero--about-compact {
  min-height: 28vh;
  padding: 32px 24px 28px;
}

.marathon-about-page .marathon-hero--about-compact .tagline {
  margin-top: 8px;
}

.marathon-page-cards--compact {
  padding-bottom: 0;
}

.marathon-about-page .marathon-section--compact {
  padding: 32px 24px 36px;
  max-width: 1250px !important;
  margin: 0 auto;
}

.marathon-about-page .marathon-section--compact:last-of-type {
  padding-bottom: 40px;
}

.marathon-about-page .marathon-section-title--compact {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.marathon-about-page .marathon-section-subtitle--compact {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  margin-bottom: 20px;
}

.marathon-about-page .marathon-page-card--compact .marathon-page-card-header {
  padding: 20px 24px 14px;
}

.marathon-about-page .marathon-page-card--compact .marathon-page-card-body {
  padding: 20px 24px 24px;
}

.marathon-about-page .marathon-page-card--compact.marathon-page-card--featured .marathon-page-card-body {
  padding: 24px 28px 28px;
}

.marathon-page-card-body__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
  align-items: start;
}

.marathon-page-card-body__content {
  min-width: 0;
}

.marathon-page-card-body__image {
  min-width: 0;
  position: relative;
}

.marathon-page-card-body-img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--shape-corner-large);
  box-shadow: var(--elevation-2);
  display: block;
}

@media (max-width: 768px) {
  .marathon-page-card-body__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .marathon-page-card-body__image {
    order: -1;
  }

  .marathon-page-card-body-img {
    max-height: 260px;
  }
}

.marathon-about-page .marathon-page-card--compact .marathon-page-card-body p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  margin-bottom: 1em;
}

.marathon-about-page .marathon-page-card--compact .marathon-page-card-icon {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}

.marathon-about-page .marathon-page-card--compact .marathon-page-card-title {
  font-size: 1.25rem;
}

.marathon-about-page .marathon-highlight--card {
  margin-top: 18px;
  padding: 18px 22px;
}

.marathon-highlight--full {
  width: 100%;
  margin-top: 24px;
  margin-bottom: 0;
  padding: 20px 24px;
  box-sizing: border-box;
}

.marathon-highlight-desc--tick {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.marathon-tick,
.marathon-run-icon {
  color: var(--md-sys-color-primary);
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.marathon-run-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.marathon-about-page .marathon-about-cards--beautiful {
  gap: 20px;
  margin-top: 16px;
}

.marathon-about-page .marathon-about-cards--beautiful .marathon-about-card {
  padding: 20px 22px 22px;
  padding-top: 24px;
}

.marathon-about-page .marathon-about-card-header {
  margin-bottom: 14px;
}

.marathon-about-page .marathon-key-info--card {
  margin-bottom: 20px;
  padding: 16px 0;
}

.marathon-about-page .marathon-cta--compact {
  padding: 40px 24px 48px;
}

.marathon-about-page .marathon-cta--compact h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.marathon-about-page .marathon-cta--compact p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  margin-bottom: 18px;
}

.marathon-about-page .marathon-list li {
  margin-bottom: 6px;
}

.marathon-about-page .marathon-landmarks {
  margin-top: 16px;
  gap: 8px;
}

.marathon-about-page .marathon-landmark-tag {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.marathon-prose {
  max-width: 720px;
  margin: 0 auto;
}

.marathon-prose p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 1.25em;
}

.marathon-prose p:last-child {
  margin-bottom: 0;
}

.marathon-lead {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface) !important;
}

.marathon-prose--center {
  text-align: center;
}

.marathon-prose--center p {
  margin-left: auto;
  margin-right: auto;
}

.marathon-highlight {
  margin: 32px 0 0;
  padding: 24px 28px;
  border-radius: var(--shape-corner-large);
  background: var(--md-sys-color-surface-2);
  border-left: 4px solid var(--md-sys-color-secondary);
}

.marathon-highlight-quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface) !important;
  margin: 0 0 4px !important;
}

.marathon-highlight-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant) !important;
  margin: 0 !important;
}

.marathon-highlight--card {
  margin-top: 24px;
  margin-bottom: 0;
}

/* ----- About page: full-width content cards ----- */
.marathon-page-cards {
  width: 100%;
}

.marathon-page-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  transition: box-shadow .25s ease, transform .2s ease;
  position: relative;
}

.marathon-page-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-3px);
}

.marathon-page-card--featured {
  border-top: 4px solid var(--md-sys-color-secondary);
}

.marathon-page-card--featured:hover {
  border-top-color: #D84300;
}

.marathon-page-card--landmarks {
  border-top: 4px solid var(--md-sys-color-primary);
}

.marathon-page-card--community {
  border-top: 4px solid var(--md-sys-color-secondary);
}

.marathon-page-card--event {
  border-top: 4px solid var(--md-sys-color-primary);
}

.marathon-page-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 28px 32px 16px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-page-card-body {
  padding: 28px 32px 32px;
}

.marathon-page-card-body p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 1.25em;
}

.marathon-page-card-body p:last-child {
  margin-bottom: 0;
}

.marathon-page-card-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  background: var(--md-sys-color-primary-container);
  font-size: 1.75rem;
}

.marathon-page-card-icon--calendar {
  background: var(--md-sys-color-secondary-container);
}

.marathon-page-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0;
}

.marathon-page-card-subtitle {
  flex-basis: 100%;
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 4px 0 0;
  padding-left: 0;
}

.marathon-page-card--featured .marathon-page-card-body {
  padding: 32px 36px 36px;
}

/* 
.marathon-page-card--featured .marathon-lead,
.marathon-page-card--featured p {
  max-width: 680px;
} */
marathon-highlight-desc .marathon-key-info--card {
  margin-bottom: 28px;
  padding: 20px 0;
  border-top: none;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-prose--card p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  margin-bottom: 1em;
}

.marathon-prose--card p:last-child {
  margin-bottom: 0;
}

/* About page: beautiful race category cards */
.marathon-about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.marathon-about-cards--beautiful {
  gap: 28px;
}

.marathon-about-cards--beautiful .marathon-about-card {
  border-radius: var(--shape-corner-extra-large);
  box-shadow: var(--elevation-2);
  padding-top: 32px;
  transition: box-shadow .25s ease, transform .2s ease;
}

.marathon-about-cards--beautiful .marathon-about-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-4px);
}

.marathon-about-cards--stack {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.marathon-about-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  padding: 28px;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  position: relative;
  overflow: hidden;
}

.marathon-about-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--md-sys-color-primary);
}

.marathon-about-card--road .marathon-about-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-about-card--trail .marathon-about-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-about-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.marathon-about-card-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-medium);
  background: var(--md-sys-color-primary-container);
  font-size: 1.5rem;
}

.marathon-about-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.marathon-about-card-desc {
  flex-basis: 100%;
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 4px 0 0;
}

.marathon-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.marathon-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.5;
}

.marathon-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--md-sys-color-secondary);
}

.marathon-list li strong {
  color: var(--md-sys-color-on-surface);
}

/* Landmarks tags */
.marathon-landmarks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.marathon-landmark-tag {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--shape-corner-full);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Key info block */
.marathon-key-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  margin-bottom: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-key-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.marathon-key-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface-variant);
}

.marathon-key-info-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--md-sys-color-primary);
}

/* ----- Contact page ----- */
.marathon-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.marathon-contact-card {
  display: block;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  padding: 28px;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .15s, border-color .2s;
}

.marathon-contact-card:hover {
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
  border-color: var(--md-sys-color-primary);
}

.marathon-contact-card--plain {
  cursor: default;
}

.marathon-contact-card--plain:hover {
  transform: none;
  border-color: var(--md-sys-color-outline-variant);
}

.marathon-contact-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-medium);
  background: var(--md-sys-color-primary-container);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.marathon-contact-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 6px;
  color: var(--md-sys-color-on-surface);
}

.marathon-contact-value {
  font-size: 1rem;
  color: var(--md-sys-color-primary);
  font-weight: 600;
  margin: 0;
  word-break: break-word;
}

.marathon-quick-links {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.marathon-quick-links a {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--shape-corner-small);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: background .2s, border-color .2s;
}

.marathon-quick-links a:hover {
  background: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.marathon-contact-social {
  padding: 48px 24px;
}

.marathon-contact-social-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.marathon-powered-by {
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

.marathon-powered-link {
  color: var(--md-sys-color-primary);
  font-weight: 600;
  text-decoration: none;
}

.marathon-powered-link:hover {
  text-decoration: underline;
}

.marathon-social-links {
  display: flex;
  gap: 12px;
}

.marathon-social-link {
  padding: 8px 16px;
  border-radius: var(--shape-corner-full);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: background .2s, color .2s, border-color .2s;
}

.marathon-social-link:hover {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}

/* Contact page: social link cards */
.marathon-contact-social-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 16px;
  width: 100%;
}

.marathon-social-links--cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  justify-content: center;
}

.marathon-social-link-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--shape-corner-large);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface-variant);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s, color 0.2s, background 0.2s;
  box-shadow: var(--elevation-1);
}

.marathon-social-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-3);
  border-color: transparent;
}

.marathon-social-link-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--shape-corner-medium);
  flex-shrink: 0;
}

.marathon-social-link-card-icon svg {
  width: 24px;
  height: 24px;
}

.marathon-social-link-card--facebook:hover {
  background: #1877F2;
  color: #fff;
}

.marathon-social-link-card--facebook .marathon-social-link-card-icon {
  background: rgba(24, 119, 242, 0.12);
  color: #1877F2;
}

.marathon-social-link-card--facebook:hover .marathon-social-link-card-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.marathon-social-link-card--instagram:hover {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
}

.marathon-social-link-card--instagram .marathon-social-link-card-icon {
  background: rgba(225, 48, 108, 0.12);
  color: #e1306c;
}

.marathon-social-link-card--instagram:hover .marathon-social-link-card-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.marathon-social-link-card--youtube:hover {
  background: #FF0000;
  color: #fff;
}

.marathon-social-link-card--youtube .marathon-social-link-card-icon {
  background: rgba(255, 0, 0, 0.12);
  color: #FF0000;
}

.marathon-social-link-card--youtube:hover .marathon-social-link-card-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.marathon-social-link-card--twitter:hover {
  background: #000;
  color: #fff;
}

.marathon-social-link-card--twitter .marathon-social-link-card-icon {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
}

.marathon-social-link-card--twitter:hover .marathon-social-link-card-icon {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ----- Contact page: beautiful cards ----- */
.marathon-hero--contact .tagline {
  max-width: 560px;
}

.marathon-contact-intro-card {
  background: linear-gradient(135deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface-2) 100%);
  border-radius: var(--shape-corner-extra-large);
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto;
}

.marathon-contact-intro-card-inner {
  padding: 32px 36px 36px;
}

.marathon-contact-intro-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-primary);
  margin: 0 0 8px;
}

.marathon-contact-intro-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

/* Contact: beautiful contact cards (Call, Email, Address) */
.marathon-contact-cards-beautiful {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.marathon-contact-beautiful-card {
  display: block;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .25s ease, transform .2s ease, border-color .2s;
}

.marathon-contact-beautiful-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-4px);
  border-color: var(--md-sys-color-primary);
}

.marathon-contact-beautiful-card--plain {
  cursor: default;
}

.marathon-contact-beautiful-card--plain:hover {
  transform: none;
  border-color: var(--md-sys-color-outline-variant);
}

.marathon-contact-beautiful-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.marathon-contact-beautiful-card--call .marathon-contact-beautiful-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-contact-beautiful-card--email .marathon-contact-beautiful-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-contact-beautiful-card--address .marathon-contact-beautiful-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-contact-beautiful-card-inner {
  padding: 28px 28px 32px;
}

.marathon-contact-beautiful-card-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.marathon-contact-beautiful-card--call .marathon-contact-beautiful-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-contact-beautiful-card--email .marathon-contact-beautiful-card-icon {
  background: var(--md-sys-color-secondary-container);
}

.marathon-contact-beautiful-card--address .marathon-contact-beautiful-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-contact-beautiful-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 6px;
}

.marathon-contact-beautiful-card-value {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-primary);
  font-weight: 600;
  margin: 0;
  word-break: break-word;
}

/* Contact: Quick Links card */
.marathon-contact-quicklinks-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.marathon-contact-quicklinks-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-contact-quicklinks-card-header {
  padding: 28px 28px 16px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-contact-quicklinks-card-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  background: var(--md-sys-color-secondary-container);
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.marathon-contact-quicklinks-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 4px;
}

.marathon-contact-quicklinks-card-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

.marathon-contact-quicklinks-card-body {
  padding: 24px 28px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.marathon-contact-quicklink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: var(--shape-corner-medium);
  background: var(--md-sys-color-surface-2);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: background .2s, border-color .2s, color .2s;
}

.marathon-contact-quicklink:hover {
  background: var(--md-sys-color-primary-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

/* Contact: About Marathon card */
.marathon-contact-about-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.marathon-contact-about-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-contact-about-card-inner {
  padding: 32px 36px 36px;
}

.marathon-contact-about-card-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  background: var(--md-sys-color-primary-container);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.marathon-contact-about-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 10px;
}

.marathon-contact-about-card-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

/* Contact: Social & powered by card */
.marathon-contact-social-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.marathon-contact-social-card {
  background: var(--md-sys-color-surface-2);
  border-radius: var(--shape-corner-large);
  padding: 0;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.marathon-contact-social-card-inner {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .marathon-contact-cards-beautiful {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .marathon-contact-social-card-inner {
    flex-direction: column;
    text-align: center;
  }

  .marathon-social-links--cards {
    flex-wrap: wrap;
  }

  .marathon-contact-quicklinks-card-body {
    grid-template-columns: 1fr;
  }
}

/* ----- Events page: intro card & policy cards ----- */
.marathon-hero--events .tagline {
  max-width: 600px;
}

.marathon-section--tight {
  padding-top: 40px;
  padding-bottom: 40px;
}

.marathon-events-intro-card {
  background: linear-gradient(135deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface-2) 100%);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
}

.marathon-events-intro-card-inner {
  padding: 36px 40px 40px;
}

.marathon-events-intro-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-primary);
  margin: 0 0 8px;
}

.marathon-events-intro-desc {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 28px;
}

.marathon-events-intro-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.marathon-events-intro-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.4;
}

.marathon-events-intro-step-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-medium);
  background: var(--md-sys-color-primary-container);
  font-size: 1.25rem;
}

.marathon-events-intro-actions {
  margin-top: 24px;
  text-align: center;
}

/* Events: policy cards */
.marathon-events-policy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.marathon-events-policy-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .2s ease;
}

.marathon-events-policy-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-4px);
}

.marathon-events-policy-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.marathon-events-policy-card--refund .marathon-events-policy-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-events-policy-card--transfer .marathon-events-policy-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-events-policy-card-header {
  padding: 28px 28px 16px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-events-policy-card-body {
  padding: 24px 28px 32px;
}

.marathon-events-policy-card-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.marathon-events-policy-card--refund .marathon-events-policy-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-events-policy-card--transfer .marathon-events-policy-card-icon {
  background: var(--md-sys-color-secondary-container);
}

.marathon-events-policy-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 6px;
}

.marathon-events-policy-card-desc {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0;
}

.marathon-list--policy li {
  margin-bottom: 12px;
  padding-left: 22px;
}

.marathon-list--policy li::before {
  width: 7px;
  height: 7px;
  top: 0.45em;
}

@media (max-width: 700px) {
  .marathon-events-intro-card-inner {
    padding: 28px 24px 32px;
  }

  .marathon-events-intro-steps {
    grid-template-columns: 1fr;
  }

  .marathon-events-policy-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }

  .marathon-events-policy-card-header,
  .marathon-events-policy-card-body {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ----- Registration page: intro card & term cards ----- */
.marathon-hero--registration .tagline {
  max-width: 560px;
}

.marathon-registration-intro-card {
  background: linear-gradient(135deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface-2) 100%);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}

.marathon-registration-intro-card-inner {
  padding: 36px 40px 40px;
}

.marathon-registration-intro-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-primary);
  margin: 0 0 8px;
}

.marathon-registration-intro-desc {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 28px;
}

.marathon-registration-intro-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.marathon-registration-intro-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.35;
}

.marathon-registration-intro-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.marathon-registration-intro-actions {
  margin-top: 24px;
  text-align: center;
}

/* Registration: term cards (horizontal) */
.marathon-registration-term-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.marathon-registration-term-cards--full {
  max-width: none;
  width: 100%;
}

.marathon-registration-term-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 0;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  position: relative;
  transition: box-shadow .25s ease, transform .2s ease;
}

.marathon-registration-term-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-3px);
}

.marathon-registration-term-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.marathon-registration-term-card--1 .marathon-registration-term-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-registration-term-card--2 .marathon-registration-term-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-secondary-container) 100%);
}

.marathon-registration-term-card--3 .marathon-registration-term-card-accent {
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-primary-container) 100%);
}

.marathon-registration-term-card-header {
  padding: 24px 28px 20px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.marathon-registration-term-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--shape-corner-large);
  font-size: 1.4rem;
}

.marathon-registration-term-card--1 .marathon-registration-term-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-registration-term-card--2 .marathon-registration-term-card-icon {
  background: var(--md-sys-color-secondary-container);
}

.marathon-registration-term-card--3 .marathon-registration-term-card-icon {
  background: var(--md-sys-color-primary-container);
}

.marathon-registration-term-card-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--md-sys-color-on-surface-variant);
  color: var(--md-sys-color-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
}

.marathon-registration-term-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--md-sys-color-on-surface);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.marathon-registration-term-card-body {
  padding: 24px 28px 32px;
}

.marathon-registration-term-card-intro {
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 14px;
  line-height: 1.45;
}

.marathon-registration-term-card-body .marathon-list--policy {
  margin: 0;
}

@media (max-width: 900px) {
  .marathon-registration-term-cards {
    grid-template-columns: 1fr;
  }

  .marathon-registration-term-cards--full {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .marathon-registration-intro-card-inner {
    padding: 28px 24px 32px;
  }

  .marathon-registration-intro-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .marathon-registration-intro-step {
    flex-direction: row;
    text-align: left;
    gap: 14px;
  }

  .marathon-registration-term-card-header {
    flex-wrap: wrap;
    padding: 20px 24px 16px;
  }

  .marathon-registration-term-card-body {
    padding: 20px 24px 28px;
  }
}

/* ----- Footer ----- */
.marathon-footer {
  margin-top: auto;
  padding: 48px 24px 24px;
  background: var(--md-sys-color-surface-3);
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.marathon-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.marathon-footer .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--md-sys-color-primary);
  display: inline-block;
  line-height: 0;
}

.marathon-footer .footer-logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

.marathon-footer .brand span {
  color: var(--md-sys-color-secondary);
}

.marathon-footer p {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 8px 0 0;
}

.marathon-footer h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 16px;
}

.marathon-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.marathon-footer ul a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 4px 0;
  display: inline-block;
}

.marathon-footer ul a:hover {
  color: var(--md-sys-color-primary);
}

.marathon-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .marathon-about-grid {
    grid-template-columns: 1fr;
  }

  .marathon-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {

  .marathon-page-card-header,
  .marathon-page-card-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .marathon-page-card--featured .marathon-page-card-body {
    padding: 24px 20px 28px;
  }

  .marathon-page-card-title {
    font-size: 1.25rem;
  }

  .marathon-nav {
    display: none;
  }

  .marathon-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--md-sys-color-surface);
    box-shadow: var(--elevation-3);
    padding: 16px;
    gap: 4px;
  }

  .marathon-menu-toggle {
    display: block;
  }

  .marathon-hero {
    min-height: 60vh;
    padding: 48px 20px;
  }

  .marathon-section {
    padding: 56px 20px;
  }

  .marathon-hero--page {
    min-height: 36vh;
    padding: 40px 20px;
  }

  .marathon-about-cards {
    grid-template-columns: 1fr;
  }

  .marathon-key-info {
    flex-direction: column;
    gap: 16px;
  }

  .marathon-footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .marathon-footer-grid>div:first-child {
    display: flex;
    justify-content: center;
  }

  .marathon-footer .brand {
    text-align: center;
  }

  .marathon-footer .footer-logo {
    height: 44px;
    max-width: 180px;
    object-position: center center;
  }
}

/* ----- Runner API registration form (two-column, no cards, Material) ----- */
.marathon-hero--runner-register .tagline {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.marathon-section--runner-form {
  padding: 28px 24px 48px;
  width: 80%;
  max-width: 1200px;
  min-width: 320px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--md-sys-color-surface-2) 0%, var(--md-sys-color-surface-dim) 100%);
  border-radius: 0 0 var(--shape-corner-extra-large) var(--shape-corner-extra-large);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.marathon-runner-form-wrap {
  width: 100%;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  padding: 28px 32px 32px;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-runner-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.marathon-runner-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  align-items: start;
}

.marathon-runner-form__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marathon-runner-form__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marathon-runner-form__section-label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-sys-color-primary);
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-runner-form__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marathon-runner-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-runner-form .marathon-form-group {
  margin: 0;
}

.marathon-runner-form .marathon-form-group label:not(.marathon-form-check) {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 4px;
}

.marathon-runner-form .marathon-form-group input[type="text"],
.marathon-runner-form .marathon-form-group input[type="email"],
.marathon-runner-form .marathon-form-group input[type="tel"],
.marathon-runner-form .marathon-form-group input[type="number"],
.marathon-runner-form .marathon-form-group select {
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
  border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-medium);
  font-size: 1rem;
  font-family: var(--font-body);
  line-height: 1.4;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.marathon-runner-form .marathon-form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%234A4639'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 22px;
  padding-right: 48px;
}

.marathon-runner-form .marathon-form-group input:hover,
.marathon-runner-form .marathon-form-group select:hover {
  border-color: var(--md-sys-color-outline);
}

.marathon-runner-form .marathon-form-group input:focus,
.marathon-runner-form .marathon-form-group select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.15);
  background: var(--md-sys-color-surface);
}

.marathon-runner-form .marathon-form-message {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .marathon-runner-form__row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .marathon-section--runner-form {
    width: 95%;
    padding: 20px 16px 32px;
    border-radius: 0 0 var(--shape-corner-large) var(--shape-corner-large);
  }

  .marathon-runner-form-wrap {
    padding: 20px 20px 24px;
  }
}

.marathon-form-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.marathon-api-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marathon-form-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.marathon-form-card {
  position: relative;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  padding: 20px 20px;
  box-shadow: var(--elevation-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
}

.marathon-form-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--md-sys-color-primary);
  border-radius: 0 2px 2px 0;
}

.marathon-form-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 14px;
  padding-left: 4px;
}

.marathon-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

.marathon-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marathon-form-group--full {
  grid-column: 1 / -1;
}

.marathon-form-group--inline {
  align-self: flex-end;
  justify-content: flex-end;
}

.marathon-form-group label:not(.marathon-form-check) {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
}

.marathon-form-group input[type="text"],
.marathon-form-group input[type="email"],
.marathon-form-group input[type="tel"],
.marathon-form-group input[type="number"],
.marathon-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-small);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.marathon-form-group input:focus,
.marathon-form-group select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.2);
}

.marathon-form-group input::placeholder {
  color: var(--md-sys-color-outline);
}

.marathon-form-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9375rem;
}

.marathon-form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--md-sys-color-primary);
  cursor: pointer;
}

.marathon-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.marathon-form-message {
  padding: 14px 18px;
  border-radius: var(--shape-corner-small);
  font-size: 0.9375rem;
  font-weight: 500;
}

.marathon-form-message--success {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1px solid var(--md-sys-color-primary);
}

.marathon-form-message--error {
  background: #FFEBEE;
  color: var(--md-sys-color-error);
  border: 1px solid var(--md-sys-color-error);
}

/* ----- Login page ----- */
.marathon-hero--login .tagline {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.marathon-section--login {
  padding: 40px 24px 64px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.marathon-login-wrapper {
  width: 100%;
  max-width: 420px;
}

.marathon-login-card {
  position: relative;
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  padding: 40px 32px;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
}

.marathon-login-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--md-sys-color-primary);
  border-radius: 0 2px 2px 0;
}

.marathon-login-card-inner {
  position: relative;
  z-index: 1;
}

.marathon-login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--md-sys-color-on-surface);
  margin: 0 0 6px;
}

.marathon-login-subtitle {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 28px;
}

.marathon-login-form .marathon-form-group {
  margin-bottom: 18px;
}

.marathon-login-form .marathon-form-group:last-of-type {
  margin-bottom: 4px;
}

.marathon-login-form input[type="text"],
.marathon-login-form input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-medium);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.marathon-login-form input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.2);
}

.marathon-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.marathon-login-forgot {
  font-size: 0.875rem;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.marathon-login-forgot:hover {
  text-decoration: underline;
}

.marathon-login-submit {
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
}

.marathon-login-form .marathon-form-message {
  margin-top: 20px;
}

.marathon-login-footer {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  text-align: center;
}

.marathon-login-footer a {
  font-size: 0.9375rem;
  color: var(--md-sys-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.marathon-login-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .marathon-form-cards-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .marathon-form-grid {
    grid-template-columns: 1fr;
  }

  .marathon-form-group--inline {
    align-self: flex-start;
  }
}

/* ----- Payment instruction page ----- */
.marathon-payment-header {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 32px 24px;
}

.marathon-payment-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.marathon-payment-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0;
  color: var(--md-sys-color-on-primary);
  letter-spacing: -0.02em;
}

.marathon-payment-ref {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.marathon-payment-ref-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.marathon-payment-ref-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.marathon-section--payment {
  padding: 40px 24px 64px;
  background: var(--md-sys-color-surface-dim);
}

.marathon-payment-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

.marathon-payment-intro {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 32px;
}

.marathon-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.marathon-payment-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-large);
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
}

.marathon-payment-card:hover {
  box-shadow: var(--elevation-3);
  transform: translateY(-2px);
}

.marathon-payment-card--mpesa {
  border-top: 4px solid #E60000;
}

.marathon-payment-card--tigo {
  border-top: 4px solid #FFD700;
}

.marathon-payment-card--airtel {
  border-top: 4px solid #E60000;
}

.marathon-payment-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  gap: 12px;
}

.marathon-payment-card-logos {
  display: flex;
  align-items: center;
  flex: 1;
}

.marathon-payment-logo-img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.marathon-payment-ussd {
  flex-shrink: 0;
}

.marathon-payment-ussd-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--md-sys-color-primary);
  letter-spacing: 0.02em;
}

.marathon-payment-card-body {
  padding: 20px 20px 24px;
}

.marathon-payment-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step-counter;
}

.marathon-payment-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
}

.marathon-payment-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.marathon-payment-steps li strong {
  color: var(--md-sys-color-on-surface);
  font-weight: 600;
}

.marathon-payment-footer {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
}

.marathon-payment-note {
  font-size: var(--p-font-size);
  line-height: var(--p-line-height);
  color: var(--md-sys-color-on-surface-variant);
  margin: 0 0 24px;
}

@media (max-width: 900px) {
  .marathon-payment-methods {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .marathon-payment-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .marathon-payment-ref {
    align-items: flex-start;
  }
}

/* ----- Runners DataTable page ----- */
.marathon-section--runners {
  padding: 40px 16px 64px;
  background: var(--md-sys-color-surface-dim);
  width: 100%;
  max-width: 100% !important;
  margin: 0 !important;
}

.marathon-runners-wrapper {
  width: 100%;
  margin: 0;
}

.marathon-runners-card {
  background: var(--md-sys-color-surface);
  border-radius: var(--shape-corner-extra-large);
  box-shadow: var(--elevation-2);
  border: 1px solid var(--md-sys-color-outline-variant);
  overflow: hidden;
  width: 100%;
}

.marathon-runners-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  background: linear-gradient(180deg, var(--md-sys-color-surface-1) 0%, var(--md-sys-color-surface) 100%);
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.marathon-runners-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--md-sys-color-on-surface);
  margin: 0;
}

.marathon-runners-table-container {
  padding: 24px 16px 32px;
  overflow-x: auto;
  width: 100%;
}

/* DataTables customization */
.marathon-datatable-wrapper {
  font-family: var(--font-body);
}

.marathon-datatable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.marathon-datatable-search {
  flex: 1;
  min-width: 250px;
}

.marathon-datatable-search input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-medium);
  font-size: 0.9375rem;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.marathon-datatable-search input:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.1);
}

.marathon-datatable-length select {
  padding: 8px 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-small);
  font-size: 0.9375rem;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}

.marathon-datatable {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.marathon-datatable thead th {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 2px solid var(--md-sys-color-outline-variant);
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
}

.marathon-datatable tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.9375rem;
}

.marathon-datatable tbody tr:hover {
  background: var(--md-sys-color-surface-1);
}

.marathon-datatable tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--shape-corner-small);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-group {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.badge-personal {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.badge-tanzanian {
  background: #1B5E20;
  color: #fff;
}

.badge-non-tanzanian {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
}

.badge-size {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline-variant);
}

.badge-status {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Table actions */
.marathon-table-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-small);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn-action:hover {
  background: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-primary);
}

.btn-action:active {
  background: var(--md-sys-color-surface-2);
}

.marathon-datatable-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  flex-wrap: wrap;
  gap: 16px;
}

.marathon-datatable-info {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.875rem;
}

.marathon-datatable-pagination {
  display: flex;
  gap: 4px;
}

.marathon-datatable-pagination .paginate_button {
  padding: 6px 12px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-corner-small);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.marathon-datatable-pagination .paginate_button:hover {
  background: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-primary);
}

.marathon-datatable-pagination .paginate_button.current {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}

.marathon-datatable-pagination .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .marathon-runners-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .marathon-datatable-header {
    flex-direction: column;
    align-items: stretch;
  }

  .marathon-datatable-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .marathon-contact-social-inner {
    flex-direction: column;
    text-align: center;
  }

  .marathon-contact-grid {
    grid-template-columns: 1fr;
  }

  .marathon-runners-table-container {
    padding: 16px;
  }

  .marathon-datatable {
    font-size: 0.875rem;
  }

  .marathon-datatable thead th,
  .marathon-datatable tbody td {
    padding: 10px 8px;
  }
}

/* ----- Gallery ----- */
.marathon-gallery-hero {
  background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, #2E7D32 50%, #1B5E20 100%);
  color: var(--md-sys-color-on-primary);
  padding: 3rem 1.5rem;
  text-align: center;
}

.marathon-gallery-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.marathon-gallery-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.marathon-gallery-subtitle {
  font-size: var(--p-lead-font-size);
  line-height: var(--p-line-height);
  opacity: 0.95;
  margin: 0;
}

.marathon-gallery-wrap {
  padding: 2rem 1.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.marathon-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.marathon-gallery-item {
  min-height: 0;
}

.marathon-gallery-card {
  background: var(--md-sys-color-surface-container);
  border-radius: var(--shape-corner-large);
  overflow: hidden;
  box-shadow: var(--elevation-2);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.marathon-gallery-card:hover {
  box-shadow: var(--elevation-4);
  transform: translateY(-2px);
}

.marathon-gallery-thumb-wrap {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.marathon-gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.marathon-gallery-thumb-wrap:hover .marathon-gallery-thumb {
  transform: scale(1.06);
}

.marathon-gallery-zoom {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.marathon-gallery-zoom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  background: rgba(255, 255, 255, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231B5E20'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") center/28px no-repeat;
  border-radius: 50%;
  box-shadow: var(--elevation-3);
}

.marathon-gallery-thumb-wrap:hover .marathon-gallery-zoom {
  opacity: 1;
}

/* Lightbox */
.marathon-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.marathon-lightbox[hidden] {
  display: none;
}

.marathon-lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marathon-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--shape-corner-small);
  box-shadow: var(--elevation-4);
}

.marathon-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.marathon-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.marathon-lightbox-prev,
.marathon-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.marathon-lightbox-prev {
  left: 1rem;
}

.marathon-lightbox-next {
  right: 1rem;
}

.marathon-lightbox-prev:hover,
.marathon-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.marathon-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .marathon-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .marathon-lightbox-prev {
    left: 0.5rem;
  }

  .marathon-lightbox-next {
    right: 0.5rem;
  }

  .marathon-lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/*for card registration close */
.alert-card {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; 
  background: rgba(238, 233, 233, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.alert-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.alert-content h3 {
  margin-bottom: 10px;
}

.alert-content button {
  margin-top: 15px;
  padding: 8px 18px;
  border: none;
  background: #D84300;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

/* end of css for alert Card registration close */