/* ============================================
   Wentworth Sporting Complex - Stylesheet
   A volunteer-run community sports facility
   Wentworth NSW, Australia
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* ============================================
   1. RESET & BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: #1a1a1a;
  line-height: 1.3;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  color: #2d6a2d;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #2d6a2d;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c9a84c;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #2d6a2d;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   3. LAYOUT HELPERS
   ============================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   4. HEADER & NAV
   ============================================ */

#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0;
}

#site-header .container,
#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.header-logo a,
.site-branding {
  text-decoration: none;
  display: block;
}

.site-name-short {
  display: none;
}

.site-name-full {
  display: inline;
}

.header-logo .site-name,
.site-branding .site-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d6a2d;
  line-height: 1.2;
  text-decoration: none;
  display: block;
}

.header-logo .tagline,
.site-branding .site-tagline {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c9a84c;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav li {
  display: inline-block;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: #2d6a2d;
  text-decoration: none;
  background-color: rgba(45, 106, 45, 0.05);
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: #c9a84c;
}

/* ============================================
   5. HERO SECTIONS
   ============================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.hero-content {
  max-width: 800px;
  color: #ffffff;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #ffffff;
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.75rem;
}

.hero .hero-subheading {
  font-size: 1.2rem;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
}

/* Page Hero (inner pages) */
.page-hero {
  position: relative;
  height: 50vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  text-align: center;
}

.page-hero .hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Page-specific hero background images */
body.page-golf .page-hero     { background-image: url('images/golf-hero.jpg'); }
body.page-tennis .page-hero   { background-image: url('images/tennis-hero.jpg'); }
body.page-bowls .page-hero    { background-image: url('images/bowls-hero.jpg'); }
body.page-visitors .page-hero { background-image: url('images/golf-card.jpg'); }
body.page-contact .page-hero  { background-image: url('images/about.jpg'); }

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  color: #ffffff;
  font-size: 3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.5rem;
}

.page-hero .hero-subheading {
  font-size: 1.2rem;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ============================================
   6. BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.4;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: #2d6a2d;
  color: #ffffff;
  padding: 14px 32px;
  border: 2px solid #2d6a2d;
}

.btn-primary:hover {
  background-color: #c9a84c;
  border-color: #c9a84c;
  color: #1a1a1a;
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  padding: 14px 32px;
  border: 2px solid #ffffff;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: #2d6a2d;
  border-color: #ffffff;
}

.btn-primary.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ============================================
   7. QUICK FACTS BAR
   ============================================ */

.quick-facts {
  background-color: #2d6a2d;
  color: #ffffff;
  padding: 0;
}

.quick-facts .container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
}

.quick-facts .fact-item {
  flex: 1 1 25%;
  text-align: center;
  padding: 28px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.quick-facts .fact-item:last-child {
  border-right: none;
}

.quick-facts .fact-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

.quick-facts .fact-text {
  font-size: 0.95rem;
  font-weight: 600;
  display: block;
}

.quick-facts .fact-subtext {
  font-size: 0.8rem;
  opacity: 0.8;
  display: block;
  margin-top: 2px;
}

/* ============================================
   8. SPORTS CARDS
   ============================================ */

.sports-cards {
  padding: 80px 20px;
  background-color: #ffffff;
}

.sports-cards h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.sports-cards > .container > p {
  text-align: center;
  color: #555;
  max-width: 650px;
  margin: 0 auto 48px auto;
}

.sports-cards .cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

.sport-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sport-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);
}

.sport-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.sport-card .card-body {
  padding: 24px;
}

.sport-card .card-body h3 {
  font-family: 'Playfair Display', serif;
  color: #2d6a2d;
  margin-bottom: 8px;
}

.sport-card .card-body p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.sport-card .card-body .btn {
  margin-top: auto;
}

/* ============================================
   9. ABOUT SECTION
   ============================================ */

.about-section {
  background-color: #f9f7f2;
  padding: 80px 20px;
}

.about-section .about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: center;
}

.about-section .about-text {
  position: relative;
}

/* Decorative quote mark */
.about-section .about-text h2::before {
  content: '\201C';
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: #c9a84c;
  line-height: 0.8;
  margin-bottom: -10px;
}

.about-section .about-text p {
  color: #555;
}

.about-section .about-image img {
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  width: 100%;
  height: auto;
}

/* ============================================
   10. LOCATION TEASER
   ============================================ */

.location-teaser {
  background-color: #ffffff;
  padding: 80px 20px;
  text-align: center;
}

.location-teaser .location-content {
  max-width: 800px;
  margin: 0 auto;
}

.location-teaser h2 {
  text-align: center;
}

.location-teaser .distances {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 30px 0;
}

.location-teaser .distance-item {
  text-align: center;
  min-width: 100px;
}

.location-teaser .distance-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.location-teaser .distance-km {
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a1a1a;
  display: block;
}

.location-teaser .distance-label {
  font-size: 0.85rem;
  color: #555;
}

.location-teaser .map-placeholder {
  margin-top: 30px;
}

/* ============================================
   11. MAP PLACEHOLDER
   ============================================ */

.map-placeholder {
  background-color: #e0e8e0;
  height: 350px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-style: italic;
  font-size: 1rem;
}

/* ============================================
   12. STATS BOX (Golf page table)
   ============================================ */

.stats-box {
  background-color: #f9f7f2;
  border-radius: 8px;
  padding: 24px;
}

.stats-box table {
  width: 100%;
  border-collapse: collapse;
}

.stats-box tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.stats-box tr:last-child {
  border-bottom: none;
}

.stats-box td {
  padding: 14px 16px;
  font-size: 0.95rem;
}

.stats-box td:first-child {
  font-weight: 700;
  color: #1a1a1a;
  width: 40%;
}

.stats-box td:last-child {
  color: #555;
}

.stats-box tr:nth-child(even) td {
  background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================
   13. VISITOR REVIEWS
   ============================================ */

.review-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.review-card {
  background-color: #ffffff;
  border-left: 4px solid #c9a84c;
  padding: 24px;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.review-card .review-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #1a1a1a;
  line-height: 1.6;
  margin-bottom: 0;
}

.review-card .review-attribution {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
  color: #888;
  margin-top: 12px;
}

/* ============================================
   14. CONTACT FORM
   ============================================ */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 20px;
  color: #1a1a1a;
}

.contact-form label:first-child {
  margin-top: 0;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #1a1a1a;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #2d6a2d;
  box-shadow: 0 0 0 3px rgba(45, 106, 45, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

.contact-form button[type="submit"],
.contact-form input[type="submit"] {
  width: 100%;
  margin-top: 24px;
  cursor: pointer;
  font-size: 1rem;
}

/* ============================================
   15. FEATURES GRID (utility for sport pages)
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.feature-item {
  text-align: center;
  padding: 20px;
}

.feature-item .feature-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.feature-item h4 {
  color: #2d6a2d;
  margin-bottom: 6px;
}

.feature-item p {
  color: #555;
  font-size: 0.9rem;
}

/* ============================================
   16. PAGE INTRO TEXT
   ============================================ */

.page-intro {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 40px auto;
  color: #555;
  font-size: 1.05rem;
}

.page-intro.lead {
  font-size: 1.15rem;
}

/* ============================================
   17. FEES / PRICING TABLE
   ============================================ */

.fees-table {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-collapse: collapse;
}

.fees-table thead th {
  background-color: #2d6a2d;
  color: #ffffff;
  padding: 14px 16px;
  text-align: left;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.fees-table thead th:last-child {
  text-align: right;
}

.fees-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 0.95rem;
}

.fees-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
}

.fees-table tbody tr:nth-child(even) td {
  background-color: #f9f7f2;
}

/* ============================================
   18. FOOTER
   ============================================ */

#site-footer {
  background-color: #1c2b1c;
  color: #ccc;
  padding: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 60px 20px 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-column strong {
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 16px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  line-height: 2;
}

.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-column ul li a:hover {
  color: #c9a84c;
  text-decoration: none;
}

.footer-column p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  max-width: 1100px;
}

.footer-bottom p {
  margin-bottom: 0;
}

/* ============================================
   19. UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: #555;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

/* Section background variations */
.bg-warm {
  background-color: #f9f7f2;
}

.bg-white {
  background-color: #ffffff;
}

/* Two-column content layout */
.content-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ============================================
   20. RESPONSIVE — Tablet (max-width: 1024px)
   ============================================ */

@media (max-width: 1024px) {
  .sports-cards .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================

/* ============================================
   HAMBURGER TOGGLE (hidden on desktop)
   ============================================ */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
}

/* ============================================
   RESPONSIVE — Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .sports-cards .cards-grid,
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-two-col {
    grid-template-columns: 1fr 320px;
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   RESPONSIVE — Mobile (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

  /* --- Header: compact row with hamburger --- */
  #site-header .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    gap: 0;
    text-align: left;
    flex-wrap: wrap;
    min-height: 0;
  }

  #site-header {
    padding: 0;
  }

  .site-branding {
    flex: 1;
    min-width: 0;
  }

  .site-branding .site-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    display: block;
    line-height: 1.2;
  }

  .site-branding .site-tagline {
    display: none;
  }

  /* Show hamburger icon */
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
  }

  .nav-toggle-label span {
    display: block;
    width: 22px;
    height: 2px;
    background: #2d6a2d;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Nav hidden by default on mobile */
  .main-nav {
    order: 3;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    padding: 4px 0 8px;
    gap: 0;
  }

  .main-nav li {
    display: block;
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 11px 16px;
    font-size: 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    border-radius: 0;
  }

  /* Checkbox opens the nav */
  #nav-toggle:checked + header .main-nav {
    max-height: 400px;
  }

  /* Animate hamburger → X */
  #nav-toggle:checked + header .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  #nav-toggle:checked + header .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  #nav-toggle:checked + header .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Hero --- */
  .hero { height: 80vh; min-height: 400px; }
  .page-hero { height: 40vh; min-height: 220px; }
  .hero h1, .page-hero h1 { font-size: 2rem; }
  .hero .hero-subheading, .page-hero .hero-subheading { font-size: 1rem; }

  /* --- Layouts --- */
  .cards-grid,
  .sports-cards .cards-grid { grid-template-columns: 1fr; }
  .content-two-col { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .quick-facts { flex-wrap: wrap; }
  .quick-facts .fact-item { flex: 0 0 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
  .review-cards { grid-template-columns: 1fr; }
  .schedule-box { flex-direction: column; }

  /* --- General --- */
  .container { padding: 0 16px; }
  .content-section { padding: 40px 0; }
  h2 { font-size: 1.6rem; }
}

/* ============================================
   RESPONSIVE — Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .hero h1, .page-hero h1 { font-size: 1.6rem; }
  .hero .hero-subheading, .page-hero .hero-subheading { font-size: 0.9rem; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
  body { font-size: 15px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  #site-header, #site-footer, .btn, .nav-toggle, .nav-toggle-label { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
