/*
 * Sistema de diseño de la web pública de LR Medicina Laboral.
 *
 * Es CSS propio (sin Bootstrap ni jQuery) porque la web pública se mide por
 * Core Web Vitals: menos bytes y menos bloqueo de render que el dashboard.
 * Los colores salen de variables para que el administrador pueda cambiarlos
 * desde el CMS sin tocar este archivo.
 */

/* Los tokens de color, tipografía y espaciado viven en tokens.css. */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--web-header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--web-fuente-texto);
    font-size: var(--fs-base);
    line-height: var(--lh-texto);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: var(--web-body);
    background: var(--web-white);
    /* Evita cualquier desbordamiento lateral en móvil. */
    overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }

/* Iconos del sprite: heredan el color y se alinean con el texto. */
.web-icono {
    display: inline-block;
    vertical-align: -.125em;
    fill: currentColor;
    flex: 0 0 auto;
}

/* El atributo `hidden` debe ganarle a cualquier `display` de clase: se usa para
   ocultar pasos del cotizador y resultados filtrados. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
    margin: 0 0 .55em;
    color: var(--web-titulo, var(--web-ink));
    font-family: var(--web-fuente-titulo);
    line-height: var(--lh-titulo);
    font-weight: 700;
    letter-spacing: var(--ls-titulo);
    text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
.web-display { font-size: var(--fs-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p { margin: 0 0 1em; }

a { color: var(--web-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }

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

/* Enlace de salto para lectores de pantalla y teclado. */
.web-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--web-ink);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--web-radius-sm) 0;
}
.web-skip:focus { left: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Barras de desplazamiento
   Una sola forma para todo el sitio, la de la ventana incluida. Firefox solo
   admite `scrollbar-width`/`scrollbar-color`; el resto usa los pseudoelementos
   de WebKit, que permiten el pulgar con degradado.
   ───────────────────────────────────────────────────────────────────────────── */
:root {
    --barra-ancho: 12px;
    --barra-pulgar: linear-gradient(180deg, var(--web-primary), var(--web-primary-dark));
    --barra-pista: color-mix(in srgb, var(--web-primary) 8%, transparent);
}

html { scrollbar-width: thin; scrollbar-color: var(--web-primary) transparent; }

*::-webkit-scrollbar { width: var(--barra-ancho); height: var(--barra-ancho); }
*::-webkit-scrollbar-track { background: var(--barra-pista); border-radius: 999px; }
*::-webkit-scrollbar-thumb {
    background: var(--barra-pulgar);
    border-radius: 999px;
    /* El borde transparente adelgaza el pulgar sin encoger la zona de agarre. */
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background-color .2s ease;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--web-accent), #C88C00);
    background-clip: content-box;
}
*::-webkit-scrollbar-corner { background: transparent; }

/* Sobre fondo oscuro la barra se aclara para no desaparecer. */
.web-section--oscura, .web-section--ink, .web-section--tech, .web-banda {
    scrollbar-color: rgba(255, 255, 255, .45) transparent;
}
.web-section--oscura *::-webkit-scrollbar-track,
.web-section--ink *::-webkit-scrollbar-track,
.web-section--tech *::-webkit-scrollbar-track,
.web-banda *::-webkit-scrollbar-track { background: rgba(255, 255, 255, .1); }

.web-section--oscura *::-webkit-scrollbar-thumb,
.web-section--ink *::-webkit-scrollbar-thumb,
.web-section--tech *::-webkit-scrollbar-thumb,
.web-banda *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .5);
    background-clip: content-box;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.web-container {
    width: min(100% - 2.5rem, var(--web-max));
    margin-inline: auto;
}

.web-section { padding-block: var(--sp-seccion); }

/* La sección que sigue al encabezado no necesita todo el aire: el hero ya
   dejó el suyo y juntos abrían un hueco enorme. */
.web-hero + .web-section { padding-top: var(--sp-seccion-media); }
.web-section--sand { background: var(--web-sand); }
.web-section--arena { background: var(--web-sand); }
.web-section--ink { background: var(--web-ink); }

/* Cualquier sección de fondo oscuro. Fija --web-titulo, así que h1..h4 quedan
   en blanco de una sola vez: antes solo se rescataban h2 y h3 y el h1 de
   /web/sistema resultaba invisible sobre su propio color de fondo. */
.web-section--oscura,
.web-section--ink,
.web-section--tech,
.web-banda {
    --web-titulo: #fff;
    color: rgba(255, 255, 255, .84);
}
.web-section--oscura .web-eyebrow,
.web-section--ink .web-eyebrow,
.web-section--tech .web-eyebrow,
.web-banda .web-eyebrow { color: var(--web-accent); }

.web-section--oscura .web-lead,
.web-section--ink .web-lead,
.web-section--tech .web-lead,
.web-banda .web-lead { color: rgba(255, 255, 255, .84); }

/* Botón fantasma legible sobre oscuro. */
.web-btn--ghost-inverso {
    --btn-bg: transparent;
    --btn-fg: #fff;
    border-color: rgba(255, 255, 255, .45);
}
.web-btn--ghost-inverso:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

/* Medidas de lectura, en vez de max-width en línea por vista. */
.web-medida-corta { max-width: 22ch; }
.web-medida { max-width: 46rem; }

.web-section__head { max-width: 46rem; margin-bottom: 2.5rem; }
.web-section__head--center { margin-inline: auto; text-align: center; }

.web-eyebrow {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--web-primary);
    margin-bottom: .75rem;
}
.web-section--ink .web-eyebrow { color: var(--web-accent); }

.web-lead { font-size: var(--fs-lg); color: var(--web-body); }
.web-section--ink .web-lead { color: rgba(255, 255, 255, .82); }

/* Rejilla que se reacomoda sola: de 1 a N columnas sin media queries. */
.web-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.web-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.web-grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

/* ── Botones ─────────────────────────────────────────────────────────────── */
.web-btn {
    --btn-bg: var(--web-primary);
    --btn-fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    /* Un botón nunca debe partir su texto en dos renglones. */
    white-space: nowrap;
    min-height: 48px;
    padding: .75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.web-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 124, 123, .28);
}
.web-btn:active { transform: translateY(0); }

.web-btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--web-ink);
    border-color: var(--web-line);
}
.web-btn--ghost:hover { border-color: var(--web-primary); color: var(--web-primary-dark); box-shadow: var(--web-shadow-sm); }

.web-btn--light { --btn-bg: #fff; --btn-fg: var(--web-primary-dark); }
.web-btn--block { width: 100%; }
.web-btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: var(--fs-sm); }

/* ── Encabezado ──────────────────────────────────────────────────────────── */
.web-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.web-header.is-stuck {
    box-shadow: var(--web-shadow-sm);
    border-bottom-color: var(--web-line);
}

.web-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--web-header-h);
}

/* La marca no se comprime ni parte sus líneas. */
.web-brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; flex: 0 0 auto; }
.web-brand img { height: 42px; width: auto; }
.web-brand__name {
    font-weight: 800;
    color: var(--web-ink);
    line-height: 1.15;
    font-size: 1.05rem;
    white-space: nowrap;
}
.web-brand__tag {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--web-primary);
    white-space: nowrap;
}

.web-nav { display: flex; align-items: center; gap: .15rem; flex-wrap: nowrap; }
.web-nav a {
    padding: .55rem .7rem;
    border-radius: var(--web-radius-sm);
    color: var(--web-ink);
    font-weight: 600;
    font-size: var(--fs-sm);
    white-space: nowrap;
}
.web-nav a:hover { background: var(--web-primary-soft); text-decoration: none; }
.web-nav a[aria-current="page"] { color: var(--web-primary-dark); background: var(--web-primary-soft); }

.web-header__actions { display: flex; align-items: center; gap: .6rem; }

.web-burger {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--web-line);
    border-radius: var(--web-radius-sm);
    background: #fff;
    color: var(--web-ink);
    cursor: pointer;
}

/* Menú móvil a pantalla completa. Vive fuera del <header> a propósito: su
   backdrop-filter lo convertiría en bloque contenedor de este panel fijo. */
.web-mobile-nav {
    position: fixed;
    inset: var(--web-header-h) 0 0;
    z-index: 55;
    background: #fff;
    padding: 1.5rem 1.25rem 6rem;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.web-mobile-nav.is-open { opacity: 1; transform: none; visibility: visible; }
.web-mobile-nav a:not(.web-btn) {
    display: block;
    padding: 1rem .25rem;
    border-bottom: 1px solid var(--web-line);
    color: var(--web-ink);
    font-size: var(--fs-lg);
    font-weight: 600;
}
.web-mobile-nav .web-btn { margin-top: 1.5rem; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.web-hero {
    position: relative;
    padding-block: clamp(3rem, 2rem + 5vw, 6rem);
    background:
        radial-gradient(90rem 40rem at 85% -20%, rgba(56, 178, 172, .22), transparent 60%),
        linear-gradient(180deg, var(--web-primary-soft) 0%, #fff 72%);
}
.web-hero__grid {
    display: grid;
    gap: clamp(2rem, 1rem + 4vw, 4rem);
    align-items: center;
    grid-template-columns: 1fr;
}
.web-hero__title { margin-bottom: .5rem; }
.web-hero__title span { color: var(--web-primary); }
.web-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.web-hero__media { position: relative; }
.web-hero__media img {
    width: 100%;
    border-radius: var(--web-radius-lg);
    box-shadow: var(--web-shadow-lg);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.web-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.web-badges li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--web-line);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--web-ink);
}

/* ── Cifras ──────────────────────────────────────────────────────────────── */
.web-cifras { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.web-cifra {
    padding: 1.5rem 1.25rem;
    border-radius: var(--web-radius);
    background: #fff;
    border: 1px solid var(--web-line);
    text-align: center;
    box-shadow: var(--web-shadow-sm);
}
.web-cifra__valor { display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--web-primary); line-height: 1; }
.web-cifra__etiqueta { display: block; margin-top: .5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--web-ink); }

/* ── Tarjetas ────────────────────────────────────────────────────────────── */
.web-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    border-radius: var(--web-radius);
    background: #fff;
    border: 1px solid var(--web-line);
    box-shadow: var(--web-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.web-card:hover { transform: translateY(-4px); box-shadow: var(--web-shadow); border-color: rgba(14, 124, 123, .35); }
.web-card h3 { font-size: var(--fs-lg); margin-bottom: .5rem; }
.web-card p { font-size: var(--fs-sm); margin-bottom: 1rem; }
.web-card__link { margin-top: auto; font-weight: 700; color: var(--web-primary-dark); }

.web-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: var(--web-primary-soft);
    color: var(--web-primary-dark);
    font-size: 1.5rem;
}

.web-card--plain { background: transparent; border: none; box-shadow: none; padding: 0; }
.web-card--plain:hover { transform: none; box-shadow: none; }

.web-card__media {
    margin: -1.75rem -1.75rem 1.25rem;
    border-radius: var(--web-radius) var(--web-radius) 0 0;
    overflow: hidden;
}
.web-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ── Listas de exámenes ──────────────────────────────────────────────────── */
.web-chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.web-chips li {
    padding: .4rem .9rem;
    border-radius: 999px;
    background: var(--web-primary-soft);
    color: var(--web-primary-dark);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.web-tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Formularios ─────────────────────────────────────────────────────────── */
.web-form { display: grid; gap: 1.1rem; }
.web-form__row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.web-field label {
    display: block;
    margin-bottom: .35rem;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--web-ink);
}
.web-field .req { color: var(--web-danger); }

.web-field input,
.web-field select,
.web-field textarea {
    width: 100%;
    min-height: 48px;
    padding: .7rem .9rem;
    border: 1px solid var(--web-line);
    border-radius: var(--web-radius-sm);
    background: #fff;
    font: inherit;
    color: var(--web-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.web-field textarea { min-height: 140px; resize: vertical; }
.web-field input:focus,
.web-field select:focus,
.web-field textarea:focus {
    border-color: var(--web-primary);
    box-shadow: 0 0 0 4px rgba(14, 124, 123, .14);
    outline: none;
}
.web-field__error { display: block; margin-top: .3rem; font-size: var(--fs-sm); color: var(--web-danger); font-weight: 600; }
.web-field__hint { display: block; margin-top: .3rem; font-size: var(--fs-xs); color: var(--web-body); }

.web-check { display: flex; align-items: flex-start; gap: .65rem; font-size: var(--fs-sm); }
.web-check input { width: 20px; height: 20px; min-height: 0; margin-top: .2rem; flex: 0 0 auto; }

.web-radios { display: flex; flex-wrap: wrap; gap: .6rem; }
.web-radio {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border: 1px solid var(--web-line);
    border-radius: 999px;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--web-ink);
}
.web-radio input { width: 18px; height: 18px; min-height: 0; }
.web-radio:has(input:checked) { border-color: var(--web-primary); background: var(--web-primary-soft); }

.web-captcha { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.web-captcha img { border-radius: var(--web-radius-sm); border: 1px solid var(--web-line); }
.web-captcha button {
    border: 1px solid var(--web-line);
    background: #fff;
    border-radius: var(--web-radius-sm);
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: var(--web-ink);
}

/* ── Avisos ──────────────────────────────────────────────────────────────── */
.web-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--web-radius-sm);
    border-left: 4px solid var(--web-primary);
    background: var(--web-primary-soft);
    color: var(--web-ink);
    font-weight: 600;
}
.web-alert--error { border-left-color: var(--web-danger); background: #FDEDEC; }
.web-alert--exito { border-left-color: var(--web-success); background: #E8F6EF; }

/* ── Acordeón ────────────────────────────────────────────────────────────── */
.web-acordeon { border: 1px solid var(--web-line); border-radius: var(--web-radius); overflow: hidden; background: #fff; }
.web-acordeon details + details { border-top: 1px solid var(--web-line); }
.web-acordeon summary {
    padding: 1.15rem 1.35rem;
    cursor: pointer;
    font-weight: 700;
    color: var(--web-ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.web-acordeon summary::-webkit-details-marker { display: none; }
.web-acordeon summary::after { content: "+"; font-size: 1.4rem; color: var(--web-primary); line-height: 1; }
.web-acordeon details[open] summary::after { content: "−"; }
.web-acordeon .web-acordeon__body { padding: 0 1.35rem 1.35rem; font-size: var(--fs-sm); }

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.web-cta {
    padding: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
    border-radius: var(--web-radius-lg);
    background: linear-gradient(135deg, var(--web-primary-dark), var(--web-primary) 55%, var(--web-accent));
    color: #fff;
    text-align: center;
    box-shadow: var(--web-shadow-lg);
}
.web-cta h2 { color: #fff; }
.web-cta p { color: rgba(255, 255, 255, .9); max-width: 42rem; margin-inline: auto; }
.web-cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }

/* ── Pie de página ───────────────────────────────────────────────────────── */
.web-footer {
    position: relative;
    overflow: hidden;
    background: var(--web-ink);
    color: rgba(255, 255, 255, .72);
    padding-block: clamp(2.5rem, 2rem + 2vw, 3.75rem) 1.25rem;
    /* Filo de color que separa el pie del contenido. */
    border-top: 4px solid var(--web-primary);
}

/* Halo suave para que el bloque no se vea plano. */
.web-footer__brillo {
    position: absolute;
    inset: -30% -10% auto auto;
    width: 34rem; height: 34rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 178, 172, .16), transparent 68%);
    pointer-events: none;
}

.web-footer > * { position: relative; z-index: 1; }

.web-footer a:not(.web-btn) { color: rgba(255, 255, 255, .82); }
.web-footer a:not(.web-btn):hover { color: #fff; }

.web-footer h3 {
    color: #fff;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}

.web-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
@media (min-width: 62rem) {
    .web-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; }
}

.web-footer__marca p { font-size: var(--fs-sm); }
.web-footer__logo { height: 46px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.web-footer__nit { font-size: var(--fs-xs); opacity: .7; }

/* Redes como botones circulares. */
.web-footer__redes { display: flex; gap: .5rem; margin-top: 1rem; }
.web-footer__redes a {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 1.05rem;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.web-footer__redes a:hover {
    background: var(--web-primary);
    border-color: var(--web-primary);
    transform: translateY(-2px);
}

.web-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .55rem;
    font-size: var(--fs-sm);
}

/* Subrayado que crece al pasar el cursor. */
.web-footer__col nav a, .web-footer__col ul a { text-decoration: none; }
.web-footer__col ul li > a {
    position: relative;
    display: inline-block;
}
.web-footer__col ul li > a::after {
    content: "";
    position: absolute;
    inset: auto 0 -2px 0;
    height: 1px;
    background: var(--web-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.web-footer__col ul li > a:hover::after { transform: scaleX(1); }

.web-footer__datos { gap: .75rem !important; }
.web-footer__datos li { display: flex; align-items: flex-start; gap: .6rem; }
.web-footer__datos i { color: var(--web-accent); margin-top: .2rem; flex: 0 0 auto; }

/* Horario agrupado: una línea por tramo, no por día. */
.web-footer__horario {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
    font-size: var(--fs-sm);
}
.web-footer__horario li {
    display: grid;
    gap: .1rem;
    padding-left: .75rem;
    border-left: 2px solid rgba(255, 255, 255, .18);
}
.web-footer__horario span { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.web-footer__horario strong { color: #fff; font-weight: 600; }

.web-footer__bottom {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: var(--fs-xs);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
}

/* ── WhatsApp flotante ───────────────────────────────────────────────────── */
.web-wa {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 1.25rem;
    border-radius: 999px;
    background: #25D366;
    color: #08331B;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(37, 211, 102, .38);
}
.web-wa:hover { text-decoration: none; color: #08331B; transform: translateY(-2px); }
.web-wa svg { width: 24px; height: 24px; flex: 0 0 auto; }

/* ── Barra inferior móvil ────────────────────────────────────────────────── */
.web-bottombar { display: none; }

/* ── Animación de aparición ──────────────────────────────────────────────── */
/* El estado oculto se aplica solo cuando hay JavaScript: sin él, el contenido
   debe verse igual (y los buscadores deben poder leerlo). */
.reveal-css .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal-css .reveal.is-visible { opacity: 1; transform: none; }

/* ── Utilidades ──────────────────────────────────────────────────────────── */
.web-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
.web-mt-2 { margin-top: 2rem; }
.web-center { text-align: center; }

/* Columna de tarjetas apiladas: sin esto la primera se estira a todo el alto
   de la fila (por el height:100% de .web-card) y deja un hueco enorme. */
.web-stack { display: grid; gap: 1.25rem; align-content: start; }
.web-stack > .web-card { height: auto; }

/* ── Adaptación por tamaño ───────────────────────────────────────────────── */
@media (min-width: 62rem) {
    .web-hero__grid { grid-template-columns: 1.05fr .95fr; }
    /* Sin imagen cargada no tiene sentido reservar la segunda columna. */
    .web-hero__grid--simple { grid-template-columns: minmax(0, 46rem); }
}

/* El menú completo necesita ~1200px: por debajo se pasa al botón hamburguesa
   para que la marca y los botones nunca partan de renglón. */
@media (max-width: 74.99rem) {
    .web-nav { display: none; }
    .web-burger { display: inline-flex; align-items: center; justify-content: center; }
    /* Solo se conserva "Cotizar"; el acceso al sistema queda en el menú. */
    .web-header__actions .web-btn--ghost { display: none; }
}

@media (max-width: 33.74rem) {
    .web-header__actions .web-btn { display: none; }
    .web-brand__tag { display: none; }
}

/* Por debajo de ~416 px el nombre escrito ya no cabe junto al botón de menú y
   empujaba la cabecera fuera de la pantalla. El logotipo incluye el nombre,
   así que se conserva solo la imagen. */
@media (max-width: 26rem) {
    .web-brand { flex: 0 1 auto; min-width: 0; }
    .web-brand__name { display: none; }
    .web-brand img { height: 38px; }
}

@media (max-width: 47.99rem) {
    body { padding-bottom: 68px; }

    .web-wa { right: .9rem; bottom: 78px; padding: .75rem; }
    .web-wa span { display: none; }

    /* Tres acciones clave siempre al alcance del pulgar. */
    .web-bottombar {
        position: fixed;
        inset: auto 0 0;
        z-index: 65;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: #fff;
        border-top: 1px solid var(--web-line);
        box-shadow: 0 -4px 20px rgba(23, 51, 79, .08);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .web-bottombar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .15rem;
        min-height: 60px;
        font-size: var(--fs-xs);
        font-weight: 700;
        color: var(--web-ink);
    }
    .web-bottombar a:hover { text-decoration: none; }
    .web-bottombar a[aria-current="page"] { color: var(--web-primary-dark); }
    .web-bottombar i { font-size: 1.2rem; }
}

@media (min-width: 100rem) {
    :root { --web-max: 1320px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .reveal-css .reveal { opacity: 1; transform: none; }
}

@media print {
    .web-header, .web-wa, .web-bottombar, .web-mobile-nav, .web-cta { display: none !important; }
}
