/* ==========================================================
   Cambridge Neurology — shared stylesheet
   Built from 2008-Cambridge-Neurology-Web-v8.pdf
   ========================================================== */

:root {
  --teal: #1f8a7c;
  --teal-hover: #187065;
  --teal-dark: #15665c;
  --teal-bar: #1f8578;
  --teal-bright: #2aa594;
  --accent: #ee8a4a;
  --mint: #dce9eb;
  --grey-bg: #f2f2f2;
  --card-bg: #f5f8f9;
  --card-foot: #e9f0f1;
  --text: #6f7575;
  --text-dark: #4d5353;
  --heading: #1f8a7c;
  --white: #fff;
  --max: 1150px;
  --gutter: 24px;
  --font-head: "Red Hat Display", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
strong { font-weight: 600; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 90px 0; }
.section--mint { background: var(--mint); }
.section--grey { background: var(--grey-bg); }
.center { text-align: center; }
.intro { max-width: 800px; margin: 0 auto 2.4em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 11px 32px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover, .btn:focus-visible { background: var(--teal-hover); color: var(--white); transform: translateY(-1px); }
.btn--bright { background: var(--teal-bright); }
.btn--bright:hover { background: var(--teal); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.link-arrow::after {
  content: "\27F6";
  color: var(--accent);
  font-size: 1.5em;
  line-height: 1;
  transition: transform .2s;
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--teal-dark);
}
.brand:hover { color: var(--teal-dark); }
.brand img { width: 38px; }

.nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
}
.nav a {
  font-family: var(--font-head);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--teal-dark);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  margin-right: -10px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal-dark);
  margin: 5px 0;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 575px;
  display: flex;
  align-items: center;
  background-color: #f4f6f6;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  padding: 60px 0;
}
.hero-content { max-width: 460px; position: relative; }
.hero h1 { margin-bottom: .45em; }
.hero h1 .post-nominals {
  font-size: .42em;
  font-weight: 400;
  white-space: nowrap;
}
.hero h3 { font-size: 1.1em; margin-top: 2em; margin-bottom: 0.25em; }
.hero p { margin-bottom: 1.8em; }

.hero--home    { background-image: url("../images/hero-home.jpg"); }
.hero--about   { background-image: url("../images/hero-about.jpg"); }
.hero--consult { background-image: url("../images/hero-consultations.jpg"); }
.hero--medico  { background-image: url("../images/hero-medicolegal.jpg"); background-color: #15222e; }
.hero--medico h1 { color: var(--teal-bright); }
.hero--medico p  { color: #d3dade; }

.hero-logos {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-logos img { height: 38px; width: auto; }
.hero-logos img.tall { height: 54px; }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.split-media {
  background-size: cover;
  background-position: center;
  min-height: 520px;
}
.split-body {
  padding: 70px 9% 70px 7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-body--mint { background: var(--mint); }
.split-body--teal { background: var(--teal); color: #cfe7e2; }
.split-body--teal h2 { color: var(--white); }
.split-body--white { background: var(--white); }
.split-body > :last-child { margin-bottom: 0; }
.split-body .btn { align-self: flex-start; }

.dot-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.2em;
}
.dot-list li { position: relative; padding-left: 14px; }
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Logo strips ---------- */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 44px 90px;
  max-width: 820px;
  margin: 0 auto;
}
.logo-row img { height: auto; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 40px;
  max-width: 960px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
.link-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  padding: 8px;
  transition: opacity .25s;
}
.link-grid a:hover,
.link-grid a:focus-visible { opacity: .7; }

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 34px;
  margin-top: 50px;
}
.testimonial {
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  margin: 0;
}
.testimonial-body { padding: 34px 32px 26px; flex: 1; }
.stars {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  color: var(--teal-bright);
}
.stars svg { width: 28px; height: 28px; fill: currentColor; }
.testimonial time {
  display: block;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.testimonial h3 { font-size: 1.12rem; }
.testimonial blockquote { margin: 0; font-size: .9rem; }
.testimonial blockquote p { margin-bottom: .6em; }
.testimonial figcaption {
  background: var(--card-foot);
  padding: 13px 32px;
  font-size: .68rem;
  line-height: 1.5;
  letter-spacing: .05em;
}
.testimonial figcaption strong {
  display: block;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dark);
}

/* ---------- Columns & cards ---------- */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.card img {
  width: 100%;
  aspect-ratio: 402 / 262;
  object-fit: cover;
  margin-bottom: 24px;
}
.card--wide img { aspect-ratio: 525 / 342; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: .9rem; }
.card--wide p { max-width: 460px; }

.qual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.qual-grid h3 { font-size: 1.1rem; }
.qual-grid ul { list-style: none; padding: 0; }
.qual-grid li { font-size: .88rem; margin-bottom: 10px; line-height: 1.5; }
.qual-grid .swirl { grid-column: 3; justify-self: center; width: 130px; margin-top: -10px; }

.qual-grid ul + h3 { margin-top: 3em; }

.academic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.academic p { font-size: .92rem; }

/* ---------- Diagnosis banner ---------- */
.banner {
  position: relative;
  padding: 120px 0;
  text-align: center;
  background: #0d1f33 url("../images/banner-scans.jpg") center / cover no-repeat;
  color: #dde5ed;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 40, .35);
}
.banner .container { position: relative; max-width: 800px; }
.banner h2 { color: var(--white); }
.banner p { margin-bottom: 2.2em; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* ---------- Appointments ---------- */
.contact-split { display: grid; grid-template-columns: 1fr 1fr; }
.contact-form-wrap { background: var(--grey-bg); padding: 70px 8% 70px 9%; }
.contact-form-wrap h2 { font-size: 1.25rem; }
.contact-info {
  background: var(--teal-dark);
  color: #a9ccc5;
  padding: 70px 8% 60px 5%;
  font-size: .92rem;
}
.contact-info h2 { color: var(--white); font-size: 1.25rem; }
.contact-info strong { color: var(--white); font-weight: 500; }
.contact-info a { color: #cfe6e1; }
.contact-info a:hover { color: var(--white); }
.contact-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.contact-info address { font-style: normal; }
.contact-info .pa-photo { width: 100px; flex: none; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0 22px; margin: 0 0 1.6em; }
.contact-info dt, .contact-info dd { margin: 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form input,
.form textarea {
  width: 100%;
  border: 1px solid transparent;
  background: var(--white);
  font: inherit;
  font-size: .85rem;
  color: var(--text-dark);
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 0;
}
.form ::placeholder { color: #a3a8a8; }
.form textarea { min-height: 175px; resize: vertical; display: block; }
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--teal); }
.form .btn { margin-top: 6px; }
.form-status { font-size: .85rem; margin-top: 14px; color: var(--teal-dark); }

.location img {
  width: 100%;
  aspect-ratio: 525 / 342;
  object-fit: cover;
  margin-bottom: 22px;
}
.location h3 { font-size: 1.15rem; }
.location p { font-size: .88rem; margin-bottom: .35em; }
.location p a { font-weight: 600; }

.fee-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 44px;
  text-align: left;
}
.fee-card { background: var(--teal-dark); color: #a9ccc5; font-size: .88rem; position: relative; }
.fee-card h3 {
  background: var(--teal);
  color: var(--white);
  padding: 16px 26px;
  margin: 0;
  font-size: 1.12rem;
}
.fee-card-body { padding: 24px 26px 32px; }
.fee-card .swirl { width: 76px; position: absolute; right: 34px; bottom: 30px; }

/* ---------- Medicolegal ---------- */
.terms-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
}
.terms { list-style: none; padding: 0; font-size: .9rem; }
.terms li { position: relative; padding-left: 14px; margin-bottom: 12px; }
.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--teal);
}
.terms-wrap .swirl { width: 160px; justify-self: center; }

/* ---------- Publications ---------- */
.pubs-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 50px;
  align-items: start;
}
.pub-list { list-style: none; padding: 0; }
.pub-list li { font-size: .88rem; margin-bottom: 1em; line-height: 1.6; }
.pub-list b { color: var(--teal); font-weight: 600; }
.pub-aside {
  background: var(--mint);
  padding: 28px 24px 32px;
  font-size: .85rem;
  position: sticky;
  top: 110px;
}
.pub-aside img { width: 150px; margin-top: 16px; }
.pub-aside a:hover img { opacity: .85; }

/* ---------- Prose page ---------- */
.prose { max-width: 720px; margin: 0 auto; font-size: .92rem; }
.prose h1 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin-bottom: 1em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: #b7d3ce; font-size: .88rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 64px;
}
.site-footer .brand { color: var(--white); margin-bottom: 20px; }
.site-footer p { max-width: 500px; }
.site-footer p a { color: var(--white); }
.site-footer p a:hover { color: var(--accent); }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav a {
  display: inline-block;
  color: var(--white);
  font-family: var(--font-head);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 5px 0;
}
.footer-nav a:hover { color: var(--accent); }
.footer-badge img { width: 150px; }
.copyright { background: var(--teal-bar); color: #cde6e1; font-size: .7rem; padding: 16px 0; }
.copyright p { margin: 0; }

.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #52bcb0;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, background .2s;
  z-index: 40;
}
.to-top svg { width: 18px; height: 18px; }
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { color: var(--white); background: var(--teal); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .testimonials, .fee-cards { grid-template-columns: 1fr 1fr; }
  .link-grid { grid-template-columns: repeat(3, 1fr); }
  .pubs-layout, .terms-wrap { grid-template-columns: 1fr; }
  .pub-aside { position: static; order: -1; }
  .terms-wrap .swirl { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-badge { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 20px rgba(0,0,0,.08);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 6px var(--gutter) 18px; }
  .nav a { display: block; padding: 11px 0; font-size: .95rem; }
  .site-header .container { min-height: 72px; }

  .hero { min-height: 0; padding: 70px 0; background-position: 70% center; }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.82);
  }
  .hero--medico::before { background: rgba(21,34,46,.78); }

  .split, .contact-split, .cols-2, .academic { grid-template-columns: 1fr; }
  .split-media { min-height: 300px; }
  .split--media-right .split-media { order: -1; }
  .split-body { padding: 56px var(--gutter); }
  .contact-form-wrap, .contact-info { padding: 56px var(--gutter); }
  .cols-3, .qual-grid { grid-template-columns: 1fr 1fr; }
  .qual-grid .swirl { grid-column: auto; }
  .section { padding: 64px 0; }
  .academic { gap: 36px; }
}

@media (max-width: 600px) {
  body, .hero h3 { font-size: 14.5px; } 
  .testimonials, .cols-3, .fee-cards, .qual-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .logo-row { gap: 28px 40px; }
  .logo-row img { max-width: 110px; }
  .testimonial-body { padding: 28px 24px 22px; }
  .testimonial figcaption { padding: 12px 24px; }
  .contact-details { flex-direction: column; align-items: flex-start; }
  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.logo-row--insurers { max-width: 900px; gap: 40px 80px; margin-top: 50px; }
@media (max-width: 600px) { .logo-row--insurers { gap: 28px 36px; } }
