/* =================================================================
   First Aid Training On Site — Design System
   firstaidtrainingonsite.co.uk
   Clean, professional medical brand: deep emerald + slate, Manrope,
   white surfaces, soft shadows, generous whitespace.
   ================================================================= */

:root {
  /* Brand — emerald */
  --brand:      #047857;   /* primary action / accent */
  --brand-dark: #065F46;   /* hover */
  --brand-mid:  #059669;   /* lighter accent */
  --brand-tint: #ECFDF5;   /* light emerald wash */
  --brand-line: #A7F3D0;   /* emerald hairline */
  /* alias kept for inline styles in the HTML (price/accent) */
  --red:        #047857;

  /* Slate / ink */
  --ink:        #0F172A;   /* headings (slate-900) */
  --ink-soft:   #475569;   /* body text (slate-600) */
  --ink-faint:  #64748B;   /* muted captions (slate-500) */

  /* Surfaces */
  --page:       #F8FAFC;   /* page background (slate-50) */
  --cream:      #F8FAFC;   /* alias */
  --paper:      #FFFFFF;   /* cards / header */
  --sand:       #F1F5F9;   /* tint sections (slate-100) */
  --dark:       #0F172A;   /* darkest slate (reserved) */
  --dark-soft:  #233044;   /* CTA band + footer — softer dark (nudge here to taste) */
  --line:       #E2E8F0;   /* hairline (slate-200) */
  --line-strong:#CBD5E1;   /* slate-300 */

  /* Type */
  --sans:  "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Manrope", "Segoe UI", system-ui, sans-serif; /* alias: headings also Manrope */

  /* Layout */
  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 10px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Soft shadows */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 6px rgba(15,23,42,.04), 0 10px 20px rgba(15,23,42,.07);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
  --ring: 0 0 0 3px rgba(4,120,87,.15);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 100px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 4.8vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
a { color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { color: var(--ink); font-weight: 700; }
hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: var(--wrap-narrow); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-sand { background: var(--sand); }
.section-cream { background: var(--sand); }
.section-ink  { background: var(--dark); color: #CBD5E1; }
.section-ink h1, .section-ink h2, .section-ink h3 { color: #fff; }
.section-ink a { color: #fff; }
.center { text-align: center; }

/* Kicker label */
.kicker {
  display: inline-block;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .7rem;
}
.section-ink .kicker { color: #34D399; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.section-ink .lead { color: #94A3B8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: .85rem 1.4rem; border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1E293B; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--sand); color: var(--ink); border-color: var(--ink-faint); }
.section-ink .btn-ghost, .cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.section-ink .btn-ghost:hover, .cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.06rem; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  padding: .35rem .75rem; border-radius: var(--r-pill);
}
.chip-red { background: var(--brand-tint); border-color: var(--brand-line); color: var(--brand-dark); }
.price-tag { font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
/* Chip rows (course-page intro meta) */
.chip-row, .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--brand); color: #fff; border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm); flex: 0 0 auto;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-weight: 800; font-size: 1.12rem; line-height: 1.05; color: var(--ink); letter-spacing: -.03em; }
.brand-sub  { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-faint); text-transform: uppercase; }
.main-nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: .97rem; color: var(--ink-soft); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: .45rem .55rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--r-sm); z-index: 100; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--brand-tint) 0%, var(--page) 70%); padding-block: clamp(2.75rem,6vw,4.75rem); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.7rem; max-width: 38ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.7rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; font-size: .92rem; font-weight: 600; color: var(--ink); list-style: none; margin: 0; padding: 0; }
.trust-row li { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.trust-row .tick, .trust-row svg { color: var(--brand); }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/3; background: var(--sand); }
.hero-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: .8rem 1.1rem;
}
.hero-badge b { display: block; font-size: 1.6rem; color: var(--brand); line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.hero-badge span { font-size: .76rem; font-weight: 600; color: var(--ink-faint); }

/* ---------- Logos / accreditation strip ---------- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.25rem; }
.logo-strip span {
  font-weight: 700; color: var(--ink-soft); font-size: .9rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: .55rem 1.1rem; box-shadow: var(--shadow-sm);
}
.logo-strip img { height: 42px; width: auto; opacity: .9; }

/* Accreditation logos (FAIB / Qualsafe) */
.accred-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem 2.25rem; }
.accred-logos img { height: 52px; width: auto; }
.accred-logos .chip { font-size: .9rem; }

/* Trusted-by client logo wall */
.trust-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.trust-logo { display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.1rem; min-height: 92px; box-shadow: var(--shadow-sm); }
.trust-logo img { max-height: 52px; max-width: 100%; width: auto; object-fit: contain; }

/* Per-course accreditation badge (in summary box) */
.summary-accred { display: flex; align-items: center; gap: .7rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.summary-accred span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.summary-accred img { height: 34px; width: auto; }

/* Footer accreditation logos (white tiles on the dark footer) */
.footer-accred { display: flex; gap: .55rem; margin-top: 1.3rem; }
.footer-accred img { height: 36px; width: auto; background: #fff; border-radius: 6px; padding: 5px 8px; }

/* ---------- Course grid / cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.course-card {
  display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; text-decoration: none; color: inherit;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.course-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--sand); }
.course-card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.course-card h3 { font-size: 1.18rem; margin-bottom: .3rem; }
.course-card p { font-size: .95rem; color: var(--ink-soft); margin-bottom: 1rem; }
.course-card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.course-card .price-tag { font-size: 1.25rem; }
.course-card .more { font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: .3rem; font-size: .92rem; }

/* ---------- Feature / why list ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 1.75rem 2rem; }
.feature { display: flex; gap: .9rem; }
.feature-ico { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); border-radius: var(--r-md); }
.feature-ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.feature p { font-size: .95rem; margin: 0; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 1.75rem; }
.step { position: relative; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand); color: #fff; font-weight: 800; font-size: 1.25rem; box-shadow: var(--shadow-sm); }
.step h3 { font-size: 1.12rem; margin: .8rem 0 .3rem; }
.step p { font-size: .95rem; margin: 0; }
.steps-split { gap: 2rem; }
@media (max-width: 880px) { .steps-split { grid-template-columns: 1fr !important; } }

/* ---------- Prose ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.prose ul li::marker { color: var(--brand); }
.prose blockquote {
  margin: 1.6rem 0; padding: 1rem 1.4rem; background: var(--brand-tint);
  border-left: 3px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink);
}

/* At-a-glance summary box */
.summary-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 1.4rem 1.5rem; }
.summary-box h2 { font-size: 1.2rem; margin-top: 0; }
.summary-box dl { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; margin: 0; }
.summary-box dt { font-weight: 700; color: var(--ink); }
.summary-box dd { margin: 0; }

/* Two-column course layout */
.course-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.course-aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 1.2rem; }

/* ---------- FAQ accordion ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--brand); font-weight: 500; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 0 1.2rem; }
.faq p { margin: 0 0 .6em; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--dark-soft); color: #CBD5E1; border-radius: var(--r-lg); padding: clamp(2.2rem,5vw,3.4rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #AEB8C7; max-width: 52ch; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; margin-top: 1.5rem; margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .88rem; color: var(--ink-faint); padding-block: 1.1rem; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 1.7rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: .35rem; font-size: .94rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .75rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1rem; }
.gallery-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--r-md); background: var(--sand); box-shadow: var(--shadow-sm); }
.gallery-item { margin: 0; }
.gallery-item figcaption { font-size: .85rem; color: var(--ink-faint); margin-top: .55rem; line-height: 1.45; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-soft); color: #AEB8C7; padding-block: 3rem 1.5rem; }
.site-footer a { color: #D2D9E3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .5rem; font-size: .95rem; }
.footer-grid p { color: #AEB8C7; }
.footer-brand .brand-name { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem; color: #8A93A3; }
.footer-bottom a { color: #8A93A3; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.eyebrow-head { margin-bottom: 2.5rem; }
.tick-list { list-style: none; padding: 0; }
.tick-list li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; }
.tick-list li::before { content: ""; position: absolute; left: .15rem; top: .5em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .course-layout { grid-template-columns: 1fr; }
  .course-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: .85rem 0; }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-cta .btn { padding: .7rem 1rem; }
  .hero-badge { left: 12px; bottom: 12px; }
}

/* ── Courses mega menu ──────────────────────────────────────────── */
.has-mega { position: relative; }
.has-mega .mega-trigger { font: inherit; font-weight: 600; font-size: .97rem; color: var(--ink-soft); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.has-mega .mega-trigger:hover,
.has-mega[data-open="true"] .mega-trigger,
.mega-trigger[aria-current="page"] { color: var(--brand); }
.mega-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .2s; }
.has-mega[data-open="true"] .mega-caret { transform: rotate(-135deg); margin-top: 2px; }
.mega { position: absolute; top: calc(100% + 14px); left: 0; display: none; grid-template-columns: repeat(3, minmax(185px, 1fr)); gap: 14px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg, 0 24px 60px -28px rgba(15,23,42,.5)); padding: 22px 24px; width: min(760px, 94vw); z-index: 80; }
.has-mega[data-open="true"] .mega { display: grid; }
.mega::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }  /* hover-bridge over the gap */
.mega-col { display: flex; flex-direction: column; gap: 1px; }
.mega-h { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 0 0 7px; }
.mega a { display: block; padding: 7px 9px; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; line-height: 1.3; transition: background .12s, color .12s; }
.mega a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.mega-all { color: var(--brand); font-weight: 700; margin-top: 6px; }
@media (max-width: 880px) {
  .has-mega { width: 100%; }
  .has-mega .mega-trigger { display: flex; width: 100%; justify-content: space-between; padding: .85rem 0; }
  .mega { position: static; transform: none; display: none; grid-template-columns: 1fr; width: auto; padding: 0 0 .6rem; border: 0; box-shadow: none; border-radius: 0; }
  .has-mega[data-open="true"] .mega { display: grid; }
  .mega::before { display: none; }
  .mega-h { margin-top: .5rem; }
  .mega a { padding: .55rem .25rem; font-size: .92rem; }
}
