:root {
  --ink: #1c2430;
  --paper: #f7f4ef;
  --white: #ffffff;
  --teal: #006b65;
  --teal-bright: #00a8a0;
  --teal-deep: #003135;
  --teal-soft: #d4f3f1;
  --sand: #e8e0d4;
  --accent: #d33650;
  --accent-dark: #b82e42;
  --muted: #535c66;
  --line: rgba(28, 36, 48, 0.12);
  --shadow: 0 18px 50px rgba(0, 122, 116, 0.12);
  --radius: 1.15rem;
  --radius-sm: 0.8rem;
  --header: 4.65rem;
  --gutter: clamp(1.15rem, 4.2vw, 2.25rem);
  --max: 70rem;
  --read: 42rem;
  --gap: 1.15rem;
  --gap-lg: clamp(1.15rem, 2.6vw, 1.6rem);
  --space-5: clamp(1.4rem, 2.6vw, 1.9rem);
  --space-6: clamp(1.85rem, 3.4vw, 2.5rem);
  --space-7: clamp(2.85rem, 5.8vw, 4.85rem);
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + env(safe-area-inset-top, 0px) + 0.85rem);
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

a,
button {
  -webkit-tap-highlight-color: rgba(0, 122, 116, 0.14);
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: 1.2rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 80;
  padding: 0.5rem 0.85rem;
  background: var(--teal-deep);
  color: var(--white);
  border-radius: 0.4rem;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: block;
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-family: var(--font-sans);
  line-height: 1.4;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--teal);
}

.btn-ghost:hover {
  background: var(--teal);
  color: var(--white);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.88rem;
}

.ext-icon {
  flex: 0 0 auto;
  width: 0.8em;
  height: 0.8em;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  text-decoration: none;
}

.arrow-link::after {
  content: "→";
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  isolation: isolate;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(247, 244, 239, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(28, 36, 48, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 2.7rem;
  width: auto;
  max-width: min(13.75rem, 62vw);
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.35rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav a:not(.btn):hover,
.nav a[aria-current="page"] {
  color: var(--teal);
}

.nav a[aria-current="page"] {
  font-weight: 650;
}

.nav .btn {
  margin-left: 0.35rem;
}

.nav .btn-primary,
.nav .btn-primary:hover {
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 1.2rem;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

/* ---------- breadcrumbs ---------- */

.crumbs {
  margin-bottom: 1.1rem;
  font-size: 0.86rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 0.3rem;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--teal);
}

/* ---------- hero (home) ---------- */

.hero {
  padding: clamp(1.5rem, 3.5vw, 3.25rem) 0 clamp(2rem, 4vw, 3.25rem);
  background:
    radial-gradient(58rem 32rem at 76% 14%, rgba(0, 168, 160, 0.1), transparent 62%),
    radial-gradient(44rem 28rem at 4% 88%, rgba(232, 224, 212, 0.6), transparent 66%);
}

.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

/* «UROCLINIC VALENCIA»: crece con la pantalla y nunca se parte (cabe en 320 px) */
.hero-eyebrow {
  margin-bottom: 0.9rem;
  font-size: clamp(1rem, 4.6vw, 1.4rem);
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5.2vw, 3.35rem);
}

.hero .lede {
  max-width: 34rem;
  margin-bottom: 0.8rem;
}

.hero .lede + .lede {
  margin-bottom: 1.6rem;
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1.35rem;
  box-shadow: var(--shadow);
}

/* varias fotos: apiladas, se ve la activa (js/main.js las alterna) */
.hero-slides {
  display: grid;
}

.hero-slides img {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slides img.is-active {
  opacity: 1;
}

.hero-points {
  display: grid;
  gap: 0.6rem;
  margin: 1.6rem 0 0;
  padding: 1.3rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-points li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.point-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.65rem;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.point-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  overflow: visible;
}

.hero-points a {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.hero-points a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* ---------- page head (subpages) ---------- */

.page-head {
  padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 clamp(1.75rem, 3.5vw, 2.5rem);
  background:
    radial-gradient(52rem 26rem at 82% 0%, rgba(0, 168, 160, 0.09), transparent 64%);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
}

.page-head .lede {
  max-width: var(--read);
}

/* ---------- sections ---------- */

.section {
  padding: var(--space-7) 0;
}

.section-alt {
  background: var(--white);
}

.section-sand {
  background: var(--sand);
}

.section-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: clamp(1.6rem, 2.8vw, 2.1rem);
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.section-head .lede {
  max-width: 36rem;
}

.section-foot {
  margin-top: var(--space-5);
}

/* ---------- segunda opinión y cita prioritaria (home, bajo el hero) ---------- */

.priority {
  padding: var(--space-6) 0;
  background: var(--teal-deep);
  color: var(--white);
}

.priority-inner {
  display: grid;
  gap: 1.4rem;
  align-items: start;
}

.priority .eyebrow {
  color: var(--teal-soft);
}

.priority-copy h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
}

.priority-copy p:last-child {
  margin: 0;
  max-width: 26rem;
  color: rgba(255, 255, 255, 0.82);
}

.priority-cards {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.priority-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.3rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.priority-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.priority-card p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.priority-card p a {
  overflow-wrap: anywhere;
}

.priority-card .priority-subject {
  margin: 0.15rem 0 0.6rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.45rem;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.priority-card .btn {
  margin-top: auto;
}

/* ---------- insurers band (home) ---------- */

.insurers {
  padding: var(--space-6) 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.insurers-inner {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.insurers-copy h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
}

.insurers-copy p {
  margin: 0;
  max-width: 26rem;
  color: var(--muted);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-grid li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.logo-grid img {
  display: block;
  height: var(--h, 32px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.insurers-more {
  margin: 0.85rem 0 0;
  color: var(--ink);
  font-weight: 700;
}

/* ---------- treatment tiles (home) ---------- */

.topics {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  height: 100%;
  padding: 1.25rem 1.3rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.section-alt .topic {
  background: var(--paper);
}

.topic h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
}

.topic p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.badge {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.95rem;
  height: 2.95rem;
  border-radius: 0.85rem;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.badge svg {
  width: 1.78rem;
  height: 1.78rem;
  overflow: visible;
}

.badge-lg {
  width: 3.4rem;
  height: 3.4rem;
}

.badge-lg svg {
  width: 2.05rem;
  height: 2.05rem;
}

/* ---------- avatar (photo or monogram) ---------- */

.avatar {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--teal-soft);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.avatar-mono {
  display: grid;
  place-items: center;
  color: var(--teal-deep);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
    var(--teal-soft);
}

.avatar-mono span {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.04em;
}

/* ---------- team cards ---------- */

.team {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-alt .doc-card {
  background: var(--paper);
}

.doc-card .avatar {
  border-radius: 0;
}

.doc-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 1.1rem 1.15rem;
}

.doc-card h2,
.doc-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.doc-card h2 a,
.doc-card h3 a {
  color: inherit;
  text-decoration: none;
}

.doc-card h2 a::after,
.doc-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.doc-role {
  margin: 0;
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
}

.doc-card .doc-summary {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.doc-card-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: auto;
  padding-top: 0.95rem;
  font-size: 0.9rem;
}

.doc-card-links a {
  font-weight: 650;
  text-decoration: none;
}

.team-lg .doc-card-body {
  padding: 1.2rem 1.3rem 1.3rem;
}

.team-lg .doc-card h2 {
  font-size: 1.22rem;
}

/* compact team list (home, mobile) */

.team-compact .doc-card {
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.9rem;
}

.team-compact .avatar {
  flex: 0 0 3.6rem;
  width: 3.6rem;
  height: 3.6rem;
  aspect-ratio: 1;
  border-radius: 999px;
}

.team-compact .avatar-mono span {
  font-size: 1.15rem;
}

.team-compact .doc-card-body {
  padding: 0;
}

.team-compact .doc-card h3 {
  margin-bottom: 0.15rem;
  font-size: 1.05rem;
}

.team-compact .doc-card::after {
  content: "›";
  margin-left: auto;
  color: var(--teal);
  font-size: 1.5rem;
  line-height: 1;
}

/* ---------- booking & places ---------- */

.booking-grid {
  display: grid;
  gap: var(--space-6);
}

.booking h2,
.places-col h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.ways {
  display: grid;
  gap: 0.85rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: way;
}

.way {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.3rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: way;
}

.way::before {
  content: counter(way);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--teal-deep);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1;
}

.way h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.15rem;
}

.way p {
  color: var(--muted);
  font-size: 0.97rem;
}

.way .actions {
  margin-top: 0.85rem;
}

.phone {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.note {
  margin-top: 1.25rem;
  padding: 1.15rem 1.3rem;
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(212, 243, 241, 0.45);
}

.note h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}

.note p,
.note li {
  color: var(--muted);
  font-size: 0.97rem;
}

.link-list,
.doc-section-body .link-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 650;
  text-decoration: none;
}

.link-note {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.places {
  display: grid;
  gap: 0.85rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.place {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.place-photo {
  flex: 0 0 9.5rem;
  width: 9.5rem;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.place-body {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.15rem;
}

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

.place h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.place p {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 0.2em;
}

/* ---------- quotes ---------- */

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

.more-quotes {
  margin-top: 1.4rem;
}

.more-quotes summary {
  width: fit-content;
  margin-inline: auto;
  border-radius: 999px;
  list-style: none;
}

.more-quotes summary::-webkit-details-marker {
  display: none;
}

.more-quotes summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.3rem;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  background: var(--white);
  color: var(--teal-deep);
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
}

.more-quotes summary span::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.more-quotes summary:hover span {
  border-color: var(--accent);
  color: var(--accent);
}

.more-quotes .more-close,
.more-quotes[open] .more-open {
  display: none;
}

.more-quotes[open] .more-close {
  display: inline-flex;
}

.more-quotes[open] .more-close::after {
  margin-top: 0.25rem;
  transform: rotate(-135deg);
}

.more-quotes > .quotes {
  margin-top: 1.4rem;
}

.quote {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 1.5rem 1.55rem 1.35rem;
  background: var(--paper);
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
}

.quote blockquote {
  margin: 0 0 auto;
}

.quote blockquote p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.5;
}

.quote figcaption {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.quote figcaption a {
  color: var(--teal);
  white-space: nowrap;
}

.quote-list {
  display: grid;
  gap: var(--gap);
}

.quote-list .quote {
  background: var(--white);
}

.quote-list .quote-wide {
  grid-column: 1 / -1;
}

/* ---------- video ---------- */

.video {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.section-alt .video {
  background: var(--paper);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--teal-deep);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-play {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--white);
}

.video-play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 49, 53, 0.35));
}

.video-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  margin: -2.1rem 0 0 -2.1rem;
  border-radius: 999px;
  background: rgba(211, 54, 80, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.video-btn::before {
  content: "";
  margin-left: 0.3rem;
  border-style: solid;
  border-width: 0.75rem 0 0.75rem 1.2rem;
  border-color: transparent transparent transparent var(--white);
}

.video-play:hover .video-btn,
.video-play:focus-visible .video-btn {
  transform: scale(1.06);
}

.video figcaption {
  padding: 0.95rem 1.15rem 1.05rem;
}

.video figcaption strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
}

.video figcaption span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

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

/* ---------- split (text + media) ---------- */

.split {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.prose {
  max-width: var(--read);
}

.prose h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.prose h3 {
  margin: 1.8rem 0 0.5rem;
  font-size: 1.32rem;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li::marker {
  color: var(--teal);
}

.prose .lede {
  margin-bottom: 1.2rem;
}

.pull {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 3px solid var(--teal);
}

.pull p {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.5;
}

.pull footer {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.feature {
  margin: 1.6rem 0 1.8rem;
  padding: 1.35rem 1.45rem 1.45rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  box-shadow: var(--shadow);
}

.feature h3 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.feature p {
  color: var(--muted);
}

.feature .actions {
  margin-top: 1rem;
}

.terms {
  margin: 0 0 1rem;
}

.terms div {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.terms div:first-child {
  padding-top: 0;
}

.terms dt {
  font-weight: 650;
}

.terms dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.client-list {
  margin-top: 1.4rem;
  padding: 1.3rem 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.section-alt .client-list {
  background: var(--paper);
}

.client-list h3 {
  margin: 0 0 0.6rem;
  font-size: 1.08rem;
}

.client-list h3:not(:first-child) {
  margin-top: 1.2rem;
}

.client-list ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.client-list li {
  margin-bottom: 0.3rem;
}

.client-list li::marker {
  color: var(--teal);
}

.aside-stack {
  display: grid;
  gap: var(--gap);
}

/* ---------- table of contents (pills) ---------- */

.toc {
  margin-top: 1.4rem;
}

.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--teal-deep);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.toc a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ---------- faq ---------- */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
}

.faq details:first-child {
  padding-top: 0;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.faq summary::after {
  content: "";
  flex: 0 0 0.48rem;
  width: 0.48rem;
  height: 0.48rem;
  margin-top: -0.18rem;
  border-right: 1.75px solid var(--teal);
  border-bottom: 1.75px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  margin-top: 0.15rem;
  transform: rotate(225deg);
}

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

.faq details p {
  margin-top: 0.6rem;
  padding-right: 1.5rem;
  color: var(--muted);
}

.faq-split {
  display: grid;
  gap: var(--space-5);
}

.faq-split h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

/* ---------- doctor page ---------- */

.doctor-head {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.doctor-head .avatar {
  width: min(100%, 15rem);
  box-shadow: var(--shadow);
}

.doctor-head .avatar-mono span {
  font-size: 3.2rem;
}

.doctor-head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 4.6vw, 2.8rem);
}

.doctor-head .doc-role {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.doctor-head .lede {
  max-width: var(--read);
  margin-bottom: 1.3rem;
}

.doctor-facts {
  display: grid;
  gap: 0.5rem 1.5rem;
  margin: 1.3rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.doctor-facts dt {
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.doctor-facts dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.doc-section {
  display: grid;
  gap: 0.75rem;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line);
}

.doc-section:last-child {
  border-bottom: 0;
}

.doc-section > h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
}

.doc-section-body {
  min-width: 0;
  max-width: var(--read);
}

.doc-section-body ul {
  padding-left: 1.2rem;
}

.doc-section-body li {
  margin-bottom: 0.4rem;
}

.doc-section-body li::marker {
  color: var(--teal);
}

.timeline {
  margin: 0;
  padding: 0 !important;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.timeline li:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline .when {
  color: var(--teal);
  font-size: 0.86rem;
  font-weight: 650;
}

.more {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.9rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

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

.more summary::after {
  content: "+";
  color: var(--teal);
  font-size: 1.3rem;
  line-height: 1;
}

.more[open] summary::after {
  content: "−";
}

.more > div {
  padding: 0 1rem 1rem;
  font-size: 0.96rem;
}

.more ul {
  margin: 0;
}

.more li {
  color: var(--muted);
}

.others {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.others a {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: inherit;
  text-decoration: none;
}

.others a:hover {
  border-color: var(--teal);
}

.others strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
}

.others span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---------- topic sections (tratamientos, cirugía) ---------- */

.topic-section {
  scroll-margin-top: calc(var(--header) + 1rem);
}

.topic-section .split {
  gap: var(--space-6);
}

.topic-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.topic-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.cta-band {
  padding: var(--space-6) 0;
  background: var(--sand);
  color: var(--ink);
}

.cta-band-inner {
  display: grid;
  gap: 1.1rem;
  align-items: center;
}

.cta-band h2 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
}

.cta-band p {
  margin: 0;
  color: var(--muted);
}

.figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.figure img {
  width: 100%;
}

.figure figcaption {
  padding: 0.75rem 1.1rem 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- footer ---------- */

.footer {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--teal-deep);
  color: rgba(247, 244, 239, 0.78);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 1.85rem 1.5rem;
}

.footer-logo {
  height: 2.7rem;
  width: auto;
  max-width: min(13.75rem, 70vw);
  margin: 0 0 0.6rem;
  object-fit: contain;
  object-position: left center;
}

.footer a {
  color: var(--paper);
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col p {
  margin: 0;
}

.footer-title {
  color: rgba(247, 244, 239, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-brand p {
  max-width: 24rem;
}

/* ---------- legal ---------- */

.legal-page.wrap {
  width: min(calc(100% - 2 * var(--gutter)), 40.5rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 5rem;
}

.legal-page h1 {
  margin: 0 0 1.4rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.9rem, 4vw, 2.25rem);
}

.legal-page h2 {
  margin-top: 1.9rem;
  font-size: 1.22rem;
}

.legal-page ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
  color: var(--muted);
}

/* ---------- mobile cta ---------- */

.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.7rem var(--gutter) calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(247, 244, 239, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.mobile-cta .btn {
  width: 100%;
}

.mobile-cta.is-hidden {
  transform: translateY(110%);
}

/* ---------- breakpoints ---------- */

@media (min-width: 560px) {
  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .team-lg,
  .quote-list,
  .videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 780px) {
  .section-head {
    padding-bottom: 1.6rem;
  }

  .section-head:has(.lede) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
  }

  .section-head:has(.lede) .lede {
    padding-top: 0.4rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    column-gap: clamp(2rem, 5vw, 4rem);
  }

  .insurers-inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr);
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }

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

  /* home team: grid of cards instead of list */
  .team-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .team-compact .doc-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .team-compact .avatar {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: 0;
  }

  .team-compact .avatar-mono span {
    font-size: 2.4rem;
  }

  .team-compact .doc-card-body {
    padding: 0.95rem 1rem 1.05rem;
  }

  .team-compact .doc-card::after {
    content: none;
  }

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

  .booking-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: clamp(2rem, 4vw, 3.25rem);
    align-items: start;
  }

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

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

  .priority-copy p:last-child {
    max-width: 36rem;
  }

  .split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: clamp(2rem, 4vw, 3.25rem);
  }

  .split-even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .faq-split {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    column-gap: clamp(2rem, 4vw, 3rem);
  }

  .faq-split > :first-child {
    position: sticky;
    top: calc(var(--header) + env(safe-area-inset-top, 0px) + 1.5rem);
    align-self: start;
  }

  .doctor-head {
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: clamp(1.75rem, 4vw, 3rem);
  }

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

  .doc-section {
    grid-template-columns: 13rem minmax(0, 1fr);
    column-gap: clamp(1.5rem, 4vw, 3rem);
  }

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

  .cta-band-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 1040px) {
  .priority-inner {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }

  .priority-copy p:last-child {
    max-width: 26rem;
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 0.85fr));
    gap: 2.5rem 1.75rem;
    align-items: start;
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (max-width: 1039px) {
  :root {
    --header: 3.9rem;
  }

  .brand img,
  .footer-logo {
    height: 2.25rem;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.7rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(247, 244, 239, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 36px rgba(28, 36, 48, 0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    max-height: calc(100dvh - var(--header) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
  }

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

  .nav a,
  .nav .btn {
    width: 100%;
    min-height: 2.85rem;
    justify-content: center;
    margin-left: 0;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    text-align: center;
  }

  .nav a:not(.btn) {
    display: flex;
    align-items: center;
  }

  .mobile-cta {
    display: block;
    transition: transform 0.25s ease;
  }

  /* home: el botón fijo sustituye al CTA principal del hero */
  .hero-cta {
    display: none;
  }

  body:has(.mobile-cta) .footer {
    padding-bottom: calc(6.6rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 779px) {
  .hero-figure img {
    aspect-ratio: 16 / 10;
  }

  .toc ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: thin;
  }

  .doctor-head .avatar {
    width: min(100%, 13rem);
  }

  .doctor-head .avatar-mono {
    width: 7.5rem;
  }

  .doctor-head .avatar-mono span {
    font-size: 2.2rem;
  }
}

@media (max-width: 559px) {
  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .logo-grid li {
    height: 3.4rem;
    padding: 0.4rem 0.5rem;
  }

  .logo-grid img {
    height: calc(var(--h, 32px) * 0.6);
  }
}

@media (max-width: 479px) {
  .place-photo {
    flex-basis: 6.75rem;
    width: 6.75rem;
  }

  .place-body {
    padding: 0.85rem 0.95rem;
  }

  .hero-actions,
  .doctor-head .actions {
    flex-direction: column;
  }

  .hero-actions .btn,
  .doctor-head .actions .btn {
    width: 100%;
  }

  .brand img {
    height: 2.2rem;
    max-width: min(12rem, 64vw);
  }

  .topic,
  .way,
  .quote {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .way {
    flex-direction: column;
    gap: 0.6rem;
  }

  .way .actions .btn-primary {
    width: 100%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .topic,
  .doc-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  a.topic:hover,
  .doc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: inherit;
  }

  a.topic:hover h3,
  .doc-card:hover h2,
  .doc-card:hover h3 {
    color: var(--teal);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .topic,
  .doc-card,
  a.topic:hover,
  .doc-card:hover,
  .video-btn,
  .mobile-cta {
    transition: none;
    transform: none;
  }

  .hero-slides img {
    transition: none;
  }
}

/* tableta: la columna de centros es estrecha; foto arriba a todo el ancho */
@media (min-width: 780px) and (max-width: 1039px) {
  .place {
    flex-direction: column;
  }

  .place-photo {
    flex: none;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 7;
    object-position: 50% 15%;
  }
}
