/* ==========================================================================
   Rediseno INTAP: componentes compartidos (cabecera, pie, boton flotante,
   botones, hero de pagina interna, entradas al hacer scroll).
   Se carga despues de styles.css.

   Todo lleva prefijo rd- para no pelear con Bootstrap ni con las reglas
   globales heredadas de styles.css, que siguen vivas porque las paginas aun
   no migradas dependen de ellas:
     nav { padding: 20px !important; ... }      -> se neutraliza en .rd-header
     span { font-size: 30px; color: gris }      -> reset en .rd / .rd-header / .rd-footer
     h1, h2, h3, span { line-height: .8 !important }
     p { text-align: justify; color: gris }
     body { font-size: 25px }
   ========================================================================== */

:root {
  --rd-bar-h: 88px;
  --rd-px: var(--intap-gutter);
  --rd-py: 104px;
  --rd-line: rgba(148, 163, 184, 0.16);
  --rd-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}
@media (max-width: 1279.98px) { :root { --rd-px: 64px; } }
@media (max-width: 991.98px)  { :root { --rd-px: 40px; --rd-bar-h: 70px; --rd-py: 80px; } }
@media (max-width: 575.98px)  { :root { --rd-px: 20px; --rd-py: 60px; } }

/* ---------- reset local frente a lo heredado ---------- */
.rd, .rd-header, .rd-footer, .rd-fab {
  font-family: var(--intap-font-body);
  font-weight: 300;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.rd *, .rd *::before, .rd *::after,
.rd-header *, .rd-header *::before, .rd-header *::after,
.rd-footer *, .rd-footer *::before, .rd-footer *::after,
.rd-fab *, .rd-fab *::before, .rd-fab *::after { box-sizing: border-box; }

:where(.rd) span, .rd-header span, .rd-footer span, .rd-fab span {
  font-size: inherit;
  color: inherit;
  line-height: inherit !important;
}
/* :where() deja estos resets con especificidad cero: las clases (.rd-lead, .pr-card__desc...) siempre ganan */
:where(.rd) :is(h1, h2, h3, h4, p, ol, ul, blockquote), :where(.rd-footer) p { margin: 0; padding: 0; }
:where(.rd) p { text-align: left; color: inherit; text-wrap: pretty; }
:where(.rd) :is(h1, h2, h3) { line-height: 1.1 !important; }
.rd a, .rd-header a, .rd-footer a, .rd-fab a { text-decoration: none; }
.rd ol, .rd ul { list-style: none; }
.rd img { max-width: 100%; }

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

:where(.rd, .rd-header, .rd-footer, .rd-fab) :focus-visible {
  outline: 2px solid var(--intap-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}
.rd-skip {
  position: fixed; left: 16px; top: -80px; z-index: 2000;
  background: var(--intap-cyan); color: var(--intap-navy); font: 600 14px var(--intap-font-display);
  padding: 12px 20px; border-radius: var(--intap-r-pill);
  transition: top .2s var(--rd-ease);
}
.rd-skip:focus { top: 12px; }

/* ---------- tipografia compartida ---------- */
.rd-display {
  font-family: var(--intap-font-display);
  font-weight: 700;
  letter-spacing: -0.028em;
}
.rd-eyebrow {
  font-family: var(--intap-font-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--intap-blue);
}
.rd-band-dark { background: var(--intap-navy); color: var(--intap-white); }
.rd-band-dark .rd-eyebrow { color: var(--intap-cyan); }
.rd-band-dark .rd-h1, .rd-band-dark .rd-h2, .rd-band-dark .rd-display { color: var(--intap-white); }
.rd-band-dark .rd-lead { color: var(--intap-ink-soft); }
.rd-accent { color: var(--intap-cyan-soft); }
/* acento de texto que cambia de régimen: azul AA sobre claro, cyan sobre las bandas oscuras */
.rd-acc { color: var(--intap-blue); }
.rd-band-dark .rd-acc { color: var(--intap-cyan); }

/* ---------- botones ---------- */
.rd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px; border-radius: var(--intap-r-pill);
  font-family: var(--intap-font-display); font-size: 15px; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer; text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.rd-btn svg { flex: none; transition: transform .2s ease; }
.rd-btn:hover svg { transform: translateX(3px); }
.rd-btn--primary { background: var(--intap-cyan); color: var(--intap-navy); }
.rd-btn--primary:hover,
.rd-btn--primary:focus-visible { background: var(--intap-navy); color: var(--intap-cyan-soft); border-color: var(--intap-cyan); }
.rd-btn--ghost { border-color: rgba(57, 226, 240, 0.4); color: var(--intap-white); background: transparent; }
.rd-btn--ghost:hover { border-color: var(--intap-cyan); color: var(--intap-cyan); }
.rd-btn--sm { min-height: 44px; padding: 0 22px; font-size: 14px; }
.rd-btn:active { transform: translateY(1px); }

/* ==========================================================================
   CABECERA
   88px -> 60px al bajar; se oculta al bajar y reaparece al subir.
   ========================================================================== */
.rd-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--intap-navy-deep); color: var(--intap-white);
  border-bottom: 1px solid var(--rd-line);
  transition: transform .35s var(--rd-ease), box-shadow .3s ease;
}
.rd-header.is-hidden { transform: translateY(-101%); }
.rd-header.is-compact { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28); }
.rd-header__bar {
  position: relative; height: var(--rd-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--rd-px);
  transition: height .3s var(--rd-ease);
}
.rd-header.is-compact .rd-header__bar { height: 60px; }
.rd-logo { display: flex; align-items: center; flex: none; }
.rd-logo img { height: 64px; width: auto; display: block; transition: height .3s var(--rd-ease); }
.rd-header.is-compact .rd-logo img { height: 40px; }

/* nav: neutraliza la regla global `nav { padding: 20px !important; ... }` */
.rd-header .rd-nav {
  padding: 0 !important; margin: 0; background: transparent; color: inherit !important; font-size: 14.5px;
  display: flex; align-items: center; gap: 28px;
}
.rd-nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 2px; border: 0; border-bottom: 1px solid transparent; background: transparent;
  font-family: var(--intap-font-body); font-size: 14.5px; font-weight: 400; line-height: 1.2;
  color: #DCE7F2; cursor: pointer; white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.rd-nav__link:hover { color: var(--intap-cyan); border-bottom-color: rgba(57, 226, 240, 0.32); }
.rd-nav__link[aria-current],
.rd-nav__link.is-current { color: var(--intap-cyan); border-bottom-color: var(--intap-cyan); }

.rd-header__right { display: flex; align-items: center; gap: 22px; flex: none; }
.rd-lang {
  display: flex; align-items: center; height: 34px; overflow: hidden;
  border: 1px solid var(--rd-line); border-radius: var(--intap-r-pill);
}
.rd-lang button {
  height: 100%; padding: 0 14px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--intap-font-display); font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--intap-ink-mute); transition: background-color .2s ease, color .2s ease;
}
.rd-lang button:hover { color: var(--intap-white); }
.rd-lang button.is-on { background: var(--intap-cyan); color: var(--intap-navy); }

.rd-burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--rd-line); border-radius: 14px; background: transparent;
  color: #DCE7F2; cursor: pointer; transition: border-color .2s ease, color .2s ease;
}
.rd-burger:hover { border-color: var(--intap-cyan); color: var(--intap-cyan); }
.rd-burger .rd-burger__x { display: none; }
.rd-burger[aria-expanded="true"] .rd-burger__x { display: block; }
.rd-burger[aria-expanded="true"] .rd-burger__lines { display: none; }

/* El menú de 7 enlaces + selector no cabe en una barra angosta: cajón hasta 1279px.
   Umbral conservador: se fijó cuando la barra llevaba además el botón Contáctanos. */
@media (max-width: 1279.98px) {
  .rd-header__right { gap: 12px; margin-left: auto; }
  .rd-burger { display: flex; }

  .rd-header .rd-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - var(--rd-bar-h)); max-height: calc(100dvh - var(--rd-bar-h)); overflow-y: auto;
    padding: 8px var(--rd-px) 28px !important;
    background: var(--intap-navy-deep); border-bottom: 1px solid var(--rd-line);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s var(--rd-ease), visibility .25s;
  }
  .rd-header .rd-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .rd-nav__link {
    width: 100%; min-height: 52px; padding: 12px 2px; font-size: 16px;
    justify-content: space-between; border-bottom: 1px solid var(--rd-line);
  }
  .rd-nav__link:hover { border-bottom-color: var(--rd-line); }
  .rd-nav__link[aria-current], .rd-nav__link.is-current { border-bottom-color: var(--rd-line); }
}
@media (max-width: 991.98px) {
  .rd-logo img { height: 44px; }
  .rd-header.is-compact .rd-header__bar { height: 56px; }
  .rd-header.is-compact .rd-logo img { height: 36px; }
  .rd-lang { height: 32px; }
  .rd-lang button { padding: 0 12px; font-size: 11px; }
}
html.rd-menu-open { overflow: hidden; }

/* ==========================================================================
   BOTON FLOTANTE: solo WhatsApp (el agendamiento ahora pasa por Maria)
   ========================================================================== */
.rd-fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 900;
  border-radius: var(--intap-r-pill); overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  transition: transform .25s var(--rd-ease), box-shadow .25s ease;
}
.rd-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.rd-fab a {
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  background: var(--intap-cyan); color: var(--intap-navy); transition: background-color .2s ease;
}
.rd-fab a:hover { background: #7BEDF5; color: var(--intap-navy); }
@media (max-width: 575.98px) {
  .rd-fab { right: 16px; bottom: 16px; }
  .rd-fab a { width: 54px; height: 54px; }
}

/* ==========================================================================
   PIE
   ========================================================================== */
.rd-footer {
  background: var(--intap-navy); color: var(--intap-ink-soft);
  border-top: 1px solid var(--rd-line);
  padding: 84px var(--rd-px) 0 !important; margin: 0 !important;
}
.rd-footer__grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 56px; }
.rd-footer__logo img { height: 64px; width: auto; display: block; }
.rd-footer__title {
  display: block; margin: 0 0 22px;
  font-family: var(--intap-font-display); font-size: 13px; font-weight: 700; line-height: 1.3 !important;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--intap-white);
}
.rd-footer__logo + .rd-footer__title { margin-top: 26px; }
.rd-footer__title--spaced { margin-top: 40px; }
.rd-footer__list { display: flex; flex-direction: column; gap: 13px; }
.rd-footer a.rd-footer__link, .rd-footer__link {
  font-size: 14.5px; font-weight: 300; line-height: 1.45; color: var(--intap-ink-soft);
  transition: color .2s ease;
}
.rd-footer a.rd-footer__link:hover { color: var(--intap-cyan); }
.rd-footer__contact { display: flex; flex-direction: column; gap: 14px; }
.rd-footer__row { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.5; color: var(--intap-ink-soft); }
.rd-footer__row svg { flex: none; margin-top: 2px; color: var(--intap-cyan); }
.rd-footer__row a { color: inherit; transition: color .2s ease; }
.rd-footer__row a:hover { color: var(--intap-cyan); }
.rd-footer__social { display: flex; gap: 12px; margin-top: 28px; }
.rd-footer__social a {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rd-line); border-radius: 14px; color: var(--intap-ink-soft);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.rd-footer__social a:hover { border-color: var(--intap-cyan); color: var(--intap-cyan); transform: translateY(-2px); }
.rd-footer__address { margin: 0; font-size: 14.5px; line-height: 1.6; font-style: normal; color: var(--intap-ink-soft); }
.rd-footer__bar {
  margin-top: 72px; padding: 28px 0 40px; border-top: 1px solid var(--rd-line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--intap-ink-mute);
}
@media (max-width: 991.98px) {
  .rd-footer { padding-top: 64px !important; }
  .rd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 40px; }
  .rd-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .rd-footer { padding-top: 48px !important; }
  .rd-footer__grid { grid-template-columns: 1fr; gap: 40px; }
  .rd-footer__logo img { height: 52px; }
  .rd-footer__social a { width: 46px; height: 46px; }
  .rd-footer__bar { margin-top: 44px; padding: 22px 0 34px; flex-direction: column; align-items: flex-start; font-size: 12.5px; line-height: 1.7; }
}

/* ==========================================================================
   HERO DE PAGINA INTERNA (malla de puntos + resplandor)
   ========================================================================== */
.rd-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--rd-bar-h) + 76px) var(--rd-px) 80px;
}
.rd-hero__glow {
  position: absolute; top: -320px; right: -160px; width: 860px; height: 860px; pointer-events: none;
  background: radial-gradient(circle, rgba(57, 226, 240, 0.15) 0%, rgba(0, 33, 69, 0) 66%);
  animation: rd-breathe 14s ease-in-out infinite alternate;
}
.rd-hero__mesh { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rd-hero__velo {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, var(--intap-navy) 16%, rgba(0, 33, 69, 0.88) 40%, rgba(0, 33, 69, 0) 78%);
}
.rd-hero__in { position: relative; }
.rd-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--intap-ink-mute); }
.rd-crumb a { color: var(--intap-ink-mute); transition: color .2s ease; }
.rd-crumb a:hover { color: var(--intap-cyan); }
.rd-crumb [aria-current] { color: var(--intap-ink-soft); }
.rd-crumb svg { flex: none; }
.rd-h1 { font-size: 62px; line-height: 1.02 !important; margin-top: 22px; }
.rd-lead { font-size: 18.5px; line-height: 1.68; margin-top: 26px; max-width: 740px; }

.rd-section { padding: var(--rd-py) var(--rd-px); background: var(--intap-white); color: var(--intap-ink); }
.rd-section--tint { background: var(--intap-tint); }
.rd-h2 { font-size: 46px; line-height: 1.06 !important; margin-top: 18px; color: var(--intap-ink); }
.rd-sub { font-size: 17px; line-height: 1.7; opacity: 0.82; margin-top: 20px; max-width: 660px; }

.rd-cta-band { position: relative; overflow: hidden; text-align: center; background: var(--intap-navy-deep); color: var(--intap-white); padding: 100px var(--rd-px); }
.rd-cta-band__glow {
  position: absolute; left: 50%; top: 50%; width: 1000px; height: 480px; margin: -240px 0 0 -500px; pointer-events: none;
  background: radial-gradient(ellipse, rgba(57, 226, 240, 0.14) 0%, rgba(0, 23, 48, 0) 68%);
  animation: rd-breathe 17s ease-in-out infinite alternate;
}
.rd-cta-band__in { position: relative; }
.rd-cta-band__in p, .rd-cta-band__in h2 { text-align: center; }
.rd-cta-band__title { font-size: 50px; line-height: 1.06 !important; margin-top: 20px; color: var(--intap-white); }
.rd-cta-band__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 40px; }

@keyframes rd-breathe {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

@media (max-width: 991.98px) {
  .rd-hero { padding-top: calc(var(--rd-bar-h) + 52px); padding-bottom: 60px; }
  .rd-h1 { font-size: 46px; }
  .rd-h2 { font-size: 36px; }
  .rd-lead { font-size: 17px; }
  .rd-cta-band { padding-top: 80px; padding-bottom: 80px; }
  .rd-cta-band__title { font-size: 38px; }
  .rd-hero__velo { background: linear-gradient(100deg, var(--intap-navy) 20%, rgba(0, 33, 69, 0.9) 55%, rgba(0, 33, 69, 0.55) 100%); }
}
@media (max-width: 575.98px) {
  .rd-hero { padding-top: calc(var(--rd-bar-h) + 36px); padding-bottom: 48px; }
  .rd-h1 { font-size: 38px; }
  .rd-h2 { font-size: 30px; }
  .rd-lead { font-size: 16px; line-height: 1.65; margin-top: 20px; }
  .rd-sub { font-size: 16px; }
  .rd-cta-band { padding-top: 64px; padding-bottom: 64px; }
  .rd-cta-band__title { font-size: 30px; }
  .rd-cta-band__actions .rd-btn { width: 100%; }
  .rd-hero__velo { background: linear-gradient(180deg, rgba(0, 33, 69, 0.94) 0%, rgba(0, 33, 69, 0.8) 100%); }
}

/* ==========================================================================
   BASE DE PÁGINA Y SELECTOR ENTRE PÁGINAS HERMANAS
   ========================================================================== */
body.rd-page { margin: 0; background: var(--intap-navy); color: var(--intap-ink); font-size: 16px; line-height: 1.5; }

/* Selector entre páginas hermanas (productos, servicios): franja bajo la cabecera fija, antes de la portada.
   Cada píldora es un enlace real; la actual lleva aria-current="page". Se usa <div role="navigation">
   con enlaces directos: styles.css pisa con !important tanto `nav` como `ul > li > a`. */
.rd-switch {
  padding: calc(var(--rd-bar-h) + 14px) var(--rd-px) 14px;
  background: var(--intap-navy-deep); border-bottom: 1px solid rgba(57, 226, 240, 0.18);
}
.rd-switch__list {
  display: inline-flex; max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28); border-radius: var(--intap-r-pill); overflow: hidden;
}
.rd-switch__item {
  display: flex; align-items: center; min-height: 42px; padding: 0 24px;
  font-family: var(--intap-font-display); font-size: 13.5px; font-weight: 600;
  color: #8FA5BE; transition: color .2s ease, background-color .2s ease;
}
.rd-switch__item:hover { color: #C3D3E4; }
.rd-switch__item.is-on, .rd-switch__item.is-on:hover { background: var(--intap-cyan); color: var(--intap-navy); }
@media (max-width: 575.98px) {
  .rd-switch { padding-top: calc(var(--rd-bar-h) + 10px); padding-bottom: 10px; }
  .rd-switch__list { display: flex; }
  .rd-switch__item { flex: 1 1 auto; }
  .rd-switch__item { justify-content: center; padding: 0 10px; font-size: 13px; min-height: 40px; }

  /* Variante para etiquetas largas (servicios): rejilla de 2x2 en lugar de una sola fila recortada */
  .rd-switch__list--wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 24px; }
  .rd-switch__list--wrap .rd-switch__item { min-height: 46px; padding: 6px 12px; text-align: center; line-height: 1.25; }
  .rd-switch__list--wrap .rd-switch__item:nth-child(n+3) { border-top: 1px solid rgba(148, 163, 184, 0.28); }
  .rd-switch__list--wrap .rd-switch__item:nth-child(even) { border-left: 1px solid rgba(148, 163, 184, 0.28); }
}

/* ==========================================================================
   ENTRADAS AL HACER SCROLL
   24px de desplazamiento + opacidad, 600ms, 80ms entre hermanos.
   Solo se oculta si el JS corrio (clase rd-js): sin JS el contenido se ve.
   ========================================================================== */
.rd-js .rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--rd-ease) var(--rv-d, 0ms), transform .6s var(--rd-ease) var(--rv-d, 0ms);
}
.rd-js .rv.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Todo el movimiento se apaga con prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .rd-js .rv { opacity: 1; transform: none; transition: none; }
  .rd-header, .rd-header__bar, .rd-logo img, .rd-nav, .rd-fab, .rd-skip { transition: none !important; }
  .rd-hero__glow, .rd-cta-band__glow { animation: none; }
  .rd-btn, .rd-btn svg { transition: none; }
  .rd-btn:hover svg { transform: none; }
  .rd-fab:hover, .rd-footer__social a:hover { transform: none; }
}

/* Ver la nota de .rd-sin-fluidez en home.css: lo activa la guardia de fluidez. */
.rd-sin-fluidez .rd-hero__glow, .rd-sin-fluidez .rd-cta-band__glow { animation: none !important; }
