/* ================================
   GLOBAL RESET
================================ */

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

body {
  font-family: system-ui, sans-serif;
  background: #ffffff;
  color: #000;
  line-height: 1.5;
}

/* ================================
   HERO SECTION
================================ */

.hero {
  position: relative;
  text-align: center;
  padding: 80px 20px 60px;
  background: #000;
  color: #fff;
  margin-bottom: 40px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero h1 {
  position: relative;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  position: relative;
  font-size: 18px;
  opacity: 0.9;
}

/* ================================
   MODAL CLOSE BUTTONS
================================ */

.modal-content {
  position: relative;
  background: #111;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  margin: 40px auto;
}

.hidden {
  display: none !important;
}

.close-archive,
.close-modal,
.close-sponsor {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.close-archive::before,
.close-modal::before,
.close-sponsor::before {
  content: "×";
  font-size: 28px;
  font-weight: bold;
  line-height: 28px;
  color: #fff;
}

/* ================================
   ARCHIVE MODAL
================================ */

#archive-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

#archive-modal.hidden {
  display: none;
}

#archive-list {
  list-style: none;
  margin-top: 20px;
}

#archive-list li {
  padding: 10px;
  background: #222;
  margin-bottom: 8px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

/* ================================
   NEXT MATCH BLOCK
================================ */

.next-match {
  background: #f5f5f5;
  padding: 30px 20px;
  margin: 0 auto 40px;
  border-radius: 12px;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.match-header span {
  font-weight: 700;
  font-size: 18px;
}

.team-badge {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.match-info h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.match-info p {
  margin-bottom: 4px;
  color: #444;
}

/* ================================
   FIXTURE TABS
================================ */

.fx-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.fx-tabs button {
  flex: 1;
  padding: 12px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
}

.fx-tabs button.active {
  background: #b30000;
}

.fx-tab-content {
  display: none;
}

.fx-tab-content.active {
  display: block;
}

/* ================================
   BADGES
================================ */

.fx-opponent {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-badge {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ================================
   PREMIUM FIXTURES TABLE (DESKTOP)
================================ */

.fixtures-table,
.reserves-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin-bottom: 40px;
}

/* Alternating row shading */
.fixtures-table tr:nth-child(even),
.reserves-table tr:nth-child(even) {
  background: #fafafa;
}

.fixtures-table tr:nth-child(odd),
.reserves-table tr:nth-child(odd) {
  background: #ffffff;
}

/* Row container */
.fixtures-table tr,
.reserves-table tr {
  border-radius: 8px;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.15s ease;
}

/* Hover highlight */
.fixtures-table tr:hover,
.reserves-table tr:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Table cells */
.fixtures-table td,
.reserves-table td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 15px;
}

/* Header row */
.fixtures-table tr:first-child td,
.reserves-table tr:first-child td {
  background: none;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 2px solid #ddd;
  border-radius: 0;
}

/* Opponent column */
.fx-opponent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-badge {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Venue + ground */
.fx-venue {
  text-align: center;
  line-height: 1.25;
}

.fx-venue div:first-child {
  font-weight: 700;
  margin-bottom: 2px;
}

/* KO column */
.fixtures-table td:nth-child(4),
.reserves-table td:nth-child(4) {
  text-align: center;
  font-weight: 600;
}

/* Competition column with icon */
.fx-competition {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
  font-size: 14px;
}

.fx-competition::before {
  content: "??";
  font-size: 15px;
}

/* Home/Away colour coding */
.fx-home {
  color: #b30000;
  font-weight: 700;
}

.fx-away {
  color: #0044aa;
  font-weight: 700;
}

/* Next fixture highlight */
.fx-next {
  border-left: 6px solid #b30000 !important;
  box-shadow: 0 0 10px rgba(179,0,0,0.25);
}

/* ================================
   MOBILE FIXTURE CARDS (PREMIUM)
================================ */

@media (max-width: 600px) {

  .fixtures-table,
  .reserves-table {
    width: 100%;
    border-collapse: collapse;
  }

  .fixtures-table tr,
  .reserves-table tr {
    display: block;
    margin-bottom: 16px;
    padding: 14px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 0.15s ease;
  }

  .fixtures-table tr:hover,
  .reserves-table tr:hover {
    transform: translateY(-3px);
  }

  .fixtures-table td,
  .reserves-table td {
    display: block;
    padding: 5px 0;
    text-align: left !important;
    border: none;
  }

  .fixtures-table tr:first-child,
  .reserves-table tr:first-child {
    display: none;
  }

  /* Date */
  .fixtures-table td:nth-child(1),
  .reserves-table td:nth-child(1) {
    font-weight: 700;
    font-size: 1.05em;
  }

  /* Opponent */
  .fixtures-table td:nth-child(2),
  .reserves-table td:nth-child(2) {
    font-size: 1.2em;
    margin-top: 4px;
  }

  /* KO */
  .fixtures-table td:nth-child(4),
  .reserves-table td:nth-child(4) {
    font-weight: 700;
    color: #b30000;
  }

  /* Competition */
  .fixtures-table td:nth-child(5),
  .reserves-table td:nth-child(5) {
    color: #666;
    font-size: 0.95em;
  }

  /* Next fixture highlight */
  .fx-next {
    border-left: 5px solid #b30000 !important;
  }
}

/* ================================
   HEADER (RED)
================================ */

.header {
  background: #b30000;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  width: 42px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.4));
}

.club-name {
  font-size: 20px;
  font-weight: 600;
}

/* ================================
   MOBILE MENU BUTTON
================================ */

.menu-btn {
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  z-index: 10000;
}

.menu-btn span {
  display: block;
  width: 100%;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ================================
   MOBILE MENU
================================ */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #000;
  color: #fff;
  padding: 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
}

.mobile-menu.show {
  transform: translateX(0);
}

.mobile-menu h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #b30000;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #333;
  font-size: 18px;
}

.mobile-menu a:hover {
  color: #b30000;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9998;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================================
   LEAGUE TABLE
================================ */

.league-table {
  margin-bottom: 40px;
}

.league-scroll {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #ccc;
  margin-top: 10px;
}

.league-compact {
  background: #b30000;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* ================================
   NEWS CARDS
================================ */

.news-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 16px;
  margin-bottom: 20px;
}

.news-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.news-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.news-card p {
  color: #444;
  margin-bottom: 10px;
}

.news-link {
  color: #b30000;
  font-weight: 600;
  text-decoration: none;
}

/* ================================
   NEWS GRID
================================ */

#newsGrid {
  padding: 20px;
  display: grid;
  gap: 20px;
}

.news-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
}

.news-item img {
  width: 100%;
  border-radius: 12px 12px 0 0;
}

.news-item-content {
  padding: 14px;
}

.news-item-content h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.news-item-content p {
  color: #555;
}

.page-btn {
  padding: 8px 14px;
  margin: 4px;
  border: none;
  background: #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.page-btn.active {
  background: #b30000;
  color: #fff;
}

/* ================================
   ARTICLE PAGE
================================ */

.article-header {
  padding: 20px;
  text-align: center;
}

.article-header h1 {
  font-size: 26px;
  margin-bottom: 10px;
}

.article-meta {
  color: #666;
  margin-bottom: 20px;
}

#articleImage {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}

#articleContent {
  padding: 20px;
  color: #333;
}

/* ================================
   TEAMS PAGE
================================ */

.teams-header {
  padding: 32px 16px;
  text-align: center;
  background: #f5f5f5;
}

.teams-header h1 {
  font-size: 28px;
}

.teams-grid {
  padding: 24px 16px;
  display: grid;
  gap: 20px;
}

.team-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.team-card:hover {
  transform: translateY(-3px);
}

.team-header {
  padding: 32px 16px;
  text-align: center;
  background: #f5f5f5;
}

.team-section {
  padding: 24px 16px;
}

.team-list {
  list-style: none;
}

.team-list li {
  background: #fff;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ================================
   SPONSOR GRID (STATIC)
================================ */

#sponsor-grid {
  padding: 20px;
  display: grid;
  gap: 20px;
}

#sponsor-grid img {
  width: 100%;
  border-radius: 10px;
}

/* ================================
   FOOTER
================================ */

.footer {
  background: #111;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-badge {
  width: 80px;
  height: auto;
  margin-bottom: 20px;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 25px;
}

.footer-links a {
  color: #ddd;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #b30000;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
}

.social-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  background: #222;
  border-radius: 50%;
  line-height: 36px;
  text-align: center;
  font-size: 14px;
  color: #fff;
  transition: background 0.2s ease;
}

.social-icon:hover {
  background: #b30000;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 15px;
  font-size: 14px;
  color: #aaa;
}

/* ================================
   PROGRAMME OVERLAY
================================ */

#programme-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z