/* NNGL Shared Styles - Mobile-first design system */

:root {
  --header-bg: #2c3845;
  --accent: #cc494f;
  --cta: #39bc72;
  --gold: rgba(174,147,94,0.5);
  --text-dark: #252525;
  --text-heading: #353535;
  --text-muted: #686868;
  --footer-bg: #303d4c;
  --bg-light: #f7f8fa;
  --bg-white: #ffffff;
  --border: #e2e5e8;
  --row-alt: rgba(0,0,0,0.015);
  --row-border: rgba(0,0,0,0.03);
  --win: #39bc72;
  --loss: #cc494f;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-header: 0 2px 8px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --max-width: 1100px;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER (injected by nav.js)
   ============================================================ */
.site-header {
  background: var(--header-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-header);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
}
.site-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.site-header-brand:hover { text-decoration: none; }
.site-header-logo { height: 36px; width: auto; filter: invert(1); }
.site-header-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Desktop nav */
.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav-item {
  position: relative;
}
.site-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border: none;
}
.site-nav-link:hover,
.site-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  text-decoration: none;
}
.site-nav-arrow {
  font-size: 8px;
  transition: transform 0.2s;
}

/* Dropdown */
.site-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  min-width: 180px;
  padding: 6px 0;
  z-index: 300;
}
.site-nav-item:hover .site-nav-dropdown,
.site-nav-item.open .site-nav-dropdown {
  display: block;
}
.site-nav-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.15s;
}
.site-nav-dropdown a:hover {
  background: var(--bg-light);
  text-decoration: none;
}

/* Hamburger */
.site-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* Mobile nav */
.site-nav-mobile {
  display: none;
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px 16px 16px;
  max-height: 80vh;
  overflow-y: auto;
}
.site-nav-mobile.open { display: block; }
.site-nav-mobile a,
.site-nav-mobile button {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.site-nav-mobile a:hover { color: #fff; text-decoration: none; }
.site-nav-mobile .mobile-section-label {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 0 6px;
  border-bottom: none;
}
.site-nav-mobile .mobile-sub-link {
  padding-left: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-nav-toggle { display: block; }
}

/* ============================================================
   FOOTER (injected by footer.js)
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.6);
  padding: 24px 16px;
  font-size: 13px;
  text-align: center;
  margin-top: auto;
}
.site-footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   CONTROLS BAR (year selectors, filters)
   ============================================================ */
.controls {
  max-width: var(--max-width);
  margin: 16px auto 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.year-select {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 32px 8px 14px;
  border: 2px solid var(--header-bg);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232c3845' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  color: var(--header-bg);
}
.controls-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Filter pills */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--bg-white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 16px; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: var(--bg-light);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--row-border);
}
.data-table tr:hover td {
  background: rgba(0,0,0,0.01);
}
.data-table .num {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   FIXTURE CARDS (mobile)
   ============================================================ */
.fixture-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fixture-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.fixture-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f0f2f5;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fixture-date { color: var(--text-muted); }
.fixture-type-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
}
.badge-div1 { background: var(--header-bg); }
.badge-members { background: #5a6f80; }
.badge-div3 { background: #7a8a96; }
.badge-juniors { background: #4a9aba; }
.badge-seniors-a { background: var(--header-bg); }
.badge-seniors-b { background: #5a6f80; }
.badge-knockout { background: var(--accent); }

.fixture-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
}
.fixture-home {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-heading);
}
.fixture-away {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-heading);
  text-align: right;
}
.fixture-vs {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-muted);
  text-align: center;
}
.fixture-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 900;
  color: var(--header-bg);
}
.fixture-score .dash {
  font-size: 14px;
  color: var(--text-muted);
}
.fixture-venue {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 16px 8px;
}
.fixture-card.completed .fixture-meta {
  background: var(--header-bg);
}
.fixture-card.completed .fixture-date {
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   MONTH GROUPS
   ============================================================ */
.month-group { margin-bottom: 24px; }
.month-header {
  font-size: 13px;
  font-weight: 900;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 8px;
}

/* ============================================================
   TABS
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}
.tab-btn {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-heading); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--header-bg);
  color: #fff;
  padding: 48px 16px;
  text-align: center;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-logo { height: 80px; margin-bottom: 16px; }
.hero h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  max-width: 500px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .hero { padding: 64px 16px; }
  .hero-logo { height: 100px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 18px; }
}

/* ============================================================
   QUICK LINKS GRID
   ============================================================ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  transition: all 0.2s;
}
.quick-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.quick-link-icon {
  font-size: 28px;
  line-height: 1;
}
@media (min-width: 768px) {
  .quick-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .quick-link {
    padding: 28px 16px;
    font-size: 14px;
  }
}
@media (min-width: 1024px) {
  .quick-links { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-heading);
  margin: 24px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.section-heading:first-child { margin-top: 0; }

/* ============================================================
   LOADING / EMPTY STATES
   ============================================================ */
.loading {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-win { color: var(--win); }
.text-loss { color: var(--loss); }
.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
