/* ============================================================
   WGMBL — West Georgia Men's Baseball League
   Main stylesheet

   Colors:
     deep navy  #12284b   (header, headings)
     red        #c8102e   (accents, buttons)
     warm cream #faf6ee   (page background)
   The "WGMBL" wordmark uses the collegiate block-letter font
   Alfa Slab One (loaded from Google Fonts in each page's
   <head>). If the font can't load, it falls back to Georgia.
   ============================================================ */

:root {
  --navy: #12284b;
  --navy-dark: #0b1a33;
  --red: #c8102e;
  --red-dark: #a00d25;
  --red-deep: #7f0d22;      /* offset shadow behind the WGMBL wordmark */
  --cream: #faf6ee;
  --white: #ffffff;
  --text: #1e2a3a;
  --muted: #5b6b7f;
  --line: #e6dfd0;
  --footer-link: #cbd8ee;   /* readable link color on the navy footer */
  --join-link: #fda4af;     /* readable link color on the navy Join box */
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 4px solid var(--red);
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
}

/* Clean inline-SVG baseball next to the wordmark */
.brand-ball {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
}

/* Collegiate block letters, vintage baseball-jersey feel */
.brand-text strong {
  display: block;
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--white);
  text-shadow: 3px 3px 0 var(--red-deep);
}

.brand-text small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #b9c4d6;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main-nav a.active {
  background: var(--red);
}

/* ---------- Hero (homepage) ---------- */

.hero {
  background:
    linear-gradient(rgba(11, 26, 51, 0.70), rgba(11, 26, 51, 0.45)),
    url("../images/hero.jpg") center 65% / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 4.5rem 1.25rem;
  border-bottom: 4px solid var(--red);
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: #d7dfec;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2.6rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.55);
}

.hero-intro {
  color: #e6ebf4;
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.55);
}

/* Baseball seam divider */
.seam {
  border: none;
  border-top: 3px dashed var(--red);
  margin: 2.5rem auto;
  max-width: 220px;
  opacity: 0.7;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  margin: 0.25rem;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--red-dark);
}

/* Small square button for the print icon on the schedule page */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--navy);
  color: var(--white);
}

/* ---------- Sections & cards ---------- */

.section {
  padding: 2.5rem 0;
}

.section h2 {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--navy);
}

.season-line {
  margin-top: 1rem;
  color: var(--muted);
}

.page-note {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(18, 40, 75, 0.06);
}

.card h3 {
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

.card .btn {
  margin-top: 1rem;
  margin-left: 0;
}

/* Small team table inside the homepage standings card */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.mini-table td {
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.mini-table .num {
  text-align: center;
}

/* Game rows inside the homepage schedule card */
.mini-game {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.mini-game:last-of-type {
  border-bottom: none;
}

.mini-date {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 5.5rem;
}

.mini-matchup {
  flex: 1;
  min-width: 10rem;
}

.mini-score {
  font-weight: 600;
}

/* Navy Join Us box (homepage + About page).
   Links use a light pink with underline so they stay
   readable on the dark background. */
.join-box {
  background: var(--navy);
  color: #f2f5fa;
  border-radius: 12px;
  border-top: 4px solid var(--red);
  padding: 2rem;
}

.join-box h2 {
  color: var(--white);
}

.join-box p {
  margin-bottom: 1rem;
}

.join-box p:last-child {
  margin-bottom: 0;
}

.join-box a {
  color: var(--join-link);
  font-weight: 700;
  text-decoration: underline;
}

.join-box a:hover {
  color: var(--white);
}

/* Team list on the About page */
.clubs-list {
  margin-top: 1rem;
}

/* ---------- Schedule toolbar (filter + print) ---------- */

.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy);
}

.filter-label select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
}

/* ---------- Schedule view toggle + calendar ---------- */

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.view-btn {
  border: 0;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.view-btn.active {
  background: var(--navy);
  color: var(--white);
}

#calendar-wrap[hidden],
.table-wrap[hidden] {
  display: none;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cal-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.25rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 0.25rem 0;
}

.cal-day {
  min-height: 5.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.35rem;
  background: var(--white);
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
}

.cal-daynum {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
}

.cal-game {
  font-size: 0.72rem;
  line-height: 1.3;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px dashed var(--line);
  color: var(--text);
  overflow-wrap: anywhere;
}

.cal-game .score {
  font-weight: 700;
}

.cal-game.upcoming {
  border-top-style: solid;
  border-top-color: var(--red);
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

thead th {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

tbody td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
}

tbody tr:nth-child(even) {
  background: #f4f0e6;
}

/* Colored dot next to each team name, using the team's usual colors */
.team-dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: baseline;
}

.num {
  text-align: center;
}

/* ---------- Quote (motivational blurb) ---------- */

.big-quote {
  background: var(--white);
  border-left: 6px solid var(--red);
  border-radius: 0 10px 10px 0;
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  font-size: 1.08rem;
  box-shadow: 0 2px 6px rgba(18, 40, 75, 0.06);
}

.big-quote p {
  margin-bottom: 1rem;
}

.big-quote p:last-child {
  margin-bottom: 0;
}

.big-quote footer {
  margin-top: 1rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #9fb0c8;
  text-align: center;
  padding: 1.75rem 1.25rem;
  font-size: 0.9rem;
  border-top: 4px solid var(--red);
  margin-top: 2rem;
}

.site-footer p {
  margin: 0.3rem 0;
}

.site-footer strong {
  color: var(--white);
}

.site-footer a {
  color: var(--footer-link);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--white);
}

/* ---------- Print: clean black-on-white schedule ---------- */

#print-sheet {
  display: none;
}

@media print {
  .site-header,
  .site-footer,
  .hero,
  main,
  .schedule-toolbar,
  .page-note {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  #print-sheet {
    display: block !important;
    color: #000;
    padding: 0.5rem;
  }

  #print-sheet h2 {
    color: #000;
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
  }

  #print-sheet p {
    color: #000;
    margin-bottom: 0.75rem;
  }

  #print-sheet table {
    width: 100%;
    border-collapse: collapse;
  }

  #print-sheet th,
  #print-sheet td {
    border: 1px solid #000;
    padding: 6px 8px;
    text-align: left;
    font-size: 12px;
    color: #000;
  }

  #print-sheet thead th {
    background: #eee !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Printable month calendar (when the calendar view is active) */
  #print-sheet .pcal td {
    width: 14.28%;
    height: 72px;
    vertical-align: top;
  }

  #print-sheet .pcal-daynum {
    font-weight: 700;
  }

  #print-sheet .pcal-game {
    margin-top: 3px;
    font-size: 11px;
  }
}

/* ---------- Dark mode ---------- */

@media (prefers-color-scheme: dark) {
  body {
    background: #0e1a2e;
    color: #e8e4d8;
  }

  .section h2,
  .card h3,
  .filter-label {
    color: #f0ead9;
  }

  .card,
  .table-wrap,
  .big-quote {
    background: #16263f;
    border-color: #2a3a55;
  }

  .card p,
  .page-note,
  .season-line,
  .mini-date,
  .big-quote footer {
    color: #a8b2c2;
  }

  tbody td {
    border-top-color: #2a3a55;
  }

  tbody tr:nth-child(even) {
    background: #12203a;
  }

  .mini-table td,
  .mini-game {
    border-bottom-color: #2a3a55;
  }

  .filter-label select,
  .icon-btn {
    background: #16263f;
    border-color: #2a3a55;
    color: #e8e4d8;
  }

  .view-toggle {
    background: #16263f;
    border-color: #2a3a55;
  }

  .view-btn {
    color: #e8e4d8;
  }

  .view-btn.active {
    background: var(--red);
    color: #fff;
  }

  .cal-day {
    background: #16263f;
    border-color: #2a3a55;
  }

  .cal-daynum,
  .cal-game {
    color: #e8e4d8;
  }

  .cal-game {
    border-top-color: #2a3a55;
  }

  .seam {
    opacity: 0.9;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .header-inner {
    justify-content: center;
    text-align: center;
  }

  .main-nav {
    justify-content: center;
  }

  .join-box {
    padding: 1.5rem;
  }

  /* Calendar stays usable on phones: shorter cells, smaller type */
  .cal-day {
    min-height: 3.25rem;
    padding: 0.2rem;
  }

  .cal-daynum {
    font-size: 0.75rem;
  }

  .cal-game {
    font-size: 0.6rem;
  }

  .cal-dow {
    font-size: 0.65rem;
  }
}
