/* =========================================
   COLOUR VARIABLES
========================================= */
:root {
  --charcoal: #2f2d2e;
  --soft-pink: #ffdde1;
  --rose: #cf4d6f;
  --mauve: #a36d90;
  --grey: #76818e;
  --white: #ffffff;
}

/* =========================================
   GLOBAL STYLES
========================================= */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.5;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 700;
}

a {
  text-decoration: none;
}

nav {
  position: sticky;
}

/* Applies to main content sections with white background */
.page-content,
.about-wrapper,
.testimonial-grid,
.contact-wrapper,
.home-previews {
  position: relative;
  background-color: var(--white); /* keep base white */
  z-index: 0;
}

/* Add subtle overlay image */
.page-content::before,
.about-wrapper::before,
.testimonial-grid::before,
.contact-wrapper::before,
.home-previews::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("background.png") center/750px repeat;
  opacity: 0.2; /* very subtle */
  z-index: 0;
  pointer-events: none; /* so clicks go through */
}

/* Make sure content sits above background image */
.page-content > *,
.about-wrapper > *,
.testimonial-grid > *,
.contact-wrapper > *,
.home-previews > * {
  position: relative;
  z-index: 1;
}

/* =========================================
   HOME PREVIEW CARDS
========================================= */
.home-previews {
  padding: 50px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.preview-card {
  background: linear-gradient(145deg, var(--white), var(--soft-pink));
  border: 2px solid var(--mauve);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.preview-btn {
  margin-top: 15px;
  background: var(--rose);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.3s, transform 0.3s;
}

.preview-btn:hover {
  background: var(--gold);
  transform: translateY(-2px);
}

/* =========================================
   PAGE HEADER
========================================= */
.page-header {
  background: linear-gradient(135deg, var(--soft-pink), var(--mauve));
  padding: 80px 20px;
  text-align: center;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}

.page-header.overlay {
  background-image: url("images/maths-overlay.png"),
    linear-gradient(var(--soft-pink), var(--mauve));
  background-size: 200px;
  background-repeat: repeat;
}

/* =========================================
   NAVIGATION
========================================= */
nav {
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--rose);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: var(--soft-pink);
  font-weight: 600;
  position: relative;
}

nav ul li a.active {
  border-bottom: 2px solid var(--rose);
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
  background: linear-gradient(135deg, var(--soft-pink), var(--rose));
  padding: 50px 20px;
  text-align: center;
  color: var(--white);
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  margin-bottom: 20px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
}

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

.btn-primary:hover {
  opacity: 0.9;
}

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

.btn-secondary:hover {
  opacity: 0.9;
}
/* =========================================
   SERVICES PAGE - ENHANCED CARDS
========================================= */
.service-grid.enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  padding-top: 30px;
  padding-bottom: 30px;
}

.subject-card,
.service-card {
  background: linear-gradient(145deg, var(--white), var(--soft-pink));
  border: 2px solid var(--mauve);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subject-card h3,
.service-card h3 {
  color: var(--rose);
  margin-bottom: 12px;
}

.subject-card p,
.service-card p {
  color: var(--charcoal);
  margin-bottom: 15px;
  font-size: 15px;
}

.intro-text {
  text-align: center;
  font-size: 18px;
  max-width: 700px;
  margin: 10px auto 40px auto;
  color: var(--white);
  line-height: 1.6;
  background-color: var(--mauve);
  padding: 20px 25px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

/* Optional small accent or icon on top */
.service-card::before {
  content: "✏️"; /* or choose another emoji / icon */
  font-size: 28px;
  display: block;
  margin: 0 auto 10px auto;
}

.subject-card::before {
  content: "📚"; /* or choose another emoji / icon */
  font-size: 28px;
  display: block;
  margin: 0 auto 10px auto;
}

.subject-card {
  margin-top: 10px;
  padding: 10px;
}

/* Hover effect */
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

/* =========================================
   CARDS (PREVIEW, SERVICES, TESTIMONIALS, CONTACT)
========================================= */

.home-previews,
.service-grid,
.testimonial-grid,
.contact-wrapper {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preview-card,
.service-card,
.testimonial-card,
.contact-card {
  background: var(--white);
  border: 2px solid var(--mauve);
  padding: 15px;
  border-radius: 10px;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-card:hover,
.service-card:hover,
.testimonial-card:hover,
.contact-card:hover {
  transform: translateY(-4px);
}

/* Buttons inside preview cards */
.preview-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  background: var(--rose);
  color: #fff;
  text-align: center;
}

.preview-btn:hover {
  opacity: 0.9;
}

.about-wrapper {
  padding-left: 40px;
  padding-right: 40px;
  display: grid;
  grid-template-columns: auto 1fr; /* image left, text right */
  gap: 25px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.about-image-card {
  position: relative; /* overlay positioning */
  border-radius: 12px;
  overflow: hidden;
  width: 250px; /* fixed width for image */
  height: auto;
}

.about-image-card img {
  display: block;
  width: 100%;
  height: auto;
}

.about-image-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(207, 77, 111, 0.3); /* rose tint */
  pointer-events: none;
}

.about-text-card {
  background: var(--white);
  border: 2px solid var(--mauve);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s;
  position: relative;
}

.about-text-card:hover,
.about-image-card:hover {
  transform: translateY(-5px);
}

.about-text-card h2 {
  margin-top: 0;
  color: var(--rose);
}

.about-text-card p {
  margin-bottom: 15px;
}

.about-list {
  list-style: none;
  padding: 0;
}

.about-list li {
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--charcoal);
  position: relative;
  padding-left: 25px;
}

.about-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--rose);
}

/* RESPONSIVE: stack on mobile */
@media (max-width: 768px) {
  .about-wrapper {
    grid-template-columns: 1fr; /* stacks image and text */
    justify-items: center;
  }

  .about-image-card {
    width: 90%; /* scales nicely */
  }
}

/* =========================================
   PAGE HEADER
========================================= */
.page-header {
  background: var(--soft-pink);
  padding: 60px 20px;
  text-align: center;
}

.page-header.overlay {
  background-image: linear-gradient(var(--soft-pink), var(--rose));
}

/* =========================================
   CONTACT PAGE
========================================= */
contact-card {
  width: 30%;
  max-width: 400px;
  padding: 18px;
}

.contact-form input,
.contact-form textarea {
  width: 86%;
  padding: 9px;
  font-size: 13px;
}

.contact-form button {
  padding: 9px; /* reduce height */
  font-size: 13px; /* smaller button text */
}
.contact-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* center content horizontally */
  gap: 30px;
  padding: 50px 20px;
}

.contact-card {
  width: 50%; /* form card width */
  max-width: 600px; /* optional: prevent it from getting too wide */
}

.info-card {
  width: 50%; /* info card width */
  max-width: 900px;
  background: linear-gradient(145deg, var(--white), var(--soft-pink));
  color: var(--charcoal);
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

/* Form Inputs */
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--grey);
  margin-bottom: 15px;
  font-size: 14px;
  width: 95%;
}

.contact-form button {
  background: var(--rose);
  color: #fff;
  font-weight: bold;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Card Hover Effect */
.contact-card:hover,
.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

/* Info Card Specific */
.info-card p {
  margin: 4px 0;
  font-weight: bold;
  font-size: small;
  color: var(--charcoal);
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contact-card,
  .info-card {
    width: 100%; /* stack full width on small screens */
  }
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

/* =========================================
   TESTIMONIALS
========================================= */
.testimonial-card span {
  margin-top: 6px;
  color: var(--grey);
  font-size: 13px;
}
.testimonial-grid {
  padding-bottom: 100px;
}

/* HAMBURGER (hidden by default on desktop) */
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {
  /* HERO BUTTONS */
  .hero-buttons {
    flex-direction: column;
    gap: 8px;
  }

  header {
    margin-bottom: 60px;
  }

  /* ABOUT SECTION */
  .about-wrapper {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  .about-image-card {
    width: 90%;
  }

  .about-text-card {
    width: 90%;
  }

  /* CONTACT PAGE */
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    flex-direction: column;
  }

  .contact-card,
  .info-card {
    width: 90%;
    max-width: 90%;
  }

  .contact-form input,
  .contact-form textarea {
    width: 90%;
    font-size: 14px;
  }

  .contact-form button {
    width: 100%;
    font-size: 14px;
  }

  /* HOME PREVIEWS / SERVICE GRID / TESTIMONIAL CARDS */
  .home-previews,
  .service-grid,
  .testimonial-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 20px;
  }

  .preview-card,
  .service-card,
  .testimonial-card,
  .contact-card {
    padding: 20px 20px;
  }

  /* NAVIGATION */
  /* NAVIGATION MOBILE */
  /* Top nav bar - sticky */
  nav {
    position: fixed; /* <-- use fixed instead of sticky for cross-browser reliability */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--charcoal);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* optional shadow */
  }

  /* Hamburger icon */
  .hamburger {
    display: block;
    font-size: 28px;
    cursor: pointer;
    color: var(--soft-pink);
    background: none;
    border: none;
  }

  /* Logo */
  .logo {
    color: var(--rose);
    margin-right: 50px;
    font-size: 22px;
    font-weight: 700;
  }

  /* Mobile sidebar menu */
  .nav-links {
    position: fixed; /* overlay */
    top: 0;
    left: -350px; /* hidden initially */
    width: 250px; /* sidebar width */
    height: 100%;
    background: var(--charcoal);
    display: flex;
    flex-direction: column;
    padding-top: 60px; /* leave space for nav bar */
    gap: 0;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 999; /* below nav bar */
  }

  /* Slide in */
  .nav-links.show {
    left: 0;
  }

  /* Menu items */
  .nav-links li {
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #444;
  }

  .nav-links li a {
    display: block;
    padding: 15px 20px;
    color: var(--soft-pink);
    font-size: 18px;
  }

  /* Prevent page scroll when menu open */
  body.menu-open {
    overflow: hidden;
  }
}
