:root {
  --green: #4fa227;
  --olive: #588240;
  --dark: #111;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Exo, sans-serif; color: #1d1d1d; line-height: 1.55; }
.container { width: min(1240px, 94vw); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); border-bottom: 1px solid #ddd; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 1rem; }
.logo img { width: 160px; display: block; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.5rem; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.menu-root { display: flex; align-items: center; gap: 1rem; }
.menu-root > li { position: relative; }
.main-nav a { font-family: Poppins, sans-serif; text-transform: uppercase; font-size: .85rem; text-decoration: none; color: #111; font-weight: 600; display: block; padding: .35rem .15rem; }
.main-nav a:hover { color: var(--green); }
.sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border-top: 2px solid var(--green); box-shadow: 0 12px 24px rgba(0,0,0,.15); }
.sub-menu a { text-transform: none; font-size: .83rem; padding: .55rem .8rem; border-bottom: 1px solid #eee; }
.has-children:hover > .sub-menu { display: block; }

.hero {
  min-height: 78vh;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.58));
}
.hero-content { max-width: 950px; padding: 5rem 0; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 3.5vw, 3.7rem); margin: 0 0 .8rem; text-shadow: 0 5px 18px rgba(0,0,0,.45); }
.hero p { margin: 0 0 .5rem; font-size: clamp(1rem, 1.45vw, 1.35rem); }
.countdown-wrap {
  margin-top: 1.2rem;
  background: rgba(60, 152, 16, .86);
  padding: 1.1rem 1.6rem;
  display: block;
  width: min(860px, 96%);
}
.countdown-wrap strong { font-size: 1.35rem; font-weight: 700; }
.countdown { display: flex; gap: 1.6rem; margin-top: .55rem; }
.countdown b { display: block; font-size: 2.25rem; line-height: 1; }
.countdown small { font-size: .95rem; text-transform: uppercase; }

.btn { display: inline-block; text-decoration: none; color: #fff; background: #3f3f3f; padding: .82rem 1.2rem; font-weight: 700; box-shadow: 4px 4px 10px rgba(0,0,0,.35); }
.btn:hover { background: #fbcf3b; color: #000; }
.cta-row { display: flex; gap: .8rem; margin-top: 1.3rem; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }

.section { padding: 3.3rem 0; }
h2 { margin: 0 0 1.4rem; font-size: clamp(1.5rem, 2.2vw, 2.3rem); }
h3 { margin: 0 0 .5rem; }

.races { background: #f5f5dc url('/old-images/wp-content/uploads/2020/02/cork-wallet1.png'); }
.race-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.race-card {
  background: rgba(255,255,255,.92);
  padding: .8rem;
  text-align: center;
  overflow: hidden;
}
.race-badge-slot {
  min-height: 44px;
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.race-badge {
  display: block;
  width: 50%;
  max-width: 50%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
}
.race-badge-small {
  width: 50%;
  max-width: 50%;
  height: auto;
}
.race-card img.race-badge,
.race-card img.race-badge-small {
  width: 50%;
  max-width: 50%;
  height: auto;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
}
.race-actions {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1rem;
}
.race-detail-btn,
.race-download-btn {
  width: 100%;
}
.race-elevation {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-weight: 700;
  color: #2f4f2f;
}
.race-time { display: block; }
.race-card img { width: 100%; height: 210px; object-fit: cover; margin: .6rem 0; }
.muted { color: #666; }

.info-strip { background: rgba(160,160,160,.18) url('/old-images/wp-content/uploads/2020/02/cork-wallet1.png'); }
.info-two-col { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.info-two-col article { background: #fff; padding: 1rem 1.2rem; }
.rules-btn { margin-top: .9rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal-backdrop[hidden] {
  display: none !important;
}
.rules-modal {
  width: min(860px, 96vw);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: #fff;
  color: #222;
  padding: 1.2rem 1.2rem 1rem;
  position: relative;
}
.rules-modal-close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.rules-modal-content p:first-child,
.rules-modal-content h3:first-child,
.rules-modal-content h4:first-child {
  margin-top: 0;
}
.rules-modal-content ul,
.rules-modal-content ol {
  padding-left: 1.2rem;
}
.rules-modal-content a {
  color: var(--olive);
}
.track-modal {
  width: min(1120px, 96vw);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  color: #222;
  padding: 1.2rem;
  position: relative;
}
.track-modal-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
}
.track-map-wrap {
  min-height: 460px;
  position: relative;
}
.track-map {
  width: 100%;
  min-height: 460px;
  background: #e9ecef;
}
.track-map-attribution {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .35rem .5rem;
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.track-map-attribution img {
  display: block;
  height: 28px;
  width: auto;
}
.track-map-attribution a {
  color: #222;
  font-size: .85rem;
  text-decoration: none;
}
.track-map-attribution a:hover {
  text-decoration: underline;
}
.track-sidebar {
  display: flex;
  flex-direction: column;
}
.track-sidebar h3 {
  margin-bottom: 1rem;
}
.track-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .45rem .8rem;
  margin: 0;
}
.track-facts dt {
  font-weight: 700;
}
.track-facts dd {
  margin: 0;
}
.track-modal-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.track-status {
  margin: 1rem 0 0;
  color: #666;
}
body.modal-open {
  overflow: hidden;
}

.map-wrap { padding: 0; }
.map-wrap iframe { width: 100%; border: 0; height: 520px; display: block; }

.pricing { background: rgba(160,160,160,.33) url('/old-images/wp-content/uploads/2020/02/grilled1.png'); }
.price-card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.price-card {
  background: rgba(93,89,89,.33);
  color: #fff;
  padding: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.price-card:hover,
.price-card:focus-within,
.price-card:active {
  background: rgba(93,89,89,.55);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(0,0,0,.24);
}
.price-card h3 { text-align: center; font-size: 1.5rem; }
.price-card dl { margin: 0; }
.price-card dt { font-size: .95rem; margin-top: .8rem; }
.price-card dd { margin: .2rem 0 0; font-size: 1.3rem; font-weight: 700; color: #c69200; }

.includes-section { background: #e5e3df; }
.includes-grid { display: grid; gap: 1rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.includes-grid article {
  background: #fff;
  padding: 1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.includes-grid article:hover,
.includes-grid article:focus-within,
.includes-grid article:active {
  background: #fff !important;
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 14px 28px rgba(0,0,0,.24) !important;
}

.reviews { background: rgba(160,160,160,.33) url('/old-images/wp-content/uploads/2020/02/grilled1.png'); }
.reviews-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.review-card {
  margin: 0;
  background: rgba(93,89,89,.33);
  color: #fff;
  padding: 1rem;
  border: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.review-card:hover,
.review-card:focus-within,
.review-card:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(0,0,0,.24);
}
.review-meta { margin-top: auto; padding-top: .7rem; display: flex; align-items: center; gap: .6rem; }
.review-meta img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.review-meta cite { font-style: normal; font-weight: 700; }

.partners { background: rgba(160,160,160,.33) url('/old-images/wp-content/uploads/2020/02/grilled1.png'); }
.partner-heading { margin: 1.2rem 0 .7rem; font-size: 1.25rem; }
.partners-grid { display: grid; gap: .9rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.partners-grid a {
  background: rgba(255,255,255,.88);
  min-height: 90px;
  display: grid;
  place-items: center;
  padding: .65rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.partners-grid a:hover,
.partners-grid a:focus-visible,
.partners-grid a:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(0,0,0,.24);
}
.partners-grid img { max-width: 100%; max-height: 62px; object-fit: contain; }
.partners-grid.media { grid-template-columns: repeat(1, minmax(0, 320px)); }

.gallery-home { background: #f3f3ef; }
.home-album-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.home-album-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: .8rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-album-card:hover,
.home-album-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
.home-album-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.gallery-photo-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gallery-photo-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.gallery-photo-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.gallery-load-actions {
  margin-top: 1rem;
  text-align: center;
  color: #666;
  font-size: .95rem;
}
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.86);
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.gallery-lightbox[hidden] {
  display: none !important;
}
.gallery-lightbox img {
  max-width: min(94vw, 1200px);
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
}
.gallery-lightbox p {
  color: #fff;
  margin: .8rem 0 0;
  text-align: center;
}
.gallery-lightbox-close {
  position: fixed;
  top: .6rem;
  right: .8rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2.1rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-lightbox-prev { left: .7rem; }
.gallery-lightbox-next { right: .7rem; }

.cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  background: rgba(17,17,17,.96);
  color: #fff;
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
}
.cookie-bar[hidden] {
  display: none !important;
}
.cookie-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}
.cookie-bar p {
  margin: 0;
  font-size: .95rem;
}
.cookie-bar-btn {
  flex: 0 0 auto;
  box-shadow: none;
}

.site-footer { background: #111; color: #b4b4b4; text-align: center; }
.footer-inner { padding: 2rem 0; }
.footer-logo { max-width: 320px; width: 100%; height: auto; }
.site-footer a { color: #fff; }

.page-hero {
  min-height: 36vh;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: center;
}
.page-hero h1 { margin: 0 0 .5rem; font-size: clamp(1.9rem, 3.2vw, 3rem); }
.page-hero p { margin: 0; font-size: 1.1rem; }
.plain-page { background: #f3f3ef; }
.year-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.year-card {
  background: #fff;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.gallery-grid-page {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gallery-card {
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  padding: .7rem;
}
.gallery-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .race-grid, .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-grid-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-nav { position: absolute; right: 3vw; top: 82px; display: none; background: #fff; border: 1px solid #ddd; width: min(92vw, 380px); padding: .75rem; }
  .main-nav.is-open { display: block; }
  .menu-root { flex-direction: column; align-items: stretch; gap: 0; }
  .sub-menu { position: static; display: block; box-shadow: none; border: 0; margin-left: .75rem; }
  .sub-menu a { border-bottom: 0; }
  .info-two-col, .price-card-grid, .includes-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: 1fr; }
  .cookie-bar-inner { align-items: flex-start; flex-direction: column; }
  .track-modal-layout { grid-template-columns: 1fr; }
  .track-map-wrap,
  .track-map { min-height: 360px; }
}

@media (max-width: 640px) {
  .race-grid, .reviews-grid, .partners-grid { grid-template-columns: 1fr; }
  .gallery-grid-page { grid-template-columns: 1fr; }
  .gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 66vh; }
  .map-wrap iframe { height: 420px; }
}
