/* ============================================================
   Leeds United Archive — Design System
   Colour tokens and base styles
   
   Primary:   #1D428A (Leeds navy blue)
   Secondary: #FFCD00 (Leeds yellow)
   Base:      #FFFFFF (white — Leeds home colours)
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Barlow+Condensed:wght@400;600;700&family=Source+Serif+4:wght@400;600&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* Brand colours */
  --club-blue-deep:      #1D428A;
  --club-blue-mid:       #2855A4;
  --club-blue-light:     #3D6FCC;
  --club-yellow:         #FFCD00;
  --club-yellow-light:   #FFE066;
  --club-yellow-dark:    #CCA300;
  --club-white:          #FFFFFF;

  /* Text colours */
  --club-text-dark:      #0D1F3C;
  --club-text-mid:       #3D4F6B;
  --club-text-light:     #6B7A99;
  --club-text-hint:      #9AABC2;
  --club-text-on-blue:   #FFFFFF;
  --club-text-on-yellow: #1D428A;

  /* Background shades */
  --club-bg:             #F4F6FA;    /* page background — very light blue-grey */
  --club-bg-card:        #FFFFFF;
  --club-border:         #D0D8E8;
  --club-border-light:   #E8EDF5;

  /* Semantic — mapped to brand */
  --club-primary:        var(--club-blue-deep);
  --club-accent:         var(--club-yellow);
  --club-accent-dark:    var(--club-yellow-dark);

  /* Typography */
  --font-display:        'Playfair Display', Georgia, serif;
  --font-label:          'Barlow Condensed', Arial Narrow, sans-serif;
  --font-body:           'Source Serif 4', Georgia, serif;

  /* Spacing & shape */
  --radius-sm:           3px;
  --radius-md:           6px;
  --max-width:           1200px;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--club-text-dark);
  background: var(--club-bg);
  margin: 0;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--club-blue-deep);
  margin-top: 0;
}

a { color: var(--club-blue-mid); }
a:hover { color: var(--club-blue-deep); }

/* ── PAGE WRAPPER ── */
.archive-page-wrap {
  padding: 1.5rem 0 3rem;
}

.archive-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--club-blue-deep);
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--club-yellow);
  margin-bottom: 1.5rem;
}

/* ── PANEL HEADER (replaces prog-panel-header) ── */
.panel-header {
  background: var(--club-blue-deep);
  color: var(--club-yellow);
  padding: .7rem 1rem;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  border-bottom: 2px solid var(--club-yellow);
}

/* ── CARDS ── */
.archive-card {
  border: 1px solid var(--club-border);
  background: var(--club-bg-card);
  border-radius: var(--radius-sm);
}

/* Sidebar — light */
.sidebar-light {
  border: 1px solid var(--club-border);
  background: var(--club-bg-card);
  border-radius: var(--radius-sm);
}
.sidebar-light .card-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--club-blue-deep);
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--club-yellow);
  margin-bottom: .75rem;
}

/* Sidebar — dark (blue) */
.sidebar-dark {
  border: 1px solid var(--club-blue-deep);
  background: var(--club-blue-deep);
  border-radius: var(--radius-sm);
}
.sidebar-dark .card-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--club-yellow);
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: .75rem;
}

/* ── BUTTONS ── */
.btn-primary-blue {
  display: inline-block;
  background: var(--club-blue-deep);
  color: var(--club-yellow) !important;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary-blue:hover {
  background: var(--club-blue-mid);
  color: var(--club-yellow) !important;
  text-decoration: none;
}

.btn-yellow {
  display: inline-block;
  background: var(--club-yellow);
  color: var(--club-blue-deep) !important;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 9px 20px;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.btn-yellow:hover {
  background: var(--club-yellow-dark);
  text-decoration: none;
}

.btn-outline-blue {
  display: inline-block;
  background: transparent;
  color: var(--club-blue-mid) !important;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1.5px solid var(--club-blue-mid);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-outline-blue:hover {
  background: var(--club-blue-deep);
  color: #fff !important;
  border-color: var(--club-blue-deep);
  text-decoration: none;
}

/* ── TABLES ── */
.archive-table thead th {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--club-blue-deep) !important;
  color: var(--club-yellow) !important;
  border-bottom: 2px solid var(--club-yellow) !important;
  padding: .5rem .75rem;
}
.archive-table tbody tr:hover td {
  background: #EEF2FA;
}
.archive-table td {
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--club-border-light);
  vertical-align: middle;
}

/* Leeds row highlight in league tables */
.leeds-table-wrap tr.leeds-row,
.leeds-table-wrap tr.leeds-row:hover {
  background: var(--club-yellow) !important;
  color: var(--club-blue-deep) !important;
  font-weight: 700;
}

/* ── STAT CARDS ── */
.stat-card {
  text-align: center;
  padding: .75rem;
  border: 1px solid var(--club-border);
  background: var(--club-bg-card);
  height: 100%;
}
.stat-card-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--club-blue-deep);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-card-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--club-text-light);
}

/* ── ALERTS ── */
.archive-alert {
  padding: .75rem 1rem;
  font-size: .88rem;
  border-left: 4px solid;
  margin-bottom: 1rem;
}
.archive-alert--info    { background: #EEF4FF; border-color: var(--club-blue-mid); color: var(--club-text-mid); }
.archive-alert--success { background: #EDFAF0; border-color: #28a745; color: #155724; }
.archive-alert--warning { background: #FFFBE6; border-color: var(--club-yellow-dark); color: #856404; }
.archive-alert--error   { background: #FFF0F0; border-color: #dc3545; color: #842029; }

/* ── ALPHA LETTER GRID ── */
.alpha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px; margin: 2px;
  font-family: var(--font-display);
  font-size: .88rem; font-weight: 700;
  color: var(--club-blue-mid);
  background: var(--club-bg-card);
  border: 1.5px solid var(--club-border);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s, border-color .15s;
}
.alpha-btn:hover { background: var(--club-blue-deep); color: var(--club-yellow); border-color: var(--club-blue-deep); text-decoration: none; }
.alpha-btn.active { background: var(--club-blue-deep); color: var(--club-yellow); border-color: var(--club-blue-deep); }
.alpha-btn.disabled { opacity: .35; pointer-events: none; }

/* ── RESULT COLOURS ── */
.result-w { background: var(--club-blue-deep); color: #fff; }
.result-d { background: var(--club-yellow); color: var(--club-blue-deep); }
.result-l { background: #dc3545; color: #fff; }
.result-badge {
  font-family: var(--font-label);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
  display: inline-block;
}
.match-row-w { background: #EEF4FF; }
.match-row-d { background: #FFFBE6; }
.match-row-l { background: #FFF0F0; }

/* ── MATCH/SECTION TABS ── */
.archive-tabs { border-bottom: 2px solid var(--club-yellow); margin-bottom: 1.5rem; }
.archive-tabs .nav-link {
  font-family: var(--font-label); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--club-text-mid); border: none; border-radius: 0; padding: .6rem 1.1rem;
}
.archive-tabs .nav-link:hover { color: var(--club-blue-deep); background: var(--club-bg); }
.archive-tabs .nav-link.active {
  color: var(--club-blue-deep); background: transparent;
  border-bottom: 3px solid var(--club-yellow); margin-bottom: -2px;
}

/* ── MONTH HEADER ── */
.month-header {
  background: var(--club-blue-deep);
  color: var(--club-yellow);
  padding: .6rem 1rem;
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 700;
  border-bottom: 2px solid var(--club-yellow);
}

/* ── SEASON NAV BUTTON ── */
.season-nav-btn {
  font-family: var(--font-label); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--club-blue-mid); border: 1.5px solid var(--club-blue-mid);
  padding: 6px 14px; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px; transition: background .2s, color .2s;
  border-radius: var(--radius-sm);
}
.season-nav-btn:hover { background: var(--club-blue-deep); color: var(--club-yellow); border-color: var(--club-blue-deep); text-decoration: none; }

/* ── APPEARANCE MILESTONE BADGES ── */
.apps-badge {
  font-family: var(--font-label);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 3px 9px; border-radius: 12px; display: inline-block;
}

/* ── SECTION RULE ── */
.archive-section-rule {
  border: none;
  border-top: 2px solid var(--club-border);
  margin: 1.5rem 0;
}

/* ── LIGHTBOX FIX ── */
.lightboxOverlay { z-index: 9999 !important; opacity: 0.85 !important; }
.lightbox { z-index: 10000 !important; }
.lightbox .lb-image {
  max-height: 82vh !important;
  max-width: min(600px, 90vw) !important;
  width: auto !important;
  height: auto !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .archive-page-title { font-size: 1.35rem; }
  .stat-card-number   { font-size: 1.35rem; }
}
