/* Hero */

.hero {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(112, 192, 67, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(0, 194, 168, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(112, 192, 67, 0.12);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  margin-bottom: 24px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 620px;
}

.stat {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text);
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-media {
  position: relative;
}

.image-placeholder {
  min-height: 480px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.18), rgba(112, 192, 67, 0.10)),
    url("../images/hero-race.jpg") center/cover;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* About cards */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(112, 192, 67, 0.12);
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--muted);
}

/* This year section */

.happy-section {
  
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, var(--primary), #07317d);
  color: white;
  border-radius: 42px;
  margin: 0 16px;
  
  
}

.happy-section .section-header p,
.happy-section .card p,
.happy-section .timeline-text {
  color: #e6eefc;
}

.event-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.event-panel {
  background: white;
  color: var(--text);
  border-radius: 30px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
}

.event-detail {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.event-detail:last-child {
  border-bottom: 0;
}

.event-detail strong {
  display: block;
}

.event-detail span {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  align-items: start;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.timeline-time {
  color: white;
  font-weight: 900;
}

/* Latest results block */

.latest-results-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.latest-results-content {
  padding: 10px;
}

.latest-results-content h3 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.latest-results-content p {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 20px;
}

.results-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}

.result-row span {
  color: var(--muted);
  font-weight: 700;
}

.result-row strong {
  text-align: right;
  color: var(--text);
}

.latest-results-image {
  min-height: 280px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #07317d);
}

.latest-results-image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

/* Homepage gallery cards */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  min-height: 220px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.48), rgba(112, 192, 67, 0.14)),
    url("../images/gallery-2025.jpg") center/cover;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.gallery-item:nth-child(2) {
  background-image:
    linear-gradient(135deg, rgba(7, 17, 31, 0.48), rgba(112, 192, 67, 0.14)),
    url("../images/gallery-2024.jpg");
}

.gallery-item:nth-child(3) {
  background-image:
    linear-gradient(135deg, rgba(7, 17, 31, 0.48), rgba(112, 192, 67, 0.14)),
    url("../images/gallery-2023.jpg");
}

.gallery-item:nth-child(4) {
  background-image:
    linear-gradient(135deg, rgba(7, 17, 31, 0.48), rgba(112, 192, 67, 0.14)),
    url("../images/gallery-all.jpg");
}

.gallery-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.40);
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
}

/* Signup */

.signup-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(120deg, var(--primary) 0%, #2f8f5f 45%, #07317d 100%);
  color: white;
  border-radius: 34px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.signup-box p {
  color: #dbe7ff;
  margin: 14px 0 24px;
}

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

.signup-list li {
  list-style: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

/* Downloads */

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-card h3 {
  font-size: 1.1rem;
  line-height: 1.25;
}

.download-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.download-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 900;
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.contact-info {
  background: var(--dark);
  color: white;
  border-radius: 30px;
  padding: 32px;
}

.contact-info p,
.contact-info a {
  color: #cbd5e1;
}

.contact-info .info-row {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

/* Responsive homepage */

@media (max-width: 980px) {
  .hero-grid,
  .event-layout,
  .signup-box,
  .contact-layout,
  .latest-results-card {
    grid-template-columns: 1fr;
  }

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

  .latest-results-image {
    min-height: 240px;
  }
}

@media (max-width: 680px) {
  .hero {
    padding-top: 124px;
  }

  .hero-stats,
  .cards-grid,
  .downloads-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .image-placeholder {
    min-height: 360px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .signup-box {
    padding: 26px;
  }

  .latest-results-card {
    padding: 18px;
    border-radius: 24px;
  }

  .result-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .result-row strong {
    text-align: left;
  }
}

/* Homepage Level 4 sponsors */

.home-sponsors {
  padding: 54px 0;
}

.home-sponsors-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.home-sponsors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.home-sponsors-header h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.home-sponsor-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-sponsor-logo {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-sponsor-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.home-sponsor-logo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.home-sponsors-empty {
  color: var(--muted);
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .home-sponsor-logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-sponsors-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .home-sponsor-logos {
    grid-template-columns: 1fr;
  }

  .home-sponsor-logo {
    min-height: 140px;
  }

  .home-sponsor-logo img {
    height: 140px;
  }
}
