/* ============================================
   CAMBRIDGE ALLERGY PARTNERS - STYLES.CSS
   Premium Healthcare Design System
   ============================================ */

/* ROOT VARIABLES & RESET */
:root {
  --color-primary-sage: #173636;        /* brand green (Squarespace redesign 2026-06) */
  --color-primary-sage-dark: #0F2525;   /* darker green for hovers/gradients */
  --color-secondary-amber: #7CAB85;     /* green accent — step circles, line icons */
  --color-bg-cream: #FFFFFF;
  --color-bg-light-sage: #EAF6F6;       /* mint panel tint (was pale blue) */
  --color-bg-grey: #D9D9D9;             /* strip / footer grey */
  --color-header: #243C3C;              /* header bar — matches Squarespace (slightly lighter than the #173636 brand green used on dark bands) */
  --container-max: 1760px;              /* near-full-width like Squarespace (~80px margins on 1920) */
  --color-text-dark: #1A1A1A;
  --color-text-medium: #555555;
  --color-text-light: #888888;
  --color-white: #FFFFFF;
  --color-button: #000000;
  --color-button-hover: #1F1F1F;

  --font-serif: 'Roboto', sans-serif;
  --font-sans: 'Roboto', sans-serif;

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 100px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-subtle: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.1);

  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background-color: var(--color-white);
  line-height: 1.75;
  font-size: 19px;
  text-wrap: pretty; /* avoids stranded last-word "widows" in body copy (modern browsers; ignored otherwise) */
}

/* Utility: hold a multi-word phrase together on one line. */
.nowrap {
  white-space: nowrap;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-dark);
  font-weight: 400;            /* Roboto Regular — matches Squarespace's airier headings (was 600) */
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance; /* even out line lengths in headings (modern browsers; ignored otherwise) */
}

h1 {
  font-size: clamp(40px, 4.8vw, 82px);   /* fluid: large like Squarespace on desktop, safe on phones */
  line-height: 1.1;
}

h2 {
  font-size: clamp(32px, 3.8vw, 60px);
}

h3 {
  font-size: clamp(24px, 2.2vw, 38px);
}

h4 {
  font-size: 24px;
}

h5 {
  font-size: 20px;
}

h6 {
  font-size: 18px;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-dark);
}

a {
  color: var(--color-primary-sage);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-sage-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in animations: only hide content when JS has loaded
   and marked the body. This prevents invisible content if JS fails. */
.js-ready .fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.js-ready .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-button);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-button-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary-sage);
  border: 2px solid var(--color-primary-sage);
}

.btn-secondary:hover {
  background-color: var(--color-bg-light-sage);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary-white {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-secondary-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.btn-amber {
  background-color: var(--color-button);
  color: var(--color-white);
}

.btn-amber:hover {
  background-color: var(--color-button-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary-sage);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.btn-link:hover {
  color: var(--color-primary-sage-dark);
}

.btn-link::after {
  content: '→';
}

/* ============================================
   NAVIGATION
   ============================================ */

header {
  background-color: var(--color-header);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 130px;
  flex-shrink: 0;
}

.logo-header {
  max-height: 130px;
  width: auto;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
}

nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  margin: 0 var(--spacing-lg);
}

.nav-mobile-cta {
  display: none;
}

nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-white);
  position: relative;
  white-space: nowrap;
}

nav a:hover {
  color: var(--color-white);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--color-white);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.nav-cta {
  display: block;
}

nav .nav-mobile-cta {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   LAYOUT & SECTIONS
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

section {
  padding: var(--spacing-xxl) 0;
}

/* tighter vertical rhythm for sparse stacked sections (e.g. Fees) */
section.tight {
  padding: var(--spacing-md) 0;
}
section.tight .section-header {
  margin-bottom: 0;
}

/* inline "free consultation" CTA placed after the OIT sections */
.inline-cta {
  text-align: center;
  margin-top: var(--spacing-xl);
}
.inline-cta p {
  font-size: 20px;
  font-weight: 500;
  color: var(--color-primary-sage);
  max-width: 640px;
  margin: 0 auto var(--spacing-md);
}

section.bg-cream {
  background-color: var(--color-bg-cream);
}

section.bg-light-sage {
  background-color: var(--color-bg-light-sage);
}
/* two consecutive mint sections (e.g. Children: Peanut OIT -> Other allergies) otherwise stack 100px + 100px of padding into one oversized gap */
section.bg-light-sage + section.bg-light-sage {
  padding-top: 0;
}

section.bg-sage {
  background-color: var(--color-primary-sage);
  color: var(--color-white);
}

section.bg-grey {
  background-color: var(--color-bg-grey);
}

section.bg-black {
  background-color: #111111;
  color: var(--color-white);
}
section.bg-black h1, section.bg-black h2, section.bg-black h3,
section.bg-black h4, section.bg-black h5, section.bg-black h6 {
  color: var(--color-white);
}
section.bg-black p, section.bg-black a {
  color: rgba(255, 255, 255, 0.9);
}

/* feature-list bullets must be light on dark/green sections (were illegible dark) */
section.bg-sage .feature-list li,
section.bg-black .feature-list li {
  color: rgba(255, 255, 255, 0.92);
}

section.bg-sage h1,
section.bg-sage h2,
section.bg-sage h3,
section.bg-sage h4,
section.bg-sage h5,
section.bg-sage h6 {
  color: var(--color-white);
}

section.bg-sage p,
section.bg-sage a {
  color: rgba(255, 255, 255, 0.9);
}

section.bg-sage .step-number {
  background-color: var(--color-secondary-amber);
  color: var(--color-white);
  box-shadow: none;
}

section.bg-sage .steps-row::before {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero {
  background-color: var(--color-bg-grey);
  color: var(--color-text-dark);
  padding: 140px var(--spacing-lg);
  display: flex;
  align-items: center;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.hero.hero-small {
  min-height: 400px;
  padding: 100px var(--spacing-lg);
}

.hero-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--spacing-xl);
  align-items: stretch;
  width: 100%;
  position: relative;
  z-index: 2;
}
/* push the hero buttons to the bottom of the text column so they line up with the bottom of the hero image */
.hero-content > div:first-child {
  display: flex;
  flex-direction: column;
}
.hero-content > div:first-child .hero-buttons {
  margin-top: auto;
}

.hero-content.center {
  grid-template-columns: 1fr;
  text-align: center;
}

.hero-badge {
  background-color: rgba(23, 54, 54, 0.1);
  color: var(--color-primary-sage);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: inline-block;
}

.hero h1 {
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-md);
  font-size: clamp(36px, 4.2vw, 70px);   /* a touch smaller than the global h1 so long hero headings don't run to 5 lines */
}

.hero-subtitle {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--color-text-medium);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-start;
  margin-top: var(--spacing-md);
}

/* keep centred heroes' buttons centred */
.hero-content.center .hero-buttons {
  justify-content: center;
}

.hero-buttons .btn {
  flex: 1 1 0;
  max-width: 340px;   /* wide enough for "Learn About Our Approach" to sit centred on one line */
  text-align: center;
}

.hero-image {
  background: none;
  border-radius: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-medium);
  font-size: 16px;
  text-align: center;
  padding: 0;
  border: none;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

.hero-image:has(img) {
  padding: 0;
  background: none;
  border: none;
}

/* ============================================
   CARDS & CONTENT BLOCKS
   ============================================ */

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.card-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-bg-light-sage), rgba(234, 246, 246, 0.6));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  flex-shrink: 0;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-primary-sage);
  fill: none;
  stroke-width: 1.5;
}

.card h3 {
  margin-bottom: var(--spacing-sm);
}

.card p {
  color: var(--color-text-medium);
  margin-bottom: var(--spacing-md);
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: stretch;
}

.two-column-reverse {
  grid-template-columns: 1fr 1fr;
}

.two-column-reverse > :first-child {
  order: 2;
}

.two-column-reverse > :last-child {
  order: 1;
}

/* In two-column sections the photo fills exactly the text-column height
   (cover-cropped), so it never towers over the text. */
.two-column .hero-image {
  position: relative;
  height: 100%;
  min-height: 320px;
}
.two-column .hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* ============================================
   SECTION HEADINGS
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-bottom: var(--spacing-md);
}

.section-header p {
  color: var(--color-text-medium);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* wider intro paragraph — used on the Peanut OIT section headers so the lead-in fits on two lines */
.section-header.wide p {
  max-width: 1500px;
}

/* ============================================
   PATHWAY SELECTOR
   ============================================ */

.pathway-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

/* Home "How can we help you?" — two wide bordered cards filling the page */
.pathway-cards-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

.pathway-cards-2 .pathway-card {
  border: 1px solid var(--color-bg-grey);
}

.pathway-cards-2 .pathway-photo {
  max-width: 360px;
}

/* white bordered cards on a dark/green band keep their normal dark text */
/* Children Expert-care: white cards on the black band keep dark text */
.bg-black .pathway-card h3 {
  color: var(--color-primary-sage);
}
.bg-black .pathway-card p,
.bg-black .pathway-card .feature-list li {
  color: var(--color-text-medium);
}

/* Approach OIT: see-through green panels with white text + a light border */
.bg-sage .pathway-card {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
}
.bg-sage .pathway-card h3 {
  color: var(--color-white);
}
.bg-sage .pathway-card p {
  color: rgba(255, 255, 255, 0.9);
}
/* keep the see-through green panels on hover — only a light tint, not the drastic white the generic .pathway-card:hover applies */
.bg-sage .pathway-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* default-column bordered card grid — "replicate from Home" used on Children Expert-care */
.pathway-cards.bordered .pathway-card {
  border: 1px solid var(--color-bg-grey);
}

.pathway-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  cursor: pointer;
  border-top: 4px solid transparent;
  border-left: none;
}

.pathway-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
  border-top-color: var(--color-secondary-amber);
  background: linear-gradient(to bottom, rgba(250, 247, 242, 0.5), rgba(255, 255, 255, 1));
}

.pathway-card h3 {
  color: var(--color-primary-sage);
  margin-bottom: var(--spacing-md);
}

.pathway-card p {
  color: var(--color-text-medium);
  margin-bottom: var(--spacing-md);
  font-size: 18px;
}

.pathway-card a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pathway-card a::after {
  content: '→';
}

.pathway-photo {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--spacing-lg);
  flex-shrink: 0;
}

.pathway-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pathway-card {
  text-align: center;
}

.pathway-card .btn {
  margin-top: var(--spacing-md);
  justify-self: center;
  padding-left: 28px;
  padding-right: 28px;
}

.pathway-card.compact {
  text-align: left;
  padding: var(--spacing-lg);
}

.pathway-card.compact h3 {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
}

.pathway-card.compact p {
  margin-bottom: 0;
}

.two-column-narrow {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.two-column-narrow .hero-image {
  aspect-ratio: 4 / 3;
  height: auto;
  max-width: 460px;
  margin: 0 auto;
}

.expert-care-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.expert-care-bottom {
  margin-top: var(--spacing-xl);
}

.expert-care-bottom .feature-list {
  max-width: 800px;
}

@media (max-width: 768px) {
  .two-column-narrow,
  .expert-care-top {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   STEPS & NUMBERED SECTIONS
   ============================================ */

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  position: relative;
}

.steps-row::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-bg-light-sage);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 60px;
  height: 60px;
  background-color: var(--color-primary-sage);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto var(--spacing-md);
  box-shadow: 0 4px 12px rgba(95, 130, 99, 0.15);
}

.step h4 {
  margin-bottom: var(--spacing-sm);
}

.step p {
  color: var(--color-text-medium);
  font-size: 18px;
}

/* ============================================
   TESTIMONIALS
   ============================================ */

.testimonial-card {
  background-color: var(--color-white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  border-left: 3px solid var(--color-secondary-amber);
  position: relative;
}

.testimonial-card blockquote {
  color: var(--color-text-dark);
  font-size: 18px;
  font-style: italic;
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
  padding-left: 40px;
  position: relative;
}

.testimonial-card blockquote::before {
  content: '"';
  font-size: 72px;
  color: var(--color-secondary-amber);
  position: absolute;
  left: -10px;
  top: -20px;
  line-height: 1;
  opacity: 0.6;
}

.testimonial-attribution {
  color: var(--color-text-medium);
  font-weight: 600;
}

/* ============================================
   CREDIBILITY BAR
   ============================================ */

.credibility-bar {
  background-color: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: var(--spacing-xl) var(--spacing-lg);
}

.credibility-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.credibility-label {
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.credibility-item-text {
  font-size: 15px;
  color: var(--color-text-medium);
  font-weight: 500;
}

.credibility-divider {
  font-size: 14px;
  color: var(--color-text-light);
}

.credibility-item {
  opacity: 0.7;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.credibility-item:hover {
  opacity: 1;
}

.credibility-item img {
  max-height: 40px;
  width: auto;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.credibility-item:hover img {
  filter: grayscale(0%);
}

/* ============================================
   TRUST SIGNALS BAR
   ============================================ */

/* full-breadth grey trust band; icons stay centred in the container */
.trust-band {
  background-color: var(--color-bg-grey);
  padding: var(--spacing-xl) 0;
}

.trust-signals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
  align-items: start;
}

.trust-signal {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.trust-icon {
  width: 88px;
  height: 88px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary-amber);
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  flex-shrink: 0;
}

.trust-icon svg {
  width: 80px;
  height: 80px;
  stroke: var(--color-secondary-amber);
  fill: none;
  stroke-width: 1.5;
}

.trust-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.trust-signal p {
  color: var(--color-text-medium);
  font-size: 18px;
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--color-bg-grey);
  color: var(--color-text-dark);
  padding: var(--spacing-xxl) 0 var(--spacing-lg);
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-column h4 {
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-md);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--color-text-medium);
}

.footer-column a {
  color: var(--color-text-medium);
  font-size: 17px;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: var(--color-text-dark);
}

.footer-logo {
  height: 96px;
  margin-bottom: var(--spacing-md);
  overflow: hidden;
}

.footer-logo a {
  display: block;
  height: 100%;
}

.footer-logo img {
  height: 100%;
  width: auto;
  max-height: 96px;
  display: block;
}

.footer-description {
  font-size: 16px;
  color: var(--color-text-medium);
  line-height: 1.7;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: var(--spacing-lg);
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dark);
  transition: var(--transition);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Constrain inline SVGs in feature lists (GrapesJS strips inline styles) */
.feature-list li svg {
  width: 1.2em;
  height: 1.2em;
  display: inline;
  margin-right: 0.5em;
  flex-shrink: 0;
  vertical-align: middle;
}

.social-icon {
  width: 34px;
  height: 34px;
}

.social-icon:hover {
  background-color: rgba(0, 0, 0, 0.08);
  color: var(--color-primary-sage);
}

.footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: var(--spacing-lg);
  text-align: center;
  color: var(--color-text-light);
  font-size: 12px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-lg);
}

.footer-bottom p {
  color: var(--color-text-medium);
}

.footer-bottom a {
  color: var(--color-text-medium);
}

.footer-bottom a:hover {
  color: var(--color-text-dark);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  background-color: var(--color-bg-light-sage);
  color: var(--color-text-dark);
  padding: var(--spacing-xxl) var(--spacing-lg);
  text-align: center;
}

.cta-section h2 {
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-lg);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

/* ============================================
   RESOURCE FILTERS & ARTICLES
   ============================================ */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.filter-tag {
  padding: 10px 20px;
  border: 2px solid var(--color-primary-sage);
  border-radius: 20px;
  background-color: transparent;
  color: var(--color-primary-sage);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 14px;
}

.filter-tag:hover,
.filter-tag.active {
  background-color: var(--color-primary-sage);
  color: var(--color-white);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.article-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.article-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-bg-light-sage), var(--color-bg-cream));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
  text-align: center;
  padding: var(--spacing-md);
}

.article-card-content {
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-category {
  display: inline-block;
  background-color: var(--color-bg-light-sage);
  color: var(--color-primary-sage);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  width: fit-content;
}

.article-card h4 {
  margin-bottom: var(--spacing-sm);
}

.article-excerpt {
  color: var(--color-text-medium);
  font-size: 15px;
  margin-bottom: var(--spacing-md);
  flex: 1;
}

.article-card a {
  font-weight: 600;
  margin-top: auto;
}

/* ============================================
   FEES / PRICING
   ============================================ */
.fee-group {
  margin-bottom: var(--spacing-xl);
}

.fee-group h3 {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-primary-sage);
}

.fee-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.fee-row:last-child {
  border-bottom: none;
}

.fee-name {
  font-weight: 500;
  color: var(--color-text-dark);
  flex: 1;
}

.fee-price {
  font-weight: 600;
  color: var(--color-primary-sage);
  font-size: 18px;
  text-align: right;
  white-space: nowrap;
  margin-left: var(--spacing-lg);
}

.fee-note {
  font-size: 14px;
  color: var(--color-text-medium);
  margin-top: 4px;
}

.fee-package {
  background: linear-gradient(135deg, var(--color-primary-sage), #5F8263);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 1120px;
  margin: 0 auto var(--spacing-xl);
}

.fee-package h3 {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.fee-package .fee-row {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.fee-package .fee-name {
  color: white;
}

.fee-package .fee-price {
  color: white;
  font-size: 24px;
}

.fee-package .fee-note {
  color: rgba(255, 255, 255, 0.8);
}

.fee-package ul {
  list-style: none;
  padding: 0;
  margin-top: var(--spacing-md);
}

.fee-package ul li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

.fee-package ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-secondary-amber);
  font-weight: bold;
}

/* ============================================
   TEAM GRID
   ============================================ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto auto auto auto;
  column-gap: var(--spacing-xxl);
  row-gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.team-card {
  text-align: center;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
}

.team-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  border-radius: 16px;
  margin: 0 auto var(--spacing-lg);
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card h4 {
  color: var(--color-primary-sage);
}

.team-card .feature-list {
  text-align: left;
  display: inline-block;
}

.team-title {
  color: var(--color-text-medium);
  font-size: 18px;
  margin-bottom: var(--spacing-md);
}

.team-bio {
  color: var(--color-text-medium);
  font-size: 17px;
  margin-bottom: var(--spacing-md);
}

/* ============================================
   FEATURE LIST
   ============================================ */

.feature-list {
  list-style: none;
  margin-bottom: var(--spacing-lg);
}

.feature-list li {
  padding: 8px 0;
  color: var(--color-text-dark);
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.feature-list li::before {
  content: '✓';
  color: var(--color-secondary-amber);
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

/* bullet lists are always left-aligned, even inside centred cards
   (e.g. .pathway-card sets text-align:center) — overrides the inherited
   centring at source so it can't drift back via editor saves */
.feature-list {
  text-align: left;
}
.feature-list li {
  justify-content: flex-start;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .logo { height: 60px; }   /* shrink the larger desktop logo on phones */
  .hamburger {
    display: flex;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  nav {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  nav.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-header);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    box-shadow: var(--shadow-subtle);
    z-index: 999;
  }

  nav.active .nav-mobile-cta {
    display: inline-block;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }

  .hero {
    padding: 80px var(--spacing-md);
    min-height: auto;
  }

  .btn {
    white-space: normal;
    word-wrap: break-word;
  }

  .hero.hero-small {
    padding: 80px var(--spacing-lg);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    max-width: 100%;
    overflow: hidden;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;   /* centre the stacked buttons on phones (desktop stays left-aligned) */
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* On phones the hero photo reads better above the heading and buttons */
  .hero .hero-image {
    order: -1;
  }

  .hero-image {
    aspect-ratio: 4/3;
    height: auto;
    min-height: 0;
    max-height: 300px;
  }

  .pathway-cards {
    grid-template-columns: 1fr;
  }

  .steps-row {
    grid-template-columns: 1fr;
  }

  .steps-row::before {
    display: none;
  }

  .two-column,
  .two-column-reverse {
    /* minmax(0,1fr) — not plain 1fr — so the column can shrink below the
       photo's intrinsic width; otherwise a wide image pushes the column
       (and its text) off the side of narrow phones */
    grid-template-columns: minmax(0, 1fr);
  }

  /* let grid items shrink below their content size so wide photos
     can't force the column (and the text) off the side of the screen */
  .two-column > *,
  .two-column-reverse > * {
    min-width: 0;
  }

  /* stacked photos flow as normal responsive images on phones */
  .two-column .hero-image {
    min-height: 0;
    height: auto;
    aspect-ratio: 4/3;
  }
  .two-column .hero-image img {
    position: static;
  }

  .two-column-reverse > :first-child {
    order: 0;
  }

  .two-column-reverse > :last-child {
    order: 0;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .trust-signals {
    grid-template-columns: 1fr;
  }

  .credibility-inner {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }

  .credibility-divider {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .cta-buttons {
    flex-direction: column;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--spacing-xl) 0;
  }

  .nav-container {
    padding: var(--spacing-md);
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .card {
    padding: 32px;
  }

  .pathway-card {
    padding: 32px;
  }

  .article-card-content {
    padding: 32px;
  }

  .testimonial-card {
    padding: 32px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  body {
    font-size: 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  section {
    padding: var(--spacing-lg) 0;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .nav-container {
    padding: var(--spacing-sm);
  }

  .logo {
    height: 56px;
  }

  .card {
    padding: var(--spacing-md);
  }

  .pathway-card {
    padding: var(--spacing-md);
  }

  .article-card-content {
    padding: var(--spacing-lg);
  }

  .testimonial-card {
    padding: var(--spacing-lg);
  }

  .hero {
    padding: 80px var(--spacing-lg);
  }

  .trust-bar .container {
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  .trust-bar-item {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    justify-content: center;
  }

  .trust-bar-item img,
  .trust-bar-item img[alt="Innovate UK"] {
    height: 56px;
  }
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.contact-form-wrap h2 {
  margin-bottom: var(--spacing-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid #D5D0CA;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-text-dark);
  background: var(--color-white);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-sage);
  box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  cursor: pointer;
}

input[name="_honey"] {
  display: none !important;
}

.btn-submit {
  align-self: flex-start;
  padding: 14px 36px;
  font-size: 16px;
}

.form-consent {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
}

.form-consent a {
  color: var(--color-primary-sage);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-info-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-subtle);
}

.contact-info-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-dark);
}

.contact-info-card p {
  color: var(--color-text-medium);
  line-height: 1.7;
}

.contact-info-card a {
  color: var(--color-primary-sage);
  text-decoration: none;
}

.contact-info-card a:hover {
  text-decoration: underline;
}

.contact-detail {
  margin-bottom: var(--spacing-sm);
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-detail h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.form-success {
  text-align: center;
  padding: var(--spacing-xl);
}

.form-success h3 {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-primary-sage);
  margin-bottom: var(--spacing-sm);
}

.form-success p {
  color: var(--color-text-medium);
  font-size: 17px;
}

/* ============================================
   STORY UPDATE BANNER
   ============================================ */

.story-update-banner {
  background: var(--color-bg-light-sage);
  border-left: 4px solid var(--color-primary-sage);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

/* ============================================
   TRUST BAR
   ============================================ */

.trust-bar {
  background: var(--color-white);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: var(--spacing-lg) 0;
  text-align: center;
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 96px;
  flex-wrap: wrap;
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text-light);
  font-size: 17px;
  font-family: var(--font-sans);
}

.trust-bar-item img {
  height: 76px;
  width: auto;
}

.trust-bar-item img[alt="Innovate UK"] {
  height: 66px;
}

.story-update-banner h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-primary-sage-dark);
  margin-bottom: var(--spacing-sm);
}

.story-update-banner p {
  color: var(--color-text-medium);
  line-height: 1.7;
  margin-bottom: var(--spacing-xs);
}

.story-update-banner p:last-of-type {
  margin-bottom: 0;
}

/* ============================================
   MOBILE OVERRIDES (must come after CONTACT FORM
   to win source-order against unconditional rules)
   ============================================ */

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid #D5D0CA;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: var(--spacing-md) var(--spacing-lg);
  z-index: 9999;
  font-family: var(--font-sans);
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-md);
  justify-content: space-between;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 280px;
  font-size: 14px;
  color: var(--color-text-medium);
  line-height: 1.5;
}

.cookie-banner p a {
  color: var(--color-primary-sage);
}

.cookie-banner-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex: 0 0 auto;
}

.cookie-banner .btn {
  padding: 8px 18px;
  font-size: 14px;
}

@media (max-width: 480px) {
  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================
   PRIVACY POLICY PAGE
   ============================================ */

.policy-content {
  max-width: 760px;
  margin: 0 auto;
}

.policy-content p {
  color: var(--color-text-medium);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.policy-content ol.policy-list {
  counter-reset: policy;
  list-style: none;
  padding: 0;
  margin: 0;
}

.policy-content ol.policy-list > li {
  counter-increment: policy;
  position: relative;
  padding-left: 48px;
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-medium);
  line-height: 1.7;
}

.policy-content ol.policy-list > li::before {
  content: counter(policy);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--color-bg-light-sage);
  color: var(--color-primary-sage-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
}

.policy-content ul.rights-list {
  margin: var(--spacing-sm) 0 0 var(--spacing-md);
  padding: 0;
  list-style: disc;
}

.policy-content ul.rights-list li {
  margin-bottom: 6px;
}

.policy-content a {
  color: var(--color-primary-sage);
}

/* ============================================
   RESOURCES EDITORIAL LIBRARY
   ============================================ */

.resources-library-hero {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: var(--spacing-xl);
  padding: 64px var(--spacing-xl) var(--spacing-lg);
  background: #FFFDF8;
  border-bottom: 1px solid #E2DBCF;
}

.resources-library-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
}

.section-kicker,
.resource-badge {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-kicker {
  margin-bottom: auto;
  border: 1px solid rgba(122, 158, 126, 0.35);
  color: var(--color-primary-sage-dark);
}

.resources-library-copy h1 {
  max-width: 680px;
  margin: var(--spacing-xl) 0 0;
  color: var(--color-text-dark);
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
}

.resources-library-copy p {
  max-width: 610px;
  margin-top: var(--spacing-md);
  color: var(--color-text-medium);
  font-size: 18px;
  line-height: 1.6;
}

.resources-featured-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 430px;
  color: var(--color-white);
  background: #263B32;
  box-shadow: var(--shadow-medium);
}

.resources-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resources-featured-card > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-xl);
}

.resource-badge {
  margin-bottom: var(--spacing-md);
  color: #DCEBDD;
  background: rgba(255, 255, 255, 0.14);
}

.resources-featured-card h2 {
  margin: 0;
  color: var(--color-white);
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.05;
}

.resources-featured-card p {
  margin: var(--spacing-md) 0 0;
  color: #D8E2DC;
  line-height: 1.55;
}

.resources-featured-card strong {
  margin-top: var(--spacing-md);
  color: var(--color-white);
  font-size: 15px;
}

.resources-library-section {
  padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-xxl);
  background: var(--color-bg-cream);
}

.resources-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(122, 158, 126, 0.35);
  border-radius: 999px;
  background: #FFFDF8;
  color: var(--color-primary-sage-dark);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.resource-chip:hover,
.resource-chip.active {
  background: #263B32;
  color: var(--color-white);
}

.resource-count {
  color: var(--color-text-medium);
  font-size: 14px;
  font-weight: 700;
}

.resource-editorial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  background: #FFFDF8;
  border: 1px solid #E2DBCF;
  transition: var(--transition);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.resource-card img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}

.resource-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--spacing-md);
}

.resource-card-body span {
  color: var(--color-primary-sage-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.resource-card-body h3 {
  margin: var(--spacing-sm) 0 10px;
  color: var(--color-text-dark);
  font-size: 24px;
  line-height: 1.14;
}

.resource-card-body p {
  margin: 0;
  color: var(--color-text-medium);
  font-size: 14px;
  line-height: 1.55;
}

.resource-card-body a,
.resource-card-body em {
  margin-top: auto;
  padding-top: var(--spacing-md);
  color: var(--color-primary-sage-dark);
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
}

.resource-card.text-card {
  background: #DDEBEF;
}

.resource-card.text-card .resource-card-body {
  padding: var(--spacing-lg);
}

.resource-card.text-card h3 {
  font-size: 31px;
  line-height: 1.08;
}

.resource-card.dark-card {
  color: var(--color-white);
  background: #263B32;
}

.resource-card.dark-card .resource-card-body span,
.resource-card.dark-card .resource-card-body h3,
.resource-card.dark-card .resource-card-body em {
  color: var(--color-white);
}

.resource-card.dark-card .resource-card-body p {
  color: #D8E2DC;
}

@media (max-width: 1100px) {
  .resources-library-hero,
  .resource-editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resources-featured-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .resources-library-hero,
  .resource-editorial-grid {
    grid-template-columns: 1fr;
  }

  .resources-library-hero,
  .resources-library-section {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }

  .resources-library-copy {
    min-height: 0;
  }

  .resources-library-copy h1 {
    margin-top: var(--spacing-lg);
    font-size: 42px;
  }

  .resources-featured-card > div {
    padding: var(--spacing-lg);
  }

  .resources-filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ─── Pathway cards: subgrid alignment (added 2026-05-14) ─── */
.pathway-cards {
  grid-template-rows: auto auto 1fr auto;
}
.pathway-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 4;
  row-gap: var(--spacing-md);
}
@media (max-width: 768px) {
  .pathway-cards {
    grid-template-rows: none;
  }
  .pathway-card {
    display: block;
    grid-row: auto;
  }
}

/* ============================================
   SQUARESPACE REDESIGN COMPONENTS (2026-06)
   ============================================ */

/* Dark-green emphasis cards — used for allergy-type grids, "what to
   expect", "what this means for you", team support cards. Put .cards-dark
   on the grid container (or .card-dark on an individual card). */
.cards-dark .card,
.cards-dark .pathway-card,
.card.card-dark {
  background-color: var(--color-primary-sage);
  color: var(--color-white);
  box-shadow: none;
  border-top-color: transparent;
}
.cards-dark .card h3,
.cards-dark .pathway-card h3,
.card.card-dark h3 { color: var(--color-white); }
.cards-dark .card p,
.cards-dark .pathway-card p,
.card.card-dark p { color: rgba(255, 255, 255, 0.9); }
/* centre the dark allergy/support cards and give the heading more breathing room, matching the pathway-card boxes */
.cards-dark .card {
  text-align: center;
}
.cards-dark .card h3 {
  margin-bottom: var(--spacing-md);
}
/* opt-in centring for light card grids (Children "Specialist care", Adults "Understanding adult food allergy") */
.cards-center .card {
  text-align: center;
}
.cards-dark .card:hover,
.card.card-dark:hover { box-shadow: var(--shadow-medium); }
.cards-dark .pathway-card:hover {
  background: var(--color-primary-sage);
  border-top-color: var(--color-secondary-amber);
}

/* Pill-style section headers joined by a line — "Understanding side
   effects" (Mild / Moderate / Serious). Sits inside a .bg-sage section. */
.reaction-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  position: relative;
  max-width: none;
  margin: 0 auto;
}
.reaction-row::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 0;
}
.reaction-col {
  text-align: center;
  position: relative;
  z-index: 1;
}
.reaction-pill {
  display: inline-block;
  background-color: var(--color-secondary-amber);
  color: var(--color-white);
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 18px;
  margin-bottom: var(--spacing-md);
}
.reaction-col p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
}

/* Circular section photos in 2- or 3-column intros (reuses .pathway-photo).
   On a .bg-sage band the headings/text inherit white. */
.photo-cols {
  display: grid;
  gap: var(--spacing-xl);
  max-width: 1100px;
  margin: 0 auto;
}
.photo-cols.cols-2 { grid-template-columns: repeat(2, 1fr); }
.photo-cols.cols-3 { grid-template-columns: repeat(3, 1fr); }
.photo-col { text-align: center; }
.photo-col .pathway-photo { margin-bottom: var(--spacing-md); }
.photo-col .feature-list { text-align: left; max-width: 360px; margin: 0 auto; }

/* CTA band — dark-green variant (Children / Team / Approach). Default
   .cta-section stays mint (Home / Adults / Fees). */
.cta-section.cta-dark {
  background-color: var(--color-primary-sage);
  color: var(--color-white);
}
.cta-section.cta-dark h2 { color: var(--color-white); }
.cta-section.cta-dark p { color: rgba(255, 255, 255, 0.9); }
.cta-section.cta-dark .btn-primary {
  background-color: var(--color-white);
  color: var(--color-primary-sage);
}
.cta-section.cta-dark .btn-primary:hover {
  background-color: var(--color-bg-light-sage);
}

@media (max-width: 768px) {
  .reaction-row { grid-template-columns: 1fr; }
  .reaction-row::before { display: none; }
  .photo-cols.cols-2,
  .photo-cols.cols-3 { grid-template-columns: 1fr; }
}

/* ============================================
   PRINT  — clean, ink-light, single-column layout.
   Only applies when printing; the on-screen design is untouched.
   ============================================ */
@page {
  margin: 1.4cm 1.2cm 1.3cm;
}

@media print {
  /* flatten all the brand colour blocks to black-on-white so sections
     don't print as heavy ink slabs or white-on-white text */
  *, *::before, *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* the scroll-reveal animation leaves elements at opacity:0 until they're
     scrolled into view — which never happens on paper, so force them visible */
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }
  html, body {
    overflow: visible !important;
  }

  html, body {
    font-size: 10.5pt;
    line-height: 1.4;
  }

  /* brand/contact banner at the top of the printout (page 1). A true
     per-page running header isn't reliably paintable by the browser's
     print engine via CSS, so this sits in normal flow at the very top;
     enable the browser's own "Headers and footers" for per-page URL/date. */
  body::before {
    content: "Cambridge Allergy Partners  ·  capallergy.co.uk  ·  enquiries@capallergy.co.uk";
    display: block;
    font-size: 9pt;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding-bottom: 6pt;
    margin-bottom: 12pt;
    border-bottom: 0.75pt solid #999;
  }

  /* drop the interactive / decorative chrome that has no place on paper */
  header, .hamburger, nav, .nav-cta, .nav-mobile-cta,
  .cookie-banner, .trust-bar, footer,
  .cta-section, .hero-buttons, .inline-cta,
  .social-icons, iframe, video,
  .contact-form-wrap, form, noscript {
    display: none !important;
  }

  /* hide ALL photography and its now-empty wrappers (printed reference is
     text-only — saves pages and colour ink) */
  img,
  .hero-image, .pathway-photo, .team-photo, .trust-icon, figure {
    display: none !important;
  }

  /* the map card (embed + its "Open in Google Maps" link) is useless on paper */
  .contact-info-card:has(iframe) {
    display: none !important;
  }

  .hero, section {
    padding: 6pt 0 !important;
    min-height: 0 !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* stack every multi-column layout into a single readable column */
  .hero-content, .two-column, .two-column-reverse,
  .pathway-cards, .pathway-cards-2, .grid-2, .grid-3,
  .steps-row, .trust-signals, .photo-cols, .reaction-row,
  .contact-layout, .footer-content {
    display: block !important;
  }

  /* left-align everything for paper (centred reads sparse and informal) */
  .hero-content, .hero-content.center, .section-header, .hero-subtitle,
  .card, .pathway-card, .step, .reaction-col, .trust-signal,
  .cta-section, .fee-package, .photo-col {
    text-align: left !important;
  }
  .section-header {
    margin-bottom: 8pt !important;
  }

  h1 { font-size: 17pt; margin-bottom: 6pt; }
  h2 { font-size: 14pt; margin-bottom: 4pt; }
  h3, h4 { font-size: 12pt; margin-bottom: 3pt; }
  h1, h2, h3, h4 { page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }

  /* keep small units intact, but let big groups (e.g. fee tables) flow
     across pages instead of jumping and leaving a blank half-page */
  .fee-row, .card, .pathway-card, .team-card, .step, .reaction-col {
    page-break-inside: avoid;
  }
  .card, .pathway-card, .team-card, .step, .reaction-col, .fee-package {
    border: 0.5pt solid #bbb !important;
    padding: 7pt 10pt !important;
    margin-bottom: 7pt !important;
  }

  /* black ticks instead of brand-colour ones */
  .feature-list li::before { color: #000 !important; }
  .feature-list li svg { fill: #000 !important; }

  a { color: #000 !important; text-decoration: underline; }
}
