/* ============================================================
   THE NORTH EAST VEIN CLINIC — style.css
   No framework. CSS custom properties, Grid, Flexbox.
   Fonts loaded via <link> in HTML for non-blocking rendering.
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-wrap: break-word; /* prevent long words/URLs from blowing out the layout */
}

/* ── Custom properties ──────────────────────────────────────── */
:root {
  --navy:        #0a2540;
  --navy-mid:    #143559;
  --teal:        #18a2b8;
  --teal-dark:   #0e7490;
  --teal-light:  #e8f6f9;
  --bg:          #f8f7f4;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --muted:       #5a6a7a;
  --border:      #d4dfe6;
  --nav-h:       68px;
  --max-w:       1000px;
  --radius:      4px;
  --shadow:      0 2px 16px rgba(10,37,64,.09);
  --shadow-hover: 0 4px 22px rgba(24,162,184,.15);
}

/* ── Base ───────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  padding-top: var(--nav-h);
}

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

/* ── Skip navigation link (WCAG 2.4.1) ─────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  padding: .5rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top .15s;
}

.skip-link:focus { top: 0; }

/* ── Focus indicators (WCAG 2.4.7) ─────────────────────────── */
:focus-visible {
  outline: 3px solid var(--teal-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove default outline for mouse users; keep for keyboard */
:focus:not(:focus-visible) { outline: none; }

a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #0b5f72; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: 'Libre Baskerville', Georgia, serif;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem);  margin-bottom: .75rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); margin-bottom: .4rem; }
h4 { font-size: 1rem; margin-bottom: .3rem; }

hr { border: none; border-top: 1px solid var(--border); margin: 2.25rem 0; }

b, strong { font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-content {
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
}

/* ── Page header (inner pages) ──────────────────────────────── */
.page-header {
  padding: 2.25rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.page-header h1 { margin-bottom: .2rem; }

.page-header .subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Section heading accent ─────────────────────────────────── */
.section-heading {
  display: inline-block;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--teal);
  margin-bottom: 1.25rem;
}

/* ── Lead text ──────────────────────────────────────────────── */
.lead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  border-left: 3px solid var(--teal);
  padding: .25rem 0 .25rem 1.25rem;
  margin: 1.5rem 0 2rem;
}

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--navy);
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: .01em;
}

.nav-brand:hover { color: var(--teal); }

.nav-links {
  list-style: none;
  display: flex;
  gap: .15rem;
}

.nav-links a {
  display: block;
  padding: .35rem .8rem;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 400;
  letter-spacing: .025em;
  border-radius: var(--radius);
  transition: background .18s, color .18s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: var(--teal-dark);
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .28s, opacity .2s;
}

.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 (index only) ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 380px;
  background: url('images/north-east-vein-clinic-1-1.jpg') center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(10,37,64,.88) 0%,
    rgba(10,37,64,.4)  55%,
    transparent        100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero-content h1 {
  color: var(--white);
  font-size: clamp(1.85rem, 4.5vw, 2.9rem);
  margin-bottom: .4rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

.hero-content p {
  color: rgba(255,255,255,.82);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 0;
}

/* ── Split layout (content + image) ─────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin: 2.5rem 0;
}

/* .reverse: visually swap columns using order, not direction:rtl which causes horizontal overflow */
.split.reverse > :first-child { order: 2; }
.split.reverse > :last-child  { order: 1; }

.split img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-hover);
}

.card h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--teal-light);
}

.card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
}

.card p:last-child { margin-bottom: 0; }

.card strong { color: var(--text); }

.card a { font-size: .88rem; }

/* ── Button ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--teal-dark);
  color: var(--white);
  text-decoration: none;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .2s, transform .15s, box-shadow .2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #0b5f72;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(11,95,114,.3);
}

/* ── CTA band ───────────────────────────────────────────────── */
.cta-band {
  background: var(--navy);
  padding: 3.5rem 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.cta-band h2 { color: var(--white); margin-bottom: .4rem; }
.cta-band p  { color: rgba(255,255,255,.65); margin-bottom: 1.5rem; }

/* ── Surgeon section ────────────────────────────────────────── */
.surgeon-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  margin: 1.5rem 0 2rem;
}

.surgeon-photo {
  width: 190px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

/* ── Surgery logos ──────────────────────────────────────────── */
.surgeries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.surgery-item figure { margin: 0; }

.surgery-item img {
  max-height: 90px;
  width: auto;
  margin-bottom: .5rem;
}

.surgery-item figcaption {
  font-size: .88rem;
  color: var(--muted);
}

/* ── Accordion (treatment.html) ─────────────────────────────── */
.accordion { margin: 1.5rem 0; }

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  margin-bottom: .5rem;
}

summary {
  padding: 1.1rem 1.25rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: .97rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: background .15s;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--teal-dark);
  flex-shrink: 0;
  line-height: 1;
  transition: transform .2s;
}

details[open] > summary {
  background: var(--teal-light);
  border-bottom: 1px solid var(--border);
}

details[open] > summary::after { content: '−'; }

.details-body {
  padding: 1.25rem 1.25rem 1rem;
  font-size: .93rem;
  animation: slidedown .2s ease both;
}

@keyframes slidedown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.details-body p { margin-bottom: .7rem; }
.details-body p:last-child { margin-bottom: 0; }

.reference {
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  margin-top: .75rem;
  padding-top: .75rem;
  line-height: 1.5;
}

/* ── Symptoms content ───────────────────────────────────────── */
.symptoms-content h2 { margin-top: 2rem; }
.symptoms-content h3 {
  margin-top: 1.75rem;
  color: var(--teal-dark);
  font-size: 1.1rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  margin-top: 0;
  padding-top: 3rem;
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h2 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--white);
  margin-bottom: .75rem;
}

.footer-col p {
  font-size: .87rem;
  line-height: 1.65;
  margin-bottom: .3rem;
}

.footer-col strong { color: var(--white); }

/* Venefit logo sits in a subtle white container so the JPG shows on dark footer */
.footer-logo-box {
  display: inline-block;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius);
  padding: .6rem .8rem;
}

.footer-logo-box img {
  max-width: 120px;
  display: block;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  color: rgba(255,255,255,.65);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--navy-mid);
    padding: .75rem 1rem 1rem;
    gap: .2rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: .6rem .9rem; font-size: .95rem; }

  .split,
  .split.reverse {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Reset order on mobile so text always appears above image */
  .split.reverse > :first-child { order: 0; }
  .split.reverse > :last-child  { order: 0; }

  .surgeon-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .surgeon-photo { width: 130px; }

  .hero { min-height: 260px; }

  .hero-content { padding: 2rem 1.5rem; }
}
