/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a3c5e;
  --primary-light: #2a5f8f;
  --secondary: #2196F3;
  --accent: #f0c040;
  --text: #333;
  --text-light: #666;
  --bg: #ffffff;
  --bg-light: #f8fafb;
  --bg-dark: #0f2a44;
  --border: #e0e6eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  line-height: 1.3;
  font-weight: 700;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Navigation ===== */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  position: fixed;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .nav-logo {
  color: var(--primary);
}

.header.scrolled .nav-links a {
  color: var(--text);
}

.header.scrolled .nav-toggle span {
  background: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 72px;
}

.nav-logo {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
}

.header.scrolled .nav-links a::after {
  background: var(--secondary);
}

.header.scrolled .nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  background: var(--secondary);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  text-shadow: none;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--primary-light);
  color: #fff !important;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10px;
  background:
    url('../images/Magswimhero.PNG') center/cover no-repeat,
    linear-gradient(
      160deg,
      #0f2a44 0%,
      #1a5276 20%,
      #1a7a6d 40%,
      #2a9d8f 55%,
      #56bfae 65%,
      rgba(255, 255, 255, 0.5) 68%,
      #c8a87c 72%,
      #a67c52 85%,
      #8b6542 100%
    );
  z-index: 0;
  filter: blur(3px);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 42, 68, 0.5) 0%,
    rgba(26, 60, 94, 0.4) 50%,
    rgba(15, 42, 68, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 60px 24px;
}

.hero-logo {
  width: 280px;
  height: auto;
  margin: 0 auto 32px;
}

.hero h1 {
  font-size: 3.2rem;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 32px;
  opacity: 0.95;
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--secondary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
}

.btn-accent:hover {
  background: #e0b030;
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== About / Info Cards ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card {
  background: #fff;
  padding: 36px 28px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== About Split Section ===== */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-text .btn {
  margin-top: 8px;
}

/* ===== Stat Bar ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
  padding: 48px 0;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.testimonial-card {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--secondary);
  opacity: 0.15;
  position: absolute;
  top: 12px;
  left: 20px;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
}

/* ===== Team ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.team-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.team-card img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

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

.team-card h3 {
  margin-bottom: 4px;
  font-size: 1.3rem;
}

.team-card .role {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: block;
}

.team-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Featured team member (Nate) */
.team-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.team-featured img {
  width: 100%;
  height: 100%;
  min-height: 450px;
  object-fit: cover;
}

.team-featured-body {
  padding: 48px 48px 48px 0;
}

.team-featured h3 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.team-featured .role {
  color: var(--secondary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
  display: block;
}

.team-featured p {
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.team-featured .contact-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.team-featured .contact-info a {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* ===== Classes ===== */
.class-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.class-info-card {
  background: #fff;
  padding: 36px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--secondary);
}

.class-info-card h3 {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.class-info-card ul {
  list-style: none;
  padding: 0;
}

.class-info-card li {
  padding: 8px 0;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.class-info-card li:last-child {
  border-bottom: none;
}

.class-info-card li strong {
  color: var(--text);
}

.price-highlight {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin: 16px 0;
}

.price-highlight span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light);
}

/* ===== Policy Section ===== */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h3 {
  font-size: 1.3rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.policy-content p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.policy-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.policy-content li {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.contact-item p,
.contact-item a {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== Page Banner ===== */
.page-banner {
  background: var(--primary);
  color: #fff;
  padding: 140px 0 60px;
  text-align: center;
}

.page-banner h1 {
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.page-banner p {
  opacity: 0.85;
  font-size: 1.1rem;
}

/* ===== Registration Form Embed ===== */
.registration-section {
  background: var(--bg-light);
}

.registration-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 40px;
}

.registration-wrapper iframe {
  width: 100%;
  border: none;
  min-height: 600px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand img {
  height: 44px;
  width: auto;
}

.footer-brand span {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.footer-about p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact p,
.footer-contact a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 8px;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-social {
  margin-top: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  transition: background var(--transition), color var(--transition);
}

.footer-social a:hover {
  background: var(--secondary);
  color: #fff;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom img {
  height: 48px;
  width: auto;
  margin: 0 auto 12px;
  opacity: 0.6;
}

/* ===== CTA Section ===== */
.cta-section {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cta-section p {
  opacity: 0.9;
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .about-split,
  .team-featured,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .team-featured-body {
    padding: 32px;
  }

  .team-featured img {
    min-height: 300px;
  }

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

@media (max-width: 768px) {
  /* backdrop-filter creates a containing block for position:fixed descendants,
     which confines the nav overlay to the header height. Disable it on mobile
     so the full-screen menu overlay spans the entire viewport. */
  .header.scrolled {
    backdrop-filter: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
    padding: 32px 24px;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    color: #fff !important;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 14px 32px;
    display: block;
    width: 100%;
    text-align: center;
    border-radius: var(--radius);
    transition: background var(--transition);
    text-shadow: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-links a::after {
    display: none !important;
  }

  .nav-links .nav-cta {
    margin-top: 8px;
    background: var(--secondary) !important;
    color: #fff !important;
    display: block;
  }

  .nav-links .nav-cta:hover {
    background: var(--primary-light) !important;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .header.scrolled .nav-toggle span {
    background: var(--primary);
  }

  .nav-toggle.open span {
    background: #fff !important;
  }

  .hero-logo {
    width: 200px;
  }

  .hero h1 {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .section {
    padding: 60px 0;
  }

  .page-banner {
    padding: 110px 0 40px;
  }

  .page-banner h1 {
    font-size: 2rem;
  }

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

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .registration-wrapper {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .hero-logo {
    width: 160px;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }
}
