/* Reset some defaults for consistency */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 80px; /* height of your fixed header */
}

/* Body and base font */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #222;
  background-color: #fff;
  line-height: 1.6;
  font-size: 16px;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container to center page content and limit width */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px !important;
}

/* Headings */
h1, h2, h3, h4 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  color: #0b4949; /* teal by default */
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75em;
}

h2 {
  font-size: 2rem;
  margin-top: 1.5em;
  margin-bottom: 1em;
}

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

h4 {
  font-size: 1.2rem;
  margin-bottom: 0.75em;
}

/* Paragraphs */
p {
  margin-bottom: 1em;
  color: #444;
}

/* Links */
a {
  color: #0b4949;
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
    color: #9B5B3F;
}

/* Lists */
ul {
  list-style: disc inside;
  margin-bottom: 1.5em;
  color: #444;
}

/* Section spacing */
section {
  border-bottom: none;
  box-shadow: none; /* if there is any shadow acting as a line */
  margin-top: 0;
  margin-bottom: 0; /* optionally adjust spacing */
  padding-top: 0;
  padding-bottom: 0; /* optionally adjust spacing */
}

/* Remove border from last section */
section:last-of-type {
  border-bottom: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;           /* keeps it above other content */
  background-color: #fff;  /* ensure opaque background */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* subtle shadow on sticky */
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

header > *:last-child,
section > *:last-child {
  margin-bottom: 0;
}

header > *:first-child,
section > *:first-child {
  margin-top: 0;
}

.navbar {
  display: flex;
  align-items: center;        /* ensures vertical centering */
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
  height: 80px;              /* set an explicit height for consistency */
}

/* Styling for the header menu */

.logo img {
  max-height: 80px;
  display: block;
  vertical-align: middle;     /* helps vertical centering */
  margin: 0;                  /* ensures no extra top/bottom gap */
  padding: 0;                 /* ensures no extra padding */
}

.menu {
  position: static; /* remove fixed for desktop */
  display: flex;
  flex-direction: row;
  background: none;
  width: auto;
  transform: none;
  box-shadow: none;
  padding: 0;
  list-style-type: none; /* hides the default bullets */
  margin: 0;             /* reset default ul margin */
  gap: 1rem;             /* optional spacing between menu items */
}


.menu li a {
  color: #0b4949;  /* teal default */
}
.menu li a:hover,
.menu li a:focus {
  background-color: #f6edea; /* pale brown background */
  color: #9B5B3F;            /* brown text */
}
.menu li a.active {
  background-color: #9B5B3F; /* brown active */
  color: #fff;
}

.menu li a:hover,
.menu li a:focus {
  color: #0b4949;
  text-decoration: none;
}

.menu li a {
  padding: 0.5em 0.75em;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.menu li a:hover,
.menu li a:focus {
  background-color: #43afaf;
  color: #fff;
  outline: none;
}

/* Active menu item style (you can add a class "active" to the current page link) */
.menu li a.active {
  background-color: #43afaf;
  color: #fff;
}



/*Hero section styling */

.hero {
  position: relative;
  width: 100vw;
  min-height: 550px;
  display: flex;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
  text-align: center;
  overflow: hidden;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
  padding: 2em 1em 0 1em;
  margin-bottom: 0;
  border-bottom: 1px solid transparent;
}

/* Background image, darken with brightness */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('images/hero-bg.jpg') center center/cover no-repeat;
  filter: brightness(0.5);
  z-index: 0;
}

/* Extra dark overlay for contrast */
.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  padding: 2em;
  border-radius: 8px;
}

/* Force ALL text in hero to off-white */
.hero-content,
.hero-content h1,
.hero-content h3,
.hero-content a,
.hero-content .hero-contact {
  color: #f8f8f8 !important;
}

/* Highlight the phone number */
.hero-contact .highlighted-phone {
  color: #ffffff !important; /* golden highlight */
  text-decoration: underline;
  font-weight: 900;
}

/* About section styling */
.about-section {
  background-color: #f9f9f9;       /* off-white background */
  width: 100vw;                    /* full viewport width */
  position: relative;              /* help with positioning */
  left: 50%;                      /* move right 50% of container */
  right: 50%;                     /* move left 50% */
  margin-left: -50vw;              /* pull back left by 50vw */
  margin-right: -50vw;             /* pull back right by 50vw */
  padding: 3em 15px 3em 15px;     /* vertical padding with some horizontal inside spacing */
  box-sizing: border-box;
}

.about-section > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: #0b4949;
  margin-bottom: 2rem;
  margin-top: 3rem !important;
  font-weight: 700;
  padding-top: 1rem !important;
}

.about-content {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2em;
  flex-wrap: wrap;
  align-items: center;
}

.about-text {
  flex: 1 1 50%;  /* take half width, shrink on small screens */
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.about-image {
  max-width: 80%;
  height: auto;
  border-radius: 8px; /* if you want rounded corners */
}

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

/* horizontal line between sections */
.full-width-divider {
  border: none;
  border-top: 1px solid #ccc;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
}

/*Different classes for different sections */

/* --- Lessons Section Styles --- */
.lessons-section {
  max-width: 960px;      /* Set max width of page content */
  margin: 3em auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.tabs {
  width: 100%;           /* Full width of the container */
  margin: 0 auto 2em auto;
  box-sizing: border-box;
  padding: 0;
}

.tabs input[type="radio"] {
  display: none;
}

/* Tab buttons container */
.tab-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;       /* Add horizontal space between tabs */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Style tab labels */
.tabs label {
  flex: 1;              /* Tabs share available width equally */
  text-align: center;
  padding: 0.6em 1.4em;
  cursor: pointer;
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-bottom: none;
  font-weight: 600;
  user-select: none;
  transition: background-color 0.3s ease;
  border-radius: 5px 5px 0 0;
  margin: 0;
  box-sizing: border-box;
  color: #333;
  min-width: 0;
}

.tabs label:hover {
  background: #e9e9e9;
}

/* Active tab label style */
#tab-child:checked ~ .tab-labels label[for="tab-child"],
#tab-teen:checked ~ .tab-labels label[for="tab-teen"],
#tab-adult:checked ~ .tab-labels label[for="tab-adult"] {
  background: white;
  border-bottom: 1px solid white;
  color: #9B5B3F;
  position: relative;
  top: 1px;
}

/* Tab content containers */
.tab-content {
  border: 1px solid #ccc;
  padding: 1.5em;
  background: white;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  /* Flex for two-column layout */
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Show active tab */
#tab-children:checked ~ #content-children,
#tab-teens:checked ~ #content-teens,
#tab-adults:checked ~ #content-adults {
  display: flex;
}

/* Two-column styles */
.tab-content > .lesson-text {
  flex: 1 1 55%;
  font-size: 1.12rem;
  color: #333;
  min-width: 0;
}

.tab-content > .lesson-text ul {
  margin-top: 0.5em;
  padding-left: 1.2em;
}

.tab-content > .lesson-image {
  flex: 1 1 40%;
  text-align: center;
}

.tab-content > .lesson-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* FadeIn animation */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* --- Testimonial Section Styles --- */

/* Full width off-white background for the whole testimonial section */
#testimonials {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  background-color: #f9f9f9;
  padding: 3em 0; /* vertical padding only */
  box-sizing: border-box;
  overflow: visible;
  color: #333;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.testimonial-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px; /* horizontal padding */
  box-sizing: border-box;
}

/* Container inside testimonial section to center and constrain content */
.testimonial-section {
  max-width: 960px;
  margin: 0 auto 3em auto;                        /* centered horizontally with bottom margin */
  padding: 0 15px;
  box-sizing: border-box;
}

/* Section heading styling inside testimonial container */
.testimonial-section .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: #0b4949;                 /* dark teal for good visibility */
}

/* Flex container for testimonial cards */
.testimonial-cards {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  box-sizing: border-box;
}

/* Each row of testimonial cards layout */
.testimonial-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Individual testimonial card styling */
.testimonial-card {
  flex: 1 1 30%;
  background: #ffffff;            /* white cards for readability */
  border-radius: 8px;
  padding: 1.5em;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

/* Testimonial text inside each card */
.testimonial-text {
  font-style: italic;
  color: #555;
  margin-bottom: 1em;
}

/* Why Marina section styling */
.why-marina-section {
  max-width: 960px;
  margin: 3em auto;
  padding: 0 15px;
  box-sizing: border-box;
  position: relative; /* reset positioning */
  width: auto; /* override any forced width */
  left: auto; /* override any forced left */
  overflow: visible;
}

.why-marina-section .section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
  color: #0b4949;
}

.why-marina-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.why-marina-box {
  background: #f7f9fc;
  padding: 1.8em 1.5em;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  color: #333;
}

.why-marina-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.why-marina-box .icon {
  font-size: 1.5rem;
  color: #0b4949;
  line-height: 1;
}

/* Contact section styling */
#contact {
  background-color: #6bb6b5;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
  padding-top: 1em;
  padding-bottom: 1em;
}

.contact-heading {
  color: #ffffff; /* example color */
}

.contact-container {
  display: flex;
  gap: 2em;
  max-width: 960px;
  margin: 0 auto 2em auto;
  padding: 0 1em;
  box-sizing: border-box;
}

.contact-left,
.contact-right {
  flex-basis: 50%;    /* Each column exactly half width */
  flex-grow: 0;
  flex-shrink: 0;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .contact-container {
    flex-direction: column;
  }
  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }
}

/* Footer styling */
footer {
  text-align: center;
  padding: 1em 0;
  background: rgb(0, 0, 0);
  font-size: 0.9em;
  margin: 0 !important;
}

footer,
footer * {
  color: rgb(255, 255, 255) !important;
}

/* ===== Responsive Styles ===== */

/* Medium devices (tablets) */
@media (max-width: 768px) {
  /* Navigation menu stacks vertically */
  .menu {
    flex-direction: column;
    gap: 0.5em;
  }
  .menu li a {
    padding: 1em;
    font-size: 1.1rem;
  }

  /* About section stacks image and text vertically */
  .about-content {
    flex-direction: column;
  }
  .about-image,
  .about-text {
    flex-basis: 100%;
    max-width: 100%;
  }
  .about-image {
    margin-bottom: 1.5em;
  }

  /* Tabs labels stack vertically and tab content stacks */
  .tab-labels {
    flex-direction: column;
  }
  .tab-labels label {
    margin-bottom: 0.5em;
  }
  .tab-content {
    flex-direction: column;
  }
  .tab-content > .lesson-text,
  .tab-content > .lesson-image {
    flex-basis: 100%;
  }

  /* Testimonials stack vertically */
  .testimonial-cards,
  .testimonial-row {
    flex-direction: column;
  }
  .testimonial-card {
    flex-basis: 100%;
    margin-bottom: 1.5em;
  }

  /* Why Choose Marina grid becomes single column */
  .why-marina-grid {
    grid-template-columns: 1fr;
  }
}

/* Small devices (mobile phones) */
@media (max-width: 480px) {
  /* Slightly smaller font for better fit */
  body {
    font-size: 14px;
  }
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.4rem;
  }
}
