/* ===== Variables ===== */
:root {
  --brand: #0097b2;
  --accent: #fff197;
  --cream: #f4eadf;
  --white: #ffffff;
  --font-heading: 'Mali', cursive;
  --font-body: 'Crimson Pro', serif;
  --max-width: 1000px;
}

/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--brand);
  background-color: var(--white);
  line-height: 1.6;
  font-size: 1.125rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: inherit;
}

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

ul {
  list-style: none;
}

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

/* ===== Sections ===== */
.section {
  padding: 3.25rem 0;
}

.section-light {
  background-color: var(--cream);
  color: var(--brand);
}

.section-brand {
  background-color: var(--brand);
  color: var(--accent);
}

.section h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 2rem;
}

.section-brand h2,
.section-brand h3 {
  color: var(--accent);
}

.section-light h2,
.section-light h3 {
  color: var(--brand);
}

/* ===== Header ===== */
.site-header {
  background-color: var(--brand);
  color: var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--accent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 0.75;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

/* ===== Hero + Tutor Sidebar ===== */
.hero-wrap {
  background-color: var(--brand);
  color: var(--accent);
  padding: 3.25rem 0;
}

.hero-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2.5rem;
}

.hero-main {
  flex: 1;
  text-align: center;
}

.hero-main h1 {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  margin-bottom: 0.75rem;
}

.hero-main .tagline {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-main .subheading {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto 1.75rem;
  opacity: 0.95;
}

/* Meet the Tutor sidebar card */
.tutor-sidebar {
  flex-shrink: 0;
  width: 100%;
  max-width: 430px;
  background-color: var(--white);
  color: var(--brand);
  border: 2px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  padding: 1.5rem 1.75rem;
  text-align: center;
}

.tutor-photo {
  width: 160px;
  height: 160px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--brand);
}

.tutor-sidebar .tutor-name {
  font-size: 1.3rem;
  color: var(--brand);
  margin-bottom: 0.4rem;
}

.tutor-sidebar .tutor-title {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.tutor-sidebar .tutor-bio {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--brand);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  padding: 0.9rem 2.25rem;
  border-radius: 999px;
  font-size: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ===== Section hint text ===== */
.section-hint {
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
  opacity: 0.8;
}

/* ===== Subjects (card grid) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.card {
  display: block;
  background-color: var(--white);
  border: 2px solid var(--brand);
  border-radius: 14px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.card h3 {
  font-size: 1.2rem;
  color: var(--brand);
}

/* ===== Subject Details (click-to-expand boxes, matches Subjects Offered cards) ===== */
/* Multi-column layout so collapsed/expanded boxes stack independently per column,
   instead of a shared grid row forcing empty space next to a taller (open) box. */
.detail-grid {
  display: block;
  columns: 4 230px;
  column-gap: 1.5rem;
}

.detail-card {
  color: var(--brand);
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.detail-card summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand);
  text-align: center;
}

.detail-card summary::-webkit-details-marker {
  display: none;
}

.detail-card summary::after {
  content: '+';
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-card[open] summary::after {
  content: '\2212';
}

.detail-card[open] summary {
  margin-bottom: 0.85rem;
}

.detail-card p {
  font-size: 1rem;
  text-align: left;
  line-height: 1.55;
}

.detail-card:hover {
  transform: none;
  box-shadow: none;
}

.detail-card.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 241, 151, 0.5), 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ===== Policies ===== */
.policy-list-card {
  background-color: var(--white);
  color: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 14px;
  padding: 2rem 2rem 2rem 2.5rem;
  max-width: 850px;
  margin: 0 auto;
}

.policy-list {
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.policy-list li {
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ===== What Students Learn ===== */
.learn-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.learn-list li {
  background-color: rgba(255, 241, 151, 0.12);
  border: 2px solid var(--accent);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  font-weight: 500;
  font-size: 1.15rem;
}

/* ===== Pricing ===== */
.pricing-label {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: -0.75rem;
  margin-bottom: 1.75rem;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.price-card {
  background-color: var(--white);
  color: var(--brand);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.price-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--brand);
}

.price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
}

.price span {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}

/* ===== Contact ===== */
.contact-intro {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}

.form-embed {
  background-color: var(--white);
  border: 2px solid var(--brand);
  border-radius: 14px;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.form-embed iframe {
  border: none;
  display: block;
}

.booking-newtab-link {
  text-align: center;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.booking-newtab-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.contact-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.05rem;
}

.contact-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--brand);
  color: var(--accent);
  text-align: center;
  padding: 1.75rem 0;
  font-size: 0.95rem;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--brand);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 320px;
    border-bottom: 3px solid var(--accent);
  }

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

  .nav-links a {
    display: block;
    padding: 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .hero-wrap {
    padding: 2.5rem 0;
  }

  .hero-flex {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .tutor-sidebar {
    max-width: 340px;
  }

  .section-hint {
    margin-top: -0.5rem;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 1rem;
  }
}
