/*
 * Componentes ricos e interacciones de la web pública.
 *
 * Complementa base.css. Todo el movimiento está construido con CSS y con
 * IntersectionObserver: sin librerías de animación y respetando siempre
 * prefers-reduced-motion.
 */

/* ── Barra de progreso de lectura ────────────────────────────────────────── */
.web-progreso {
    position: fixed;
    inset: 0 0 auto;
    height: 3px;
    z-index: 80;
    background: transparent;
    pointer-events: none;
}
.web-progreso__barra {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--web-primary), var(--web-accent));
    transition: width .1s linear;
}

/* ── Formas decorativas ──────────────────────────────────────────────────── */
.web-orbe {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
    pointer-events: none;
    z-index: 0;
}
.web-orbe--1 {
    width: 30rem; height: 30rem;
    background: radial-gradient(circle, rgba(56,178,172,.55), transparent 70%);
    top: -8rem; right: -6rem;
    animation: flotar 18s ease-in-out infinite;
}
.web-orbe--2 {
    width: 22rem; height: 22rem;
    background: radial-gradient(circle, rgba(14,124,123,.38), transparent 70%);
    bottom: -8rem; left: -5rem;
    animation: flotar 22s ease-in-out infinite reverse;
}

@keyframes flotar {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-2rem, 2rem) scale(1.08); }
}

/* Malla de puntos: da textura sin cargar imágenes. */
.web-puntos {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(23, 51, 79, .10) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
.web-section--ink .web-puntos { background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); }

/* El contenido siempre por encima de las formas. */
.web-hero > *, .web-section > * { position: relative; z-index: 1; }
.web-hero, .web-section { position: relative; overflow: hidden; }

/* ── Onda divisoria ──────────────────────────────────────────────────────── */
.web-onda {
    position: absolute;
    left: 0; right: 0;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}
.web-onda--abajo { bottom: -1px; }
.web-onda--arriba { top: -1px; transform: rotate(180deg); }
.web-onda svg { display: block; width: 100%; height: clamp(40px, 5vw, 80px); }

/* ── Hero enriquecido ────────────────────────────────────────────────────── */
.web-hero__figura {
    position: relative;
    isolation: isolate;
}
.web-hero__figura img {
    width: 100%;
    border-radius: var(--web-radius-lg);
    box-shadow: var(--web-shadow-lg);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}
/* Marco desplazado que da profundidad sin necesitar otra imagen. */
.web-hero__figura::before {
    content: "";
    position: absolute;
    inset: 1.5rem -1.5rem -1.5rem 1.5rem;
    border-radius: var(--web-radius-lg);
    border: 2px solid var(--web-accent);
    opacity: .45;
    z-index: -1;
}

.web-flotante {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--web-shadow);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--web-ink);
    animation: flotarSuave 5s ease-in-out infinite;
    z-index: 2;
}
.web-flotante i { color: var(--web-primary); font-size: 1.2rem; }
.web-flotante--1 { top: 8%; left: -1.5rem; }
.web-flotante--2 { bottom: 12%; right: -1rem; animation-delay: 1.6s; }
.web-flotante small { display: block; font-weight: 600; color: var(--web-body); font-size: var(--fs-xs); }

@keyframes flotarSuave {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* Indicador de "hay más abajo". */
.web-scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--web-primary-dark);
}
.web-scroll-cue i { animation: rebote 1.8s ease-in-out infinite; font-size: 1.1rem; }

@keyframes rebote {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ── Aparición escalonada ────────────────────────────────────────────────── */
.reveal-css .stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .55s ease, transform .55s ease;
}
.reveal-css .stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-css .stagger.is-visible > *:nth-child(1) { transition-delay: .00s; }
.reveal-css .stagger.is-visible > *:nth-child(2) { transition-delay: .07s; }
.reveal-css .stagger.is-visible > *:nth-child(3) { transition-delay: .14s; }
.reveal-css .stagger.is-visible > *:nth-child(4) { transition-delay: .21s; }
.reveal-css .stagger.is-visible > *:nth-child(5) { transition-delay: .28s; }
.reveal-css .stagger.is-visible > *:nth-child(6) { transition-delay: .35s; }
.reveal-css .stagger.is-visible > *:nth-child(7) { transition-delay: .42s; }
.reveal-css .stagger.is-visible > *:nth-child(8) { transition-delay: .49s; }

/* ── Tarjetas con más carácter ───────────────────────────────────────────── */
.web-card {
    position: relative;
    overflow: hidden;
}
/* Barra de color que crece al pasar el cursor. */
.web-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--web-primary), var(--web-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}
.web-card:hover::after { transform: scaleX(1); }

.web-card__icon {
    transition: transform .35s ease, background-color .35s ease;
}
.web-card:hover .web-card__icon {
    transform: rotate(-6deg) scale(1.08);
}
.web-card__link i { transition: transform .25s ease; display: inline-block; }
.web-card:hover .web-card__link i { transform: translateX(5px); }

/* Icono coloreado por categoría (variable inline desde Blade). */
.web-card__icon--color {
    background: color-mix(in srgb, var(--tono, var(--web-primary)) 14%, #fff);
    color: var(--tono, var(--web-primary));
}

/* ── Carrusel infinito de clientes ───────────────────────────────────────── */
.web-marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.web-marquee__pista {
    display: flex;
    gap: 3rem;
    width: max-content;
    align-items: center;
    animation: desplazar 32s linear infinite;
}
.web-marquee:hover .web-marquee__pista { animation-play-state: paused; }
.web-marquee img {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .62;
    transition: filter .3s ease, opacity .3s ease, transform .3s ease;
}
.web-marquee img:hover { filter: none; opacity: 1; transform: scale(1.06); }

@keyframes desplazar {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Antetítulo con guion de acento ──────────────────────────────────────── */
.web-eyebrow::before {
    content: "";
    display: inline-block;
    width: 1.75rem;
    height: 2px;
    margin-right: .6rem;
    vertical-align: middle;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--web-primary), var(--web-accent));
}
.web-section--ink .web-eyebrow::before,
.web-section--tech .web-eyebrow::before,
.web-banda .web-eyebrow::before { background: linear-gradient(90deg, var(--web-accent), transparent); }
.web-section__head--center .web-eyebrow::before { display: none; }

/* ── Proceso por pasos ───────────────────────────────────────────────────── */
.web-pasos {
    position: relative;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    counter-reset: paso;
}

/* Línea que enlaza los pasos en escritorio. */
@media (min-width: 62rem) {
    .web-pasos::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--web-primary-soft) 12%, var(--web-primary-soft) 88%, transparent);
    }
}

.web-paso {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: var(--web-radius);
    background: #fff;
    border: 1px solid var(--web-line);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.web-paso:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 124, 123, .35);
    box-shadow: var(--web-shadow);
}
.web-paso::before {
    counter-increment: paso;
    content: counter(paso);
    position: absolute;
    top: -18px;
    left: 1.5rem;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--web-primary);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(14,124,123,.35);
}
.web-paso h3 { font-size: var(--fs-base); margin: .75rem 0 .35rem; }
.web-paso p { font-size: var(--fs-sm); margin: 0; }

/* ── Pestañas de categorías ──────────────────────────────────────────────── */
.web-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}
.web-tab {
    padding: .55rem 1.1rem;
    border: 1px solid var(--web-line);
    border-radius: 999px;
    background: #fff;
    color: var(--web-ink);
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}
.web-tab:hover { border-color: var(--web-primary); color: var(--web-primary-dark); }
.web-tab[aria-selected="true"] {
    background: var(--web-primary);
    border-color: var(--web-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(14,124,123,.28);
}
.web-tab span {
    display: inline-block;
    margin-left: .35rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: rgba(23,51,79,.08);
    font-size: var(--fs-xs);
}
.web-tab[aria-selected="true"] span { background: rgba(255,255,255,.25); }

/* ── Canales de atención ─────────────────────────────────────────────────── */
.web-canal {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    border-radius: var(--web-radius);
    background: #fff;
    border: 1px solid var(--web-line);
    box-shadow: var(--web-shadow-sm);
    border-top: 4px solid var(--tono, var(--web-primary));
    transition: transform .22s ease, box-shadow .22s ease;
}
.web-canal:hover { transform: translateY(-4px); box-shadow: var(--web-shadow); }
.web-canal__icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 13px;
    margin-bottom: .9rem;
    background: color-mix(in srgb, var(--tono, var(--web-primary)) 14%, #fff);
    color: var(--tono, var(--web-primary));
    font-size: 1.35rem;
}
.web-canal h3 { font-size: var(--fs-base); margin-bottom: .35rem; }
.web-canal p { font-size: var(--fs-sm); margin-bottom: 1rem; }
.web-canal__datos {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: .45rem;
    font-size: var(--fs-sm);
}
.web-canal__datos i { color: var(--tono, var(--web-primary)); width: 1.1rem; }
.web-canal__acciones { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.web-canal__acciones .web-btn { flex: 1 1 auto; }
.web-canal__destacado {
    align-self: flex-start;
    margin-bottom: .75rem;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tono, var(--web-primary)) 14%, #fff);
    color: var(--tono, var(--web-primary));
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Sección "plataforma": ambiente tecnológico ──────────────────────────── */
/* El color de los titulares lo aporta .web-section--oscura en base.css. */
.web-section--tech {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(48rem 30rem at 12% 8%, rgba(56, 178, 172, .28), transparent 62%),
        radial-gradient(40rem 28rem at 88% 92%, rgba(14, 124, 123, .30), transparent 62%),
        linear-gradient(160deg, #0B2038 0%, var(--web-ink) 55%, #0C2A45 100%);
}

/* Retícula que se desplaza despacio: da sensación de interfaz viva. */
.web-tech-red {
    position: absolute;
    inset: -2px;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(56, 178, 172, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 178, 172, .16) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 25%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, #000 25%, transparent 78%);
    animation: techDeriva 28s linear infinite;
}

@keyframes techDeriva {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 54px 54px, 54px 54px; }
}

/* Nodos que parpadean sobre la retícula. */
.web-tech-nodo {
    position: absolute;
    z-index: 0;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--web-accent);
    box-shadow: 0 0 0 0 rgba(56, 178, 172, .55);
    animation: techNodo 4s ease-out infinite;
    pointer-events: none;
}

@keyframes techNodo {
    0%   { box-shadow: 0 0 0 0 rgba(56, 178, 172, .55); opacity: .9; }
    70%  { box-shadow: 0 0 0 22px rgba(56, 178, 172, 0); opacity: .35; }
    100% { box-shadow: 0 0 0 0 rgba(56, 178, 172, 0); opacity: .9; }
}

/* Tarjetas de la sección con aspecto de panel de interfaz. */
.web-tech-panel {
    padding: 1.25rem;
    border-radius: var(--web-radius);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(6px);
    transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}
.web-tech-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 178, 172, .55);
    background: rgba(255, 255, 255, .1);
}
.web-tech-panel .web-card__icon {
    background: rgba(56, 178, 172, .18);
    color: var(--web-accent);
}
.web-tech-panel p { color: #fff; font-weight: 600; margin: 0; }

/* ── Banda de cobertura nacional ─────────────────────────────────────────── */
.web-banda {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(46rem 32rem at 94% 6%, rgba(240, 168, 0, .58), transparent 62%),
        radial-gradient(60rem 40rem at 80% 25%, rgba(255, 255, 255, .10), transparent 60%),
        linear-gradient(120deg, var(--web-primary-dark) 0%, var(--web-primary) 62%, #24807E 100%);
    padding-block: var(--sp-seccion-media);
}

/* Malla hexagonal: la textura corporativa del sector salud, hecha en CSS. */
.web-banda__malla {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(30deg, rgba(255,255,255,.5) 1px, transparent 1px),
        linear-gradient(150deg, rgba(255,255,255,.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
    background-size: 46px 80px, 46px 80px, 46px 80px;
    mask-image: linear-gradient(100deg, transparent 25%, #000 75%);
    -webkit-mask-image: linear-gradient(100deg, transparent 25%, #000 75%);
}

/* Una sola fila: copia y cifras a la izquierda, mapa y ciudades a la derecha.
   Antes eran dos bloques apilados y la sección ocupaba media pantalla. */
.banda-layout {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.75rem 2.5rem;
    align-items: center;
    grid-template-columns: 1fr;
}
@media (min-width: 75rem) {
    /* El mapa se lleva la mayor parte: es lo que se mira en esta sección. */
    .banda-layout { grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); }
}

.banda-texto h2 {
    font-size: clamp(1.5rem, 1.25rem + .8vw, 2rem);
    margin-bottom: .5rem;
}
.banda-texto p {
    font-size: var(--fs-sm);
    max-width: 42rem;
    margin-bottom: 1.1rem;
}
.banda-texto .web-eyebrow { margin-bottom: .35rem; }
.banda-texto .web-insignias { margin-bottom: 1.25rem; }

/* Insignias circulares tipo "+58 ciudades". */
.web-insignias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: .6rem .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.web-insignia {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}
.web-insignia__circulo {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--web-naranja, #FFA800);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.02em;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
    transition: transform .3s ease;
}
.web-insignia:hover .web-insignia__circulo { transform: scale(1.08) rotate(-5deg); }
.web-insignia__texto { font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; }

/* ── Líneas de servicio (cápsulas) ───────────────────────────────────────── */
.web-lineas {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.web-linea {
    position: relative;
    display: block;
    border-radius: 999px 999px var(--web-radius-lg) var(--web-radius-lg);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--web-shadow);
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.web-linea:hover { transform: translateY(-8px); box-shadow: var(--web-shadow-lg); text-decoration: none; }
.web-linea img {
    width: 100%;
    aspect-ratio: 286 / 484;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.web-linea:hover img { transform: scale(1.04); }

/* Llamado que aparece al pasar el cursor. El nombre de la línea ya viene
   rotulado en la propia imagen, así que aquí no se repite. */
.web-linea__capa {
    position: absolute;
    inset: auto 0 0 0;
    padding: 3rem 1rem 1.35rem;
    background: linear-gradient(transparent, rgba(14, 92, 91, .92));
    color: #fff;
    font-weight: 800;
    font-size: var(--fs-sm);
    text-align: center;
    line-height: 1.25;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s ease, transform .3s ease;
}
.web-linea:hover .web-linea__capa,
.web-linea:focus-visible .web-linea__capa { opacity: 1; transform: none; }
.web-linea__capa i { transition: transform .25s ease; display: inline-block; }
.web-linea:hover .web-linea__capa i { transform: translateX(4px); }

/* ── Volver arriba ───────────────────────────────────────────────────────── */
.web-arriba {
    position: fixed;
    right: 1.3rem;
    bottom: 5.5rem;
    z-index: 69;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border: 1px solid var(--web-line);
    border-radius: 50%;
    background: #fff;
    color: var(--web-ink);
    box-shadow: var(--web-shadow-sm);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.web-arriba.is-visible { opacity: 1; visibility: visible; transform: none; }
.web-arriba:hover { color: var(--web-primary-dark); border-color: var(--web-primary); }

/* ── Bloque de imagen con marco ──────────────────────────────────────────── */
.web-figura {
    position: relative;
    border-radius: var(--web-radius-lg);
    overflow: hidden;
    box-shadow: var(--web-shadow);
}
.web-figura img { width: 100%; display: block; object-fit: cover; }
.web-figura__pie {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem 1.25rem 1rem;
    background: linear-gradient(transparent, rgba(23,51,79,.85));
    color: #fff;
    font-size: var(--fs-sm);
    font-weight: 600;
}

/* ── Listado de exámenes con acento ──────────────────────────────────────── */
.web-chips li {
    transition: transform .18s ease, background-color .18s ease;
    cursor: default;
}
.web-chips li:hover { transform: translateY(-2px); background: var(--web-accent); color: #fff; }

/* ── Tarjetas de categoría del laboratorio ───────────────────────────────── */
.lab-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.lab-card {
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    border-radius: var(--web-radius);
    background: #fff;
    border: 1px solid var(--web-line);
    box-shadow: var(--web-shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.lab-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 124, 123, .35);
    box-shadow: var(--web-shadow);
}

.lab-card__cabecera {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .9rem;
    padding-bottom: .75rem;
    border-bottom: 1px dashed var(--web-line);
}
.lab-card__icono {
    width: 40px; height: 40px;
    flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 11px;
    background: color-mix(in srgb, var(--tono, var(--web-primary)) 14%, #fff);
    color: var(--tono, var(--web-primary));
    font-size: 1.15rem;
}
.lab-card__cabecera h3 { font-size: var(--fs-base); margin: 0; flex: 1 1 auto; }
.lab-card__conteo {
    padding: .1rem .55rem;
    border-radius: 999px;
    background: var(--web-sand);
    color: var(--web-body);
    font-size: var(--fs-xs);
    font-weight: 800;
}

.lab-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .35rem;
    font-size: var(--fs-sm);
}
.lab-card li { display: flex; align-items: flex-start; gap: .45rem; }
.lab-card li::before {
    content: "";
    width: 6px; height: 6px;
    margin-top: .55rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--tono, var(--web-primary));
}

/* ── Ajustes responsivos ─────────────────────────────────────────────────── */
@media (max-width: 61.99rem) {
    .web-flotante--1 { left: .5rem; }
    .web-flotante--2 { right: .5rem; }
    .web-hero__figura::before { display: none; }
}

@media (max-width: 47.99rem) {
    .web-arriba { bottom: 140px; right: .9rem; }
    .web-marquee img { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .web-orbe,
    .web-flotante,
    .web-banda__punto,
    .web-scroll-cue i { animation: none !important; }
    .web-marquee__pista { animation: none !important; }
    .reveal-css .stagger > * { opacity: 1; transform: none; transition: none; }
    /* Sin movimiento la capa de las cápsulas debe verse siempre. */
    .web-linea__capa { opacity: 1; transform: none; }
}

/* ── Encabezado a sangre completa ────────────────────────────────────────── */
/* Solo para fotos realmente apaisadas. Su alto sale de la proporción de la
   imagen (--foto-ratio), de modo que se descarta lo mínimo en vez de un tercio
   fijo; el tope evita que en pantallas anchas ocupe media pantalla. */
.web-hero--pleno {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: end;
    min-height: min(
        calc(100vw / var(--foto-ratio, 2.6)),
        clamp(16rem, 12rem + 10vw, 22rem)
    );
    padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem) clamp(1.5rem, 1.2rem + 2vw, 2.5rem);
    overflow: hidden;
}

/* Título y acciones más compactos: con la caja más baja, el tamaño íntegro
   del display se comía casi todo el alto disponible. */
.web-hero--pleno .web-display { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem); }

.web-hero--pleno .web-hero__actions { margin-top: 1.1rem; }
.web-hero--pleno .web-hero__actions .web-btn {
    min-height: 42px;
    padding: .6rem 1.3rem;
    font-size: var(--fs-sm);
    box-shadow: none;
}

.web-hero--pleno .web-badges { margin-top: 1rem; }

/* El sobreancho del parallax va SOLO hacia abajo. Cuando salía también por
   arriba, el recorte se comía la franja superior de la foto —justo donde están
   las cabezas— y parecía que el encabezado la tapaba.
   `height` explícito: con `inset` sola, la imagen se quedaba en su alto natural
   y dejaba una franja muerta bajo el encabezado. */
.web-hero__fondo {
    position: absolute;
    inset: 0 0 -18% 0;
    z-index: -2;
    overflow: hidden;
}
.web-hero__fondo picture,
.web-hero__fondo .web-img,
.web-hero__fondo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--foco, center 32%);
}

/* ── Encabezado partido ──────────────────────────────────────────────────── */
/* Para fotos que no son banda: la imagen se ve completa al lado del texto en
   vez de perder la mitad detrás de él. */
.web-hero--partido {
    position: relative;
    overflow: hidden;
    /* Menos aire abajo: la sección siguiente ya trae el suyo. */
    padding-block: clamp(2.25rem, 1.75rem + 2.5vw, 3.75rem) clamp(1.5rem, 1rem + 2vw, 2.75rem);
    background:
        radial-gradient(60rem 32rem at 88% -10%, color-mix(in srgb, var(--web-accent) 14%, transparent), transparent 62%),
        linear-gradient(180deg, var(--web-primary-soft) 0%, #fff 82%);
}
.web-hero--partido .web-hero__cuerpo {
    display: grid;
    gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

.web-hero__figura-entera {
    margin: 0;
    position: relative;
}
.web-hero__figura-entera picture,
.web-hero__figura-entera img {
    display: block;
    width: 100%;
    height: auto;
    /* Sin recorte: se ve el 100 % de la fotografía. */
    object-fit: contain;
    border-radius: var(--web-radius-lg);
    box-shadow: var(--web-shadow-lg);
}
/* Mancha de marca detrás de la foto, para que no flote sobre el blanco. */
.web-hero__figura-entera::before {
    content: "";
    position: absolute;
    inset: 8% -4% -8% 8%;
    z-index: -1;
    border-radius: var(--web-radius-lg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--web-primary) 22%, transparent), color-mix(in srgb, var(--web-accent) 20%, transparent));
}

@media (min-width: 62rem) {
    .web-hero--partido .web-hero__cuerpo {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    }
}

/* Velo que garantiza el contraste del texto sobre cualquier foto. Se mantiene
   un piso de opacidad incluso en el borde derecho: con fotos claras (paredes
   blancas, batas) el texto perdía contraste ahí en cuanto la foto se aclaraba. */
.web-hero__velo {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(10, 26, 42, .95) 0%, rgba(10, 26, 42, .82) 30%, rgba(10, 26, 42, .68) 60%, rgba(10, 26, 42, .55) 85%, rgba(10, 26, 42, .4) 100%),
        linear-gradient(0deg, rgba(10, 26, 42, .6), transparent 60%);
}

.web-hero__cuerpo { position: relative; z-index: 1; }
.web-hero--pleno .web-hero__cuerpo { max-width: min(100% - 2.5rem, var(--web-max)); }

/* Variante sin foto: fondo suave de marca. */
.web-hero--compacto {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2rem, 1.6rem + 2.4vw, 3.5rem);
    background:
        radial-gradient(70rem 34rem at 88% -20%, color-mix(in srgb, var(--web-accent) 16%, transparent), transparent 62%),
        linear-gradient(180deg, var(--web-primary-soft) 0%, #fff 78%);
}

/* ── Migas ───────────────────────────────────────────────────────────────── */
.web-migas {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: var(--sp-3);
    font-size: var(--fs-sm);
}
.web-migas a { color: inherit; opacity: .85; }
.web-migas a:hover { opacity: 1; }
.web-migas span { opacity: .6; }

/* Sobre foto, los botones fantasma necesitan borde claro. */
.web-hero--pleno .web-btn--ghost {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}
.web-hero--pleno .web-btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.web-hero--pleno .web-scroll-cue { color: rgba(255, 255, 255, .9); }

@media (max-width: 47.99rem) {
    .web-hero--pleno { min-height: min(calc(100vw / var(--foto-ratio, 2.6)), 17rem); }
    .web-hero__velo {
        background: linear-gradient(180deg, rgba(10, 26, 42, .78) 0%, rgba(10, 26, 42, .9) 100%);
    }
}

/* Botón grande de llamada principal. */
.web-btn--grande {
    min-height: 56px;
    padding: .9rem 2rem;
    font-size: var(--fs-lg);
    box-shadow: var(--web-glow);
}

/* Insignias sobre foto: vidrio esmerilado en vez de blanco opaco. */
.web-hero--pleno .web-badges li {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
    backdrop-filter: blur(6px);
}
.web-hero--pleno .web-badges li .web-icono { color: var(--web-accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   Utilidades de maquetación
   Estas reglas nacieron como `style="…"` dentro de las vistas. Ahí no las
   revisaba nadie: fue justamente donde se coló un `clamp()` inválido que el
   navegador descartaba en silencio. Viven aquí para poder verificarlas.
   ───────────────────────────────────────────────────────────────────────────── */

/* Dos columnas que se apilan solas cuando no caben. */
.web-duo {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
}
.web-duo > * { min-width: 0; }

/* Sección con menos aire que la estándar. */
.web-section--ajustada { padding-block: var(--sp-seccion-media); }
.web-section--apretada { padding-block: var(--sp-seccion-corta); }

/* Formulario presentado sobre una tarjeta elevada. */
.web-form--tarjeta {
    padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    border: 1px solid var(--web-line);
    border-radius: var(--web-radius);
    background: #fff;
    box-shadow: var(--web-shadow-sm);
}

/* Grupo de opciones sin el marco que dibuja el navegador. */
.web-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.web-fieldset legend {
    padding: 0;
    margin-bottom: .5rem;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--web-ink);
}

.web-campo-captcha { max-width: 10rem; text-transform: uppercase; }

/* Lista de datos de contacto: dirección, teléfono, correo. */
.web-datos {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .9rem;
    font-size: var(--fs-sm);
}
.web-datos > li > .web-icono { color: var(--web-primary); margin-right: .25rem; }
.web-datos__sub { display: inline-block; padding-left: 1.4rem; }
.web-datos__sub--tenue { color: var(--web-body); }

/* Tabla de horarios de atención. */
.web-horario { width: 100%; font-size: var(--fs-sm); border-collapse: collapse; }
.web-horario tr { border-bottom: 1px solid var(--web-line); }
.web-horario th { text-align: left; padding: .45rem 0; font-weight: 700; color: var(--web-ink); }
.web-horario td { text-align: right; padding: .45rem 0; }
.web-horario td.is-cerrado { color: var(--web-danger); }
.web-horario__nota { font-size: var(--fs-xs); margin: .75rem 0 0; color: var(--web-body); }

/* Encabezado y cuerpo dentro de una tarjeta. */
.web-card__titulo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--fs-lg);
}
.web-card__titulo .web-icono { color: var(--web-primary); }
.web-card__texto { font-size: var(--fs-sm); }

.web-btn--separado { margin-top: 1.25rem; }

/* Bloque de texto centrado, más ancho que la medida de lectura corrida. */
.web-medida-ancha { max-width: 52rem; }
.web-medida-ancha--centro { max-width: 52rem; margin-inline: auto; text-align: center; }

/* Imagen suelta con las esquinas y la sombra de la marca. */
.web-imagen-marco { border-radius: var(--web-radius); box-shadow: var(--web-shadow); }
.web-imagen-marco--grande { border-radius: var(--web-radius-lg); box-shadow: var(--web-shadow-lg); }

/* Lista con viñeta de icono en lugar de punto. */
.web-lista-check { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.web-lista-check > li > .web-icono { color: var(--web-primary); margin-right: .35rem; }
.web-lista-check--suelta { gap: .5rem; }

/* Rótulo pequeño en versalitas sobre una franja de logotipos o cifras. */
.web-rotulo {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--web-body);
    margin-bottom: 1.5rem;
}

/* Migas de pan cuando no vienen del encabezado compartido. */
.web-migas--sueltas { font-size: var(--fs-sm); margin-bottom: 1rem; }

.web-bloque-separado { margin-top: 1.5rem; }
.web-titulo-seccion { font-size: var(--fs-xl); margin-top: 2.5rem; }

/* Fondo tenue de marca, para encabezados de ficha. */
.web-section--marca-suave { background: var(--web-primary-soft); }

/* Sección que se pega a la anterior: la de arriba ya aportó el aire. */
.web-section--sin-tope { padding-top: 0; }

/* Sobre fondo claro las migas necesitan su propio color. */
.web-migas--sueltas { color: var(--web-body); }
.web-migas--sueltas a { color: var(--web-primary-dark); }
.web-section--tech .web-migas--sueltas { color: rgba(255, 255, 255, .75); }
.web-section--tech .web-migas--sueltas a { color: #fff; }

/* Titular pegado a lo que sigue, cuando debajo va un subtítulo. */
.web-titulo-pegado { margin-bottom: .35rem; }

.web-duo--holgado { gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }

.web-card__icon--sm { width: 42px; height: 42px; font-size: 1.2rem; border-radius: 12px; }

.web-pie__titulo-extra { margin-top: 1.75rem; }
.web-menu__ingresar { margin-top: .75rem; }

/* Textura de fondo de la banda de cobertura (imagen editable desde el gestor). */
.web-banda__textura {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--textura, none);
    background-size: cover;
    background-position: center;
    opacity: .12;
    mix-blend-mode: soft-light;
    pointer-events: none;
}
.web-banda > .web-container { position: relative; z-index: 1; }

/* ── Distintivo de habilitación ──────────────────────────────────────────── */
/* Es un documento oficial: se muestra completo, sin recortes ni sombras que
   lo disfracen de fotografía. */
.lab-distintivo {
    margin: 0;
    padding: 1.5rem;
    border: 1px solid var(--web-line);
    border-radius: var(--web-radius);
    background: #fff;
    box-shadow: var(--web-shadow-sm);
}
.lab-distintivo__img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.lab-distintivo figcaption {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--web-line);
    font-size: var(--fs-xs);
    color: var(--web-body);
}
.lab-distintivo figcaption .web-icono { color: var(--web-success); margin-top: .15rem; }
