:root {
  --ink: #1d2b2d;
  --muted: #607072;
  --line: #dce6e3;
  --paper: #fbfdfc;
  --surface: #ffffff;
  --teal: #40B3C9;
  --teal-deep: #1f6f82;
  --mint: #e5f7fa;
  --sage: #7fb7c2;
  --coral: #c86f57;
  --gold: #caa35b;
  --shadow: 0 18px 50px rgba(19, 46, 48, .12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  z-index: 20;
}

.skip-link:focus {
  left: 12px;
}

.topbar {
  background: var(--teal-deep);
  color: white;
  font-size: 14px;
}

.topbar-inner,
.nav-inner,
.section-inner,
.footer-inner {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar a {
  opacity: .96;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 253, 252, .92);
  border-bottom: 1px solid rgba(220, 230, 227, .85);
  backdrop-filter: blur(16px);
  transition: box-shadow .25s ease;
}

/* Cabecera compacta al hacer scroll (clase gestionada por script.js) */
.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(19, 46, 48, .1);
}

.nav-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  transition: min-height .25s ease;
}

.site-header.is-scrolled .nav-inner {
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-mark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--teal-deep);
}

.brand-tagline {
  color: var(--muted);
  font-size: 13px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 6px;
  color: #314244;
  font-size: 15px;
  font-weight: 650;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--teal);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 118, 110, .22);
  background: var(--teal-deep);
}

.btn.secondary {
  background: white;
  color: var(--teal-deep);
  border-color: var(--line);
}

.btn.secondary:hover {
  background: var(--mint);
  box-shadow: none;
}

.btn.coral {
  background: var(--teal);
}

.btn.coral:hover {
  background: var(--teal-deep);
}

.hero {
  min-height: calc(100vh - 120px);
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  background: #10292b;
}

.hero.compact {
  min-height: 430px;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Vídeo de fondo del hero: se superpone a la imagen (que queda como fallback) */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-video.playing {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 31, 33, .88) 0%, rgba(5, 31, 33, .70) 38%, rgba(5, 31, 33, .12) 72%),
    linear-gradient(0deg, rgba(5, 31, 33, .45) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0 82px;
  color: white;
  animation: hero-in .9s cubic-bezier(.22, .61, .36, 1) both;
}

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

  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: #bde6dc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(38px, 6vw, 72px);
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
}

h3 {
  font-size: 22px;
}

.hero-copy {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
}

.fact-pill {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: white;
  border-radius: 999px;
  padding: 9px 13px;
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.band {
  padding: 76px 0;
}

.band.alt {
  background: #eef6f3;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(19, 46, 48, .06);
}

.card h3 {
  margin-bottom: 10px;
}

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

.icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal-deep);
  margin-bottom: 18px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
}

.split-copy p,
.lead {
  color: var(--muted);
  font-size: 18px;
}

.clinic-photo {
  position: relative;
  min-height: 430px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* La imagen se posiciona absoluta para rellenar siempre el contenedor
   (con min-height indefinido, height:100% se quedaba en automático y
   dejaba un hueco blanco debajo, sobre todo en móvil). */
.clinic-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Imagen con parallax: se amplía un poco para que al desplazarse no se vean bordes */
.parallax-img {
  transform: scale(1.18);
  will-change: transform;
}

/* Banda de imagen a todo lo ancho con frase y parallax */
.parallax-band {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 400px;
  text-align: center;
  color: white;
  background: var(--teal-deep);
}

.parallax-media {
  position: absolute;
  inset: -70px 0;
}

.parallax-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.parallax-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 31, 33, .74) 0%, rgba(5, 31, 33, .46) 100%);
}

.parallax-quote {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 36px));
  padding: 84px 0;
}

.parallax-quote .eyebrow {
  color: #bde6dc;
}

.parallax-quote h2 {
  color: white;
}

.clinic-photo.method-photo img {
  object-position: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.stat {
  border-left: 3px solid var(--teal);
  background: white;
  padding: 14px 16px;
}

.stat strong {
  display: block;
  font-size: 24px;
  color: var(--teal-deep);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.specialization-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.specialization-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--teal-deep);
  box-shadow: var(--shadow);
}

.specialization-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.specialization-card:hover img {
  transform: scale(1.035);
}

.specialization-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 42, 47, .82) 0%, rgba(12, 42, 47, .36) 54%, rgba(12, 42, 47, .08) 100%);
}

.specialization-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 24px;
  color: white;
}

.specialization-body h3 {
  font-size: 25px;
}

.specialization-body p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.82);
}

.team-card {
  overflow: hidden;
  padding: 0;
}

.team-photo {
  aspect-ratio: 1 / 1;
  background: var(--mint);
}

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

.team-photo.placeholder {
  display: grid;
  place-items: center;
  background: var(--teal-deep);
  color: white;
}

.team-photo.placeholder span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.32);
  border-radius: 999px;
  font-size: 32px;
  font-weight: 850;
}

.team-body {
  padding: 20px;
}

.team-body p {
  margin-top: 6px;
}

.team-role {
  color: var(--teal-deep);
  font-weight: 750;
}

.service-list {
  display: grid;
  gap: 14px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: white;
}

.service-row p,
.service-row h3 {
  margin: 0;
}

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

.price {
  text-align: right;
  min-width: 120px;
  color: var(--teal-deep);
  font-weight: 850;
}

.price span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.booking-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.booking-panel {
  position: sticky;
  top: 104px;
  background: var(--teal-deep);
  color: white;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.booking-panel p {
  color: rgba(255,255,255,.78);
}

.booking-main-action {
  width: 100%;
  margin-top: 8px;
}

.booking-phone {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.2);
}

.booking-phone span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: 14px;
  font-weight: 700;
}

.booking-phone a {
  display: inline-block;
  margin-top: 6px;
  color: white;
  font-size: 24px;
  font-weight: 850;
}

.cal-inline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  overflow: hidden;
}

.cal-inline {
  width: 100%;
  min-height: 680px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  font-weight: 750;
  color: #253638;
}

.booking-panel label {
  color: white;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.notice {
  border-left: 3px solid var(--coral);
  background: #fff7f4;
  color: #654238;
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 22px;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 18px;
}

.contact-item strong {
  display: block;
  color: var(--teal-deep);
}

.map {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.location-actions {
  margin-top: 24px;
}

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--teal-deep);
  color: white;
  padding: 56px 0;
}

/* Brillos decorativos de la banda CTA (los inyecta script.js y se mueven con parallax) */
.cta-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.cta-glow.one {
  top: -190px;
  right: -70px;
  background: var(--teal);
  opacity: .38;
}

.cta-glow.two {
  bottom: -220px;
  left: -130px;
  background: var(--sage);
  opacity: .26;
}

.cta-inner {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner p {
  max-width: 660px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.78);
}

.site-footer {
  background: #132729;
  color: white;
  padding: 42px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-inner p,
.footer-inner a {
  color: rgba(255,255,255,.76);
}

.footer-inner h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.copyright {
  width: min(1160px, calc(100% - 36px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.56);
  font-size: 13px;
}

@media (max-width: 900px) {
  .topbar-inner {
    align-items: start;
    flex-direction: column;
    padding: 10px 0;
    gap: 4px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: 77px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-links a {
    padding: 12px 14px;
  }

  .hero,
  .hero.compact {
    min-height: 560px;
  }

  .hero::after {
    background: linear-gradient(90deg, rgba(5, 31, 33, .9), rgba(5, 31, 33, .52));
  }

  .section-head,
  .cta-inner {
    display: grid;
  }

  .grid.three,
  .specialization-grid,
  .team-grid,
  .grid.two,
  .split,
  .booking-layout,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .booking-panel {
    position: static;
  }
}

/* Aparición al hacer scroll (la clase .reveal la añade script.js) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.22, .61, .36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .hero-video {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 620px) {
  .topbar-inner,
  .nav-inner,
  .section-inner,
  .footer-inner,
  .hero-content,
  .cta-inner,
  .copyright {
    width: min(100% - 24px, 1160px);
  }

  .nav-inner {
    min-height: 70px;
  }

  .nav-links {
    top: 69px;
    left: 12px;
    right: 12px;
  }

  .hero-content {
    padding: 56px 0 62px;
  }

  .band {
    padding: 54px 0;
  }

  .hero-copy,
  .split-copy p,
  .lead {
    font-size: 16px;
  }

  .parallax-band {
    min-height: 300px;
  }

  .parallax-quote {
    padding: 60px 0;
  }

  .hero-actions,
  .service-row,
  .stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .price {
    text-align: left;
  }

  .brand-mark {
    font-size: 18px;
  }

  .cal-inline {
    min-height: 580px;
  }
}
