/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
  --primary-blue: #1e6c93;
  --primary-focus: #005fcc;
  --text-white: #ffffff;
  --text-dark: #212121;
  /* Darker overlay for better text contrast reliability */
  --overlay: rgba(0, 0, 0, 0.75);
  --spacing-unit: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--text-white);
  /* Operational Fix: Single source of truth for background */
  background:
    linear-gradient(var(--overlay), var(--overlay)),
    url("../assets/images/herojpeg.jpeg") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
   2. ACCESSIBILITY UTILITIES
   ========================================= */
/* Skip Link (Essential for Keyboard Users) */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--primary-blue);
  color: white;
  padding: 12px 20px;
  font-weight: bold;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* Global Focus Indicators (High Visibility) */
:focus-visible {
  outline: 3px solid var(--primary-focus);
  outline-offset: 4px;
}

/* Specific overrides for dark backgrounds */
nav a:focus-visible,
button:focus-visible,
input:focus-visible {
  background-color: rgba(0, 95, 204, 0.2);
}

/* =========================================
   3. BASE LAYOUT (Mobile Default)
   ========================================= */
header {
  padding: 1.5rem; /* Reduced slightly for mobile efficiency */
  text-align: center;
   /* Higher opacity for readability */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column; /* Stack vertically for mobile */
  gap: 10px;
}

nav a {
  color: var(--text-white);
  text-decoration: none;
  font-weight: bold;
  display: block; /* Full width touch target */
  padding: 15px; /* Min 44px height compliance */
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2); /* Visual separation */
  transition: all 0.2s ease;
}

main {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  font-size: 2.2rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 10px;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

/* =========================================
   4. EVENTS & DATA TABLES
   ========================================= */
article {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.05); /* Card effect */
  padding: 15px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

h3.event-day {
  font-weight: bold;
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #fff;
  background-color: var(--primary-blue);
  padding: 6px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive Table Handling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  /* Operational Fix: Remove overflow logic here, handle via wrapper if needed */
}

th,
td {
  text-align: left;
  padding: 12px 8px; /* Slightly tighter for mobile */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: top;
}

th {
  font-weight: bold;
  color: var(--primary-white);
  text-transform: uppercase;
  font-size: 0.9rem;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.9);
  margin-top: auto; /* Pushes footer to bottom */
}

/* =========================================
   5. RESPONSIVE BREAKPOINTS
   ========================================= */

/* --- TABLET / LAPTOP (Min-Width: 768px) --- */
@media (min-width: 768px) {
  header {
    padding: 2rem;
  }

  nav ul {
    flex-direction: row; /* Switch to horizontal row */
    justify-content: center;
    gap: 2rem;
  }

  nav a {
    display: inline-block;
    padding: 8px 12px;
    background: transparent; /* Remove mobile background */
    border-bottom: 2px solid transparent;
  }

  nav a:hover,
  nav a:focus {
    background: transparent;
    border-bottom-color: var(--text-white);
  }

  h1 {
    font-size: 3rem;
  }

  article {
    padding: 0; /* Remove card padding on desktop for cleaner list look */
    background: transparent;
    border: none;
  }
}

/* --- MOBILE OPTIMIZATION (Max-Width: 768px) --- */
@media (max-width: 768px) {
  /* Operational Fix: Disable fixed background on mobile for performance */
  body {
    background-attachment: scroll;
  }

  /* Force tables to be scrollable if content overflows */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
  }
}

/* --- SMALL MOBILE (Max-Width: 400px) --- */
@media (max-width: 400px) {
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.3rem;
  }

  /* Stack table cells for very small screens if needed */
  th,
  td {
    display: block;
    width: 100%;
    padding-left: 0;
  }

  th {
    padding-bottom: 0;
    color: #8abce4; /* Lighter blue for better contrast on small dark screens */
  }

  td {
    padding-top: 5px;
    border-bottom: none;
  }

  tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: block;
    margin-bottom: 15px;
  }
}




