/* =========================
   VARIABLES
========================= */
:root {
  --bg-dark: #081a2b;
  --bg-mid: #122b45;
  --surface: #ffffff;
  --text-dark: #1a1a1a;
  --text-light: #eaeaea;
  --accent: #0d3b66;
}

/* PAGE THEMES */
.home-page { --accent: #0d3b66; }
.tennis-page { --accent: #2e7d32; }
.badminton-page { --accent: #1565c0; }
.pickleball-page { --accent: #ef6c00; }

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

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
   background: linear-gradient(180deg, #081a2b, #122b45);
  color: var(--text-light);
  font-family: 'Segoe UI', sans-serif;
}

/* =========================
   NAVBAR
========================= */
header {
  background: linear-gradient(135deg, var(--accent), #0b2e4f);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  padding: 15px 20px;
  position: relative;
  z-index: 9999;
  overflow: visible;
  border-radius: 12px;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px; 
}

.logo img {
  height: 40px;
}

.logo span {
  font-weight: bold;
    font-size: 1.5rem;
}

/* =========================
   DESKTOP MENU
========================= */
#nav-placeholder {
  max-width: 1100px;
  margin: 0 auto;
}

nav ul.menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

nav ul.menu > li {
  position: relative;
}

nav ul.menu > li > a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
}

.menu a:hover {
  color: #ffd166;
  border-bottom: 2px solid #ffd166;
}

/* =========================
   DROPDOWN (DESKTOP)
========================= */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.2s ease;
  z-index: 9999;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: #0d3b66;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
 background: #eef5fb;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  color: var(--accent);
}

/* =========================
   MOBILE NAV
========================= */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #0d3b66;

  display: flex;
 flex-direction: column;  /* 🔑 ensures vertical flow */
  padding-top: 70px;

  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;

  transition: transform 0.25s ease, opacity 0.2s ease;
  z-index: 10000;
}

.mobile-nav.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  padding: 14px 20px;
  color: white;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* MOBILE DROPDOWN */
.mobile-dropdown-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.mobile-sub {
  display: flex;
  flex-direction: column;   /* 🔑 force vertical stacking */
   
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: #0b2e4f;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.mobile-sub.open {
  max-height: 300px;
  opacity: 1;
}

/* LINKS */
.mobile-sub a {
  display: block;        /* 🔑 prevents inline behaviour */
  width: 100%;           /* 🔑 full width */
  padding: 12px 20px;
}

/* =========================
   OVERLAY
========================= */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 9000;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* =========================
   LAYOUT
========================= */
section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: 30px auto;
 background: rgba(255,255,255,0.05); /* subtle contrast */
  border-radius: 16px;
}

.section-spacing {
  margin-top: 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.grid .section-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid .section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: stretch;
}

.slideshow-container {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
   transition: opacity 1s ease-in-out;
}
 

.slide.active {
  opacity: 1;
  z-index: 2;
}

.section-card {
  background: white;
  color: #0d3b66;
  padding: 25px;
  border-radius: 12px;
  display: flex;              /* 🔑 */
  flex-direction: column;     /* 🔑 */
}

/* pushes button section to bottom */
.section-card .cta-container {
  margin-top: auto;           /* 🔑 */
  padding-top: 20px;
}

/* TOP BANNER (FIXED) */
.top-banner {
  width: 100%;
  max-width: 1100px;   /* keeps it aligned with content */
  aspect-ratio: 2 / 1; /* 🔑 matches your image */
  object-fit: cover;

  display: block; 
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  margin: 15px auto;
}

/* =========================
   COMMITTEE TABLE
========================= */

.committee-table-wrapper {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 15px;
}

.committee-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.committee-table th {
  background: var(--accent);
  color: white;
  padding: 16px;
  text-align: left;
  font-size: 0.95rem;
}

.committee-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e5e5;
  color: #222;
}

.committee-table td,
.committee-table th {
  vertical-align: top;
}

.committee-table tr:last-child td {
  border-bottom: none;
}

/* LINKS */
.committee-table a {
  color: #4db8ff;
  text-decoration: none;
  font-weight: 500;
}

.committee-table a:hover {
  color: #8fd3ff;
  text-decoration: underline;
}

/* ROW HOVER */
.committee-table tbody tr:hover {
  background: #f7fbff;
}


/* DESKTOP */
@media (min-width: 1200px) {
  .top-banner {
    max-height: 220px;
  }
}

.top-banner:hover {
  transform: scale(1.01);
  transition: 0.3s ease;
}

/* =========================
   HERO
========================= */
.hero {
  position: relative;
  border-radius: 16px;
  overflow: visible;
     margin: 40px auto;
  max-width: 1100px;   /* 🔑 matches your sections */
}

.hero.no-banner {
  margin: 100px auto 20px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.2),
    rgba(0,0,0,0.45)
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  z-index: 2;
}

.hero img {
  width: 100%;
  aspect-ratio: 16 / 6;   /* 🔑 controls shape */
  object-fit: cover;
  display: block;
}


/* =========================
   CARDS
========================= */
.card {
  background: var(--surface);
  color: var(--text-dark);
  padding: 22px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-6px);
}

.card a[href^="tel:"],
.card a[href^="mailto:"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.card a[href^="tel:"]:hover,
.card a[href^="mailto:"]:hover {
  text-decoration: underline;
}
.card ul {
  margin-top: 12px;
  padding-left: 20px;
}

.card li {
  margin-bottom: 12px;
  line-height: 1.6;
}

.card,
.section-card {
  overflow: hidden;
}
/* =========================
   BUTTONS
========================= */
.copy-btn,
.cta-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cta-btn:hover,
.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cta-btn.tennis {
  background: #2e7d32;  /* tennis green */
}

.cta-btn.tennis:hover {
  background: #276a2b;  /* slightly darker */
}

.cta-btn.badminton {
  background: #1565c0;  /* badminton blue */
}

.cta-btn.badminton:hover {
  background: #0d47a1;  /* slightly darker */
}

.cta-btn.pickleball {
  background: #ef6c00;  /* pickleball orange */
}

.cta-btn.pickleball:hover {
  background: #d65f00;  /* slightly darker */
}

/* =========================
   BADGES
========================= */
.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  color: white;
  margin-bottom: 8px;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  letter-spacing: 0.3px;
}

/* Variants */
.badge.junior {
  background: linear-gradient(135deg, #2196F3, #64b5f6);
}

.badge.intermediate {
  background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.badge.relaxed {
  background: linear-gradient(135deg, #9c27b0, #ce93d8);
}

.badge.private {
  background: linear-gradient(135deg, #eb2337, #ba3c3c);
}

/* =========================
   MAP
========================= */
.map-container {
  margin-top: 15px;
  border-radius: 12px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

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

 
  .top-banner {
    max-height: 200px;
     aspect-ratio: 16 / 9;
  }
 

  /* NAV */
  nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  /* LAYOUT */
  section {
    padding: 30px 15px;
    margin: 20px 10px;
  }

  .tennis-container {
    padding: 10px;
  }

  /* GRID */
  .grid {
    grid-template-columns: 1fr;
  }

  /* HERO */
   .hero {
    margin: 20px auto;
  }
   
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero img {
    aspect-ratio: 16 / 9;
  }

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

  .slideshow-container {
    min-height: 220px;
  }

  /* LOGO */

   .logo {
    min-width: 0;
  }
   
  .logo img {
    height: 32px; 
  }

  .logo span {
    font-size: clamp(0.85rem, 7vw, 1.5rem);
    white-space: nowrap;
  }

  /* BUTTONS */
  .button-group {
    flex-direction: column;
  }

  .cta-btn,
  .copy-btn {
    width: 100%;
    text-align: center;
  }

  /* TABLES */
  .committee-table,
  .committee-table thead,
  .committee-table tbody,
  .committee-table th,
  .committee-table td,
  .committee-table tr {
    display: block;
    width: 100%;
  }

  /* hide headings */
  .committee-table thead {
    display: none;
  }

  /* card */
  .committee-table tr {
    background: white;
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    padding: 10px 0;
  }

  .committee-table td {
    border: none;
    padding: 10px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  /* labels */
  .committee-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    opacity: 0.8;
  }

  /* role styling */
  .committee-table td:first-child {
    background: rgba(0,0,0,0.03);
    font-weight: 700;
    font-size: 1rem;
    padding-top: 14px;
    padding-bottom: 14px;
  }

}
