/*
 * Western Bowl website stylesheet
 *
 * Defines typography, layout and component styles for the site. Using CSS variables
 * makes it simple to adjust the colour palette across the whole site from a
 * single location.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

/* Colour palette */
:root {
  --primary-color: #0B2545; /* dark blue for headers and nav */
  --secondary-color: #1F4172; /* slightly lighter dark blue */
  --accent-color: #F7C548; /* golden accent colour */
  --light-bg: #f7f8fa; /* background for light sections */
  --dark-bg: var(--primary-color); /* background for dark sections */
  --text-dark: #2c2c2c; /* dark text for light backgrounds */
  --text-light: #f5f5f5; /* light text for dark backgrounds */
  --border-radius: 8px;
}

/* Global styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--light-bg);
}

h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--primary-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.logo img {
  height: 100px;
  width: auto;
  display: block;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

/* underline indicator for active link */
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: var(--text-light);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #e5ac25;
}

/* Section styling */
.section {
  padding: 3rem 1rem;
}

.section.light {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.section.dark {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

/* Improve readability of headings on dark sections
 * The base heading colours are dark blue, which don't contrast well
 * against dark backgrounds. Override them here to use the accent
 * colour instead. */
.section.dark h1,
.section.dark h2,
.section.dark h3,
.section.dark h4 {
  color: var(--accent-color);
}

/* Prices grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-card {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-card h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.price-card .price {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.price-card .price span {
  font-size: 1rem;
}

.note {
  font-size: 0.9rem;
  margin-top: 1rem;
  font-style: italic;
}

/* Hours table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.hours-table th,
.hours-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.hours-table th {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.hours-table tr:nth-child(even) td {
  background-color: #f1f5fa;
}

/* Highlight the current day in the hours table */
.hours-table tr.today td {
  background-color: var(--accent-color);
  color: var(--primary-color);
  font-weight: 600;
}

/* Promotions grid (if used) */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.promo-item {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1rem;
  border-radius: var(--border-radius);
}

.promo-item h3 {
  margin-bottom: 0.25rem;
  color: var(--accent-color);
}

.promo-desc {
  font-size: 0.9rem;
}

/* Inline radio/checkbox options styling for forms */
.inline-options {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.inline-options label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 400;
  margin: 0;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.btn-submit {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: var(--secondary-color);
}

/* Banner showing today's open bowling hours */
.today-banner {
  background-color: var(--accent-color);
  color: var(--primary-color);
  text-align: center;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Responsive layout for small screens */
@media (max-width: 768px) {
  /* Stack nav items vertically on mobile */
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .logo img {
    height: 40px;
  }
  .hero {
    padding: 3rem 1rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  /* Display price cards in a single column */
  .price-grid {
    grid-template-columns: 1fr;
  }
  /* Display promo cards in a single column */
  .promo-grid {
    grid-template-columns: 1fr;
  }
  .hours-table th,
  .hours-table td {
    font-size: 0.9rem;
  }
  /* Footer stacking */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Footer styles */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 2rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer h4 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.footer a {
  color: var(--text-light);
}

.footer a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid #1a3a67;
  padding-top: 1rem;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}