/* ==========================================================================
   Ribera Dental — estilos propios sobre Bootstrap 5.3
   ========================================================================== */

/* Fuentes (servidas desde el propio servidor) ----------------------------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/lato-300.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/lato-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-700.woff2") format("woff2"); }

/* Variables ---------------------------------------------------------------- */
:root {
  --rd-primary: #8c77cd;
  --rd-primary-dark: #6f5bb3;
  --rd-lilac: #d7b4e4;
  --rd-lilac-pale: #f1e5f5;
  --rd-dark: #1e2428;
  --rd-text: #42474c;
  --rd-muted: #8e8e93;
  --rd-soft: #f7fafb;
  --rd-header-h: 80px;

  --bs-font-sans-serif: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-weight: 300;
  --bs-body-color: var(--rd-text);
  --bs-body-color-rgb: 66, 71, 76;
  --bs-emphasis-color: var(--rd-dark);
  --bs-heading-color: var(--rd-dark);
  --bs-primary: var(--rd-primary);
  --bs-primary-rgb: 140, 119, 205;
  --bs-link-color: var(--rd-primary);
  --bs-link-color-rgb: 140, 119, 205;
  --bs-link-hover-color: var(--rd-primary-dark);
  --bs-link-hover-color-rgb: 111, 91, 179;
  --bs-border-radius: .25rem;
  --bs-focus-ring-color: rgba(140, 119, 205, .35);
}

body { -webkit-font-smoothing: antialiased; }
strong, b { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { font-weight: 400; }
img { max-width: 100%; height: auto; }
::selection { background: var(--rd-primary); color: #fff; }

.icon { width: 1em; height: 1em; vertical-align: -.125em; flex-shrink: 0; }
.icon-lg { width: 1.5em; height: 1.5em; }

.skip-link { position: absolute; z-index: 2000; top: .5rem; left: .5rem; padding: .5rem 1rem; background: #fff; color: var(--rd-dark); }

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

.bg-soft { background: var(--rd-soft); }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-sm { padding-block: 3rem; }

.section-title {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 2.75rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin-top: 1.25rem;
  background: var(--rd-primary);
}
.section-title-light { color: #fff; }
.section-title-light::after { background: #fff; }
.text-center .section-title::after, .section-title.text-center::after { margin-inline: auto; }

/* Botones -------------------------------------------------------------- */
.btn {
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: .8rem;
  --bs-btn-font-size: .72rem;
  --bs-btn-font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.btn-sm { --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .5rem; --bs-btn-font-size: .68rem; }
.btn-primary {
  --bs-btn-bg: var(--rd-primary);
  --bs-btn-border-color: var(--rd-primary);
  --bs-btn-hover-bg: var(--rd-primary-dark);
  --bs-btn-hover-border-color: var(--rd-primary-dark);
  --bs-btn-active-bg: var(--rd-primary-dark);
  --bs-btn-active-border-color: var(--rd-primary-dark);
  --bs-btn-focus-shadow-rgb: 140, 119, 205;
}
.btn-outline-primary {
  --bs-btn-color: var(--rd-primary);
  --bs-btn-border-color: var(--rd-primary);
  --bs-btn-hover-bg: var(--rd-primary);
  --bs-btn-hover-border-color: var(--rd-primary);
  --bs-btn-active-bg: var(--rd-primary);
  --bs-btn-active-border-color: var(--rd-primary);
  --bs-btn-focus-shadow-rgb: 140, 119, 205;
}
.btn-light { --bs-btn-color: var(--rd-primary); --bs-btn-hover-color: var(--rd-primary-dark); }
.btn-soft {
  --bs-btn-bg: var(--rd-lilac);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--rd-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--rd-primary);
  --bs-btn-active-color: #fff;
}

/* Cabecera ----------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1030;
  color: #fff;
  background: rgba(30, 36, 40, .45);
  transition: background-color .3s, box-shadow .3s, transform .3s;
}
.site-header a { color: inherit; text-decoration: none; }
.site-header.is-fixed {
  position: fixed;
  background: rgba(30, 36, 40, .92);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .15);
  animation: header-in .35s ease;
}
.site-header.is-fixed .topbar { display: none !important; }
@keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }

.topbar { font-size: .8rem; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.topbar-item { padding: .9rem 1.5rem; border-right: 1px solid rgba(255, 255, 255, .15); opacity: .9; }
.topbar-item:first-child { padding-left: 0; }
.topbar-item:hover { opacity: 1; }
.topbar-social { display: flex; gap: 1rem; border-right: 0; }

.navbar { --bs-navbar-padding-y: 1rem; min-height: var(--rd-header-h); }
.navbar-brand img { width: clamp(170px, 18vw, 230px); }
.navbar-toggler { border: 0; color: #fff; padding: .25rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.btn-call { --bs-btn-padding-x: .6rem; --bs-btn-padding-y: .45rem; color: #fff; border: 1px solid rgba(255, 255, 255, .5); font-size: 1rem; }
.btn-call:hover { background: var(--rd-primary); color: #fff; }

@media (min-width: 992px) {
  .navbar .nav-link {
    --bs-navbar-nav-link-padding-x: 1rem;
    color: #fff;
    font-size: .95rem;
    font-weight: 400;
    position: relative;
  }
  .navbar .nav-link-mega::after {
    content: "";
    display: inline-block;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    width: .4em; height: .4em;
    transform: rotate(45deg) translateY(-3px);
    margin-left: .5em;
    transition: transform .25s;
  }
  .navbar .nav-link:hover, .navbar .nav-link.active, .has-mega:hover .nav-link-mega { color: var(--rd-lilac); }
  .has-mega:hover .nav-link-mega::after { transform: rotate(225deg) translateY(-1px); }

  .btn-header {
    --bs-btn-color: var(--rd-primary);
    --bs-btn-bg: rgba(255, 255, 255, .85);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-color: var(--rd-primary-dark);
    --bs-btn-padding-y: .85rem;
    --bs-btn-font-size: .65rem;
  }

  /* Mega menú: se abre al pasar el ratón (o al tabular dentro) */
  .has-mega { position: static; }
  .submenu-toggle { display: none; }
  .mega-panel,
  .mega-panel.collapse:not(.show) {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    width: min(1170px, calc(100vw - 2rem));
    padding: 1.5rem 1.25rem 2rem;
    background: #fff;
    box-shadow: 0 20px 40px rgba(6, 30, 52, .12);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  /* Puente invisible para que el menú no se cierre al bajar el ratón */
  .mega-panel::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 1.25rem; }
  .navbar .has-mega:hover .mega-panel,
  .navbar .has-mega:focus-within .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
  }

  /* 5 especialidades arriba y 6 abajo, como en la web original */
  .mega-grid { display: grid; grid-template-columns: repeat(30, 1fr); gap: .5rem; }
  .mega-item { grid-column: span 5; }
  .mega-item:nth-child(-n + 5) { grid-column: span 6; }

  /* Entrada escalonada de cada especialidad al abrir */
  .mega-item { opacity: 0; transform: translateX(-24px); transition: opacity .45s ease, transform .45s ease, box-shadow .3s ease; }
  .mega-item:nth-child(even) { transform: translateX(24px); }
  .has-mega:hover .mega-item,
  .has-mega:focus-within .mega-item { opacity: 1; transform: none; transition-delay: calc(var(--i) * 35ms), calc(var(--i) * 35ms), 0s; }
}

.mega-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.6rem 1.25rem 1.75rem;
  background: #fff;
  color: var(--rd-dark) !important;
}
.mega-item:hover, .mega-item:focus-visible { box-shadow: 5px 5px 50px rgba(6, 30, 52, .11); }
.mega-icon { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.mega-icon img { max-height: 90px; width: auto; max-width: 100%; }
.mega-title { font-weight: 700; font-size: 1.1rem; line-height: 1.2; margin-bottom: .6rem; }
.mega-text { font-size: .85rem; line-height: 1.75; color: var(--rd-text); font-weight: 300; }

/* Menú móvil (offcanvas) */
@media (max-width: 991.98px) {
  .offcanvas { color: var(--rd-text); }
  .offcanvas a { color: var(--rd-dark); }
  .offcanvas .nav-link { font-size: 1.1rem; font-weight: 400; padding-block: .75rem; border-bottom: 1px solid #eee; }
  .offcanvas .nav-link.active { color: var(--rd-primary); }
  .nav-link-wrap { display: flex; align-items: stretch; border-bottom: 1px solid #eee; }
  .nav-link-wrap .nav-link { flex: 1; border-bottom: 0; }
  .submenu-toggle { background: none; border: 0; padding: 0 .75rem; color: var(--rd-primary); font-size: 1.1rem; }
  .submenu-toggle .icon { transition: transform .25s; }
  .submenu-toggle:not(.collapsed) .icon { transform: rotate(180deg); }
  .mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding-block: .75rem; }
  .mega-item { padding: .9rem .5rem; }
  .mega-icon { height: 40px; margin-bottom: .5rem; }
  .mega-icon img { max-height: 40px; }
  .mega-title { font-size: .9rem; margin-bottom: 0; }
  .mega-text { display: none; }
  .btn-header { --bs-btn-bg: var(--rd-primary); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--rd-primary-dark); --bs-btn-hover-color: #fff; width: 100%; margin-top: 1.5rem; }
  .offcanvas-contact { display: flex; flex-direction: column; gap: .9rem; margin-top: 2rem; font-size: .95rem; }
  .offcanvas-contact .icon { color: var(--rd-primary); margin-right: .5rem; }
}

/* Slider portada --------------------------------------------------------- */
.hero { position: relative; background: #e9edf3; }
.hero .carousel-item { height: clamp(520px, 70vw, 760px); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--rd-header-h);
}
.hero-brand {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem);
  font-weight: 300;
  color: var(--rd-primary);
  line-height: 1;
  margin-bottom: .75rem;
}
.hero-brand strong { font-weight: 400; letter-spacing: .08em; }
.hero-title {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem);
  font-weight: 300;
  color: var(--rd-dark);
  margin-bottom: 2rem;
  line-height: 1.25;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-buttons .btn-outline-primary { background: rgba(255, 255, 255, .7); }
.hero .carousel-indicators [data-bs-target] { background-color: var(--rd-primary); width: 24px; }

/* Animación del texto al cambiar de diapositiva */
.hero .carousel-item .hero-content > * { opacity: 0; transform: translateX(-30px); transition: opacity .7s ease, transform .7s ease; }
.hero .carousel-item.active .hero-content > * { opacity: 1; transform: none; }
.hero .carousel-item.active .hero-title { transition-delay: .2s; }
.hero .carousel-item.active .hero-buttons { transition-delay: .4s; }

/* Móvil y tablet: la foto se ve entera en formato apaisado bajo la cabecera y se funde
   con el fondo; el texto queda debajo, superpuesto a la zona difuminada */
@media (max-width: 991.98px) {
  .hero { background: #f4f6fa; }
  .hero .carousel-item { height: auto; }
  .hero-bg {
    position: relative;
    display: block;
    margin-top: var(--rd-header-h);
    height: auto;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
  }
  .hero-content { height: auto; padding-top: 0; margin-top: -1.5rem; padding-bottom: 5rem; }
  .hero-brand { font-size: 2.1rem; margin-bottom: .4rem; }
  .hero-title { margin-bottom: 1.5rem; }
}

/* Cajas de información -------------------------------------------------- */
.info-boxes { position: relative; z-index: 2; background: linear-gradient(to bottom, transparent 0, transparent 90px, var(--rd-soft) 90px); }
.info-boxes-row { margin-top: -90px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .05); }
.info-box { padding: 2.25rem 2.25rem 2rem; border-bottom: 6px solid; font-size: .95rem; }
.info-box-1 { border-color: var(--rd-lilac-pale); }
.info-box-2 { border-color: var(--rd-lilac); }
.info-box-3 { border-color: var(--rd-primary); }
.info-box-title { color: var(--rd-primary); font-size: 1.6rem; font-weight: 400; margin-bottom: 1.75rem; }
.horario { margin: 0; }
.horario-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: .9rem; border-bottom: 1px solid #e8e8e8; font-size: .85rem; }
.horario-row dt { font-weight: 700; color: var(--rd-dark); }
.horario-row dd { margin: 0; text-align: right; font-weight: 700; color: var(--rd-primary); }
.info-phone { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); font-weight: 400; color: #000; text-decoration: none; margin-bottom: 1.5rem; }
.info-phone .icon { color: var(--rd-primary); width: 1.1em; height: 1.1em; }
@media (max-width: 991.98px) {
  .info-boxes-row { margin-top: -40px; }
  .info-boxes { background: linear-gradient(to bottom, transparent 0, transparent 40px, var(--rd-soft) 40px); padding-inline: .5rem; }
}

/* Valores */
.valor img { margin-bottom: 1.5rem; }
.valor-title { font-size: 1.15rem; color: var(--rd-dark); margin-bottom: 1rem; }
.valor p { font-size: .85rem; line-height: 1.8; }

/* Bienvenida ------------------------------------------------------------- */
.bienvenida { position: relative; overflow: hidden; color: #fff; background: #a9b4c9; }
.bienvenida-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.bienvenida .container { position: relative; }
.bienvenida-content { max-width: 520px; padding-block: clamp(3rem, 7vw, 5.5rem); }
.bienvenida h2 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.4rem); font-weight: 300; margin-bottom: 1.25rem; }
.bienvenida .lead { font-weight: 300; margin-bottom: 2rem; }
.bienvenida p { opacity: .95; }
.bienvenida .btn { margin-top: 1rem; }
/* Móvil/tablet: la foto sigue de fondo, ampliada para que las dos doctoras
   (que ocupan la mitad derecha de la imagen) llenen el ancho, apoyadas abajo */
@media (max-width: 991.98px) {
  .bienvenida { background: #8c95a8; }
  .bienvenida-bg {
    inset: auto 0 0 auto;
    width: 205%;
    max-width: none;
    height: auto;
    object-fit: initial;
    opacity: .35;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
    mask-image: linear-gradient(to bottom, transparent, #000 35%);
  }
}

/* Tratamientos ----------------------------------------------------------- */
.tratamientos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
@media (min-width: 992px) {
  .tratamientos-grid { grid-template-columns: repeat(30, 1fr); gap: .5rem; }
  .tratamiento { grid-column: span 5; }
  .tratamiento:nth-child(-n + 5) { grid-column: span 6; }
}
.tratamiento {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.6rem 1.25rem 1.75rem;
  background: #fff;
  color: var(--rd-text);
  text-decoration: none;
}
.js .tratamiento.is-visible { transition: box-shadow .3s ease; }
.tratamiento:hover, .tratamiento:focus-visible { box-shadow: 5px 5px 50px rgba(6, 30, 52, .11); color: var(--rd-text); }
.tratamiento-icon { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.tratamiento-icon img { max-height: 90px; width: auto; max-width: 100%; }
.tratamiento-title { font-weight: 700; color: var(--rd-dark); margin-bottom: .6rem; }
.tratamiento-text { font-size: .8rem; line-height: 1.7; max-width: 200px; }
@media (max-width: 575.98px) {
  .tratamientos-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .tratamiento { padding: 1.25rem .5rem; }
  .tratamiento-icon { height: 64px; }
  .tratamiento-icon img { max-height: 64px; }
}

/* Testimonios ------------------------------------------------------------ */
.testimonios { position: relative; background: #e3e7ec; padding-block: 3.5rem; }
.testimonios-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.testimonios .container { position: relative; }
.testimonios .carousel-item { padding-inline: clamp(2.5rem, 8vw, 6rem); margin: 0; }
.testimonio-text { margin-bottom: 1.5rem; }
.testimonio-text p { color: var(--rd-primary); font-size: clamp(1.15rem, 1rem + .9vw, 1.6rem); font-weight: 700; line-height: 1.35; margin: 0; }
.testimonio-autor { font-weight: 700; color: var(--rd-dark); }
.testimonios .carousel-control-prev, .testimonios .carousel-control-next { width: auto; color: var(--rd-primary); opacity: .8; }
.testimonios .carousel-control-prev:hover, .testimonios .carousel-control-next:hover { color: var(--rd-primary-dark); opacity: 1; }

/* Equipo ----------------------------------------------------------------- */
.equipo { max-width: 860px; margin-inline: auto; }
.miembro { height: 100%; }
@media (max-width: 575.98px) { .miembro { max-width: 320px; margin-inline: auto; } }
.miembro-foto { width: 100%; aspect-ratio: 300 / 352; object-fit: cover; background: #e2e2e2; margin-bottom: 1.25rem; }
.miembro-cargo { font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--rd-muted); margin-bottom: .25rem; }
.miembro-nombre { font-size: 1.15rem; color: var(--rd-dark); margin-bottom: 1rem; }
.miembro-meritos { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.miembro-meritos li { position: relative; padding-left: 1.4rem; margin-bottom: .45rem; line-height: 1.5; }
.miembro-meritos li::before {
  content: "";
  position: absolute;
  left: 0; top: .3em;
  width: .8em; height: .8em;
  background: var(--rd-primary);
  -webkit-mask: url("../img/check.svg") center / contain no-repeat;
  mask: url("../img/check.svg") center / contain no-repeat;
}

/* Cita + blog ------------------------------------------------------------ */
.cita-panel { background: var(--rd-lilac); color: #fff; }
.blog-panel { background: #fff; }
.cita-panel-inner, .blog-panel-inner { padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem); max-width: 600px; }
.cita-panel-inner { margin-left: auto; }

.form-cita .form-control {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .6);
  border-radius: 0;
  color: #fff;
  padding-inline: 0;
  font-weight: 400;
}
.form-cita .form-control::placeholder { color: rgba(255, 255, 255, .85); }
.form-cita .form-control:focus { box-shadow: none; border-bottom-color: #fff; }
.form-cita .form-control::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .8; }
.form-cita .form-label { font-size: .8rem; margin-bottom: 0; opacity: .9; }
.form-cita-note { font-size: .8rem; opacity: .95; }
.form-cita .form-check-input { border-color: #fff; background-color: transparent; }
.form-cita .form-check-input:checked { background-color: var(--rd-primary); border-color: #fff; }
.form-cita .form-check-label { font-size: .85rem; }
.form-cita a { color: #fff; text-decoration: underline; }
.form-cita .invalid-feedback { color: #7a1530; font-weight: 400; }
.form-cita .form-control.is-invalid { border-bottom-color: #a3123a; background-image: none; }
.form-cita .alert a { color: inherit; }
.rgpd-info { font-size: .72rem; line-height: 1.6; border: 1px solid rgba(255, 255, 255, .6); padding: .75rem 1rem; }
.rgpd-info summary { cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.rgpd-info p { margin: .75rem 0 0; }
.btn-cita { min-width: 220px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Variante sobre fondo claro (contacto) */
.form-cita-dark .form-control { color: var(--rd-text); border-bottom-color: #cfcfd4; }
.form-cita-dark .form-control::placeholder { color: var(--rd-muted); }
.form-cita-dark .form-control:focus { border-bottom-color: var(--rd-primary); }
.form-cita-dark .form-control::-webkit-calendar-picker-indicator { filter: none; }
.form-cita-dark .form-check-input { border-color: var(--rd-primary); }
.form-cita-dark a { color: var(--rd-primary); }
.form-cita-dark .rgpd-info { border-color: #dcdce0; }
.form-cita-dark .btn-cita { --bs-btn-bg: var(--rd-primary); --bs-btn-color: #fff; --bs-btn-border-color: var(--rd-primary); --bs-btn-hover-bg: var(--rd-primary-dark); --bs-btn-hover-color: #fff; }
.form-cita-dark .invalid-feedback { color: var(--bs-form-invalid-color); }

.post-card-title { font-size: 1.35rem; margin-bottom: .75rem; }
.post-card-title a { color: var(--rd-lilac); text-decoration: none; }
.post-card-title a:hover { color: var(--rd-primary); }
.post-card p { font-size: .95rem; }

.logo-colaborador { height: 120px; width: auto; object-fit: contain; }

/* Pie -------------------------------------------------------------------- */
.site-footer { background: var(--rd-primary); color: #fff; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .85rem; line-height: 1.85; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-title { color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 1.75rem; }
.footer-title::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 1rem; background: #fff; opacity: .7; }
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; font-style: normal; }
.footer-links-sm { font-size: .78rem; }
.footer-horario { margin: 0; }
.footer-horario dt { font-weight: 400; opacity: .85; }
.footer-horario dd { margin-bottom: .5rem; }
.footer-social { display: flex; gap: 1.1rem; font-size: 1rem; }
.footer-bottom { background: var(--rd-lilac); margin-top: 3.5rem; padding-block: 1.25rem; font-size: .78rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.link-button { background: none; border: 0; padding: 0; color: #fff; font: inherit; }
.link-button:hover { text-decoration: underline; }

/* WhatsApp flotante ------------------------------------------------------ */
.whatsapp-float {
  position: fixed;
  right: 15px; bottom: 15px;
  z-index: 1040;
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.65rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }

/* Banner de cookies ------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  left: 15px; bottom: 15px;
  z-index: 1050;
  width: min(380px, calc(100vw - 90px));
  padding: 1.25rem;
  background: #fff;
  color: var(--rd-text);
  font-size: .8rem;
  line-height: 1.55;
  border-radius: .35rem;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .18);
}
.cookie-banner p { margin-bottom: 1rem; }

/* Animaciones al hacer scroll ------------------------------------------- */
/* Solo se ocultan si hay JS; si no, el contenido se ve siempre. */
.js [data-anim] {
  opacity: 0;
  transition: opacity .8s ease, transform .8s ease;
  transition-delay: var(--anim-delay, 0s);
}
.js [data-anim="fade-up"]     { transform: translateY(30px); }
.js [data-anim="fade-right"]  { transform: translateX(40px); }
.js [data-anim="slide-left"]  { transform: translateX(-60px); }
.js [data-anim="slide-right"] { transform: translateX(60px); }
.js [data-anim].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: 1; transform: none; transition: none; }
  .hero .carousel-item .hero-content > * { opacity: 1; transform: none; transition: none; }
  .site-header.is-fixed { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Páginas interiores
   ========================================================================== */

/* Cabecera de página (título + migas) */
.page-header {
  position: relative;
  padding: calc(var(--rd-header-h) + 44px + 2rem) 0 2.5rem;
  background: #a9b6e4 url("../img/cabecera-pagina.jpg") center / cover no-repeat;
  color: #fff;
}
@media (max-width: 991.98px) { .page-header { padding-top: calc(var(--rd-header-h) + 1.5rem); padding-bottom: 1.75rem; } }
.page-header-title { color: #fff; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); font-weight: 700; margin-bottom: .25rem; }
.page-header .breadcrumb { --bs-breadcrumb-divider-color: #fff; --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .6); --bs-breadcrumb-divider: "/"; margin: 0; font-size: 1rem; }
.page-header .breadcrumb a { color: #fff; text-decoration: none; }
.page-header .breadcrumb a:hover { color: rgba(255, 255, 255, .7); }

/* Bloque imagen + caja morada */
.intro-split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .intro-split { grid-template-columns: 1fr 1fr; } }
.intro-split-img img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; display: block; }
.intro-split-box { background: var(--rd-primary); color: #fff; display: flex; align-items: center; padding: 2.5rem clamp(1rem, 5vw, 4.5rem); }
.intro-split-text { max-width: 420px; }
.intro-split-box h2 { color: #fff; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); font-weight: 700; margin-bottom: 1.25rem; }
.intro-split-box p { margin: 0; font-size: 1.05rem; }

/* Tarjetas con imagen (efecto "sadie" de la web original) */
.banner-card { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; aspect-ratio: 37 / 28; }
.banner-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.banner-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--rd-primary); opacity: .3; transition: opacity .35s; }
.banner-card-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.4rem;
}
.banner-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.4; transition: transform .35s; }
.banner-card-reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.banner-card-text { overflow: hidden; font-size: .88rem; line-height: 1.55; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.banner-card:hover, .banner-card:focus-visible { color: #fff; }
.banner-card:hover::before, .banner-card:focus-visible::before { opacity: .8; }
.banner-card:hover img, .banner-card:focus-visible img { transform: scale(1.04); }
.banner-card:hover .banner-card-reveal, .banner-card:focus-visible .banner-card-reveal { grid-template-rows: 1fr; }
.banner-card:hover .banner-card-text, .banner-card:focus-visible .banner-card-text { opacity: 1; transform: none; padding-top: .5rem; }

.banner-card-cita::before { opacity: .8; }
.banner-card-cita .banner-card-body { justify-content: center; align-items: center; text-align: center; }
.banner-card-cita .banner-card-title { text-transform: uppercase; letter-spacing: .05em; }
.banner-card-phone { font-size: clamp(1.6rem, 1.3rem + 1vw, 1.9rem); font-weight: 400; margin-top: .25rem; }
.banner-card-cita:hover::before { opacity: .9; }

/* Ficha de especialidad ------------------------------------------------- */
.intro-text { font-size: 1.1rem; line-height: 1.75; text-align: justify; hyphens: auto; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-img { max-height: 320px; width: auto; object-fit: cover; }

.content { font-size: .92rem; line-height: 1.85; text-align: justify; hyphens: auto; }
.content .content-title { font-size: 1.35rem; font-weight: 700; margin: 2.5rem 0 1.5rem; text-align: left; }
.content .content-title:first-child { margin-top: 0; }
.content .content-title::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 1rem; background: var(--rd-primary); }
.content a { font-weight: 700; }

.check-list { list-style: none; padding: 0; margin: 1.25rem 0; text-align: left; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: .9em; height: .9em;
  background: var(--rd-primary);
  -webkit-mask: url("../img/check.svg") center / contain no-repeat;
  mask: url("../img/check.svg") center / contain no-repeat;
}

/* Pestañas verticales */
.tabs-vertical { display: grid; grid-template-columns: 1fr; border: 1px solid #e3e3e8; margin: 1.5rem 0 2rem; text-align: left; }
@media (min-width: 768px) { .tabs-vertical { grid-template-columns: 200px 1fr; } }
.nav-tabs-v { border-right: 1px solid #e3e3e8; }
@media (max-width: 767.98px) { .nav-tabs-v { border-right: 0; border-bottom: 1px solid #e3e3e8; } }
.nav-tabs-v .nav-link {
  text-align: left;
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.35;
  color: var(--rd-dark);
  padding: 1rem 1.1rem;
  border: 0;
  border-radius: 0;
  border-left: 3px solid transparent;
  background: none;
}
.nav-tabs-v .nav-link:hover { color: var(--rd-primary); }
.nav-tabs-v .nav-link.active { color: var(--rd-primary); background: #fff; border-left-color: var(--rd-primary); }
@media (min-width: 768px) {
  .nav-tabs-v .nav-link.active { margin-right: -1px; box-shadow: inset -1px 0 0 #fff; }
}
.tabs-vertical .tab-content { padding: 1.25rem 1.5rem; font-size: .88rem; line-height: 1.7; }
.tabs-vertical .tab-content p { margin-bottom: .75rem; }

/* Foto con pie */
.foto-caption { position: relative; margin: 2.5rem 0; }
.foto-caption img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; }
.foto-caption figcaption { position: absolute; left: 0; bottom: 0; padding: 1.25rem 1.5rem; color: #fff; font-size: 1.15rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }

/* Recuadro "Pide tu cita" */
.cta-cita {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 2rem;
  margin-bottom: 2rem;
  background: #fff;
  border-top: 4px solid var(--rd-primary);
  box-shadow: 0 10px 40px rgba(6, 30, 52, .08);
}
@media (min-width: 768px) { .cta-cita { grid-template-columns: auto 1fr auto; } }
.cta-cita-icon {
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--rd-primary);
  color: #fff;
  font-size: 1.9rem;
  box-shadow: 0 0 0 7px var(--rd-lilac-pale);
}
.cta-cita-title { color: var(--rd-primary); font-size: 1.4rem; margin-bottom: .1rem; }
.cta-cita-phone { display: block; color: var(--rd-dark); font-size: 1.85rem; text-decoration: none; margin-bottom: .5rem; }
.cta-cita-body p { font-size: .85rem; margin: 0; }
@media (max-width: 767.98px) { .cta-cita .btn { grid-column: 1 / -1; justify-self: start; } }

.cita-box { background: var(--rd-lilac); color: #fff; padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem); }

/* Barra lateral */
.sidebar { position: sticky; top: calc(var(--rd-header-h) + 1.5rem); }
.sidebar-title { color: var(--rd-primary); font-size: 1.4rem; margin-bottom: 1.5rem; }
.doctor-card { margin-bottom: 2rem; }
.doctor-card img { width: 100%; aspect-ratio: 300 / 352; object-fit: cover; background: #e2e2e2; display: block; }
.doctor-card-body { background: var(--rd-lilac-pale); padding: 1.25rem 1.5rem; }
.doctor-card-num { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--rd-dark); margin-bottom: .25rem; }
.doctor-card-name { font-size: 1.05rem; color: var(--rd-dark); margin: 0; font-weight: 400; }
@media (min-width: 576px) and (max-width: 991.98px) {
  .doctor-card { display: grid; grid-template-columns: 200px 1fr; align-items: end; }
}
.otras-esp { background: var(--rd-soft); border-top: 4px solid var(--rd-primary); padding: 1.75rem 2rem 1.25rem; }
.otras-esp ul { list-style: none; padding: 0; margin: 0; }
.otras-esp li { margin-bottom: .55rem; }
.otras-esp a { color: var(--rd-dark); text-decoration: none; font-size: .92rem; transition: color .2s, padding .2s; }
.otras-esp a:hover { color: var(--rd-primary); padding-left: .35rem; }
@media (max-width: 767.98px) {
  .intro-text, .content { text-align: left; }
  .doctor-card { max-width: 320px; }
}

/* La clínica ------------------------------------------------------------ */
.intro-split-text-wide { max-width: 560px; }
.intro-split-text-wide p { font-size: .9rem; text-align: justify; }
.content .content-lead { color: var(--rd-primary); font-size: 1.15rem; font-weight: 700; line-height: 1.6; text-align: left; margin-bottom: 1.75rem; }
.cta-cita-sm { grid-template-columns: 1fr !important; padding: 1.75rem; }
.cta-cita-sm .cta-cita-phone { font-size: 1.7rem; }
.cta-cita-sm .btn { justify-self: center; }
.post-mini { display: block; color: var(--rd-primary); text-decoration: none; font-size: .9rem; }
.post-mini img { width: 100%; height: auto; display: block; margin-bottom: .5rem; transition: opacity .2s; }
.post-mini:hover img { opacity: .85; }

/* Galería + visor ------------------------------------------------------- */
.galeria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 2.5rem; }
@media (max-width: 575.98px) { .galeria { gap: 2px; } }
.galeria a { display: block; overflow: hidden; background: #eee; }
.galeria img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .4s ease, opacity .3s; }
.galeria a:hover img { transform: scale(1.06); opacity: .9; }

.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(15, 18, 22, .92); color: #fff; }
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); text-align: center; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: .75rem; font-size: .9rem; opacity: .85; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2rem; padding: 1rem; opacity: .8; line-height: 1; }
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; }
.lightbox .lb-close { top: .5rem; right: .5rem; font-size: 1.6rem; }
.lightbox .lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; top: 1.25rem; left: 1.25rem; font-size: .85rem; opacity: .7; }

/* Contacto -------------------------------------------------------------- */
.contacto-intro { display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .contacto-intro { grid-template-columns: 1fr 1fr; } }
.contacto-intro-text { display: flex; justify-content: flex-end; padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }
.contacto-intro-inner { width: 100%; max-width: 480px; }
.contacto-intro-img img { width: 100%; height: 100%; object-fit: cover; display: block; max-height: 480px; }
.contacto-datos { list-style: none; padding: 0; margin: 2rem 0 0; }
.contacto-datos li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; font-weight: 400; color: var(--rd-dark); }
.contacto-datos .icon { color: var(--rd-primary); font-size: 1.35rem; margin-top: .05rem; }
.contacto-datos a { color: var(--rd-dark); text-decoration: none; }
.contacto-datos a:hover { color: var(--rd-primary); }
.contacto-datos span { font-size: .9rem; font-weight: 300; line-height: 1.7; }

.consent-embed { position: relative; height: clamp(300px, 40vw, 420px); background: #e5e3df; }
.consent-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.consent-embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(rgba(247, 250, 251, .9), rgba(247, 250, 251, .9)), url("../img/cabecera-pagina.jpg") center / cover;
}
.consent-embed-placeholder p { margin-bottom: .5rem; max-width: 460px; }
.consent-embed-placeholder .btn { margin-top: .75rem; }
.consent-embed-icon { font-size: 2.25rem; color: var(--rd-primary); margin-bottom: .75rem; }
.consent-embed.is-loaded .consent-embed-placeholder { display: none; }

.contacto-equipo { background: var(--rd-soft); }
.contacto-equipo-inner { max-width: 600px; margin-left: auto; padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }
.miembro-h { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.miembro-h:last-child { margin-bottom: 0; }
.miembro-h img { width: 100%; aspect-ratio: 300 / 352; object-fit: cover; background: #e2e2e2; }
@media (max-width: 400px) { .miembro-h { grid-template-columns: 110px 1fr; gap: 1rem; } }
.cita-panel-primary { background: var(--rd-primary); }
.cita-panel-primary .form-cita .btn-cita { --bs-btn-color: var(--rd-primary); }

/* Blog ------------------------------------------------------------------ */
.post-date, .post-meta { display: block; font-size: .8rem; color: var(--rd-muted); margin-bottom: .4rem; }
.post-meta a { color: var(--rd-primary); text-decoration: none; }
.post-body { font-size: .95rem; line-height: 1.85; }
.post-body h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; margin: 2.5rem 0 1rem; }
.post-body h3 { font-size: 1.2rem; font-weight: 700; margin: 2.25rem 0 .9rem; }
.post-body figure { margin: 2rem 0; }
.post-body figure img { width: 100%; height: auto; }
.recientes li { margin-bottom: 1rem; }
.recientes a { display: block; color: var(--rd-primary); text-decoration: none; }
.recientes a:hover { color: var(--rd-primary-dark); }
.recientes time { font-size: .75rem; color: var(--rd-muted); }

/* Páginas legales ------------------------------------------------------- */
.legal { max-width: 860px; font-size: .95rem; line-height: 1.8; }
.legal .content-title { font-size: 1.35rem; font-weight: 700; margin: 2.5rem 0 1.25rem; }
.legal .content-title:first-child { margin-top: 0; }
.legal .content-title::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 1rem; background: var(--rd-primary); }
.legal h3 { font-size: 1.1rem; font-weight: 700; margin: 2rem 0 .75rem; }
.legal-table { font-size: .85rem; }
.legal-table th { font-weight: 700; color: var(--rd-dark); }
@media (max-width: 767.98px) { .intro-split-text-wide p { text-align: left; } }
@media (min-width: 992px) { .nav-item-cta { margin-left: 1rem; } }
