/* === Merged CSS: styles.css === */
:root{
  --bg:#111;
  --text:#eee;
  --gold:#ffd700;
  --panel:#222;
  --border:#444;
  --black:#000;
}/* Reset & Base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Page Titles */
h1 {
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
}

/* Header & Nav */
header {
  display: flex;
  align-items: flex-end;
  padding: 15px 20px;
  background: var(--black);
  min-height: 120px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.logo img {
  height: 150px;
  width: auto;
}

nav {
  display: flex;
  align-items: flex-end;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  display: block;
  padding-bottom: 5px;
}

nav a:hover,
nav a.active {
  color: var(--gold);
}

/* Hero Section */
.hero {
  position: relative;
  background: url('../images/banner-color.webp') no-repeat center bottom/cover;
  height: 80vh;
  color: #fff;
  text-align: center;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  width: 100%;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.hero-overlay-content {
  margin-top: 4rem;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--gold);
  font-weight: 700;
  text-align: left;
}

.hero-overlay-content > div {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px 20px;
  border-radius: 10px;
  flex: 1 1 67%;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.hero-overlay-content h2 {
  margin: 0 0 10px;
}

.hero-overlay-content ul {
  margin: 0;
  padding-left: 20px;
  font-weight: 400;
  list-style-type: disc;
}

.hero-overlay-content a {
  color: var(--gold);
  text-decoration: underline;
}

.hero-overlay-content a:hover {
  color: #fff;
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero-overlay-content {
    flex-direction: column;
  }
  .hero-overlay-content > div {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 40px 15px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
  }

  .hero-overlay-content {
    flex-direction: column;
    gap: 30px;
    margin-top: 2rem;
  }

  .hero-overlay-content > div {
    flex: 1 1 100%;
    padding: 20px;
  }

  .hero-overlay-content h2 {
    font-size: 1.2rem;
  }

  .hero-overlay-content ul {
    font-size: 0.95rem;
    padding-left: 20px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding-left: 0;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav a {
    display: inline-block;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }
}


/* Main Content */
main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

section {
  background: var(--panel);
  padding: 20px 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

section h2 {
  color: var(--gold);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}

section p,
section ul {
  font-size: 1.1rem;
  color: #ddd;
}

section ul {
  padding-left: 20px;
}

/* Contact Info */
.contact-info-container {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 600px;
}

.contact-info-inner {
  text-align: left;
  display: inline-block;
}

.contact-section {
  margin-bottom: 30px;
}

.label {
  font-weight: bold;
  margin: 0 0 5px;
  color: var(--gold);
}

.contact-link {
  color: var(--gold);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

/* Map Section */
.map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a1a;
  padding: 40px 20px;
  border-radius: 15px;
  margin: 40px auto;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
  max-width: 1100px;
}

.map-container iframe {
  width: 100%;
  max-width: 800px;
  height: 500px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.25);
  transition: transform 0.3s ease;
}

.map-container iframe:hover {
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.35);
}

/* Raffle Prizes */
.prizes-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  padding: 20px;
  text-align: center;
}

.prize {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prize img {
  width: 100%;
  max-width: 700px;
  height: auto;
  border: 2px solid var(--gold);
  border-radius: 10px;
}

.prize p {
  margin-top: 10px;
  color: #fff;
}

/* Raffle iframe */
.iframe-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 800px;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  min-height: 1500px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Table Styling */
.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  color: var(--text);
  margin-bottom: 40px;
  font-size: 0.95rem;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.history-table th,
.history-table td {
  padding: 12px 16px;
   border: 1px solid #333;
}

.history-table th {
  background: var(--black);
  color: var(--gold);
}

.result-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: bold;
}

.result-link:hover {
  text-decoration: underline;
}

.team-link {
  color: #fff;
  text-decoration: underline;
}

.team-link:hover {
  color: var(--gold);
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

.lightbox-content {
  position: relative;
  background: var(--bg);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--gold);
  padding: 20px 25px 25px;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.lightbox-img-wrapper {
  flex: 1;
  width: 100%;
  max-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: contain;
}

#lightbox-caption {
  color: var(--gold);
  margin-top: 15px;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  flex-shrink: 0;
  max-height: 10vh;
  overflow: hidden;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 215, 0, 0.8);
  border: none;
  color: var(--bg);
  font-size: 2rem;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 50%;
  user-select: none;
  transition: background 0.3s ease;
  z-index: 10001;
}

#lightbox-prev {
  left: 10px;
}

#lightbox-next {
  right: 10px;
}

.lightbox-nav:hover {
  background: var(--gold);
}

#lightbox-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 36px;
  color: var(--gold);
  cursor: pointer;
  user-select: none;
}

/* Footer */
.site-footer {
  width: 100vw; /* Force full viewport width */
  margin: 0;     /* Remove any inherited margin */
  background: var(--black);
  color: #888;
  text-align: center;
  padding: 25px 15px;
  font-size: 0.9rem;
  border-top: 1px solid var(--panel);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer a img {
  width: 24px;
  height: 24px;
}

.site-footer .contact-link {
  display: inline; /* prevent block or flex behavior */
  margin-left: 4px; /* tiny spacing if needed */
}

.footer-bullet {
  display: inline-block;
  font-size: 1.5rem; /* Make the bullet larger */
  color: var(--gold);
  margin: 0 10px;
  line-height: 1;
}


/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  nav ul {
    gap: 15px;
  }
  footer {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  header {
    flex-wrap: wrap;
    justify-content: center;
  }
  .logo img {
    height: 80px;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  main {
    margin: 30px 15px;
  }
}

/* Hamburger Button Styles */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--gold);
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 1001;
  cursor: pointer;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gold);
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1001;
    cursor: pointer;
  }

  nav#main-nav {
    display: none;
    background-color: var(--black);
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
  }

  nav#main-nav.show {
    display: block;
  }

  nav#main-nav ul {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 0; /* remove vertical gaps between items */
  }

  nav#main-nav ul li {
    margin: 0;
    padding: 0;
    text-align: center;
    line-height: 1;
  }

  nav#main-nav ul li a {
    display: block;
    padding: 8px 0; /* adjust spacing as needed */
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    line-height: 1.2;
  }

  nav#main-nav ul li a:hover {
    background-color: var(--bg);
  }
}





/* === Merged CSS: event-history.css === */
.event-history-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  color: var(--text);
  background-color: var(--bg);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
}

.event-history-page h1 {
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
}

.table-zoom-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.event-history-page .history-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  color: var(--text);
  margin-bottom: 40px;
  font-size: 0.95rem;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.event-history-page .history-table th,
.event-history-page .history-table td {
  padding: 12px 16px;
  border: 1px solid #333;
  text-align: center;
}

.event-history-page .history-table th {
  background: var(--black);
  color: var(--gold);
}

.history-table td.no-photo {
  color: white;
  font-style: normal;
  text-decoration: none;
  cursor: default;
}

/* Highlight header borders */
.history-table thead tr:first-child th:nth-child(2),
.history-table thead tr:first-child th:nth-child(3),
.history-table thead tr:first-child th:nth-child(4) {
  border-top: 3px solid var(--gold);
}

.history-table thead tr:nth-child(1) th:nth-child(2),
.history-table thead tr:nth-child(1) th:nth-child(3),
.history-table thead tr:nth-child(1) th:nth-child(4),
.history-table thead tr:nth-child(1) th:nth-child(5),
.history-table thead tr:nth-child(2) th:nth-child(1),
.history-table thead tr:nth-child(2) th:nth-child(3) {
  border-left: 3px solid var(--gold);
}

.history-table tbody td:nth-child(2),
.history-table tbody td:nth-child(4),
.history-table tbody td:nth-child(6),
.history-table tbody td:nth-child(7) {
  border-left: 3px solid var(--gold);
}

.history-table tbody tr:last-child td:nth-child(n+2):nth-child(-n+6) {
  border-bottom: 3px solid var(--gold);
}

.history-table thead tr:nth-child(2) th:nth-child(-n+4),
.history-table thead tr:nth-child(1) th:nth-child(4) {
  border-bottom: 3px solid var(--gold);
}

/* Team and Result links */
.event-history-page .result-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: bold;
}
.event-history-page .result-link:hover {
  text-decoration: underline;
}
.event-history-page .team-link {
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}
.event-history-page .team-link:hover {
  color: var(--gold);
}

/* Footer styling */
.site-footer {
  background: var(--black);
  color: var(--text);
  text-align: center;
  padding: 25px 15px;
  font-size: 0.9rem;
  border-top: 1px solid var(--panel);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer img {
  width: 24px;
  height: 24px;
}

.footer-bullet {
  display: inline-block;
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 10px;
  line-height: 1;
}

.contact-link {
  font-weight: normal;
}

/* Responsive footer */
@media (max-width: 768px) {
  .site-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Lightbox Styles */
#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.lightbox-content {
  position: relative;
  max-width: 75vw;
  max-height: 75vh;
  background: var(--bg);
  padding: 15px 45px 50px;
  border-radius: 15px;
  box-shadow: 0 0 20px var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

#lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 10px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

#lightbox-caption {
  color: var(--gold);
  text-align: center;
  margin-top: 15px;
  font-weight: 600;
  font-size: 1.2rem;
  min-height: 1.4em;
}

#lightbox-close,
#lightbox-prev,
#lightbox-next {
  all: unset;
  cursor: pointer;
  color: var(--gold);
  background: transparent;
  position: absolute;
  transition: color 0.3s ease;
}

#lightbox-close { top: 8px; right: 12px; font-size: 36px; }
#lightbox-prev, #lightbox-next {
  top: 50%;
  font-size: 50px;
  transform: translateY(-50%);
  padding: 0 10px;
}
#lightbox-prev { left: 10px; }
#lightbox-next { right: 10px; }

#lightbox-close:hover,
#lightbox-prev:hover,
#lightbox-next:hover {
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .event-history-page {
    margin: 30px 15px;
  }

  .lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    padding: 10px 40px 40px;
  }

  #lightbox-img {
    max-height: 50vh;
  }

  #lightbox-caption {
    font-size: 1rem;
    margin-top: 10px;
  }
}

/* ✅ Mobile Zoom Out - Using scale(0.4) */
@media (max-width: 767px) {
  .table-zoom-wrapper {
    overflow-x: hidden;
  }

  .history-table {
    transform: scale(0.4);
    transform-origin: top left;
    width: calc(100% / 0.4);
  }
}


/* === Merged CSS: record-book.css === */
/* General Page Styles */
.record-book-page {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.record-book-page h1 {
  color: var(--gold);
  text-align: center;
  margin-bottom: 2rem;
}

/* Section Wrapper */
.record-table-wrapper {
  margin-bottom: 3rem;
}

.record-table-wrapper h2 {
  color: var(--gold);
  margin-bottom: 1rem;
  text-align: center;
}

/* Table Styles */
.record-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.record-table th,
.record-table td {
  padding: 0.75rem;
  border: 1px solid var(--border);
  text-align: center;
}

.record-table td:first-child,
.record-table th:first-child {
  text-align: left;
  padding-left: 1rem;
}

/* Zebra Striping */
.record-table tbody tr:nth-child(even) {
  background-color: #2a2a2a;
}

/* Hover Effect */
.record-table tbody tr:hover {
  background-color: #333;
}

/* Sorting Styles */
.record-table th {
  position: relative;
  user-select: none;
}

.record-table th::after {
  content: " ▲▼";
  font-size: 0.7em;
  margin-left: 0.25rem;
  opacity: 0.4;
  color: var(--gold);
}

.record-table th.sorted-asc::after {
  content: " ▲";
  opacity: 1;
}

.record-table th.sorted-desc::after {
  content: " ▼";
  opacity: 1;
}

/* Responsive Table */
@media (max-width: 768px) {
  .record-table th,
  .record-table td {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .record-book-page {
    padding: 1rem;
  }

  .record-table-wrapper h2 {
    font-size: 1.25rem;
  }
}
.leaderboards-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.leaderboard-section {
  flex: 1 1 400px;
  min-width: 300px;
  background: var(--panel);
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
  margin-bottom: 30px;
}

.leaderboard-section h2 {
  color: var(--gold);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}

.leaderboard-section h3 {
  color: var(--gold);
  margin-top: 20px;
  margin-bottom: 10px;
}

.leaderboard-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-weight: normal;
}

.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: #ddd;
  font-weight: normal; /* unbolded text */
}

/* Years Played lists (just names, no numbers) */
.leaderboard-list.years-played li {
  display: block;
  padding-left: 0;
  text-align: left;
}

/* === Mobile Zoom-Out for Record Book Tables === */
@media (max-width: 767px) {
  /* Applies to BOTH tables */
  .record-table {
    transform: scale(0.6);
    transform-origin: top left;
    width: calc(100% / 0.6);
    display: inline-block;
  }

  .record-table-wrapper {
    overflow: hidden;
  }

  /* Engineering Division (1st table) */
  .record-table-wrapper:nth-of-type(1) .record-table {
    margin-bottom: -300px;
  }

  /* Construction Division (2nd table) */
  .record-table-wrapper:nth-of-type(2) .record-table {
    margin-bottom: -160px;
  }
}

/* ==== Responsive Tuning v3.1 (appended by apply_responsive_tuning_v3_1.py) ==== */
/* Keep layout width stable across pages */
html { scrollbar-gutter: stable both-edges; }

/* Global fluid base */
html { font-size: clamp(14px, 0.8vw + 7px, 18px); }

/* Mid-desktop: emulate ~80% zoom feel on 1920x1080 */
@media (min-width: 1367px) and (max-width: 1920px) {
  body { font-size: 0.8em; }
  h1 { font-size: clamp(1.5rem, 1.0rem + 1.8vw, 2.0rem); }
  h2 { font-size: clamp(1.3rem, 0.95rem + 1.0vw, 1.6rem); }
  header nav a { padding: 0.32rem 0.6rem; }
}

/* Header robustness — nav aligned to bottom */
header {
  display: flex;
  align-items: flex-end; /* bottom align instead of center */
  gap: 0.75rem;
  flex-wrap: wrap;
}
.logo  {
  display: flex;
  align-items: flex-end; /* keep logo bottom aligned with nav */
  width: 150px;
  min-width: 150px;
}
header nav { flex: 1; min-width: 260px; }
/* ==== End Responsive Tuning v3.1 ==== */





/* ==== Home 1080p Fit – final ==== */
/* Only affects mid-desktop widths; 4K+iPhone unchanged */
@media (min-width:1367px) and (max-width:1920px){

  /* Global nudge so px-sized text feels ~80–85% */
  body { font-size: 0.84em; }

  /* HERO: tighten height & spacing so headline isn't clipped */
  .hero-content {
    min-height: 46svh;         /* smaller than half-screen */
    padding-block: 0.9rem;     /* trim vertical padding */
    overflow: visible;         /* never clip text */
  }
  .hero-content h1 {
    font-size: clamp(1.3rem, 0.95rem + 1.5vw, 1.9rem);
    line-height: 1.15;
    margin-block: 0.25em;
  }

  /* QUICK LINKS: compress spacing so the whole block fits */
  .quick-links {
    padding-block: 0.8rem;
    overflow: visible;
  }
  .quick-links h2, .quick-links h3 {
    font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.35rem);
    line-height: 1.2;
    margin-block: 0.25em;
  }

  /* Tables/rows inside quick links (if any) feel a tad large at 1080p */
  .quick-links table { font-size: 0.92em; }
  .quick-links th, .quick-links td { padding: 0.55em 0.8em; }

  /* Keep layout width stable when scrollbar appears */
  html { scrollbar-gutter: stable both-edges; }
}
/* ==== End Home 1080p Fit – final ==== */

/* ==== 1080p Scroll Unfreeze ==== */
@media (min-width:1367px) and (max-width:1920px){
  /* Re-enable page scrolling */
  html { overflow-y: scroll !important; }   /* stable scrollbar width */
  body { overflow-y: auto !important; overflow-x: hidden !important; }

  /* Make sure common wrappers aren't clipping content */
  main, .site, .page, .wrapper, .content,
  .hero, .hero-content, .quick-links {
    overflow: visible !important;
    height: auto !important;
  }

  /* Guard against full-viewport traps */
  .hero, .hero-content { min-height: 46svh; }

  /* If header is fixed and covering top of hero, offset content */
  /* Adjust this if you still see overlap (try 100–120px) */
  main { padding-top: 100px; }
}
/* ==== End 1080p Scroll Unfreeze ==== */

@media screen and (max-width: 1550px) and (min-width: 1500px) {
  
  /* Adjust hero for scaled laptop screen */
  .hero-content {
    transform: scale(0.85);
    transform-origin: top center;
    margin-top: 0;
  }

  /* Adjust quick links section */
  .quick-links {
    transform: scale(0.9);
    transform-origin: top center;
  }

  /* Ensure page scrolls if still needed */
  html, body {
    overflow-y: auto;
  }
}

/* Override the left/right split so items can truly center */
.leaderboard-list li {
  display: block;
  justify-content: initial;
  text-align: inherit;
}

/* === Tables/Leaderboards: Native 1080p fit === */
@media (min-width:1367px) and (max-width:1920px){
  .event-history-page .history-table,
  .record-table {
    font-size: 0.84em;
    transform: scale(0.95);
    transform-origin: top center;
  }
  .event-history-page .history-table th,
  .event-history-page .history-table td,
  .record-table th, .record-table td {
    padding: 0.45em 0.6em;
  }
  .leaderboard-list {
    transform: scale(0.95);
    transform-origin: top center;
  }
  .leaderboard-list li { font-size: 0.88em; }
}

/* === Tables/Leaderboards: 1080p @125% fit === */
@media screen and (max-width:1550px) and (min-width:1500px){
  html { scrollbar-gutter: stable both-edges; }
  .event-history-page .history-table,
  .record-table {
    font-size: 0.82em;
    transform: scale(0.94);
    transform-origin: top center;
  }
  .event-history-page .history-table th,
  .event-history-page .history-table td,
  .record-table th, .record-table td {
    padding: 0.42em 0.55em;
  }
  .leaderboard-list {
    transform: scale(0.94);
    transform-origin: top center;
  }
  .leaderboard-list li { font-size: 0.86em; }
}

/* === Tables/Leaderboards: 1680x1050 @125% fit === */
@media screen and (max-width:1350px) and (min-width:1330px){
  html { scrollbar-gutter: stable both-edges; }
  .event-history-page .history-table,
  .record-table {
    font-size: 0.80em;
    transform: scale(0.93);
    transform-origin: top center;
  }
  .event-history-page .history-table th,
  .event-history-page .history-table td,
  .record-table th, .record-table td {
    padding: 0.4em 0.5em;
  }
  .leaderboard-list {
    transform: scale(0.93);
    transform-origin: top center;
  }
  .leaderboard-list li { font-size: 0.84em; }
}

/* === Leaderboard Container Centering + Alignment Restore === */
/* Center the outer containers without forcing inner text to center */
.leaderboards-container,
.leaderboard-columns {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Ensure individual sections sit centered as blocks */
.leaderboard-section {
  margin-left: auto;
  margin-right: auto;
}

/* Keep lists/tables centered as blocks, but DO NOT center their text */
.leaderboard-section table,
.leaderboard-list {
  margin-left: auto;
  margin-right: auto;
}

/* Restore internal alignment: left team names, right numbers */
.leaderboard-list {
  /* keep your existing list-style/spacing from earlier CSS */
  text-align: left;
}
.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  text-align: left;
}
