/* ============================================================
   YLHS MUSTANGS FOOTBALL — COMPONENTS
   Reusable building blocks shared across pages.
   Loaded on every page (after global.css).
   ============================================================ */

/* ---------- Section shell ---------- */
.section {
  padding: clamp(56px, 8vw, 100px) 0;
}
.section--surface {
  background: var(--bg-surface);
}
.section--navy {
  background: var(--navy-deep);
  color: var(--white);
}

.section__head {
  max-width: 760px;
  margin-bottom: 48px;
}
.section__head--center {
  margin-inline: auto;
  text-align: center;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--crimson);
  display: block;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.05;
}
.section--navy .section-title {
  color: var(--white);
}
.section-intro {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.7;
}
.section--navy .section-intro {
  color: var(--silver-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--primary {
  background: var(--crimson);
  color: var(--white);
  border-color: var(--crimson);
}
.btn--primary:hover,
.btn--primary:focus {
  background: var(--crimson-light);
  border-color: var(--crimson-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.3);
}
.btn--secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn--secondary:hover,
.btn--secondary:focus {
  background: transparent;
  color: var(--white);
  transform: translateY(-2px);
}
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-mid);
}
.btn--outline:hover,
.btn--outline:focus {
  border-color: var(--crimson);
  color: var(--crimson);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--lg {
  padding: 16px 34px;
  font-size: 15px;
}

/* ---------- Arrow link ---------- */
.arrow-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
}
.arrow-link::after {
  content: "\f061"; /* fa-arrow-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  transition: transform 0.2s;
}
.arrow-link:hover,
.arrow-link:focus {
  gap: 12px;
  color: var(--crimson-light);
}
.arrow-link:hover::after {
  transform: translateX(4px);
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--crimson);
}

/* ---------- Hero (generic, dark) ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(15, 27, 58, 0.92) 0%,
      rgba(15, 27, 58, 0.6) 50%,
      rgba(15, 27, 58, 0.85) 100%
    ),
    linear-gradient(0deg, rgba(200, 16, 46, 0.08) 0%, transparent 40%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(90px, 15vw, 170px) var(--gutter) clamp(80px, 14vw, 150px);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 7.5vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  max-width: 16ch;
}
.hero__subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--silver-light);
  margin-top: 22px;
  max-width: 56ch;
  line-height: 1.7;
}
/* Hero record/stat badges (team pages) */
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.hero__badge {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--silver-light);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 9px 15px;
  border-radius: 6px;
}
.hero__badge strong {
  color: var(--white);
  font-weight: 700;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- Stat bar ---------- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.stat {
  background: var(--navy-deep);
  padding: 44px 24px;
  text-align: center;
  position: relative;
}
.stat::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--crimson);
  opacity: 0.4;
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 56px);
  color: var(--crimson);
  line-height: 1;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--silver-light);
  margin-top: 12px;
}
@media (max-width: 680px) {
  .stat-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- News card ---------- */
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.news-card__img-wrap {
  display: block;
  overflow: hidden;
}
.news-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .news-card__img {
  transform: scale(1.05);
}
.news-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.news-card__meta .date {
  color: var(--text-muted);
}
.news-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--text-heading);
  text-transform: uppercase;
  line-height: 1.2;
}
.news-card__title a {
  color: inherit;
  transition: color 0.2s;
}
.news-card__title a:hover {
  color: var(--crimson);
}
.news-card__excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.65;
  flex: 1;
}

/* ---------- Sponsor slider (auto-scroll marquee) ---------- */
.sponsor-slider {
  position: relative;
  overflow: hidden;
  /* fade the edges */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}
.sponsor-track {
  display: flex;
  align-items: stretch;
  gap: 24px;
  width: max-content;
  animation: sponsor-scroll 70s linear infinite;
}
.sponsor-slider:hover .sponsor-track {
  animation-play-state: paused;
}
.sponsor-slide {
  flex: 0 0 auto;
  width: 190px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}
.sponsor-slide:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.sponsor-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@keyframes sponsor-scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* track holds two identical sets → -50% loops seamlessly */
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(200, 16, 46, 0.08) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 50%,
      rgba(200, 16, 46, 0.06) 0%,
      transparent 60%
    );
  pointer-events: none;
}
.cta-band__inner {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(64px, 9vw, 110px) var(--gutter);
}
.cta-band__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 50px);
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 1px;
}
.cta-band__body {
  font-size: 17px;
  color: var(--silver-light);
  margin-top: 18px;
  line-height: 1.7;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

/* ---------- Shared helpers ---------- */
.center-cta {
  text-align: center;
  margin-top: 44px;
}

/* ============================================================
   TEAM PAGE COMPONENTS — roster + schedule
   Shared by Varsity / JV / Freshman.
   ============================================================ */

/* Roster filter */
.roster-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.roster-filter__btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.roster-filter__btn:hover,
.roster-filter__btn:focus {
  border-color: var(--crimson);
  color: var(--crimson);
  background: var(--bg-card);
}
.roster-filter__btn.is-active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--white);
}

/* Roster grid + player card */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.player-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.player-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--crimson);
}
.player-card__num {
  flex: 0 0 52px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1;
  color: var(--crimson);
}
.player-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.player-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-heading);
  text-transform: uppercase;
  line-height: 1.1;
}
.player-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
  margin-top: 6px;
}
.player-card__measure {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Schedule grid + game card */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.game {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.game:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.game__date {
  text-align: center;
  line-height: 1;
}
.game__mo {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
}
.game__dy {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--text-heading);
  margin-top: 3px;
}
.game__opp {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-heading);
  text-transform: uppercase;
  line-height: 1.15;
}
.game__loc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 5px;
}
.game__right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.result-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}
.result-badge--w {
  background: var(--crimson-dim);
  color: var(--crimson);
}
.result-badge--l {
  background: rgba(123, 125, 128, 0.15);
  color: var(--silver-dark);
}
.game__score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-heading);
}
.game__time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-heading);
}
.game__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
}
.game__cta:hover {
  color: var(--crimson-light);
}

/* Team component responsive */
@media (max-width: 1024px) {
  .roster-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 820px) {
  .roster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .schedule-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .roster-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DATA TABLE — shared (standings, season records, record book)
   ============================================================ */
.table-wrap {
  /* overflow-x:auto clips the navy header to the rounded corners AND
     allows horizontal scroll on small screens */
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}
/* Header — navy bar with a crimson underline */
.data-table thead {
  background: var(--navy-deep);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--silver-light);
  text-align: left;
  padding: 16px 20px;
  border-bottom: 2px solid var(--crimson);
  white-space: nowrap;
}
/* Body — zebra striping + crimson hover */
.data-table td {
  font-size: 15px;
  color: var(--text-body);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
}
.data-table tbody tr {
  transition: background 0.15s ease;
}
.data-table tbody tr:nth-child(even) {
  background: var(--bg-surface);
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: var(--crimson-dim);
}
.data-table .col-strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--text-heading);
}
/* Highlighted row (e.g. YLHS in standings) */
.data-table .is-highlight,
.data-table .is-highlight:hover {
  background: var(--crimson-dim);
  box-shadow: inset 3px 0 0 var(--crimson);
}

/* ============================================================
   FORM — shared (recruiting, contact, sponsor inquiries…)
   ============================================================ */
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form__field {
  display: flex;
  flex-direction: column;
}
.form__field--full {
  grid-column: 1 / -1;
}
.form__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form__label .req {
  color: var(--crimson);
}
.form__input,
.form__select,
.form__textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form__textarea {
  min-height: 130px;
  resize: vertical;
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-dim);
}
.form__actions {
  margin-top: 24px;
}
@media (max-width: 600px) {
  .form__grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   WATCH LIVE — broadcast card (shared: Game Day, Media Center)
   Place inside a .section (and .section--surface) wrapper.
   ============================================================ */
.watchlive {
  position: relative;
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(44px, 6vw, 72px) clamp(24px, 5vw, 56px);
}
.watchlive::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.22) 0%, transparent 65%);
  pointer-events: none;
}
.watchlive > * {
  position: relative;
}
.watchlive__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--silver-light);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 26px;
}
.watchlive__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson);
  animation: watchlive-blink 1.5s ease-in-out infinite;
}
.watchlive__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--crimson);
  color: var(--white);
  font-size: 26px;
  padding-left: 5px;
  margin-bottom: 26px;
}
.watchlive__play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--crimson);
  animation: watchlive-pulse 2.2s ease-out infinite;
}
.watchlive__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 38px);
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0.5px;
}
.watchlive__text {
  font-size: 17px;
  color: var(--silver-light);
  line-height: 1.7;
  margin: 14px auto 30px;
  max-width: 48ch;
}
@keyframes watchlive-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes watchlive-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .watchlive__dot,
  .watchlive__play::after {
    animation: none;
  }
}
