/*
Theme Name: BrainVista Tutors
Theme URI: https://www.brainvista.co.uk/
Author: BrainVista Tutors
Description: Custom theme for BrainVista Tutors - UK GCSE & KS3 Maths tuition.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: brainvista
*/

/* =========================================================
   BrainVista Tutors — Design System
   ========================================================= */

:root {
  /* Brand colours */
  --navy-900: #0B1F3A;
  --navy-800: #0F2748;
  --navy-700: #16345F;
  --navy-600: #1F4778;
  --teal-600: #0E8776;
  --teal-500: #12A48F;
  --teal-100: #E4F6F2;
  --gold-500: #F5A623;
  --gold-600: #DD8F12;
  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;

  /* Neutrals */
  --white: #FFFFFF;
  --bg-light: #F6F8FB;
  --bg-alt: #EEF2F8;
  --border: #E1E7F0;
  --text-dark: #14213D;
  --text-body: #33415C;
  --text-muted: #64748B;

  /* Type */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* Layout */
  --container-w: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(15, 39, 72, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 39, 72, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 39, 72, 0.16);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25rem; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 var(--space-2); }
.lead { font-size: 1.15rem; color: var(--text-muted); }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
section { padding: var(--space-6) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-alt { background: var(--bg-light); }
.section-navy { background: var(--navy-900); color: #C9D6E8; }
.section-navy h2, .section-navy h3 { color: var(--white); }

.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--teal-600);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: var(--space-1);
}
.section-head { max-width: 720px; margin: 0 auto var(--space-4); text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gold-500); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-600); box-shadow: var(--shadow-md); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-navy { background: transparent; border-color: var(--navy-700); color: var(--navy-800); }
.btn-outline:hover, .btn-outline-navy:hover { background: rgba(255,255,255,0.08); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; gap: var(--space-3); }
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--font-heading); color: var(--navy-900); }
.brand-icon { height: 42px; width: auto; flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand-tagline { font-weight: 700; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-500); margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: var(--space-3); }
.main-nav ul { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; align-items: center; }
.main-nav > ul > li { position: relative; }
.main-nav a.nav-link { color: var(--text-dark); font-weight: 500; font-size: 0.96rem; padding: 0.5rem 0; }
.main-nav a.nav-link:hover { color: var(--teal-600); text-decoration: none; }
.has-dropdown > .nav-link::after { content: "▾"; margin-left: 0.3rem; font-size: 0.7rem; }
.dropdown {
  position: absolute; top: 100%; left: -1rem; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); min-width: 240px; padding: 0.5rem;
  list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.15s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 0.6rem 0.75rem; border-radius: 6px; color: var(--text-dark); font-size: 0.92rem; }
.dropdown li a:hover { background: var(--teal-100); text-decoration: none; color: var(--teal-600); }
.nav-ctas { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--navy-900); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 64px 0 0 0; background: var(--white);
    flex-direction: column; align-items: stretch; padding: var(--space-3);
    transform: translateX(100%); transition: transform 0.2s ease; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--border); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; }
  .has-dropdown.open .dropdown { display: block; }
  .nav-ctas { flex-direction: column; align-items: stretch; margin-top: var(--space-3); }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); padding: var(--space-2) 0 0; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span[aria-current] { color: var(--navy-800); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-7) 0 var(--space-6); background: linear-gradient(180deg, var(--teal-100) 0%, var(--white) 65%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); align-items: center; }
.hero .badge-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: var(--space-2); }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--white); border: 1px solid var(--border);
  padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.82rem; color: var(--text-muted); font-weight: 600;
}
.hero-cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: var(--space-3); }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; height: 420px; object-fit: cover; }
.stat-float {
  position: absolute; bottom: -1.25rem; left: -1.25rem; background: var(--white);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 1rem 1.25rem;
  display: flex; gap: 0.75rem; align-items: center;
}
.stat-float strong { display: block; font-family: var(--font-heading); font-size: 1.3rem; color: var(--navy-900); }
.stat-float span { font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media img { height: 280px; }
}

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-3); box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--teal-100); color: var(--teal-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: var(--space-2);
}
.subject-card { text-align: left; display: flex; flex-direction: column; height: 100%; }
.subject-card .tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-600); font-weight: 700; }
.subject-card h3 { margin-top: 0.3rem; }
.subject-card .card-link { margin-top: auto; font-weight: 700; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-2) 0; }
.step-num {
  counter-increment: step; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-900); color: var(--white); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700;
}
.step-num::before { content: counter(step); }

/* ---------- Testimonials / Placeholders ---------- */
.placeholder-card { border: 2px dashed #C9D3E3; background: #FBFCFE; }
.placeholder-tag {
  display: inline-block; background: #FFF3D6; color: #8A5A00; font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem;
}
.quote-mark { font-family: var(--font-heading); font-size: 2.5rem; color: var(--teal-500); line-height: 1; }

/* ---------- FAQ Accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; padding: 1.1rem 0; text-align: left; font-family: var(--font-heading);
  font-weight: 600; font-size: 1.02rem; color: var(--navy-900);
}
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--teal-600); transition: transform 0.2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--text-body); }
.faq-item.open .faq-a { max-height: 600px; padding-bottom: 1.1rem; }

/* ---------- Table of contents ---------- */
.toc { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); }
.toc h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc a { color: var(--text-dark); font-weight: 500; }

/* ---------- Article ---------- */
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--text-muted); font-size: 0.88rem; margin-bottom: var(--space-3); }
.article-body { max-width: 760px; margin: 0 auto; }
.article-body h2 { margin-top: var(--space-5); }
.article-body h3 { margin-top: var(--space-4); }
.article-body img { border-radius: var(--radius-md); margin: var(--space-3) 0; }
.article-body blockquote { border-left: 4px solid var(--teal-500); margin: var(--space-3) 0; padding: 0.5rem 0 0.5rem 1.25rem; color: var(--text-muted); font-style: italic; }
.related-links { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 780px) { .related-links { grid-template-columns: 1fr; } }

/* ---------- Blog cards ---------- */
.blog-card img { border-radius: var(--radius-md); height: 190px; object-fit: cover; margin-bottom: 0.8rem; }
.blog-card .tag { color: var(--teal-600); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg); padding: var(--space-5); color: var(--white);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.3rem; }
.cta-banner p { color: #C9D6E8; margin: 0; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: var(--space-2); display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-weight: 600; font-size: 0.9rem; color: var(--navy-900); }
.form-field input, .form-field select, .form-field textarea {
  padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.96rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--teal-500); outline-offset: 1px; }

/* ---------- Pricing ---------- */
.price-card { text-align: center; position: relative; }
.price-card.featured { border-color: var(--teal-500); box-shadow: var(--shadow-md); }
.price-card .price { font-family: var(--font-heading); font-size: 2.2rem; color: var(--navy-900); margin: 0.4rem 0; }
.price-card .price span { font-size: 0.95rem; color: var(--text-muted); font-weight: 400; }
.most-popular {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold-500); color: var(--navy-900); font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.9rem; border-radius: 999px; text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #B9C6DC; padding: var(--space-6) 0 var(--space-3); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--space-4); }
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: var(--space-2); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-grid a { color: #B9C6DC; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--white); }
.footer-brand p { color: #9AAAC6; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: var(--space-5); padding-top: var(--space-3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; font-size: 0.82rem; color: #8494B3;
}
.social-row { display: flex; gap: 0.6rem; margin-top: var(--space-2); }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; color: var(--white);
}
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  background: var(--whatsapp); color: var(--white); width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  font-size: 1.8rem; transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); text-decoration: none; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.divider { height: 1px; background: var(--border); margin: var(--space-4) 0; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy-900); color: var(--white);
  padding: 0.6rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }
