
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  line-height: 1.6;
  font-family: "Lato", sans-serif;
  color: #333; 
  background-color: var(--text-light);
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

/* GLOBAL VARIABLES (CSS Custom Properties) */
:root {
  --primary-color: #00573d; 
  --secondary-color: #f8f9fa; 
  --text-color: #333333;
  --text-light: #ffffff;
  --heading-font: "Montserrat", sans-serif;
  --body-font: "Lato", sans-serif;
  --hover-primary: #00422a;
  --border-light: #e0e0e0;
  --yellow: rgba(250, 212, 86, 1);
  --l-green: rgba(174, 209, 98, 1);
}

/* BASIC STYLING */
body {
  font-family: var(--body-font);
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}
h1 {
  font-size: 2.8rem;
} /* Adjusted sizes */
h2 {
  font-size: 2.2rem;
}
h3 {
  font-size: 1.6rem;
}
p {
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-light) !important; /* Ensure text is light */
  padding: 12px 28px;
  border-radius: 5px;
  text-transform: uppercase;
  font-weight: bold;
  font-family: var(--heading-font);
  letter-spacing: 1px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn:hover {
  background-color: var(--hover-primary);
  transform: translateY(-2px);
}
.btn-secondary {
  background-color: transparent;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color);
}
.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light) !important;
}

.btn-primary {
  background-color: transparent;
  color: var(--yellow) !important;
  border: 2px solid var(--yellow);
}
.btn-primary:hover {
  background-color: var(--l-green);
  color: black !important;
  border: 2px solid var(--l-green);
}

/* HEADER & NAVIGATION */
.main-header {
  background-color: var(--text-light);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-placeholder {
  font-size: 1.8rem;
  font-weight: 800; /* Bolder */
  font-family: var(--heading-font);
  color: var(--primary-color);

  > img {
    width: 100px;
  }
}
.main-nav {
  position: relative; /* For potential dropdowns */
}
.main-nav ul {
  display: flex;
  align-items: center;
}
.main-nav ul li {
  margin-left: 30px;
}
.main-nav ul li a {
  color: var(--text-color);
  font-weight: 500;
  font-family: var(--heading-font);
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}
.main-nav ul li a:hover {
  color: var(--primary-color);
}
.main-nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0; /* Adjusted for padding */
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
  width: 100%;
}
.main-nav ul li a.active {
  color: var(--primary-color);
  font-weight: 700;
}

.header-phone {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-left: 20px; /* Space from nav */
}
.header-phone a {
  color: var(--primary-color);
}
.header-phone a:hover {
  text-decoration: underline;
}

.mobile-nav-toggle {
  display: none; /* Hidden by default, shown in media query */
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* HERO SECTION */
.hero {
  background: var(--secondary-color) url(images/hero_image.webp) center center/cover no-repeat; 

  color: var(--text-light);
  padding: 120px 0; 
  text-align: center;
  position: relative;
  min-height: 70vh; 
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,30,15,0.6); 
}
.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero h1 {
  color: var(--yellow);
  font-size: 3.5rem; /* Larger hero title */
  font-weight: 800;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 1000px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.hero p {
  font-size: 1.3rem;
  max-width: 800px;
  margin-bottom: 2.5rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  /* max-width: 500px; */
}

/* SECTIONS (General Styling) */
section {
  padding: 80px 0;
}
section:nth-child(even):not(.hero) {
  /* Don't apply to hero if it's even */
  background-color: var(--secondary-color);
}
.section-title {
  text-align: center;
  margin-bottom: 50px; /* Increased margin */
  font-size: 2.5rem; /* Larger section titles */
  font-weight: 700;
}

/* Why Choose Us Section */
.why-choose-us .features {
  display: flex;
  justify-content: space-around; /* Better for larger screens */
  text-align: center;
  gap: 30px;
  flex-wrap: wrap;
}
.why-choose-us .feature-item {
  flex: 1 1 300px; /* Grow, shrink, with a base of 300px */
  padding: 25px;
  background-color: var(--text-light);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-choose-us .feature-item img {
  width: 60px; /* Slightly larger icons */
  height: 60px;
  margin-bottom: 15px;
  display: block; /* Center images */
  margin-left: auto;
  margin-right: auto;
  
}
.why-choose-us .feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.why-choose-us .feature-item i {
  /* If using icon fonts */
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.why-choose-us .feature-item h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

/* About Section */
.about {
  background-color: var(--text-light);
  padding: 80px 0;
  background: url(images/bg-swimming.webp) center center/cover no-repeat; /* Background image */
  min-height: 70vh;
  position: relative;
  background-attachment: fixed;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,30,15,0.6); /* Dark overlay */
}

.about .container {
  position: relative;
  z-index: 1; /* Ensure content is above the overlay */
  width: 100%;
  text-align: center;
}
.about h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--yellow);
}
.about p {
  font-size: 1.5rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
  text-align: left;
}

/* Programs Section */

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.program-card {
  background-color: var(--text-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* Ensures content pushes button down */
}
.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.program-card img {
  width: 100%;
  height: 220px; /* Slightly taller images */
  object-fit: cover;
}
.program-card-content {
  padding: 25px;
  flex-grow: 1; /* Allows content to take available space */
  display: flex;
  flex-direction: column;
}
.program-card-content p {
  flex-grow: 1; /* Pushes button to bottom */
  margin-bottom: 1.5rem;
}
.program-card h3 {
  margin-top: 0;
}

/* Schedule Section */

.schedule {
  background: var(--secondary-color) url(images/baby-swimming1.webp) center center/cover no-repeat;
  background-attachment: fixed;

  color: var(--text-);
  padding: 120px 0; /* Increased padding */
  text-align: center;
  position: relative;
  min-height: 70vh; /* Ensure it takes a good portion of viewport */
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,30,15,0.6); /* Dark overlay */
}

.schedule .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.schedule h2 {
  color: var(--yellow);
  font-size: 3rem; 
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.schedule p {
  color: var(--text-light);
  font-size: 1.4rem; 
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.schedule-table-wrapper {
  overflow-x: auto;
  /*Enableshorizontalscrollingonsmallscreens*/margin-top: 20px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}
.schedule-table {
  width: 100%;
  min-width: 600px; /* Force scroll if less than this width */
  border-collapse: collapse;
}
.schedule-table th,
.schedule-table td {
  border: 1px solid var(--border-light);
  padding: 12px 15px; /* More padding */
  text-align: left;
}
.schedule-table th {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-family: var(--heading-font);
}
.schedule-table tr:nth-child(even) {
  background-color: rgba(174, 209, 98, 0.6); 
  color: black;
}
.schedule-table tr:nth-child(odd) {
  background-color: rgba(250, 212, 86, 0.6);
  /* background-color: rgbA(174, 209, 98, 0.6);  */
  color: black;
}
.schedule-table tr:hover {
  background-color: #e9ecef;
}

/* Coaches Section */
.coaches-grid {
  /* display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px; */
  display: flex;
  justify-content: center;
  column-gap: 20px;
}
.coach-card {
  max-width: 350px;
  text-align: center;
  background-color: var(--text-light);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -ms-border-radius: 8px;
  -o-border-radius: 8px;
  -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
  -moz-transition: transform 0.3s ease, box-shadow 0.3s ease;
  -ms-transition: transform 0.3s ease, box-shadow 0.3s ease;
  -o-transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.coach-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  -webkit-transform: translateY(-5px);
  -moz-transform: translateY(-5px);
  -ms-transform: translateY(-5px);
  -o-transform: translateY(-5px);
}
.coach-card img {
  width: 160px;
  /*Largercoachphotos*/height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px auto;
  border: 4px solid var(--primary-color);
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

/* News & Events Section */
.news-events {
  background-color: var(--secondary-color);
  padding: 80px 0;
  text-align: center; 
}

.news-events-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px; /* More gap */
}
.news-column,
.events-column {
  flex: 1;
  min-width: 300px; /* Ensures stacking on smaller screens */
}
.news-item,
.event-item {
  background-color: var(--text-light);
  padding: 20px;
  margin-bottom: 20px;
  border-left: 7px solid var(--yellow);
  border-radius: 0 5px 5px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.news-item h4,
.event-item h4 {
  /* Changed from h3 for hierarchy */
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.news-item .date,
.event-item .date {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

/* Contact Section */
.contact-info {
  background: var(--secondary-color) url(images/shaking-hands.webp) center center/cover no-repeat; 
  background-attachment: fixed;
  color: var(--text-light);
  padding: 120px 0; 
  text-align: center;
  position: relative;
  min-height: 70vh; 
  /* display: flex;
  align-items: center;
  justify-content: center; */
}

.contact-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,30,15,0.6); /* Dark overlay */
}

.contact-info .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.contact-info h2 {
  color: var(--l-green);
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);

}
.contact-info p {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.contact-info .phone-prominent {
  font-size: 2rem; /* Larger prominent phone */
  font-weight: 700;
  color: var(--l-green);
  display: block;
  margin: 25px 0;
  text-align: center;
}
.contact-info .phone-prominent a {
  color: var(--l-green);
  transition: color 0.3s ease;
}
.contact-info .phone-prominent a:hover {
  color: var(--hover-primary);
  text-decoration: underline;
}

/* MAP section */
.map-section {
  background-color: var(--secondary-color);
  padding: 80px 0;
  text-align: center;
}

.map-section iframe {
  width: 100%;
  height: 75vh;
}


/* CLUB POLICIES */
.club-policies p {
  font-size: 1.4rem;
}
.club-policies a {
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: underline;
  color: purple;
}

/* Footer */
.main-footer {
  background-color: #222c30; /* Darker footer */
  color: #adb5bd; /* Lighter text for footer */
  text-align: center;
  padding: 40px 0;
}
.main-footer p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.main-footer a {
  color: #e9ecef; /* Even lighter for links */
}
.footer-phone a {
  font-weight: bold;
}
.footer-phone a:hover {
  text-decoration: underline;
}

/* --- MEDIA QUERIES for Responsiveness --- */

/* Tablets and larger phones (up to 992px for more complex nav changes) */
@media (max-width: 992px) {
  /* .main-header .container {
    /* Allow some items to wrap if needed before full mobile nav */
  /* } */ */
  .main-nav ul li {
    margin-left: 20px; /* Reduce nav spacing */
  }
  .hero h1 {
    font-size: 3rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
}

/* Mobile screens (up to 768px) */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  h2,
  .section-title {
    font-size: 1.8rem;
  }
  h3 {
    font-size: 1.4rem;
  }

  .main-header .container {
    flex-wrap: wrap; /* Allow logo and toggle to be on one line, nav below */
    justify-content: space-between; /* Keep logo and toggle spread */
  }
  .logo-placeholder {
    font-size: 1.6rem;
    /* order: 1; (default) */
  }
  .header-phone {
    display: none; /* Hide header phone on mobile, rely on contact/footer */
  }

  .mobile-nav-toggle {
    display: block; /* Show hamburger icon */
    order: 2; /* Place it after logo on the right */
  }
  .main-nav {
    display: none; /* Hide desktop nav */
    width: 100%;
    order: 3; /* Nav below logo and toggle */
    margin-top: 15px;
  }
  .main-nav.active {
    /* This class will be toggled by JavaScript */
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    width: 100%;
  }
  .main-nav ul li {
    margin: 0;
    width: 100%;
  }
  .main-nav ul li a {
    display: block;
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    font-size: 1rem;
  }
  .main-nav ul li:last-child a {
    border-bottom: none;
  }
  .main-nav ul li a::after {
    display: none;
  } /* No underline for mobile nav items */

  .hero {
    padding: 80px 0;
    min-height: auto; /* Adjust min-height for mobile */
  }
  .hero h1 {
    font-size: 2.4rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .why-choose-us .features {
    flex-direction: column; /* Explicitly stack features */
  }
  .why-choose-us .feature-item {
    flex-basis: auto; /* Reset flex-basis */
    margin-bottom: 20px;
  }

  .why-choose-us .feature-item img{
    width: 50px;

  }
  .why-choose-us .feature-item {
    flex-basis: auto; /* Reset flex-basis */
    margin-bottom: 20px;

  }
  .why-choose-us .feature-item:last-child {
    margin-bottom: 0;
  }

  section {
    padding: 50px 0;
  }
  .section-title {
    margin-bottom: 30px;
  }

  .contact-info .phone-prominent {
    font-size: 1.5rem;
  }
}

/* Smaller mobile screens (up to 480px) */
@media (max-width: 480px) {
  .container {
    width: 95%;
  } /* Slightly more width */
  h1 {
    font-size: 1.8rem;
  }
  h2,
  .section-title {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.3rem;
  }

  section {
    padding: 40px 0; /* Further reduce section padding */
  }
  .section-title {
    margin-bottom: 25px; /* Reduce space after section title */
  }

  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero .btn {
    /* Center hero button on smallest screens */
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 280px; /* Prevent it from being too wide */
  }

  .logo-placeholder {
    font-size: 1.4rem;
  }

  .program-card img {
    height: 180px; /* Reduce image height */
  }
  .program-card-content,
  .coach-card,
  .news-item,
  .event-item {
    padding: 15px;
  }

  .coach-card img {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
  }
}