/* SchoolMix theme v3: violet + teal brand, colourful tile menu, 4px corners, Poppins. */
@font-face { font-family: 'schoolmix'; src: url('../fonts/schoolmix.woff2') format('woff2'), url('../fonts/schoolmix.woff') format('woff'), url('../fonts/schoolmix.ttf') format('truetype'); font-weight: normal; font-style: normal; font-display: block; }
:root {
  --brand: #7c3aed; --brand-dark: #5b21b6; --accent: #0d9488;
  --ink: #1f2430; --text: #494c54; --mute: #5c5f69; --line: #d9dbe0; --grey: #f4f4f6; --white: #fff;
  --logo: #312e81;                    /* dark indigo-blue for the logo */
  --cat: var(--brand);               /* colour of the current section, set by theme.js */
  --radius: 4px; --font: 'Poppins', 'Helvetica Neue', 'Open Sans', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }
a { color: var(--brand); } a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; } .skip-link:focus { left: 12px; top: 12px; z-index: 99; padding: 8px 14px; background: var(--ink); color: #fff; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
[class^="sm-icon-"] { font-family: 'schoolmix' !important; font-style: normal; font-weight: normal; line-height: 1; letter-spacing: normal !important; display: inline-block; }
.sm-icon-teachers::before{content:"\e900"} .sm-icon-shop::before{content:"\e901"} .sm-icon-search::before{content:"\e902"}
.sm-icon-schools::before{content:"\e903"} .sm-icon-schoolmix::before{content:"\e906"} .sm-icon-pupils::before{content:"\e907"}
.sm-icon-parents::before{content:"\e908"} .sm-icon-menu::before{content:"\e909"} .sm-icon-login::before{content:"\e90a"}
.sm-icon-home::before{content:"\e90b"} .sm-icon-events::before{content:"\e90c"} .sm-icon-close::before{content:"\e90d"}
.sm-icon-chat::before{content:"\e90e"} .sm-icon-blog::before{content:"\e90f"}

.page { max-width: 1900px; margin: 0 auto; padding: 0 20px; }

/* top strip + search */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-toggle { width: 36px; height: 36px; min-height: 0; padding: 0; display: grid; place-items: center; line-height: 1; font-size: 16px; color: #fff; background: var(--brand); border: 0; border-radius: var(--radius); cursor: pointer; }
.search-toggle:hover { background: var(--brand-dark); }
.login { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--brand); text-decoration: none; }
.login [class^="sm-icon-"] { font-size: 28px; }
.search-panel { display: none; padding: 14px clamp(16px, 3vw, 16px); border-bottom: 1px solid var(--line); background: #faf9fd; }
.search-panel.open { display: block; }
.site-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.site-search input[type=search] { flex: 1 1 280px; min-height: 46px; padding: 0 14px; font: inherit; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.site-search input[type=search]:focus { border-color: var(--brand); outline: none; }
.search-types { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; margin: 0; padding: 0; font-size: 14px; }
.search-types label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.search-types input { width: 18px; height: 18px; accent-color: var(--accent); }
.site-search button { min-height: 46px; padding: 0 24px; font: inherit; font-weight: 500; color: #fff; background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer; }
.site-search button:disabled { background: #c8cad1; color: #5c5f69; cursor: not-allowed; }

/* masthead: logo + hand-written tile menu */
.masthead { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { flex: none; display: block; }
.brand-logo { display: block; width: 178px; aspect-ratio: 200 / 33; background: var(--logo); -webkit-mask: url('../img/schoolmix-logo.svg') no-repeat left center / contain; mask: url('../img/schoolmix-logo.svg') no-repeat left center / contain; }
.tiles { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: 88px; height: 80px; padding: 10px 6px 8px; color: var(--t, #fff); background: var(--c); border-radius: var(--radius); text-decoration: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; line-height: 1.2; text-align: center; transition: transform .18s, box-shadow .18s, background-color .18s; }
.tile [class^="sm-icon-"] { font-size: 30px; }
.tile:hover, .tile:focus-visible { background: var(--cd, var(--c)); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 16px rgba(31,36,48,.18); }
.tile.is-active::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: rgba(0,0,0,.35); border-radius: var(--radius) var(--radius) 0 0; }
.tile-donate { width: 120px; justify-content: center; font-size: 15px; font-weight: 700; letter-spacing: .22em; }
.menu-toggle:hover { background: var(--grey); color: var(--ink); }
.menu-toggle { display: none; margin-left: auto; width: 48px; height: 48px; min-height: 0; padding: 0; place-items: center; line-height: 1; font-size: 22px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }

/* context menu under the tiles; active item gets a 4px underline in the section colour */
.subnav-wrap { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.subnav-wrap[hidden], .subnav[hidden] { display: none; }
.subnav ul { display: flex; gap: 4px 26px; list-style: none; margin: 0; padding: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.subnav li ul { display: none; }
.subnav a { display: block; padding: 10px 2px 8px; font-size: 15px; font-weight: 400; color: var(--ink); text-decoration: none; border-bottom: 4px solid transparent; }
.subnav a:hover { border-bottom-color: var(--line); }
.subnav a.is-active { font-weight: 600; border-bottom-color: var(--cat); }

/* hero banner (position chosen in the CMS) */
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(340px, 40vw, 560px); margin: 0 0 40px; overflow: hidden; color: #fff; border-radius: var(--radius); background: #3b2a5e center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(124,58,237,.82), rgba(167,85,200,.62) 40%, rgba(13,148,136,.7)); background-size: 200% 200%; animation: drift 12s ease infinite; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.4px); background-size: 14px 14px; }
@keyframes drift { 0%, 100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 880px; padding: clamp(24px, 5vw, 64px); }
.hero-center .hero-inner { margin: 0 auto; text-align: center; }
.hero-right .hero-inner { margin-left: auto; text-align: right; }
.hero h1 { margin: 0 0 .3em; font-size: clamp(36px, 5.6vw, 68px); font-weight: 300; line-height: 1.1; letter-spacing: .06em; color: #fff; }
.hero h2 { margin: 0 0 .3em; font-size: clamp(19px, 2.4vw, 32px); font-weight: 300; line-height: 1.3; letter-spacing: .05em; color: #fff; }
.hero p { margin: 0 0 1.5em; font-size: clamp(15px, 1.4vw, 19px); letter-spacing: .05em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-center .hero-actions { justify-content: center; } .hero-right .hero-actions { justify-content: flex-end; }
.hero-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; font-weight: 600; letter-spacing: .2em; text-transform: lowercase; color: #fff; background: #0f8f4d; border-radius: var(--radius); text-decoration: none; }
.hero-btn:hover { background: #0b723d; color: #fff; }
.hero-btn-alt { background: transparent; border: 2px solid #fff; }
.hero-btn-alt:hover { background: #fff; color: var(--ink); }

/* page body */
.content { max-width: 1160px; margin: 0 auto 56px; }
.content h2 { margin-top: 1.6em; font-size: clamp(24px, 3vw, 34px); }
.content img { margin: 1em 0; }
.content img.align-left, .content img[style*="float: left"] { float: left; margin: 0 24px 12px 0; max-width: 45%; }
.content img.align-right, .content img[style*="float: right"] { float: right; margin: 0 0 12px 24px; max-width: 45%; }
.content::after { content: ""; display: table; clear: both; }
blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--cat); color: var(--ink); }
table { width: 100%; border-collapse: collapse; } th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); } th { background: var(--grey); font-weight: 500; }
input[type=text], input[type=email], textarea, select { width: 100%; min-height: 46px; padding: 8px 14px; font: inherit; border: 1.5px solid var(--line); border-radius: var(--radius); }
button, input[type=submit], .btn { min-height: 46px; padding: 0 24px; font: inherit; font-weight: 500; color: #fff; background: var(--brand); border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
button:hover, .btn:hover { background: var(--brand-dark); color: #fff; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; } .pagination a, .pagination span { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }

/* cards: blog posts and events */
.listing { margin: 2.4em 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); list-style: none; margin: 0; padding: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform .18s, border-color .18s; }
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card h3 { margin: 0 0 .2em; font-size: 19px; } .card h3 a { color: var(--ink); text-decoration: none; } .card p { margin: 0; font-size: 15px; }
.meta { color: var(--mute); font-size: 14px !important; }
.th { height: 160px; background: #e9defc center / cover no-repeat; } .po { padding: 14px 18px 18px; }
.ev { display: flex; gap: 16px; align-items: center; padding: 16px; }
.date { flex: none; width: 64px; height: 68px; display: grid; place-content: center; text-align: center; line-height: 1.1; color: #14172a; background: #fcd34d; border-radius: var(--radius); font-weight: 600; }
.date b { font-size: 26px; }
.empty { color: var(--mute); }
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--grey); font-weight: 500; }
.cal-head button { min-width: 44px; padding: 0; justify-content: center; color: var(--ink); background: #fff; border: 1.5px solid var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow, .cal-day { padding: 8px; font-size: 14px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { font-weight: 500; color: var(--mute); border-top: 0; } .cal-day { min-height: 76px; } .cal-day.muted { background: var(--grey); } .cal-day.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-day a { display: block; margin-top: 4px; padding: 2px 6px; font-size: 12px; line-height: 1.35; color: #fff; background: var(--accent); border-radius: var(--radius); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-list { list-style: none; margin: 0; padding: 0; } .event-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event-list time { min-width: 110px; font-weight: 500; color: var(--accent); } .event-loc { color: var(--mute); }

/* footer: newsletter zone, link columns (Orchard menus), copyright */
.site-footer { margin-top: 64px; background: #fafafa; color: #0a2c3d; }
.footer-zone form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; max-width: 1000px; margin: 0 auto; padding: 32px 20px 8px; }
.footer-zone form h3 { flex: 1 0 100%; margin: 0; font-size: 20px; }
.footer-zone form input[type=email], .footer-zone form input[type=text] { flex: 1 1 260px; width: auto; }
.footer-cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; } .footer-col li ul { display: none; }
.footer-col li { margin: 0 0 6px; line-height: 1.5; }
.footer-col a { color: #757983; text-decoration: none; } .footer-col a:hover { color: var(--brand); text-decoration: underline; }
.footer-col li:first-child > a { display: block; margin-bottom: 8px; font-weight: 600; color: var(--ink); pointer-events: none; text-decoration: none; }   /* first item = column heading */
.footer-bottom { padding: 18px 20px; background: #161921; color: #8b92a1; font-size: 14px; text-align: center; }

/* Search result styling */
/* ---------- Search page ---------- */

/* Hide the extra search form that the Search module adds above the results */
.site-main > form[action="/search/search"] {
  display: none;
}

/* Remove bullets and default list spacing from the result list */
.site-main ul.list-group:has(> li > article.content) {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-main ul.list-group:has(> li > article.content) > li {
  list-style: none;
}

/* Smaller result headings */
.site-main .list-group-item article.content h2 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0 0 .4rem;
}

/* ---------- Result colours per category ---------- */

.content[data-section="general"]  { --c:#7c3aed; --t:#ffffff; }
.content[data-section="teachers"] { --c:#ec4899; --t:#14172a; }
.content[data-section="schools"]  { --c:#22c55e; --t:#14172a; }
.content[data-section="children"] { --c:#f97316; --t:#14172a; }
.content[data-section="parents"]  { --c:#14b8a6; --t:#14172a; }
.content[data-section="events"]   { --c:#d946ef; --t:#14172a; }
.content[data-section="blog"]     { --c:#a78bfa; --t:#14172a; }
.content[data-section="about"]    { --c:#06b6d4; --t:#14172a; }

.list-group-item article.content[data-section] {
  border-left: 6px solid var(--c);
  padding: .75rem 1rem;
  background: color-mix(in srgb, var(--c) 8%, #fff);
  border-radius: var(--radius, 4px);
}

/* ---------- Category badge, icon and type text ---------- */

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin: .75rem 0 0;
  font-size: .875rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .15rem .65rem;
  border-radius: 999px;
  background: var(--c);
  color: var(--t);
  font-weight: 600;
}

.result-badge [class^="sm-icon-"] {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
}

.result-type {
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .7;
}

/* Pager: no bullets */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.pager li a {
  display: inline-block;
  min-width: 2.5rem;
  padding: .4rem .8rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.pager li a:hover,
.pager li a:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}


/* Cookie consent buttons */
#cc-main {
  --cc-font-family: var(--font);
  --cc-modal-border-radius: var(--radius);
  --cc-btn-border-radius: var(--radius);

  /* Surfaces and text */
  --cc-bg: var(--white);
  --cc-primary-color: var(--ink);
  --cc-secondary-color: var(--text);
  --cc-separator-border-color: var(--line);
  --cc-overlay-bg: rgba(31, 36, 48, .6);

  /* Primary button (Accept) */
  --cc-btn-primary-bg: var(--brand);
  --cc-btn-primary-color: var(--white);
  --cc-btn-primary-border-color: var(--brand);
  --cc-btn-primary-hover-bg: var(--brand-dark);
  --cc-btn-primary-hover-color: var(--white);
  --cc-btn-primary-hover-border-color: var(--brand-dark);

  /* Secondary button (Reject / Manage): same look as primary, as you had it */
  --cc-btn-secondary-bg: var(--cc-btn-primary-bg);
  --cc-btn-secondary-color: var(--cc-btn-primary-color);
  --cc-btn-secondary-border-color: var(--cc-btn-primary-border-color);
  --cc-btn-secondary-hover-bg: var(--cc-btn-primary-hover-bg);
  --cc-btn-secondary-hover-color: var(--cc-btn-primary-hover-color);
  --cc-btn-secondary-hover-border-color: var(--cc-btn-primary-hover-border-color);

  /* Preferences modal toggles */
  --cc-toggle-on-bg: var(--brand);
  --cc-toggle-off-bg: var(--mute);
  --cc-toggle-on-knob-bg: var(--white);
  --cc-toggle-off-knob-bg: var(--white);
  --cc-toggle-enabled-icon-color: var(--white);
  --cc-toggle-disabled-icon-color: var(--white);
  --cc-toggle-readonly-bg: var(--line);
  --cc-toggle-readonly-knob-bg: var(--white);
  --cc-toggle-readonly-knob-icon-color: var(--line);

  /* Category blocks in the preferences modal */
  --cc-section-category-border: var(--line);
  --cc-cookie-category-block-bg: var(--grey);
  --cc-cookie-category-block-border: var(--grey);
  --cc-cookie-category-block-hover-bg: #ebebef;
  --cc-cookie-category-block-hover-border: #ebebef;
  --cc-cookie-category-expanded-block-bg: var(--grey);
  --cc-cookie-category-expanded-block-hover-bg: #ebebef;

  /* Footer and scrollbar */
  --cc-footer-bg: var(--grey);
  --cc-footer-color: var(--text);
  --cc-footer-border-color: var(--line);
  --cc-webkit-scrollbar-bg: var(--line);
  --cc-webkit-scrollbar-hover-bg: var(--brand);
}
/*
#cc-main {
  --cc-btn-secondary-bg: var(--cc-btn-primary-bg);
  --cc-btn-secondary-color: var(--cc-btn-primary-color);
  --cc-btn-secondary-border-color: var(--cc-btn-primary-border-color);
  --cc-btn-secondary-hover-bg: var(--cc-btn-primary-hover-bg);
  --cc-btn-secondary-hover-color: var(--cc-btn-primary-hover-color);
  --cc-btn-secondary-hover-border-color: var(--cc-btn-primary-hover-border-color);
}
*/

/* tablet + phone: tiles collapse into a hamburger on the right */
@media (max-width: 1279px) {
  .menu-toggle { display: inline-grid; }
  .tiles { display: none; position: absolute; top: 100%; right: 0; left: 0; z-index: 30; flex-wrap: wrap; gap: 6px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 24px rgba(31,36,48,.14); }
  .tiles.open { display: flex; }
  .tiles li { flex: 1 1 96px; } .tile { width: 100%; } .tile-donate { width: 100%; }
}
@media (max-width: 700px) { .cal-day { min-height: 56px; padding: 4px; } .cal-day a { font-size: 0; padding: 4px; } .brand-logo { width: 150px; } }
