/* =====================================================================
   Layout: top bar, header, mega-menu, footer, hero, breadcrumbs,
   FAQ accordion, CTA banner, in-page nav.
   ===================================================================== */

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy);
  color: #c7d6ea;
  font-size: var(--fs-xs);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar a { color: #dbe6f4; }
.topbar a:hover { color: #fff; }
.topbar__info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.topbar__info span, .topbar__info a { display: inline-flex; align-items: center; gap: .4rem; }
.topbar__cta { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: #fff; }
.topbar svg { width: 15px; height: 15px; }
@media (max-width: 780px) { .topbar__info { display: none; } .topbar .container { justify-content: flex-end; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 2rem; min-height: var(--header-h); }
.site-logo img { height: 52px; width: auto; }
.site-logo { margin-right: auto; }

/* Primary nav */
.primary-nav > ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm); color: var(--navy); }
.primary-nav > ul > li { position: relative; }
.primary-nav > ul > li > a { display: inline-flex; align-items: center; gap: .3rem; padding: 1.2rem 0; }
.primary-nav .menu-item-has-children > a::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; opacity: .6;
}
.primary-nav > ul > li:hover > a { color: var(--blue); }

/* Dropdown / mega */
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .6rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 20;
}
.primary-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-nav .sub-menu a { display: block; padding: .6rem .8rem; border-radius: var(--radius-sm); font-weight: 500; color: var(--slate); }
.primary-nav .sub-menu a:hover { background: var(--cloud); color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: .8rem; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; color: var(--navy); position: relative; z-index: 210; }
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 1040px) {
  .nav-toggle { display: block; }
  /* Dropdown anchored under the header (header is sticky = positioning context). */
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 120;
    background: #fff; box-shadow: var(--shadow-lg); border-top: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease, visibility .3s ease; visibility: hidden;
  }
  .primary-nav.is-open { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; visibility: visible; -webkit-overflow-scrolling: touch; }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: .4rem clamp(1rem, 5vw, 2rem) 1.5rem; }
  .primary-nav > ul > li { position: relative; }
  .primary-nav > ul > li > a {
    padding: .95rem .2rem; justify-content: space-between;
    border-bottom: 1px solid var(--line); font-size: var(--fs-lg);
  }
  .primary-nav .menu-item-has-children > a::after { transition: transform .2s ease; }
  .primary-nav .menu-item-has-children.is-open > a::after { transform: rotate(-135deg) translateY(2px); }
  .primary-nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; margin: 0; padding: 0 0 .6rem .8rem; display: none; min-width: 0;
  }
  .primary-nav .sub-menu a { font-size: var(--fs-base); padding: .7rem .6rem; }
  .primary-nav .menu-item-has-children.is-open > .sub-menu { display: block; }
  .header-actions .btn--ghost { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(160deg, #f4f9fe 0%, #e7f1fb 60%, #dcecfa 100%); overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(56,179,227,.22), transparent 68%); }
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding-block: clamp(2.5rem, 5vw, 5rem); }
.hero__title { font-size: var(--fs-3xl); }
.hero__title .accent { color: var(--blue); }
.hero__lead { margin-top: 1.2rem; font-size: var(--fs-lg); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
@media (max-width: 520px) { .hero__actions .btn, .btn--lg { white-space: normal; text-align: center; line-height: 1.3; } }
.hero__trust { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; margin-top: 2.2rem; }
.hero__trust .stat strong { display: block; font-family: var(--font-head); font-size: var(--fs-xl); color: var(--navy); }
.hero__trust .stat span { font-size: var(--fs-xs); color: var(--slate); }
.hero__badges { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; max-width: 560px; }
.hero__badges li { display: flex; gap: .7rem; align-items: flex-start; }
.hero__badge-ico { width: 40px; height: 40px; border-radius: 11px; background: #fff; color: var(--blue); display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.hero__badge-ico .ler-ico { width: 21px; height: 21px; }
.hero__badges strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: var(--fs-sm); }
.hero__badges li > span:last-child { font-size: var(--fs-xs); color: var(--slate); line-height: 1.45; }
@media (max-width: 520px) { .hero__badges { grid-template-columns: 1fr; } }
.hero__media { position: relative; }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero__badge {
  position: absolute; bottom: 24px; left: -24px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.2rem; display: flex; align-items: center; gap: .8rem; max-width: 240px;
}
.hero__badge .card__icon { margin: 0; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero__media { order: -1; } .hero__badge { left: 12px; } }

/* Page hero (interior pages) */
.page-hero { background: var(--navy); color: #d7e4f4; padding-block: clamp(2.5rem, 5vw, 4.5rem); position: relative; overflow: hidden; }
.page-hero::after { content:""; position:absolute; right:-80px; bottom:-140px; width:400px; height:400px; border-radius:50%; background:radial-gradient(circle, rgba(56,179,227,.18), transparent 70%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero p { color: #c3d4ea; max-width: 60ch; margin-top: .8rem; font-size: var(--fs-lg); }
.page-hero .btn { margin-top: 1.6rem; }

/* Breadcrumbs */
.breadcrumbs { font-size: var(--fs-xs); color: #9db4d2; margin-bottom: 1rem; }
.breadcrumbs a { color: #bcd0ec; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span[aria-current] { color: #fff; }
.page-hero .breadcrumbs { color:#9db4d2; }

/* ---------- Two-column article layout with sticky in-page nav ---------- */
.article-layout { display: grid; grid-template-columns: 250px 1fr; gap: 3.5rem; align-items: start; }
@media (max-width: 940px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }
.article-layout > * { min-width: 0; }
.toc a { overflow-wrap: anywhere; }
.toc-rail { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 1.4rem; }
/* Phones/tablets: the rail sits above the article in normal flow (a sticky rail overlapped the text). */
@media (max-width: 940px) { .toc-rail { position: static; } }
.toc { }
.toc__title { font-family: var(--font-head); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--slate-300); margin-bottom: .8rem; }
.toc-cta { background: var(--cloud); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; text-align: center; }
.toc-cta__title { font-size: var(--fs-sm); font-weight: 600; font-family: var(--font-head); color: var(--navy); margin-bottom: .9rem; }
.toc-cta .btn { width: 100%; margin-bottom: .5rem; }
.toc-cta__doc { font-size: var(--fs-xs); color: var(--slate); margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; gap: .6rem; align-items: center; justify-content: center; text-align: left; }
.toc-cta__doc .ler-ico { color: var(--blue); }
.toc-cta__doc strong { color: var(--navy); font-family: var(--font-head); }
.toc-cta__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top center; flex-shrink: 0; border: 2px solid #fff; box-shadow: var(--shadow); }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .45rem 0 .45rem 1rem; margin-left: -2px; border-left: 2px solid transparent; font-size: var(--fs-sm); color: var(--slate); }
.toc a:hover, .toc a.is-active { color: var(--blue); border-left-color: var(--blue); }
.toc li.toc-sub a { padding-left: 1.9rem; font-size: var(--fs-xs); }

/* Rich content (prose) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.4rem; margin-bottom: .8rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { margin-top: 1.8rem; margin-bottom: .6rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { margin: 1rem 0; }
.prose li + li { margin-top: .4rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-left: 4px solid var(--cyan); background: var(--cloud); padding: 1rem 1.4rem; border-radius: var(--radius-sm); margin: 1.5rem 0; }

/* Medical-review byline (borrowed from Mayo) */
.med-byline { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-xs); color: var(--slate); border: 1px solid var(--line); background: var(--cloud); border-radius: 999px; padding: .4rem .9rem; width: fit-content; }
.med-byline svg { width: 16px; height: 16px; color: var(--success); }

/* At-a-glance box */
.glance { background: var(--cyan-100); border: 1px solid #cdeaf7; border-radius: var(--radius); padding: var(--sp-3); }
.glance h3 { font-size: var(--fs-base); margin-bottom: .6rem; }
.glance dl { display: grid; gap: .6rem; margin: 0; }
.glance dt { font-weight: 700; color: var(--navy); font-size: var(--fs-sm); }
.glance dd { margin: 0 0 .4rem; font-size: var(--fs-sm); color: var(--slate); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: .8rem; overflow: hidden; }
.faq__q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.1rem 1.3rem; font-family: var(--font-head); font-weight: 600; font-size: var(--fs-base); color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__q::after { content: "+"; font-size: 1.5rem; color: var(--blue); transition: transform .2s ease; line-height: 1; }
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a-inner { padding: 0 1.3rem 1.2rem; color: var(--slate); font-size: var(--fs-sm); }

/* ---------- CTA banner ---------- */
.cta-banner { background: linear-gradient(120deg, var(--navy), var(--blue-600)); border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3.5rem); color: #fff; position: relative; overflow: hidden; }
.cta-banner::after { content:""; position:absolute; right:-60px; top:-60px; width:280px; height:280px; border-radius:50%; background:radial-gradient(circle, rgba(56,179,227,.3), transparent 70%); }
.cta-banner__grid { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-banner h2 { color: #fff; max-width: 20ch; }
.cta-banner p { color: #cfe0f4; margin-top: .5rem; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Footer (mega / sitemap) ---------- */
.footer-top { display: grid; grid-template-columns: 1.2fr 1.1fr 1fr; gap: 2.5rem; padding-bottom: var(--sp-4); border-bottom: 1px solid rgba(255,255,255,.1); align-items: start; }
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-map { grid-column: 1 / -1; order: 3; } }
@media (max-width: 620px) { .footer-top { grid-template-columns: 1fr; gap: 2rem; } }
/* 2-column footer variant (preview, no map): responsive so it collapses on mobile */
.footer-top.footer-top--2col { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 820px) { .footer-top.footer-top--2col { grid-template-columns: 1fr; gap: 2rem; } }
.footer-map { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.14); min-height: 230px; height: 100%; }
.footer-map iframe { width: 100%; height: 100%; min-height: 230px; border: 0; display: block; }
.footer-contact-card h4 { margin-bottom: 1rem; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 2rem 1.5rem; padding: var(--sp-4) 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-cols h4 { color: #fff; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 1rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-cols a { font-size: var(--fs-sm); color: #a9bdd8; }
.footer-cols a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #a9bdd8; padding-top: var(--sp-6); font-size: var(--fs-sm); }
/* Keep button text colours from being overridden by the footer link colour */
.site-footer .btn--light { color: var(--navy); }
.site-footer .btn--wa, .site-footer .btn--accent, .site-footer .btn--primary { color: #fff; }
.site-footer a { color: #c6d6 ; color: #c6d6ec; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: var(--sp-5); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-brand img { height: 54px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 1rem; }
.footer-brand p { color: #fff; }
.footer-menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-contact li { display: flex; gap: .6rem; margin-bottom: .8rem; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--cyan); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--fs-xs); color: #8299b8; }

/* Emergency ribbon */
.emergency-strip { background: var(--red); color: #fff; text-align: center; padding: .55rem 1rem; font-size: var(--fs-sm); font-weight: 600; }
.emergency-strip a { color: #fff; text-decoration: underline; }

/* Floating WhatsApp — labelled pill (collapses to a circle on small screens) */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; padding: 0; background: #25d366; color: #fff; border-radius: 50%; box-shadow: var(--shadow-lg); transition: transform .15s ease, box-shadow .15s ease; }
.wa-float:hover { color: #fff; transform: translateY(-2px) scale(1.05); }
.wa-float__ico { display: grid; place-items: center; }
.wa-float__ico svg { width: 30px; height: 30px; color: #fff; }
.wa-float__label { display: none; }

/* Logo: never let the flex row squash it (img has max-width:100% globally) */
.site-logo { flex-shrink: 0; }
.site-logo img { max-width: none; width: auto; }
/* Footer: keep icons inline beside their headings/lines */
.site-footer h4 .ler-ico,
.site-footer p .ler-ico { display: inline-block; margin-right: .45rem; vertical-align: -0.18em; }
/* Mid-width desktops: keep logo, nav and CTA on one row */
@media (min-width: 1041px) and (max-width: 1599px) {
  .site-header .container { gap: 1.2rem; }
  .primary-nav > ul { gap: 1.05rem; }
  .site-logo img { height: 44px !important; }
  .header-actions .btn--ghost { display: none; }
}
@media (min-width: 1041px) and (max-width: 1180px) {
  .primary-nav > ul { gap: .8rem; }
  .header-actions .btn { padding-inline: 1rem; }
  .primary-nav a { font-size: .84rem; }
  .header-actions .btn .ler-ico { display: none; }
}
/* Top bar: drop the address before the hours wrap */
@media (max-width: 1240px) { .topbar__info > :nth-child(2) { display: none; } }

/* Phones: keep the header CTA and menu toggle inside the screen. */
@media (max-width: 560px) {
  .header-actions { gap: .25rem; }
  .header-actions .btn--primary { padding: .5rem .7rem; font-size: .78rem; }
  .header-actions .btn--primary .ler-ico { display: none; }
  .nav-toggle { flex-shrink: 0; padding: .4rem; margin-right: -.4rem; }
  .site-logo img { height: 34px !important; }
}
@media (max-width: 380px) {
  .site-header .container { gap: .5rem; }
  .site-logo img { height: 29px !important; }
  .header-actions .btn--primary { padding: .45rem .6rem; font-size: .75rem; }
}
@media (max-width: 345px) {
  .site-logo img { height: 25px !important; }
}

.footer-gbp { margin-top: .9rem; }
.footer-gbp a { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; }
.footer-gbp a:hover { color: var(--cyan); }
.footer-gbp svg { width: 18px; height: 18px; color: var(--cyan); }

/* Mobile tap targets (>= 44px) — added 2026-11-24 */
@media (max-width: 780px) {
  .topbar .container { min-height: 44px; }
  .topbar__cta { min-height: 44px; }
  .header-actions .btn--primary { min-height: 44px; }
  .footer-cols a, .footer-menu a, .footer-contact a, .footer-bottom a { display: inline-block; padding-block: .72rem; }
  .footer-cols ul { gap: 0; }
  .footer-contact li { margin-bottom: .2rem; align-items: center; }
  .footer-gbp a { padding-block: .72rem; }
}

/* Mobile tap targets, round 2 (logo, menu button, ported-page table of contents and pills) — 2026-11-24 */
@media (max-width: 780px) {
  .site-logo { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-toggle { min-width: 44px; min-height: 44px; }
  .toc-sub a, #ler .toc-sub a { display: block; padding-block: .78rem; }
  .pill, #ler .pill { display: inline-flex; align-items: center; min-height: 44px; }
}

/* GTranslate language dropdown in the top bar — 2026-11-24 */
.topbar__lang { display: flex; align-items: center; margin-left: auto; margin-right: 1rem; }
.topbar .container { flex-wrap: nowrap; }
.topbar__lang .gtranslate_wrapper select { width: auto; height: 30px !important; min-height: 30px; border: 1px solid rgba(255,255,255,.4); background-color: transparent; color: #fff; border-radius: 50px !important; padding: 0 .9rem; font-size: 13px !important; cursor: pointer; margin: 0; }
.topbar__lang .gtranslate_wrapper select option { color: #0f172a; background: #fff; }
@media (max-width: 780px) {
  .topbar .container { justify-content: space-between; gap: .6rem; }
  .topbar__lang { margin: 0; }
  .topbar__lang .gtranslate_wrapper select { height: 40px !important; min-height: 40px; max-width: 120px; }
}

/* Top bar: keep one line next to the language dropdown (tablet / small laptop widths) — 2026-11-24 */
.topbar__info { flex-wrap: nowrap; min-width: 0; }
.topbar__info span, .topbar__info a, .topbar__cta { white-space: nowrap; }
.topbar__cta, .topbar__lang { flex-shrink: 0; }
@media (min-width: 781px) and (max-width: 1100px) { .topbar__info > :nth-child(3) { display: none; } }
