/* Base Layout & Typography */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: white;
  color: #002157;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  text-align: center;
}

/* Headings */
h1, h2, h3 {
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  margin: 1rem 0;
  letter-spacing: 1px;
}

/* === Header/Nav styles === */
header {
  background-color: #002157;
  color: #ffffff;
  padding: 1rem 0;
  position: relative;
  z-index: 1000;
}

/* Page title inside header */
header h1.page-title {
  font-size: 2.5rem;
  margin: 1rem 0 0.5rem 0;
  letter-spacing: 1px;
  font-weight: bold;
}

/* Nav styles */
nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

nav a {
  margin: 0 1rem;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffb400;
}

/* Footer (exclude Beers page) */
footer {
  background-color: #002157;
  color: #ffffff;
  padding: 2rem 0;
  border-top: 2px solid #e0e0e0;
  font-size: 0.9rem;
}

/* Main Content */
main h2 {
  font-size: 2rem;
  margin-top: 1rem;
  text-transform: uppercase;
}

main p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Section Card Look */
section {
  background-color: #ffffff;
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Video Section */
.video-wrapper {
  margin: 2rem 0;
}

#beer-table-scroll-wrapper {
  transform: rotateX(180deg);
  width: 99vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow-x: auto;
  box-sizing: border-box;
}

#beer-table-scroll-wrapper::before {
  content: '';
  display: block;
  height: 16px;
  overflow-x: auto;
}

#beer-table-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  transform: rotateX(180deg);
  direction: ltr;
  width: 100%;
}

#beer-table-container {
  display: inline-block;
  min-width: 100%;
  transform: rotateX(180deg);
}

/* Beer table styling */
.beer-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 auto;
  table-layout: auto;
}

.beer-table th,
.beer-table td {
  text-align: center;
  vertical-align: middle;
  padding: 10px 14px;
  white-space: nowrap;
  border: none;
  font-size: 14px;
}

.beer-table th {
  position: relative;
  white-space: nowrap;
  vertical-align: middle;
}

.beer-table thead {
  background-color: #002157;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Table striping */
.beer-table tbody tr:nth-child(even) {
  background-color: #f2f4f8;
}

.beer-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.beer-table tbody tr:hover {
  background-color: #f5f5f5;
  cursor: pointer;
}

/* Search input styling */
#beer-search {
  flex: 1;                /* fill remaining space */
  padding: 0.5em 1em;
  font-size: 1em;
  border: 1px solid #002157;
  border-right: none;     /* avoid double border */
  border-radius: 4px 0 0 4px;
  box-sizing: border-box;
  height: 40px;
  outline: none;
  min-width: 0;           /* prevents overflow in flex */
}

#load-more-btn {
  display: block;
  margin: 1rem auto;
  padding: 0.5em 1em;
  background-color: #002157;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

#load-more-btn:hover {
  background-color: #0041a8;
}

/* Numeric & Top Rank Styling */
.numeric-bold {
  font-weight: bold;
}

.top-rank {
  color: #DAA520;
  font: bold;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === Burger menu button - hidden on desktop === */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100; /* above nav */
}

#nav-toggle:focus {
  outline: 2px solid #ffb400;
  outline-offset: 2px;
}

/* Burger lines */
.burger {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
}

/* === Mobile styles === */
@media (max-width: 768px) {
  /* Show burger */
  #nav-toggle {
    display: flex;
  }

  /* Hide nav by default */
  #nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #002157;
    padding: 10px 0;
    border-bottom: 2px solid #e0e0e0;
  }

  /* Show nav when toggled */
  #nav-menu.show {
    display: flex;
  }

  nav a {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
  }

  header .container {
    align-items: center;
  }
}

/* === Desktop nav always visible === */
@media (min-width: 769px) {
  nav {
    display: flex !important;
  }
}

.leaderboard-btn {
  display: block;
  width: 60vw;             /* responsive width */
  margin: 1rem auto;
  padding: 10px 0;
  background-color: gold;
  color: #002157;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 4px;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  font-size: 1em;
}

.leaderboard-btn:hover {
  background-color: #ffe34d;
}

/* Container for search + reset */
#controls {
  display: flex;
  max-width: 50vw;  /* max 90% of viewport width */
  width: 100%;      /* take full width of parent */
  margin: 1rem auto; /* center horizontally with margin */
  gap: 0;           /* no gap between input and button */
  box-sizing: border-box;
}

/* Reset filters button styling */
#reset-filters {
  padding: 0.5em 1em;
  font-size: 1em;
  border: 1px solid #002157;
  border-radius: 0 4px 4px 0;
  background-color: #002157;
  color: white;
  cursor: pointer;
  height: 40px;
  box-sizing: border-box;
  border-left: none;      /* avoid double border */
  flex-shrink: 0;         /* prevent shrinking */
  min-width: 110px;       /* optional min width */
}

#reset-filters:hover {
  background-color: #004080;
  border-color: #004080;
}
