/* =========================================
   1. CORE VARIABLES & SETUP
   ========================================= */
:root {
  /* Accessible color palette */
  --primary-blue: #1e6c93;
  --primary-focus: #005fcc; /* Dedicated focus color */
  --text-white: #ffffff;
  --text-dark: #212121;
  --overlay: rgba(26, 24, 24, 0.75); /* Darker for better text contrast */
}

/* Operational Fix: Single Source of Truth for Backgrounds */
body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--text-white);
  /* Combined gradient and image into one reliable property */
  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;
}

* {
  box-sizing: border-box; /* Essential for predictable layouts */
}

/* =========================================
   2. ACCESSIBILITY UTILITIES
   ========================================= */
/* Skip Link */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  background: var(--primary-blue);
  color: white;
  padding: 12px 20px;
  font-weight: bold;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}

/* Consolidated High-Contrast Focus Indicators */
/* This covers Nav, Buttons, Inputs, and Links in one block */
:focus-visible {
  outline: 3px solid var(--primary-focus);
  outline-offset: 2px;
}

/* Specific background highlights for dark themes */
nav a:focus-visible,
button:focus-visible,
input:focus-visible {
  background-color: rgba(0, 95, 204, 0.2);
}

/* =========================================
   3. BASE LAYOUT & TYPOGRAPHY
   ========================================= */
/* Operational Fix: Global Link Styling */
/* Forces all links to white to ensure contrast against dark background */
a {
  color: var(--text-white);
  text-decoration: underline; /* Accessibility: Distinguishes links from text */
}

a:hover {
  text-decoration: none; /* Visual feedback on hover */
  opacity: 0.8;
}

header {
  padding: 2rem;
  text-align: center;
   /* Increased opacity for legibility */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: var(--text-white);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  padding: 5px 10px;
  transition: all 0.2s ease;
}

nav a:hover {
  border-bottom-color: var(--text-white);
}

main {
  flex: 1;
  width: 100%;
  max-width: 900px; /* Capped for Desktop readability */
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h2 {
  border-bottom: 2px solid var(--primary-blue); /* Thicker for visibility */
  padding-bottom: 10px;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

h3 {
  color: gold;
}

.gold-text {
  color: gold; /* Matches your theme */
  /* color: gold;    <-- Alternatively, use the web keyword 'gold' (more yellow) */
}
/* =========================================
   4. DATA TABLES & CONTENT
   ========================================= */
/* Robust Table Handling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: top;
}

th {
  font-weight: bold;
  color: #8acbf3; /* Lighter blue for contrast against dark bg */
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Event Cards */
article {
  margin-bottom: 2rem;
}

h3.event-day {
  font-weight: bold;
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #fff;
  background-color: var(--primary-blue);
  padding: 6px 12px;
  display: inline-block;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.9);
  margin-top: auto;
}

/* =========================================
   5. RESPONSIVE REMEDIATION
   ========================================= */

/* --- LAPTOP (Max-Width: 1024px) --- */
@media (max-width: 1024px) {
  main {
    max-width: 90%; /* Allow more flex on smaller laptops */
  }

  h1 {
    font-size: 2.5rem;
  }
}

/* --- TABLET / MOBILE (Max-Width: 768px) --- */
@media (max-width: 768px) {
  /* Layout: Switch navigation to vertical stack */
  nav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: center; /* Center align the stack */
  }

  nav a {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 15px; /* Large touch targets (Fitts's Law) */
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-align: center;
    border-bottom: none; /* Remove underline style for button style */
  }

  nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  /* Typography Scaling */
  h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  h2 {
    font-size: 1.4rem;
  }

  /* Table Mitigation: Horizontal Scroll Container */
  /* We wrap the table logic here only for screens that need it */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
  }
}

/* --- SMALL MOBILE (Max-Width: 480px) --- */
@media (max-width: 480px) {
  header {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  /* Operational Fix: Disable Fixed Background */
  /* Fixed backgrounds cause jitter/repaint issues on mobile GPUs */
  body {
    background-attachment: scroll;
  }

  .delivery-btn {
    width: 100%;
    padding: 1rem;
  }
}




