/*
 * Cadera y Rodilla Rosario
 * Readability first: most patients are older adults with joint pain, so the
 * whole site uses Atkinson Hyperlegible Next at 16px with short line lengths.
 * Palette taken from the practice's social posts: petrol #426470 for
 * headings, actions and the hero; the grey-to-white sweep for light bands;
 * blue-grey #8ca3aa only for decorative marks (not text-safe).
 * Depth comes from two soft shadow levels, never from dark color blocks.
 */

/* Self-hosted (was Google Fonts): one variable woff2 covers 400-700; Spanish only needs the latin subset. */
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-next-latin.woff2) format('woff2');
}

:root {
  --ink: #2c3e46;
  --heading: #426470;
  --slate: #55666d;
  --white: #ffffff;
  --mist: #f3f6f7;
  --mist-strong: #e1e6e9;
  --line: #dce3e6;
  --brand: #426470;
  --brand-dark: #344f59;
  --accent: #8ca3aa;
  --radius: 14px;
  --header-h: 76px;
  --shadow-sm: 0 1px 2px rgba(44, 66, 76, 0.06), 0 4px 12px rgba(44, 66, 76, 0.06);
  --shadow-md: 0 2px 6px rgba(44, 66, 76, 0.06), 0 16px 40px rgba(44, 66, 76, 0.12);
  --measure: 68ch;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */

html {
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

strong {
  color: var(--ink);
  font-weight: 700;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand-dark);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

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

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

section {
  padding: 88px 0;
}

/* ---------- Header ---------- */

#header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid transparent;
  z-index: 997;
}

#header.header-scrolled {
  box-shadow: var(--shadow-sm);
}

#header .container {
  height: 100%;
}

#header .logo img {
  display: block;
  height: 24px;
  width: auto;
}

.appointment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.appointment-btn:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.navbar {
  padding: 0;
}

.navbar ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar li {
  position: relative;
}

.navbar > ul > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.navbar > ul > li > a:hover,
.navbar > ul > li:hover > a {
  color: var(--brand);
}

.navbar .bi-chevron-down {
  font-size: 12px;
}

.navbar .dropdown ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 4px;
  min-width: 250px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.navbar .dropdown:hover > ul,
.navbar .dropdown:focus-within > ul {
  display: block;
}

.navbar .dropdown ul a {
  display: block;
  padding: 10px 18px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}

.navbar .dropdown ul a:hover {
  background: var(--mist);
  color: var(--brand);
}

.mobile-nav-toggle {
  display: none;
  margin-left: 12px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: block;
  }

  .navbar > ul {
    display: none;
  }

  .navbar-mobile > ul {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 24px 32px;
    background: var(--white);
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }

  .navbar-mobile > ul > li > a {
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
  }

  .navbar-mobile .dropdown ul {
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 8px 16px;
  }

  .navbar-mobile .dropdown:hover > ul {
    display: none;
  }

  .navbar-mobile .dropdown > ul.dropdown-active {
    display: block;
  }

  .navbar-mobile .dropdown ul a {
    padding: 12px 0;
    font-size: 16px;
  }
}

@media (max-width: 575px) {
  :root {
    --header-h: 68px;
  }

  #header .logo img {
    height: 18px;
  }

  .appointment-btn {
    margin-left: 12px;
    padding: 8px 14px;
    font-size: 14px;
  }

  .appointment-btn .bi {
    display: none;
  }
}

/* ---------- Buttons and links ---------- */

.btn-get-started,
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

/* On light backgrounds actions are petrol; on dark backgrounds they are white. */
.btn-get-started {
  background: var(--brand);
  color: var(--white);
}

.btn-get-started:hover {
  background: var(--brand-dark);
  color: var(--white);
}

#hero .btn-get-started {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(30, 46, 53, 0.18);
}

#hero .btn-get-started:hover {
  background: var(--mist);
  color: var(--ink);
}

.cta-btn {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(66, 100, 112, 0.25);
}

.cta-btn:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.btn-primary::after {
  content: "\f285";
  font-family: "bootstrap-icons";
  font-size: 0.8em;
}

.btn-primary:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.btn-link-light {
  color: var(--white);
  font-weight: 700;
}

.btn-link-light:hover {
  color: var(--white);
}

/* ---------- Hero ---------- */

#hero {
  padding: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(72vh, 640px);
  min-height: min(72svh, 640px);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
    var(--brand);
}

.hero-panel {
  display: flex;
  align-items: center;
  padding: 72px 48px 128px max(24px, calc((100vw - 1200px) / 2 + 12px));
}

.hero-copy {
  max-width: 500px;
  animation: hero-in 0.7s cubic-bezier(0.2, 0, 0, 1) both;
}

#hero h2 {
  margin-bottom: 20px;
  color: var(--white);
  font-size: clamp(34px, 3.6vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin-bottom: 32px;
  color: var(--white);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.hero-photo {
  margin: 0;
  position: relative;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 30%;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.hero-facts {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}

.hero-facts ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 40px;
  margin: 0;
  padding: 28px 32px;
  list-style: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-facts li {
  display: flex;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.hero-facts a {
  white-space: nowrap;
}

/* Icon box matches the first text line (15px * 1.5 = 22.5px). */
.hero-facts .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin-top: -7px;
  border-radius: 10px;
  background: var(--mist-strong);
  color: var(--brand);
  font-size: 18px;
}

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    order: -1;
    aspect-ratio: 16 / 9;
  }

  .hero-panel {
    padding: 48px 24px 88px;
  }

  .hero-facts {
    margin-top: -40px;
  }

  .hero-facts ul {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
  }
}

@media (max-width: 575px) {
  .hero-panel {
    padding: 40px 20px 80px;
  }
}

/* ---------- Section headings ---------- */

.section-title {
  margin-bottom: 48px;
}

.section-title h1,
.section-title h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 2.6vw, 36px);
}

.section-title p {
  margin: 16px 0 0;
}

.section-title h3 {
  margin: 36px 0 10px;
  font-size: 20px;
}

.section-title h3 + p {
  margin-top: 0;
}

.section-title small {
  font-size: 14px;
}

.reviewed {
  padding-top: 40px;
  padding-bottom: 64px;
}

.recovery-table {
  max-width: var(--measure);
  margin: 8px 0 1.2em;
}

.recovery-table th {
  color: var(--heading);
  font-weight: 600;
}

/* ---------- Home: about ---------- */

.about .content .section-title {
  margin-bottom: 28px;
}

/* Line the photo up with the cap height of the heading beside it. */
@media (min-width: 992px) {
  .about .img-fluid {
    margin-top: 7px;
  }
}

.lead-text {
  color: var(--ink);
  font-size: 18px;
}

.content p {
  max-width: var(--measure);
}

.section-title .content p {
  max-width: none;
}

.img-fluid {
  border-radius: var(--radius);
}

/* Photos get depth; anatomy illustrations sit flat on white. */
.about .img-fluid {
  box-shadow: var(--shadow-md);
}

/* ---------- Home: areas (Cadera / Rodilla) ---------- */

.areas {
  background: linear-gradient(100deg, var(--mist-strong) 0%, var(--mist) 55%, var(--white) 100%);
}

/* Icon column takes a third (col-4), title and topics the rest (col-8). */
.area {
  display: grid;
  grid-template-columns: 1fr 2fr;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.area > img {
  align-self: center;
  justify-self: center;
  width: min(120px, 70%);
  height: auto;
  margin: 32px 0;
}

.area > div {
  padding: 32px 32px 16px;
  border-left: 1px solid var(--line);
}

.area h3 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.15;
}

.area h3 a {
  color: var(--heading);
  text-decoration: none;
}

.area h3 a:hover {
  color: var(--brand);
}

.area ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.area li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
  text-decoration: none;
}

.area li a::after {
  content: "\f285";
  font-family: "bootstrap-icons";
  font-size: 14px;
}

.area li a > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.area .tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--mist-strong);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 575px) {
  .area {
    grid-template-columns: 1fr;
  }

  .area > img {
    width: 120px;
    margin: 28px 0 20px;
  }

  .area > div {
    padding: 24px 24px 12px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.area a:hover,
.member a:hover,
.services .icon-box a:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

/* ---------- CTA band ---------- */

.cta {
  padding: 56px 0;
  background: var(--white);
}

@media (max-width: 575px) {
  .cta {
    padding: 40px 0;
  }
}

/* The panel edge lines up with the content edge of every other section. */
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding: 40px 48px;
  background: var(--mist-strong);
  border-radius: 20px;
}

@media (max-width: 575px) {
  .cta-inner {
    padding: 32px 24px;
  }
}

.cta-text {
  max-width: 680px;
}

.cta h3 {
  margin-bottom: 8px;
  font-size: clamp(22px, 2.2vw, 28px);
}

.cta p {
  margin: 0;
}

.cta .cta-where {
  margin-top: 10px;
  font-size: 15px;
}

.cta-where .bi {
  margin-right: 8px;
  color: var(--brand);
}

/* ---------- Doctors ---------- */

.member {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.member-img {
  display: block;
  background: var(--mist);
}

.member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.member-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
}

.member-info h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.member-info h3 a {
  color: var(--heading);
  text-decoration: none;
}

.member-info h3 a:hover {
  color: var(--brand);
}

.member-info p {
  font-size: 15px;
}

.member-info .btn-primary {
  margin-top: auto;
}

@media (max-width: 1199px) and (min-width: 768px), (max-width: 459px) {
  .member {
    grid-template-columns: 1fr;
  }

  .member-img {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- Locations ---------- */

.contact .section-title a {
  font-weight: 700;
}

.locations {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.locations li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.locations li:last-child {
  border-bottom: 1px solid var(--line);
}

.locations h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.locations p {
  margin-bottom: 6px;
  font-size: 15px;
}

.show-on-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.map {
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 991px) {
  .map {
    height: 380px;
    min-height: 0;
  }
}

.note {
  display: flex;
  gap: 14px;
  padding: 20px 24px;
  background: var(--mist);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  line-height: 1.6;
}

.note > .bi {
  flex: none;
  color: var(--brand);
  font-size: 18px;
  line-height: 24px;
}

.note p {
  margin: 0;
}

/* ---------- Inner pages: page header ---------- */

.breadcrumbs {
  padding: 48px 0 44px;
  background: linear-gradient(100deg, var(--mist-strong) 0%, var(--mist) 55%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
}

.breadcrumbs .d-flex {
  flex-direction: column-reverse;
  align-items: flex-start !important;
  gap: 12px;
}

.breadcrumbs h1 {
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: -0.02em;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.breadcrumbs ol li + li::before {
  content: "/";
  padding: 0 10px;
  color: var(--slate);
}

/* ---------- Inner pages: article content ---------- */

:where(#main > section) + :where(section) {
  border-top: 1px solid var(--line);
}

.cta,
.areas,
.services,
.cta + section,
.breadcrumbs + section {
  border-top: 0;
}

/* The illustration files carry a thin grey edge on both sides; trim it. */
#main > section:not(.about) .row .img-fluid {
  clip-path: inset(0 4px round var(--radius));
}

/* Long reads: the illustration stays in view while the text scrolls. */
@media (min-width: 992px) {
  #main > section:not(#about) .row > [class*="col-lg-6"]:has(> img.img-fluid) {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: flex-start;
  }
}

.content h3,
section:not(.services) .icon-box h3,
section:not(.services) .icon-box h4 {
  margin: 0 0 10px;
  font-size: 20px;
}

.content h3 {
  margin-top: 36px;
}

section:not(.services) .icon-box h3:not(:first-child),
section:not(.services) .icon-box h4:not(:first-child) {
  margin-top: 32px;
}

section:not(.services) .icon-box p {
  max-width: var(--measure);
}

section:not(.services) .icon-box.mt-5:not(.mt-lg-0) {
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.content ul,
.icon-box ul {
  max-width: var(--measure);
}

.content ul,
.icon-box ul,
.section-title ul {
  margin: 8px 0 1.2em;
  padding: 0;
  list-style: none;
}

.content li,
.icon-box li,
.section-title li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 22px;
}

.content li::before,
.icon-box li::before,
.section-title li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Doctor profiles: items that carry their own icon drop the dot. */
.content li:has(> .bi) {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-left: 0;
}

.content li:has(> .bi)::before {
  display: none;
}

.content li > .bi {
  flex: none;
  color: var(--brand);
}

.about .content > ul:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.about .content > ul:first-child li {
  margin: 0;
}

.about .content > ul:first-child li:first-child {
  flex-basis: 100%;
  padding-left: 0;
  font-size: 18px;
}

.about .content > ul:first-child li:first-child::before {
  display: none;
}

.about .content h3 + ul li {
  margin: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Inner pages: link cards (pathology index, 404) ---------- */

.services {
  background: var(--mist);
}

.services .row {
  --bs-gutter-x: 0;
  gap: 20px;
}

.services .icon-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 260px;
  width: auto;
  max-width: 380px;
  padding: 28px;
  margin-left: 0 !important;
  margin-right: 0 !important;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.services .icon-box .title {
  margin-bottom: 10px;
  font-size: 19px;
}

.services .icon-box .title a {
  color: var(--heading);
  text-decoration: none;
}

.services .icon-box p {
  font-size: 15px;
}

.services .icon-box .btn-primary {
  margin-top: auto;
}

.not-found .note {
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
  background: var(--white);
}



@media (hover: hover) and (pointer: fine) {
  .area,
  .member,
  .services .icon-box {
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
  }

  .member:hover,
  .services .icon-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- Footer ---------- */

#footer {
  padding: 64px 0 28px;
  background: linear-gradient(100deg, var(--mist-strong) 0%, var(--mist) 55%, var(--white) 100%);
  border-top: 1px solid var(--line);
  /* Same closing bar as the practice's social posts. */
  border-bottom: 8px solid var(--brand);
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-brand img {
  height: 24px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 34ch;
}

#footer h4 {
  margin-bottom: 12px;
  font-size: 15px;
}

#footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer li {
  margin-bottom: 8px;
}

#footer a {
  color: var(--slate);
  text-decoration: none;
}

#footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

#footer .bi {
  margin-right: 8px;
  color: var(--brand);
}

#footer .copyright {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Floating buttons ---------- */

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 8px 24px rgba(66, 100, 112, 0.35);
  color: var(--white);
  font-size: 28px;
  text-decoration: none;
  z-index: 990;
}

.whatsapp-float:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 100px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 22px;
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
  z-index: 990;
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* ---------- Responsive spacing ---------- */

@media (max-width: 991px) {
  section {
    padding: 72px 0;
  }
}

@media (max-width: 575px) {
  section {
    padding: 56px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

.figure-diagram {
  max-width: 760px;
  margin: 0 auto 48px;
}

.figure-diagram figcaption {
  margin-top: 8px;
  color: var(--slate);
  font-size: 14px;
  text-align: center;
}
