/* ==========================================================================
   Vidya Vriksh Tuition — shared stylesheet (multi-page, warm & welcoming)
   ========================================================================== */

:root {
  --cream: #FFF8F0;
  --peach: #FBEADF;
  --peach-deep: #F6D9C6;
  --terracotta: #E07A5F;
  --terracotta-dark: #C65B42;
  --sage: #81B29A;
  --sage-dark: #5E927B;
  --honey: #F2CC8F;
  --ink: #3D342A;
  --muted: #7D7264;
  --shadow: 0 12px 30px rgba(80, 55, 35, 0.10);
  --shadow-sm: 0 4px 14px rgba(80, 55, 35, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1140px;

  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  line-height: 1.5;
  color-scheme: light;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; width: 100%; min-height: 100vh; background: var(--cream); color: var(--ink); overflow-x: hidden; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
/* injected-layout mount points shouldn't create their own box (keeps sticky nav working) */
#site-header, #site-footer { display: contents; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .8rem 1.5rem; border: none; border-radius: 999px;
  font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none;
  font-family: inherit; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--terracotta); color: #fff; box-shadow: 0 8px 18px rgba(224,122,95,.35); }
.btn--primary:hover { background: var(--terracotta-dark); }
.btn--ghost { background: transparent; color: var(--terracotta-dark); border: 2px solid var(--peach-deep); }
.btn--ghost:hover { background: var(--peach); }
.btn--whatsapp { background: #25D366; color: #fff; box-shadow: 0 8px 18px rgba(37,211,102,.3); }
.btn--whatsapp:hover { background: #1eb457; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.pill { display: inline-block; background: var(--sage); color: #fff; padding: .35rem .9rem; border-radius: 999px; font-weight: 800; font-size: .85rem; }
.chip { display: inline-block; background: rgba(255,255,255,.7); border: 1px solid var(--peach-deep); padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.eyebrow { display: inline-block; color: var(--terracotta-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: .4rem; }

/* ---- Header / Nav (injected by layout.js) ------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255,248,240,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--peach-deep);
}
.nav__brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 900; font-size: 1.15rem; color: var(--ink); }
.nav__logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--honey); font-size: 1.1rem; }
.nav__links { display: flex; align-items: center; gap: .2rem; }
.nav__links > a { font-weight: 700; font-size: .96rem; text-decoration: none; color: var(--ink); padding: .5rem .75rem; border-radius: 10px; transition: background .15s, color .15s; }
.nav__links > a:hover { background: var(--peach); }
.nav__links > a.is-active { color: var(--terracotta-dark); background: var(--peach); }
.nav__cta { background: var(--terracotta); color: #fff !important; padding: .55rem 1.1rem !important; margin-left: .3rem; }
.nav__cta:hover { background: var(--terracotta-dark); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav__toggle span { width: 24px; height: 3px; background: var(--ink); border-radius: 3px; transition: .2s; }

/* ---- Page hero (sub-pages) ---------------------------------------------- */
.page-hero { background: linear-gradient(160deg, var(--peach), var(--cream)); border-bottom: 1px solid var(--peach-deep); position: relative; overflow: hidden; }
.page-hero__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.2rem,5vw,3.5rem) clamp(1rem,4vw,2.5rem); position: relative; z-index: 2; }
.page-hero h1 { color: var(--ink); }
.page-hero p { color: var(--muted); font-size: 1.15rem; font-weight: 600; margin-top: .6rem; max-width: 46ch; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; font-weight: 700; }
.breadcrumb a { text-decoration: none; color: var(--terracotta-dark); }
.page-hero__blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .4; }
.page-hero__blob--1 { width: 220px; height: 220px; background: var(--honey); top: -70px; right: -50px; }

/* ---- Home hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--peach), var(--cream)); }
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem,4vw,2.5rem); display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; position: relative; z-index: 2; }
.hero__text .pill { margin-bottom: 1.2rem; }
.hero__text h1 { margin: .3rem 0; color: var(--ink); }
.hero__tagline { font-size: 1.2rem; color: var(--muted); margin: 1rem 0 1.6rem; max-width: 32ch; font-weight: 600; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero__boards { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero__art { display: grid; place-items: center; }
.hero__card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 2rem; background: rgba(255,255,255,.6); border-radius: 30px; box-shadow: var(--shadow); border: 2px solid rgba(255,255,255,.8); transform: rotate(-3deg); }
.hero__emoji { font-size: clamp(2rem, 5vw, 3rem); display: grid; place-items: center; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; }
.hero__blob--1 { width: 260px; height: 260px; background: var(--honey); top: -80px; right: -60px; }
.hero__blob--2 { width: 200px; height: 200px; background: var(--sage); bottom: -70px; left: -50px; opacity: .35; }

/* ---- Sections ----------------------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem,7vw,5rem) clamp(1rem,4vw,2.5rem); }
.section--soft { max-width: none; background: var(--peach); }
.section--soft > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; max-width: 42rem; margin: 0 auto 2.5rem; }
.section__head p { color: var(--muted); font-size: 1.08rem; margin-top: .6rem; }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---- Highlights --------------------------------------------------------- */
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.highlight { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); border: 1px solid var(--peach); }
.highlight__icon { font-size: 1.8rem; }
.highlight h3 { font-size: 1.05rem; margin: .6rem 0 .3rem; }
.highlight p { color: var(--muted); font-size: .92rem; }

/* ---- About -------------------------------------------------------------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.5rem; align-items: center; }
.about__photo { display: grid; place-items: center; }
.about__photo img { width: 100%; max-width: 340px; border-radius: 26px; box-shadow: var(--shadow); }
.about__placeholder { width: 100%; max-width: 340px; aspect-ratio: 1; border-radius: 26px; display: grid; place-items: center; font-size: 6rem; background: linear-gradient(160deg, var(--honey), var(--peach-deep)); box-shadow: var(--shadow); }
.about__creds { color: var(--terracotta-dark); font-weight: 800; margin: .5rem 0 1rem; }
.about__bio { color: var(--muted); font-size: 1.08rem; line-height: 1.7; margin-bottom: 1.6rem; }

/* ---- Teachers (team) ---------------------------------------------------- */
.teachers { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.teacher { background: #fff; border: 1px solid var(--peach); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.9rem 1.6rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.teacher__photo { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 3.2rem; background: linear-gradient(160deg, var(--honey), var(--peach-deep)); box-shadow: var(--shadow-sm); margin-bottom: 1rem; overflow: hidden; }
.teacher__photo img { width: 100%; height: 100%; object-fit: cover; }
.teacher__tag { display: inline-block; background: var(--sage); color: #fff; font-weight: 800; font-size: .72rem; padding: .22rem .7rem; border-radius: 999px; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.teacher h3 { font-size: 1.3rem; }
.teacher__creds { color: var(--terracotta-dark); font-weight: 800; font-size: .92rem; margin: .35rem 0 .7rem; }
.teacher__bio { color: var(--muted); line-height: 1.65; }
@media (max-width: 640px) { .teachers { grid-template-columns: 1fr; } }

/* ---- Cards grid (subjects / generic) ------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card-item { background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--peach); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease; }
.card-item:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-item__icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--peach); font-size: 1.6rem; margin-bottom: .8rem; }
.card-item h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.card-item p { color: var(--muted); }

/* ---- Timing card -------------------------------------------------------- */
.timing-card { max-width: 480px; margin: 0 auto; text-align: center; background: #fff; border-radius: var(--radius); padding: 2.5rem 2rem; box-shadow: var(--shadow); border: 1px solid var(--peach-deep); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.timing-card__icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--peach); font-size: 2rem; margin-bottom: .4rem; }
.timing-card__time { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--terracotta-dark); }
.timing-card__note { color: var(--muted); font-weight: 600; font-size: 1.05rem; }

/* ---- Fees --------------------------------------------------------------- */
.fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); gap: 1.4rem; justify-content: center; align-items: stretch; }
.fee { position: relative; background: #fff; border-radius: var(--radius); padding: 2rem 1.6rem; border: 1px solid var(--peach); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.fee--featured { border: 2px solid var(--terracotta); box-shadow: var(--shadow); transform: translateY(-8px); }
.fee__badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--terracotta); color: #fff; padding: .3rem .9rem; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.fee h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.fee__price { display: flex; align-items: baseline; gap: .4rem; margin-bottom: 1rem; }
.fee__price strong { font-size: 2rem; color: var(--terracotta-dark); }
.fee__price span { color: var(--muted); font-weight: 600; }
.fee ul { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .6rem; }
.fee li { padding-left: 1.6rem; position: relative; color: var(--muted); }
.fee li::before { content: '✓'; position: absolute; left: 0; color: var(--sage-dark); font-weight: 900; }
.fee .btn { margin-top: auto; }

/* ---- Testimonials ------------------------------------------------------- */
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.testimonial { background: #fff; border-radius: var(--radius); padding: 1.8rem; margin: 0; box-shadow: var(--shadow-sm); border: 1px solid var(--peach-deep); }
.testimonial blockquote { margin: 0 0 1rem; font-size: 1.1rem; line-height: 1.6; }
.testimonial figcaption { color: var(--terracotta-dark); font-weight: 800; }

/* ---- FAQ accordion ------------------------------------------------------ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: .9rem; }
.faq__item { background: #fff; border: 1px solid var(--peach-deep); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq__q { width: 100%; text-align: left; background: none; border: none; font-family: inherit; font-weight: 800; font-size: 1.05rem; color: var(--ink); padding: 1.15rem 1.3rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__q::after { content: '+'; font-size: 1.5rem; color: var(--terracotta); transition: transform .2s; line-height: 1; }
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--muted); line-height: 1.7; }
.faq__a > div { padding: 0 1.3rem 1.2rem; }
.faq__item.is-open .faq__a { max-height: 400px; }

/* ---- Gallery ------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery__item { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, var(--honey), var(--peach-deep)); display: grid; place-items: center; box-shadow: var(--shadow-sm); border: 1px solid var(--peach); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__ph { font-size: 2.6rem; opacity: .8; }
.note { text-align: center; color: var(--muted); margin-top: 1.5rem; font-weight: 600; }

/* ---- Contact ------------------------------------------------------------ */
.contact__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.contact__card { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: var(--radius); padding: 1.3rem 1.5rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid var(--peach); transition: transform .15s; }
a.contact__card:hover { transform: translateY(-3px); }
.contact__card > span { font-size: 1.8rem; }
.contact__card div { display: flex; flex-direction: column; }
.contact__card strong { font-size: 1.05rem; }
.contact__card span:last-child { color: var(--muted); font-size: .92rem; }
.contact__map { margin-top: 1.4rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--peach); }
.contact__map iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---- Enquiry form ------------------------------------------------------- */
.enquiry { max-width: 720px; margin: 0 auto; }
.enquiry__form { background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--peach-deep); display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: .92rem; }
.field input, .field textarea, .field select { font-family: inherit; font-size: 1rem; padding: .75rem .9rem; border-radius: 12px; border: 2px solid var(--peach-deep); background: var(--cream); color: var(--ink); transition: border .15s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--terracotta); }
.field textarea { resize: vertical; }
.enquiry__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.enquiry__error { color: var(--terracotta-dark); font-weight: 700; }
.enquiry__success { text-align: center; background: #fff; border-radius: var(--radius); padding: 2.5rem 2rem; box-shadow: var(--shadow); border: 1px solid var(--peach-deep); }
.enquiry__success span { font-size: 3rem; }
.enquiry__success h3 { font-size: 1.6rem; margin: .6rem 0; }
.enquiry__success p { color: var(--muted); margin-bottom: 1.4rem; }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { background: linear-gradient(160deg, var(--sage), var(--sage-dark)); color: #fff; }
.cta-band__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem,5vw,3.5rem) clamp(1rem,4vw,2.5rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { margin: .6rem auto 1.5rem; max-width: 40ch; opacity: .95; font-size: 1.1rem; }
.cta-band .btn--primary { background: #fff; color: var(--terracotta-dark); }
.cta-band .btn--primary:hover { background: var(--cream); }

/* ---- Footer (injected) -------------------------------------------------- */
.footer { flex-shrink: 0; background: var(--ink); color: #fff; padding: 3rem clamp(1rem,4vw,2.5rem) 1.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer__name { font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; }
.footer__col p, .footer__col a { color: rgba(255,255,255,.72); margin-top: .5rem; text-decoration: none; }
.footer__col h4 { font-size: 1rem; margin-bottom: .3rem; }
.footer__col a { display: block; padding: .15rem 0; }
.footer__col a:hover { color: #fff; }
.footer__copy { max-width: var(--maxw); margin: 1.2rem auto 0; text-align: center; color: rgba(255,255,255,.6); font-size: .9rem; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .hero__tagline { max-width: none; }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; text-align: center; }
  .about__photo { order: -1; }
  .cards, .gallery { grid-template-columns: 1fr 1fr; }
  .fee--featured { transform: none; }
  .testimonials { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav__toggle { display: flex; }
  .nav__links { position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; background: var(--cream); padding: 1rem; gap: .3rem; border-bottom: 1px solid var(--peach-deep); box-shadow: var(--shadow); display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links > a { text-align: left; padding: .8rem 1rem; }
  .nav__cta { margin-left: 0; }
  .highlights, .cards, .gallery, .contact__grid { grid-template-columns: 1fr; }
  .enquiry__form { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}
/* ---- Mobile polish (most visitors are on phones) ------------------------ */
@media (max-width: 640px) {
  .nav { padding: .55rem 1rem; }
  .nav__brand { gap: .45rem; }
  .nav__name { font-size: 1.02rem; }
  .nav__logo { width: 34px; height: 34px; }

  /* Hero: text-focused, no decorative card, full-width buttons */
  .hero__inner { padding: 1.8rem 1rem 2.2rem; gap: 1rem; }
  .hero__art { display: none; }
  .hero__text .pill { margin-bottom: .9rem; }
  .hero__tagline { font-size: 1.08rem; margin: .8rem 0 1.3rem; max-width: none; }
  .hero__actions { flex-direction: column; gap: .6rem; }
  .hero__actions .btn { width: 100%; }

  /* Comfortable spacing + tap targets */
  .section { padding: 2.4rem 1rem; }
  .section__head { margin-bottom: 1.6rem; }
  .section__head p { font-size: 1rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .btn { padding: .8rem 1.2rem; }

  .highlight { padding: 1.2rem; }
  .about { gap: 1.3rem; }
  .about__bio { font-size: 1rem; }
  .subject, .card-item { padding: 1.3rem; }
  .fee--featured { transform: none; }
  .timing-card { padding: 2rem 1.4rem; }

  .cta-band__inner { padding: 2.2rem 1rem; }
  .cta-band .btn { width: 100%; max-width: 340px; }

  .contact__card { padding: 1.1rem 1.2rem; }
  .contact__map iframe { height: 260px; }
  .enquiry__form { padding: 1.4rem; }

  /* Footer centred and tidy */
  .footer { padding: 2.2rem 1rem 1.3rem; }
  .footer__inner { text-align: center; gap: 1.4rem; }
  .footer__name { justify-content: center; }
  .footer__inner p { margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
