/* =====================
   Reset / Base
===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  background: #f4f4f4;
  color: #0f172a;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  background: #eee;
}

a {
  text-decoration: none;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 30px auto;
  padding: 0;
}

.page-wrap {
  padding-bottom: 40px;
}

/* =====================
   Header / Navigation
===================== */
.site-header {
  background: linear-gradient(
    to right,
    #002C5B 0%,
    #002C5B 48%,
    #F2B111 52%,
    #F2B111 100%
  );
  color: #fff;
  border-bottom: 4px solid #ffffff33;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
  padding: 14px 0;
  position: relative;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 0;
}

.site-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  flex: 0 0 auto;
}

.site-brand-text {
  min-width: 0;
}

.site-brand-text strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  line-height: 1.15;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  position: relative;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255,255,255,0.14);
}

.site-nav a.active {
  font-weight: 900;
}

.site-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #fff;
  left: 14px;
  bottom: 6px;
  transition: width 0.25s ease;
}

.site-nav a:hover::after {
  width: calc(100% - 28px);
}

.nav-admin-link {
  background: #111827;
  color: #fff !important;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
}

.portal-nav {
  background: #111827;
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
}

/* Mobile menu button */
.mobile-menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}

.mobile-menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 999px;
}

/* Old header support if some pages still use old classes */
.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  text-align: center;
}

.logo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.header-text h1 {
  margin: 0;
}

.header-text p {
  margin: 5px 0 0;
}

.header-nav {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 14px;
  flex-wrap: wrap;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  position: relative;
}

/* =====================
   Slideshow
===================== */
.slideshow {
  max-width: 900px;
  margin: 30px auto;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  border-radius: 8px;
  height: 420px;
  object-fit: cover;
}

.slide.active {
  opacity: 1;
  position: relative;
}

/* =====================
   Hero
===================== */
.hero {
  max-width: 1100px;
  margin: 10px auto 0;
  padding: 0 20px;
}

.hero-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  padding: 22px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.hero h2 {
  margin: 0 0 8px;
}

.hero p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  background: #002C5B;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: .95;
}

.btn.secondary {
  background: #F2B111;
  color: #002C5B;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  background: #f4f6f8;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  color: #0f172a;
}

.notice {
  background: #002C5B;
  color: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.notice strong {
  color: #F2B111;
}

.quick-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quick-card {
  display: block;
  text-decoration: none;
  background: #f7f7f7;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.quick-card h3 {
  margin: 0 0 4px;
  color: #002C5B;
}

.quick-card p {
  margin: 0;
  color: #475569;
}

/* =====================
   Sections
===================== */
.section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  text-align: left;
}

/* =====================
   Grids
===================== */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-bottom: 20px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.clean-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.clean-list li:last-child {
  border-bottom: none;
}

/* =====================
   Tables
===================== */
.table-wrapper,
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.standings-table thead {
  background: #002C5B;
  color: #fff;
}

.standings-table th,
.standings-table td {
  padding: 12px 10px;
  text-align: center;
  border: 1px solid #ddd;
}

.standings-table tbody tr:nth-child(even) {
  background: #f4f6f8;
}

.standings-table tbody tr:hover {
  background: #e6eef7;
}

.standings-table th {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about-grid .standings-table {
  box-shadow: none;
}

.about-grid th {
  text-align: left;
}

.about-grid td {
  text-align: right;
}

/* =====================
   Sponsors
===================== */
.sponsors-section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.sponsors-section h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #002C5B;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  align-items: center;
}

.sponsor {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  transition: 0.2s ease;
}

.sponsor:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.sponsor img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: 0.3s ease;
}

.sponsor:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* =====================
   Contact / Map
===================== */
.contact-section {
  text-align: center !important;
}

.contact-section p,
.contact-section h2 {
  text-align: center;
}

.contact-section .map-container {
  max-width: 900px;
  margin: 20px auto 0;
}

.contact-section p {
  max-width: 700px;
  margin: 10px auto;
  line-height: 1.6;
}

.map-container {
  margin-top: 20px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* =====================
   Sponsor Page
===================== */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 25px;
  margin-top: 20px;
}

.tier-card {
  border-radius: 8px;
  padding: 25px;
  border: 2px solid #e5e5e5;
  text-align: center;
  background: #fff;
}

.price {
  font-size: 26px;
  font-weight: bold;
  margin: 12px 0;
  color: #002C5B;
}

.gold { border-color: #F2B111; }
.silver { border-color: #b5b5b5; }
.bronze { border-color: #cd7f32; }

.cta {
  background: #002C5B;
  color: #fff;
  padding: 35px 25px;
  text-align: center;
  border-radius: 6px;
}

.cta a {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  background: #F2B111;
  color: #002C5B;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
}

/* =====================
   Register Page
===================== */
.waiver-box {
  max-height: 260px;
  overflow-y: auto;
  padding: 20px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 6px;
  line-height: 1.6;
  font-size: .95rem;
}

.register-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.register-form label {
  font-weight: bold;
  margin-top: 12px;
}

.register-form input,
.register-form select,
.register-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea,
.standings-table input,
.standings-table select,
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
}

.signature-box {
  max-width: 420px;
  margin: 25px auto 0;
  padding: 20px;
  border: 2px dashed #002C5B;
  border-radius: 8px;
  text-align: center;
  background: #fafafa;
}

.photo-release {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =====================
   Schedule Cards
===================== */
.schedule-scroll {
  max-height: 450px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.schedule-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: center;
}

.schedule-card strong {
  font-size: 1rem;
}

.schedule-card div {
  font-size: 0.85rem;
  line-height: 1.4;
}

.schedule-card:hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
}

/* =====================
   Admin Dashboard
===================== */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-tile {
  display: block;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  text-align: left;
}

.admin-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.10);
  border-color: #cbd5e1;
}

.admin-tile-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #002C5B;
  margin-bottom: 6px;
}

.admin-tile-sub {
  color: #475569;
  line-height: 1.35;
  font-weight: 600;
}

.admin-tile.secondary {
  border-color: #F2B11166;
}

.admin-tile.secondary .admin-tile-title {
  color: #0f172a;
}

.admin-tile.danger {
  border-color: #ef444466;
}

.admin-tile.danger .admin-tile-title {
  color: #b91c1c;
}

/* =====================
   Leader Highlight
===================== */
.leader-row td {
  background: #F2B111 !important;
  color: #002C5B !important;
  font-weight: 900;
}

.leader-row td:first-child {
  border-left: 4px solid #002C5B;
}

/* =====================
   Footer
===================== */
.site-footer,
footer {
  background: #002C5B;
  color: #fff;
  text-align: center;
  padding: 25px 20px;
  margin-top: 40px;
}

.site-footer p,
footer p {
  margin: 0;
}

/* =====================
   Utility Rows
===================== */
.toolbar,
.team-tools,
.filter-row,
.action-row,
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar > *,
.team-tools > *,
.filter-row > *,
.action-row > * {
  min-width: 0;
}

/* =====================
   Responsive
===================== */
@media (max-width: 900px) {
  .container {
    width: min(100%, calc(100% - 24px));
    margin: 20px auto;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #002C5B;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.20);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 13px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
  }

  .site-nav a::after {
    display: none;
  }

  .hero-inner,
  .home-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .slide {
    height: 300px;
  }

  .header-nav {
    gap: 16px;
    padding: 10px 0 14px;
  }
}

@media (max-width: 700px) {
  .schedule-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 0 0;
  }

  .header-inner {
    min-height: 72px;
    padding: 10px 0;
  }

  .site-logo {
    width: 46px;
    height: 46px;
  }

  .site-brand-text strong {
    font-size: 0.9rem;
  }

  .logo {
    width: 82px;
    height: 82px;
  }

  .section {
    padding: 16px;
    border-radius: 10px;
  }

  .hero {
    padding: 0 10px;
  }

  .hero-inner {
    padding: 16px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .sponsors-section {
    padding: 0 10px;
  }

  .sponsor-grid {
    grid-template-columns: 1fr;
  }

  .tiers {
    grid-template-columns: 1fr;
  }

  .standings-table {
    min-width: 640px;
  }

  .map-container {
    height: 240px;
  }
}