/*
Theme Name: Limes Montessori
Theme URI: https://limesmontessori.co.uk/
Author: Limes Montessori
Description: A warm, responsive WordPress theme for Limes Montessori, including Home Education, SEND and EOTAS provision.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: limes-montessori
*/

:root {
  --limes-cream: #f7f1e6;
  --limes-cream-2: #fbf8f2;
  --limes-cream-3: #efe6d5;
  --limes-olive: #4d5b2b;
  --limes-olive-dark: #38421f;
  --limes-burgundy: #8d1e21;
  --limes-burgundy-dark: #6f1518;
  --limes-gold: #a58c55;
  --limes-ink: #302e27;
  --limes-muted: #6e6a5d;
  --limes-border: rgba(77, 91, 43, .16);
  --limes-shadow: 0 12px 30px rgba(62, 54, 38, .08);
  --limes-radius: 22px;
  --limes-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--limes-ink);
  background: var(--limes-cream-2);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--limes-burgundy); text-decoration: none; }
a:hover { color: var(--limes-burgundy-dark); }
button, input, textarea, select { font: inherit; }

.limes-container {
  width: min(calc(100% - 40px), var(--limes-max));
  margin-inline: auto;
}

.limes-section { padding: 72px 0; }
.limes-section--soft { background: var(--limes-cream); }
.limes-section--white { background: #fffdf8; }
.limes-section-title {
  margin: 0 0 34px;
  text-align: center;
  color: var(--limes-olive-dark);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.15;
}
.limes-section-title::before,
.limes-section-title::after {
  content: '❧';
  display: inline-block;
  margin: 0 12px;
  color: var(--limes-gold);
  font-size: .62em;
  transform: translateY(-2px);
}
.limes-eyebrow {
  margin: 0 0 9px;
  color: var(--limes-burgundy);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 700;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, .97);
  border-bottom: 1px solid rgba(77, 91, 43, .08);
  backdrop-filter: blur(10px);
}
body.admin-bar .site-header { top: 32px; }
.site-header__inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.site-branding { flex: 0 0 auto; }
.site-branding img { max-height: 66px; width: auto; }
.custom-logo-link img { max-height: 66px; width: auto; }
.site-branding__text { display: flex; align-items: center; gap: 12px; }
.site-branding__mark {
  width: 55px; height: 55px; border: 1px solid var(--limes-olive);
  border-radius: 50%; display: grid; place-items: center;
  color: var(--limes-olive); font-family: Georgia, serif; font-weight: 700;
}
.site-branding__name { font: 600 25px/1.1 Georgia, serif; color: var(--limes-olive-dark); }
.site-branding__sub { color: var(--limes-burgundy); letter-spacing: .12em; font-size: 10px; font-weight: 700; text-transform: uppercase; }

.primary-nav ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; align-items: center; gap: 28px;
}
.primary-nav a {
  display: block; padding: 12px 0;
  color: #3d392f; font-family: Georgia, serif; font-size: 15px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--limes-burgundy); border-bottom-color: var(--limes-burgundy); }
.menu-toggle {
  display: none; border: 1px solid var(--limes-border); background: #fffaf1; color: var(--limes-olive-dark);
  border-radius: 12px; padding: 9px 12px; cursor: pointer; font-weight: 700;
}

/* Hero */
.limes-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f8f1e7 0%, #f3eadb 100%);
  border-bottom: 1px solid rgba(141, 30, 33, .08);
}
.limes-hero__grid {
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(210px, .86fr) minmax(430px, 1.55fr) minmax(210px, .86fr);
  align-items: stretch;
}
.limes-hero__image { position: relative; overflow: hidden; min-height: 420px; }
.limes-hero__image img { width: 100%; height: 100%; object-fit: cover; }
.limes-hero__image--left { border-bottom-right-radius: 130px; }
.limes-hero__image--right { border-bottom-left-radius: 130px; }
.limes-hero__image::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 70px rgba(247,241,230,.24);
}
.limes-hero__content {
  position: relative;
  padding: 56px 42px 50px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.limes-hero__content::before,
.limes-hero__content::after {
  content: ''; position: absolute; width: 160px; height: 160px; opacity: .08;
  background: radial-gradient(circle at 40% 40%, var(--limes-olive) 0 2px, transparent 3px 100%);
}
.limes-hero__content::before { left: 4%; bottom: 3%; }
.limes-hero__content::after { right: 4%; top: 6%; }
.limes-hero__brand { max-width: 450px; width: min(100%, 450px); margin-bottom: 25px; }
.limes-hero__title {
  margin: 0;
  color: var(--limes-olive-dark);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(43px, 5vw, 69px);
  font-weight: 500;
  line-height: 1.02;
}
.limes-hero__venue {
  margin: 15px 0 19px;
  color: var(--limes-burgundy);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: clamp(12px, 1.35vw, 18px);
  font-weight: 700;
}
.limes-hero__tagline {
  margin: 0 auto 28px;
  max-width: 560px;
  color: var(--limes-olive-dark);
  font-family: Georgia, serif;
  font-size: clamp(25px, 3vw, 36px);
  font-style: italic;
  line-height: 1.22;
}
.limes-hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.limes-button {
  display: inline-flex; min-height: 49px; align-items: center; justify-content: center;
  padding: 11px 24px; border-radius: 10px; border: 1px solid var(--limes-burgundy);
  background: var(--limes-burgundy); color: #fff; font-family: Georgia, serif; font-size: 16px;
  box-shadow: 0 6px 18px rgba(141,30,33,.12); transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.limes-button:hover { color: #fff; transform: translateY(-1px); background: var(--limes-burgundy-dark); box-shadow: 0 10px 22px rgba(141,30,33,.17); }
.limes-button--outline { background: transparent; color: var(--limes-olive-dark); border-color: var(--limes-olive); box-shadow: none; }
.limes-button--outline:hover { background: var(--limes-olive); color: #fff; }
.limes-button--light { background: #fff9ee; border-color: #fff9ee; color: var(--limes-ink); box-shadow: none; }
.limes-button--light:hover { background: #fff; color: var(--limes-olive-dark); }

/* Support cards */
.support-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.support-card {
  background: rgba(255,255,255,.7); border: 1px solid rgba(165,140,85,.22);
  border-radius: var(--limes-radius); padding: 28px 24px; text-align: center; box-shadow: var(--limes-shadow);
}
.support-card__icon {
  width: 58px; height: 58px; margin: 0 auto 13px; display: grid; place-items: center;
  color: var(--limes-olive); font-size: 31px; line-height: 1;
}
.support-card:nth-child(even) .support-card__icon { color: var(--limes-burgundy); }
.support-card h3 { margin: 0 0 10px; color: var(--limes-olive-dark); font: 500 21px/1.15 Georgia, serif; }
.support-card p { margin: 0; color: var(--limes-muted); font-size: 14px; }

/* Welcome */
.welcome-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 54px; align-items: center; }
.welcome-copy h2 { margin: 0 0 18px; color: var(--limes-olive-dark); font: 500 clamp(32px,4vw,46px)/1.1 Georgia, serif; }
.welcome-copy p { margin: 0 0 16px; }
.welcome-panel {
  min-height: 310px; padding: 38px; border-radius: 28px; background: linear-gradient(135deg,#f5eddf,#fbf7ef);
  border: 1px solid rgba(165,140,85,.12); box-shadow: var(--limes-shadow); position: relative; overflow: hidden;
}
.welcome-panel::after {
  content: '❧'; position: absolute; right: 26px; bottom: 1px; color: var(--limes-olive); opacity: .12; font-size: 180px; font-family: Georgia, serif; transform: rotate(-18deg);
}
.welcome-benefit { position: relative; z-index: 1; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; margin-bottom: 25px; }
.welcome-benefit:last-child { margin-bottom: 0; }
.welcome-benefit__icon {
  width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid rgba(77,91,43,.22); border-radius: 50%; color: var(--limes-olive); font-size: 23px;
}
.welcome-benefit strong { display: block; color: var(--limes-olive-dark); font-family: Georgia, serif; font-size: 18px; font-weight: 500; }

/* Benefits */
.benefit-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.benefit { text-align: center; padding: 8px 9px; }
.benefit__icon {
  width: 66px; height: 66px; margin: 0 auto 11px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(77,91,43,.18); background: rgba(255,255,255,.5); color: var(--limes-olive); font-size: 31px;
}
.benefit strong { display: block; font: 500 16px/1.22 Georgia, serif; color: var(--limes-ink); }

/* Environment gallery */
.environment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.environment-grid figure { margin: 0; border-radius: 18px; overflow: hidden; box-shadow: var(--limes-shadow); background: #eee; }
.environment-grid img { width: 100%; height: 245px; object-fit: cover; transition: transform .3s ease; }
.environment-grid figure:hover img { transform: scale(1.02); }

/* Founder + resources */
.story-grid { display: grid; grid-template-columns: .82fr 1.8fr; gap: 22px; align-items: stretch; }
.founder-card, .resources-card { background: var(--limes-cream); border: 1px solid rgba(165,140,85,.16); border-radius: 24px; padding: 28px; }
.founder-card h2, .resources-card h2 { margin: 0 0 20px; color: var(--limes-olive-dark); font: 500 29px/1.15 Georgia, serif; text-align: center; }
.founder-card__body { display: grid; grid-template-columns: 118px 1fr; gap: 18px; align-items: start; }
.founder-card__photo { width: 118px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255,255,255,.85); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.founder-card p { margin: 0 0 17px; font-size: 14px; }
.resources-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.resource { display: grid; grid-template-columns: 135px 1fr; background: rgba(255,255,255,.62); border-radius: 16px; overflow: hidden; border: 1px solid rgba(77,91,43,.08); }
.resource img { width: 100%; height: 100%; min-height: 190px; object-fit: cover; }
.resource__copy { padding: 19px; }
.resource h3 { margin: 0 0 9px; color: var(--limes-ink); font: 500 18px/1.2 Georgia, serif; }
.resource p { margin: 0 0 12px; color: var(--limes-muted); font-size: 13px; }
.resource a { font-weight: 700; font-size: 13px; }

/* CTA */
.limes-cta-wrap { padding: 28px 0 15px; background: #fffdf8; }
.limes-cta {
  position: relative; overflow: hidden; padding: 36px 48px; border-radius: 24px;
  background: linear-gradient(135deg, #4e5d2b, #3a4520); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.limes-cta::before, .limes-cta::after { content: '❧'; position: absolute; color: rgba(255,255,255,.08); font-size: 120px; font-family: Georgia,serif; }
.limes-cta::before { left: -20px; bottom: -45px; }
.limes-cta::after { right: 8px; top: -48px; transform: rotate(180deg); }
.limes-cta__copy, .limes-cta__actions { position: relative; z-index: 1; }
.limes-cta h2 { margin: 0 0 6px; font: 500 clamp(30px,4vw,43px)/1.1 Georgia, serif; }
.limes-cta p { margin: 0; opacity: .88; }

/* Footer */
.site-footer { background: #fffdf8; padding: 40px 0 0; border-top: 1px solid rgba(77,91,43,.06); }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr .72fr; gap: 28px; padding-bottom: 38px; }
.footer-brand img { width: 220px; max-height: 70px; object-fit: contain; object-position: left center; }
.footer-brand p { color: var(--limes-muted); font-family: Georgia, serif; font-style: italic; }
.site-footer h3 { margin: 0 0 12px; color: var(--limes-olive-dark); font: 500 18px/1.2 Georgia, serif; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 7px; font-size: 14px; color: var(--limes-muted); }
.site-footer a { color: var(--limes-muted); }
.site-footer a:hover { color: var(--limes-burgundy); }
.footer-bottom { background: var(--limes-burgundy); color: #fdf6ea; text-align: center; padding: 13px 20px; font-size: 13px; }

/* Inner pages / posts */
.content-shell { width: min(calc(100% - 40px), 900px); margin: 0 auto; padding: 70px 0; }
.entry-title { color: var(--limes-olive-dark); font: 500 clamp(38px,5vw,58px)/1.08 Georgia, serif; margin: 0 0 22px; }
.entry-content { font-size: 17px; }
.entry-content h2, .entry-content h3 { color: var(--limes-olive-dark); font-family: Georgia, serif; font-weight: 500; }
.entry-content img { border-radius: 16px; }
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card { padding: 28px; background: #fff; border-radius: 18px; border: 1px solid var(--limes-border); box-shadow: var(--limes-shadow); }
.post-card h2 { margin-top: 0; font-family: Georgia, serif; color: var(--limes-olive-dark); }

/* Forms */
input[type='text'], input[type='email'], input[type='tel'], input[type='url'], textarea, select {
  width: 100%; border: 1px solid rgba(77,91,43,.22); border-radius: 10px; background: #fffefb; padding: 12px 14px; color: var(--limes-ink);
}
input[type='submit'], button[type='submit'] { border: 0; border-radius: 10px; background: var(--limes-burgundy); color: #fff; padding: 12px 20px; cursor: pointer; }

.screen-reader-text { position: absolute; left: -9999px; }

@media (max-width: 1040px) {
  .primary-nav ul { gap: 17px; }
  .primary-nav a { font-size: 14px; }
  .limes-hero__grid { grid-template-columns: .75fr 1.5fr .75fr; }
  .support-grid { grid-template-columns: repeat(2, 1fr); }
  .benefit-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .story-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.25fr 1fr 1fr; }
}

@media (max-width: 820px) {
  body.admin-bar .site-header { top: 46px; }
  .site-header__inner { min-height: 76px; }
  .site-branding img, .custom-logo-link img { max-height: 54px; }
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none; position: absolute; left: 20px; right: 20px; top: calc(100% + 8px);
    background: #fffdf8; border: 1px solid var(--limes-border); border-radius: 16px; box-shadow: var(--limes-shadow); padding: 14px 20px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav li { border-bottom: 1px solid rgba(77,91,43,.08); }
  .primary-nav li:last-child { border-bottom: 0; }
  .primary-nav a { padding: 12px 2px; }

  .limes-hero__grid { grid-template-columns: 1fr 1fr; }
  .limes-hero__content { grid-column: 1 / -1; grid-row: 1; padding: 52px 24px; min-height: 390px; }
  .limes-hero__image { grid-row: 2; min-height: 280px; }
  .limes-hero__image--left, .limes-hero__image--right { border-radius: 0; }
  .welcome-grid { grid-template-columns: 1fr; gap: 28px; }
  .environment-grid { grid-template-columns: 1fr 1fr; }
  .environment-grid figure:last-child { grid-column: 1/-1; }
  .resources-grid { grid-template-columns: 1fr; }
  .limes-cta { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .limes-container { width: min(calc(100% - 28px), var(--limes-max)); }
  .limes-section { padding: 54px 0; }
  .limes-section-title::before, .limes-section-title::after { display: none; }
  .limes-hero__grid { display: flex; flex-direction: column; }
  .limes-hero__content { order: 1; min-height: 0; padding: 44px 20px; }
  .limes-hero__image--left { order: 2; }
  .limes-hero__image--right { order: 3; }
  .limes-hero__image { min-height: 240px; }
  .limes-hero__title { font-size: 44px; }
  .limes-hero__venue { letter-spacing: .14em; }
  .support-grid { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr 1fr; }
  .environment-grid { grid-template-columns: 1fr; }
  .environment-grid figure:last-child { grid-column: auto; }
  .environment-grid img { height: 230px; }
  .founder-card__body { grid-template-columns: 1fr; text-align: center; }
  .founder-card__photo { margin-inline: auto; }
  .resource { grid-template-columns: 1fr; }
  .resource img { height: 190px; }
  .limes-cta { padding: 31px 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
}
