:root {
  color-scheme: light;
  --site-accent: #e80000;
  --site-ink: #242424;
  --site-muted: #626262;
  --site-surface: #fff;
  --site-soft-surface: #f7f7f7;
  --site-shadow: 0 14px 36px rgba(27, 27, 27, 0.09);
}

html {
  scroll-padding-top: 88px;
}

body {
  color: var(--site-ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: 3px;
}

.header-section {
  z-index: 1000;
}

.header-section.header-fixed {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.12);
}

.site-logo img {
  max-width: min(100%, 210px);
  height: auto;
}

.sponsor-section {
  background-color: #edf2f7;
  background-image: linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)),
    url("../images/Sponsors/background-image.jpeg");
  background-position: center;
  background-size: cover;
}



.sponsor-feature,
.sponsor-card {
  min-width: 0;
  text-align: center;
}

.sponsor-role {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  color: var(--site-ink);
  font-weight: 700;
  line-height: 1.35;
}

.sponsor-feature img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  object-position: center;
}

.sponsor-event-brand {
  display: flex;
  justify-content: center;
  margin: 28px auto 44px;
}

.sponsor-event-brand img {
  display: block;
  width: min(100%, 520px);
  height: 220px;
  object-fit: contain;
  object-position: center;
}

.sponsor-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
}

.sponsor-divider::before,
.sponsor-divider::after {
  height: 2px;
  flex: 1;
  background: #80c342;
  content: "";
}

.sponsor-divider h2 {
  margin: 0;
  color: var(--site-ink);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  text-align: center;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 34px;
}

.sponsor-card {
  min-height: 160px;
  padding: 8px 18px;
  border-right: 2px solid #21b7d0;
}

.sponsor-card:nth-child(4n) {
  border-right: 0;
}

.sponsor-card img {
  display: block;
  width: 100%;
  height: 115px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 767px) {
  .sponsor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }

  .sponsor-card:nth-child(4n) {
    border-right: 2px solid #21b7d0;
  }

  .sponsor-card:nth-child(2n) {
    border-right: 0;
  }

  .sponsor-feature-row {
    gap: 24px;
  }

  .sponsor-event-brand img {
    height: 180px;
  }

  .sponsor-card {
    min-height: 145px;
    padding: 8px 12px;
  }

  .sponsor-card img {
    height: 90px;
  }
}

@media (max-width: 480px) {
  .sponsor-feature-row,
  .sponsor-grid {
    grid-template-columns: 1fr;
  }

  .sponsor-card,
  .sponsor-card:nth-child(4n) {
    border-right: 0;
  }
}

.banner-section {
  isolation: isolate;
}

.home-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

#marathon-hero {
  position: relative;
  overflow: hidden;
}

#marathon-hero .carousel-item img {
  width: 100%;
  object-fit: cover;
}

.home-hero-content .container {
  padding-top: 40px;
  padding-bottom: 40px;
}

.home-hero-content h1 {
  max-width: 760px;
  margin: 0 0 16px;
  color: #fff;
  font-family: "Kanit", sans-serif;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
}

.home-hero-content p {
  max-width: 620px;
  color: #fff;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.home-hero-content .home-hero-kicker {
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.breadcrumb {
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0;
}

.section-header .section-title,
.banner-content .title {
  text-wrap: balance;
}

.about-content-area,
.faq-wrapper,
.contact-item,
.account-form-area,
.account-widget-form-area,
.feature-item,
.goals-box-item,
.term-card {
  min-width: 0;
}

.about-contents p,
.faq-content p,
.term-card li {
  color: var(--site-muted);
  line-height: 1.8;
}

.faq-item,
.contact-item,
.feature-item,
.goals-box-item,
.term-card {
  border-radius: 14px;
}

.faq-item {
  overflow: hidden;
}

.prize-money-answer {
  margin: 24px 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid #e8ecf3;
  border-radius: 16px;
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
}

.prize-money-answer > .title {
  margin-bottom: 16px;
  color: var(--site-ink);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  line-height: 1.4;
  text-transform: none;
}

.prize-money-answer h5.title {
  margin: 24px 0 12px;
  color: var(--site-ink);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.prize-money-image {
  margin: 20px 0;
}

.prize-money-image img {
  width: 100%;
  max-width: 940px;
  height: auto;
  border: 1px solid #e8ecf3;
  box-shadow: var(--site-shadow);
}

.prize-money-table table {
  min-width: 680px;
  margin-bottom: 0;
  background: #fff;
}

.prize-money-table th,
.prize-money-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.prize-money-table thead th {
  background: #f2f6fb;
}

.prize-money-answer .faq-list {
  padding-left: 20px;
  list-style: disc;
}

.prize-money-answer .faq-list li {
  display: list-item;
  margin: 0 0 12px;
  line-height: 1.75;
}

.faq-title {
  cursor: pointer;
}

.faq-title:focus-visible {
  outline: 3px solid var(--site-accent);
  outline-offset: -3px;
}

.account-form-area,
.account-widget-form-area {
  width: 100%;
}

.account-form-area input,
.account-widget-form-area input,
.account-widget-form-area textarea {
  max-width: 100%;
  border-radius: 8px;
}

.account-widget-form-area textarea {
  min-height: 150px;
  resize: vertical;
}

.event-table {
  width: 100%;
}

.gallery-item {
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  text-align: left;
}

.gallery-item img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
}

.lightbox .close-btn,
.lightbox .nav-btn {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.lightbox-content img {
  width: auto;
  max-width: min(90vw, 1200px);
  max-height: 80vh;
  object-fit: contain;
}

.btn--base,
.register-btn,
.btn-register {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn--base:hover,
.register-btn:hover,
.btn-register:hover {
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 72px;
  }

  .ptb-120 {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .banner-content .title {
    font-size: clamp(2rem, 9vw, 3.25rem);
  }

  .home-hero-content {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.28));
  }

  .home-hero-content .container {
    padding-right: 24px;
    padding-left: 24px;
  }

  .account-content-area,
  .about-content-area {
    padding-left: 0;
    padding-right: 0;
  }

  .event-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .lightbox .prev-btn {
    left: 8px;
  }

  .lightbox .next-btn {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
