:root {
  --primary:       #2E8B57;
  --primary-dark:  #1d6b40;
  --sky:           #C6DAF0;
  --sky-dark:      #a8c8e8;
  --offwhite:      #EBECE6;
  --white:         #ffffff;
  --text:          #333333;
  --text-muted:    #6b7480;
  --border:        #d4ddd4;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.05);

  --radius-sm:   8px;
  --radius:      14px;
  --radius-pill: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--offwhite);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */

.site-nav {
  background: var(--offwhite);
  border-bottom: 3px solid var(--primary);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 128px;
  position: relative;
}
.nav-logo {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.nav-logo-imgs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 112px;
  width: auto;
  object-fit: contain;
  display: block;
}
.nav-logo-text {
  white-space: nowrap;
  font-size: 0.95rem;
  color: var(--primary);
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover {
  color: var(--primary);
  background: var(--sky);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--sky); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--primary); border-radius: 2px; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  text-align: center;
  border-bottom: 4px solid var(--primary);
  overflow: hidden;
}
.hero-bg {
  width: 100%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.60) 100%);
}
.hero-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3.5rem;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
}
.hero p {
  font-size: 1.1rem;
  color: #ffffff;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 2.25rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(46,139,87,0.3);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,139,87,0.4);
}

.page-hero {
  background: var(--sky);
  color: var(--text);
  padding: 3rem 1.5rem;
  border-bottom: 4px solid var(--primary);
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  max-width: 1160px;
  margin: 0 auto;
  color: var(--primary);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.main-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin: 2.25rem 0;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 4px solid var(--sky);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-top-color 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--primary);
}
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.4rem; }
.card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.card .meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 500; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: gap 0.15s;
}
.card-link:hover { gap: 0.5rem; text-decoration: underline; }

/* ─── Section heading ────────────────────────────────────────────────────── */

.section-heading {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--primary);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--sky-dark);
  border-radius: 2px;
}

/* ─── Badges ─────────────────────────────────────────────────────────────── */

.badge-featured {
  display: inline-flex;
  align-items: center;
  background: var(--sky);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--sky-dark);
}

/* ─── Event meta ─────────────────────────────────────────────────────────── */

.event-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--sky);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--sky-dark);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(46,139,87,0.25);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46,139,87,0.35);
}
.btn-gold {
  background: var(--sky);
  color: var(--primary);
  border: 1px solid var(--sky-dark);
  box-shadow: none;
}
.btn-gold:hover {
  background: var(--sky-dark);
  color: var(--primary-dark);
  box-shadow: none;
}

/* ─── Results table ──────────────────────────────────────────────────────── */

.results-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1rem 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.results-table th {
  background: var(--primary);
  color: white;
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.results-table td { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); background: var(--white); font-size: 0.92rem; }
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:nth-child(even) td { background: var(--sky); }
.results-table tr:first-child td { font-weight: 700; color: var(--primary); }
.results-table tr.rank-gold td   { background: #fdf3c0; color: #5a4500; font-weight: 700; }
.results-table tr.rank-silver td { background: #e8e8e8; color: #2a2a2a; font-weight: 600; }
.results-table tr.rank-bronze td { background: #f0dbc8; color: #5a3010; font-weight: 600; }

/* ─── Carousel ───────────────────────────────────────────────────────────── */

.carousel-wrap {
  position: relative;
  margin: 1.5rem 0 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.carousel-track {
  display: flex;
  overflow: hidden;
  scroll-snap-type: x mandatory;
}
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.carousel-slide img {
  width: 100%;
  height: 520px;
  object-fit: contain;
  display: block;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  padding: 0.2rem 0.8rem 0.35rem;
  cursor: pointer;
  z-index: 10;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }
.carousel-counter {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.4rem 0 1rem;
}

/* ─── Photo grid ─────────────────────────────────────────────────────────── */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.photo-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
}
.photo-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

/* ─── Rich text ──────────────────────────────────────────────────────────── */

.rich-text h2 { font-size: 1.35rem; font-weight: 700; color: var(--primary); margin: 1.75rem 0 0.75rem; }
.rich-text p { margin-bottom: 1rem; }
.rich-text ul, .rich-text ol { margin: 0 0 1rem 1.5rem; }
.rich-text a { color: var(--primary); font-weight: 500; }
.rich-text a:hover { text-decoration: underline; }
.rich-text img { max-width: 100%; border-radius: var(--radius-sm); margin: 1.25rem 0; box-shadow: var(--shadow-sm); }

/* ─── Sponsors strip ─────────────────────────────────────────────────────── */

.sponsors-strip {
  background: var(--sky);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  border-top: 3px solid var(--primary);
}
.sponsors-strip-inner { max-width: 1160px; margin: 0 auto; text-align: center; }
.sponsors-strip h4 {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.sponsors-logos { display: flex; justify-content: center; align-items: center; gap: 3rem; min-height: 200px; flex-wrap: wrap; }
.sponsor-logo-item { display: none; flex-direction: column; align-items: center; gap: 0.6rem; opacity: 0; transition: opacity 0.5s ease; flex: 0 0 auto; }
.sponsor-logo-item.active { display: flex; opacity: 1; }
.sponsor-logo-item a { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-decoration: none; }
.sponsor-logo-item a:hover { opacity: 0.8; }
.sponsor-logo-item img { height: 120px; width: auto; }
.sponsor-logo-item span { color: var(--text-muted); font-size: 0.9rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Nav */
  .nav-inner { height: 64px; }
  .nav-logo-img { height: 48px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: -1.5rem;
    right: -1.5rem;
    background: var(--offwhite);
    border-top: 2px solid var(--sky);
    padding: 0.75rem 1rem;
    gap: 0.15rem;
    box-shadow: var(--shadow-md);
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 1rem; }
  .nav-toggle { display: flex; }

  /* Layout */
  .main-content { padding: 1.25rem 1rem; }
  .page-hero { padding: 1.5rem 1rem; }
  .page-hero h1 { font-size: 1.4rem; }
  .hero-body { padding: 2rem 2rem 3.5rem; }
  .hero h1 { margin-bottom: 0.75rem; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr; gap: 1rem; margin: 1.25rem 0; }

  /* Article sections */
  article[style*="padding:1.75rem 2rem"],
  article[style*="padding: 1.75rem 2rem"] { padding: 1.25rem 1rem !important; }

  /* Section heading */
  .section-heading { font-size: 1.3rem; }

  /* Event meta — stack on very small screens */
  .event-meta { gap: 0.5rem; }
  .event-meta-item { font-size: 0.8rem; padding: 0.25rem 0.6rem; }

  /* Results table — horizontal scroll */
  .results-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .results-table th,
  .results-table td { padding: 0.65rem 0.75rem; font-size: 0.82rem; white-space: nowrap; }

  /* Carousel */
  .carousel-slide img { height: 240px; }
  .carousel-btn { font-size: 1.8rem; padding: 0.15rem 0.6rem 0.25rem; }

  /* Photo grid */
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; }

  /* Sponsors */
  .sponsors-logos { gap: 1.5rem; }
  .sponsor-logo-item img { height: 80px; }

  /* Calendar dropdown — open upward on mobile to avoid clipping */
  details div[style*="position:absolute"],
  details div[style*="position: absolute"] {
    position: fixed !important;
    top: auto !important;
    bottom: 1rem !important;
    left: 1rem !important;
    right: 1rem !important;
    min-width: unset !important;
  }
}

@media (max-width: 480px) {
  .nav-logo-text { display: none; }
  .hero p { font-size: 0.95rem; }
  .carousel-slide img { height: 190px; }
}
