/* ==========================================================================
   VIÑAMETRICS by AGM GLOBAL — SISTEMA DE DISEÑO LANDING (versión 2)
   Identidad: Azul Viñametrics (#4e73df) + Azul Marino AGM (#2E4A7E)
   Tipografía: Josefin Sans (titulares) y Bitter (cuerpo de texto)
   Hero: texto a la izquierda sobre foto de fondo a sangre
   ========================================================================== */

:root {
    /* Azules Corporativos */
    --vm-blue: #4e73df;
    /* Azul de texto: indistinguible del anterior pero con contraste AA */
    --vm-blue-ink: #4b6fdb;
    --vm-blue-dark: #3752a6;
    --agm-navy: #2e4a7e;
    --agm-navy-dark: #1b2d4f;
    --agm-navy-deep: #13223b;

    /* Alto exacto de la cabecera fija (5.625rem + 1px de borde): los anclajes
       aterrizan justo debajo de ella, sin dejar franja de la sección anterior */
    --header-h: calc(5.625rem + 1px);

    /* Aire superior común de los heroes: migas y titular quedan a la misma altura */
    --hero-pad-top: clamp(4rem, 8vw, 6rem);

    /* Fondos y neutros */
    --bg-page: #f9fbfd;
    --bg-card: #ffffff;
    --bg-soft-blue: #edf3fc;
    --border-color: #dbe4ef;
    --border-light: #edf2f7;

    /* Textos */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-white: #ffffff;

    /* Tipografías oficiales */
    --font-heading:
        'Josefin Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-copy: 'Bitter', Georgia, serif;

    /* Medidas y radios */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-soft: 0 4px 20px rgba(46, 74, 126, 0.08);
    --shadow-card: 0 10px 30px rgba(46, 74, 126, 0.1);
    --transition: all 0.25s ease;
}

/* RESET Y BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-copy);
    font-size: 1.125rem;
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    /* clip y no hidden: recorta el desborde lateral sin romper el sticky */
    overflow-x: clip;
}

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

.wrap {
    width: 100%;
    padding-inline: 5vw;
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -999px;
    left: 1rem;
    background: var(--agm-navy);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
}
.skip-link:focus {
    top: 1rem;
}

/* TIPOGRAFÍA GLOBAL */
h1,
h2,
h3,
h4,
.brand,
.nav-link {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4 {
    color: var(--agm-navy);
    line-height: 1.25;
    margin-top: 0;
}

p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

:focus-visible {
    outline: 3px solid var(--vm-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection {
    background: var(--vm-blue);
    color: #fff;
}

/* ==========================================================================
   TOP BAR (ESTRICTAMENTE ALINEADA A LA DERECHA)
   ========================================================================== */
.top-bar {
    background-color: var(--agm-navy-deep);
    color: #cbd5e1;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    padding: calc(0.41rem + 1px) 0 calc(0.41rem - 1px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
    display: flex;
    justify-content: flex-end; /* A la derecha */
    align-items: center;
}

.top-bar-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.top-contact-item {
    color: #e2e8f0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.top-contact-item:hover {
    color: #93c5fd;
}

.top-address {
    color: #94a3b8;
}

.top-bar-sep {
    color: rgba(255, 255, 255, 0.2);
}

.social-link {
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.social-link:hover {
    color: #93c5fd;
}

/* Iconos a la medida del texto: escalan y centran solos */
.top-contact-item .icon,
.top-bar .social-link svg {
    width: 1em;
    height: 1em;
    /* Compensación óptica: la caja de línea pesa abajo y el texto se ve alto */
    transform: translateY(-0.06em);
}

/* Los tres textos un poco hacia arriba; los iconos no se tocan */
.top-bar .top-contact-item span {
    display: inline-block;
    transform: translateY(-0.5px);
}

@media (max-width: 767px) {
    .top-bar {
        display: none;
    }
}

/* ==========================================================================
   CABECERA PRINCIPAL (NAVBAR)
   ========================================================================== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 5.625rem;
}

/* Logotipo / Marca a la izquierda */
.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-logo-slot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand-lockup {
    height: clamp(2.75rem, 6vw, 3.75rem);
    width: auto;
    display: block;
}

/* Navegación a la derecha */
.site-nav {
    display: none;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.2rem);
}

@media (min-width: 1200px) {
    .site-nav {
        display: flex;
    }
}

.nav-link {
    color: var(--agm-navy);
    text-decoration: none;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 600;
    padding: 0.5rem 0.25rem;
    position: relative;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--vm-blue-ink);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--vm-blue);
    border-radius: 2px;
}

/* Menú Toggle Móvil */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--agm-navy);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

@media (min-width: 1200px) {
    .nav-toggle {
        display: none;
    }
}

.site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 1.5rem;
    border-bottom: 3px solid var(--agm-navy);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    gap: 1rem;
    align-items: flex-start;
}

/* ==========================================================================
   1. HERO (v2): fondo oscuro, texto a la izquierda y logo a la derecha
   ========================================================================== */
.hero-split {
    position: relative;
    background:
        linear-gradient(
            135deg,
            rgba(17, 29, 51, 0.94) 0%,
            rgba(30, 53, 91, 0.82) 45%,
            rgba(78, 115, 223, 0.7) 100%
        ),
        url('../img/fondo-hero-1920.webp') center / cover no-repeat,
        #111d33;
    color: #fff;
    overflow: hidden;
}

.hero-split-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    min-height: 100svh;
    min-height: 100dvh;
    /* +2.9rem compensa las migas ausentes: el titular iguala a los interiores */
    padding-top: calc(var(--hero-pad-top) + 2.9rem);
    padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.hero-split-text {
    max-width: max(40rem, 50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
}

.hero-split-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.25rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-dark .accent {
    color: #93c5fd;
}

.hero-split-lede {
    font-size: 1.3rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-scroll-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #93c5fd;
    text-decoration: none;
    transition: var(--transition);
}

.hero-scroll-link:hover {
    color: #fff;
}

.hero-scroll-link svg {
    animation: scrollHint 2.2s ease-in-out infinite;
}

/* Logo: en flujo dentro del texto (sobre el enlace en móvil),
   absoluto a la derecha en escritorio */
.hero-split-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-split-inner {
        padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
        /* El logo vive dentro del texto (orden móvil): sin esto su bloque
           de referencia en escritorio sería el wrap y se desplazaría */
        position: static;
    }

    .hero-split-media {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 50%;
    }

    /* El texto no pisa el bloque absoluto del logo: el 46% del wrap
       termina sobre el 46% del viewport y el logo empieza en el 50%;
       40rem lo topa en ultra-panorámicas */
    .hero-split-text {
        max-width: min(40rem, 46%);
    }
}

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

/* Sin media lateral: texto arriba como el resto de heroes */
@media (max-height: 760px) {
    .hero-split-inner {
        padding-top: calc(2rem + 2.9rem);
        padding-bottom: 2rem;
    }

    .hero-split-title {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }

    .hero-split-lede {
        font-size: 1.15rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 991px) {
    .hero-split-inner {
        min-height: calc(100svh - 5.625rem);
        min-height: calc(100dvh - 5.625rem);
        justify-content: center;
    }

    .hero-split-text > .hero-split-media {
        align-self: center;
    }

    .hero-logo-side {
        width: clamp(220px, 62vw, 340px);
    }
}

.hero-logo-side {
    width: clamp(400px, 46vw, 660px);
    height: auto;
    /* En pantallas bajitas el ancho manda y el alto desborda el hero:
       se ciñe al contenedor manteniendo proporción */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ANIMACIONES DE ENTRADA AL CARGAR LA PÁGINA */
.animate-logo-in {
    animation:
        heroLogoIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both,
        heroFloat 6s ease-in-out 1.2s infinite;
}

.animate-fade-1 {
    animation: heroFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.animate-fade-2 {
    animation: heroFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.animate-fade-3 {
    animation: heroFadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes heroLogoIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Deriva lenta del degradado de los heroes */
.hero-split,
.page-hero,
.page-hero-compact {
    background-size: cover;
    animation: heroDrift 26s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    0% {
        background-position: 0% 40%;
    }
    100% {
        background-position: 100% 60%;
    }
}

/* ==========================================================================
   2. FILAS ALTERNADAS CON LAS 2 FOTOS (DISEÑO EDITORIAL)
   ========================================================================== */
.section {
    padding: 6rem 0;
    scroll-margin-top: var(--header-h);
}

/* Aparición por scroll (la activa main.js con IntersectionObserver).
   El estado inicial vive bajo .js para no esconder nada si el JS falla. */
.reveal-on-scroll {
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll,
    .lines-alternate .line-item.reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-logo-in,
    .animate-fade-1,
    .animate-fade-2,
    .animate-fade-3 {
        animation: none;
    }

    .hero-scroll-link svg {
        animation: none;
    }

    .mision-media img {
        animation: none;
    }

    .hero-split,
    .page-hero,
    .page-hero-compact {
        animation: none;
    }
}

/* Bandas alternas: Problemas y Qué hacemos van en blanco */
.problems-section,
.lines-section {
    background-color: #fff;
}

.section-intro {
    max-width: 880px;
    margin: 0 0 4rem;
}

.section-intro.reveal-on-scroll {
    transition-delay: 0.1s;
}

/* Vuelo programado: las apariciones no animan a medio camino */
body.is-scrolling .reveal-on-scroll {
    transition: none;
}

/* Resaltado de palabra clave dentro del titular, estilo Weitec con nuestros colores */
.accent {
    color: var(--vm-blue);
}

.section-title {
    font-size: clamp(2.25rem, 3.5vw, 3.5rem);
    font-weight: 800;
    color: var(--agm-navy);
    margin-bottom: 1.25rem;
}

/* Aviso en el titular de problemas: triángulo ámbar, texto en marino */
.section-title .title-icon {
    width: 0.85em;
    height: 0.85em;
    vertical-align: -0.06em;
    margin-right: 0.15em;
    color: #b45309;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Rejilla de P1 (problemas): una columna en móvil, tres en escritorio */
.problem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 1rem;
}

.problem-grid .feature-block {
    margin-bottom: 0;
}

.problem-grid .feature-title {
    color: #7f1d1d;
}

@media (min-width: 992px) {
    .problem-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Problemas: numeración editorial y entrada escalonada */
.problem-grid {
    counter-reset: problema;
}

.problem-grid .feature-block::before {
    counter-increment: problema;
    content: '0' counter(problema);
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(180, 83, 9, 0.28);
    margin-bottom: 1rem;
}

/* Ecosistema: misma parrilla que problemas pero en azul corporativo */
.ecosistema-section .section-intro {
    max-width: none;
}

.ecosistema-section .problem-grid .feature-title {
    color: var(--agm-navy);
}

.ecosistema-section .problem-grid .feature-block::before {
    color: rgba(78, 115, 223, 0.3);
}

/* Tecnología IoT: cada fila entra desde su lado + número de fase */
.iot-editorial-section {
    counter-reset: fase;
}

.iot-editorial-section .split-row {
    counter-increment: fase;
}

.iot-editorial-section .split-text::before {
    content: '0' counter(fase);
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(78, 115, 223, 0.3);
    margin-bottom: 1.5rem;
    transform: scale(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.iot-editorial-section .split-row.revealed .split-text::before {
    transform: scale(1);
}

.split-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5.5rem;
}

.split-row:last-child {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .split-row {
        grid-template-columns: 1.15fr 1fr;
    }

    .split-row-reverse {
        grid-template-columns: 1fr 1.15fr;
    }

    .iot-editorial-section .split-row-reverse .split-text::before {
        text-align: right;
        transform-origin: right center;
    }
}

/* En móvil la fila va en una columna: número y texto siempre a la izquierda,
   y el texto de la fila invertida delante de su imagen */
@media (max-width: 991px) {
    .iot-editorial-section .split-row-reverse .split-text {
        order: -1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .js .iot-editorial-section .split-row.reveal-on-scroll {
        transform: translateX(-56px);
    }

    .js .iot-editorial-section .split-row-reverse.reveal-on-scroll {
        transform: translateX(56px);
    }

    .js .iot-editorial-section .split-row.reveal-on-scroll.revealed {
        transform: none;
    }
}

/* P3 (líneas): bandas intercaladas que salen del borde, una azul cada una */
.lines-section {
    overflow: hidden;
}

.lines-alternate {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.line-item {
    width: 100%;
    max-width: 100%;
    padding: 2rem 1.5rem;
    color: #eef2fb;
    border-radius: var(--radius-lg);
    border-left: 6px solid rgba(255, 255, 255, 0.35);
    background-color: var(--vm-blue);
    transition-duration: 0.85s;
    overflow-wrap: break-word;
}

.line-item:nth-child(odd) {
    /* Un punto más oscuro que --vm-blue para contraste AA con texto blanco */
    background-color: #4b6fdb;
}

.line-item:nth-child(even) {
    background-color: var(--vm-blue-dark);
}

.line-item:nth-child(3n) {
    background-color: var(--agm-navy);
}

@media (min-width: 992px) {
    .line-item {
        width: fit-content;
        max-width: min(84rem, 100%);
        padding: 2.5rem 4rem;
        border-left: none;
        border-radius: 0;
    }

    .line-item:nth-child(odd) {
        margin-left: calc(-1 * 5vw);
        margin-right: auto;
        padding-left: 5vw;
        border-radius: 0 999px 999px 0;
    }

    .line-item:nth-child(even) {
        margin-right: calc(-1 * 5vw);
        margin-left: auto;
        padding-right: calc(5vw + 1rem);
        border-radius: 999px 0 0 999px;
    }
}

.line-item .feature-title {
    color: #fff;
}

.line-item .feature-desc {
    color: #dbe4ef;
}

.line-item:nth-child(odd) .feature-desc {
    color: #fff;
}

.line-item .text-link {
    color: #fff;
}

.line-item .text-link:hover {
    color: #bfdbfe;
}

.line-item p:last-of-type {
    margin-bottom: 0.75rem;
}

/* Entrada desde el borde: cada banda desliza desde su lado al aparecer */
.js .lines-alternate .line-item.reveal-on-scroll {
    transform: translateX(-96px);
}

.js .lines-alternate .line-item:nth-child(even).reveal-on-scroll {
    transform: translateX(96px);
}

.lines-alternate .line-item.reveal-on-scroll.revealed {
    transform: none;
}

/* En móvil el deslizamiento lateral recorta el texto a mitad de animación */
@media (max-width: 991px) {
    .js .lines-alternate .line-item.reveal-on-scroll {
        transform: translateX(-24px);
    }

    .js .lines-alternate .line-item:nth-child(even).reveal-on-scroll {
        transform: translateX(24px);
    }
}

/* Enlace de texto sobrio para las líneas de la empresa */
.text-link {
    color: var(--agm-navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.text-link:hover {
    color: var(--vm-blue-ink);
}

.feature-block {
    margin-bottom: 2.5rem;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--agm-navy);
    margin-bottom: 0.85rem;
}

.feature-desc {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

.feature-desc.text-muted {
    color: var(--text-muted);
    font-size: 1rem;
}

.feature-quote-block {
    margin-top: 2rem;
    padding: 1.6rem 2rem;
    background-color: var(--bg-soft-blue);
    border-left: 4px solid var(--agm-navy);
    border-radius: var(--radius-sm);
}

.feature-quote-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--agm-navy);
    margin: 0;
    line-height: 1.6;
}

/* Contenedores para las fotos */
.media-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

/* Slot de imagen: tarjeta neutra con hueco reservado para la foto definitiva */
.media-slot {
    margin: 0;
    min-height: 360px;
    display: flex;
    align-items: stretch;
}

.media-slot-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin: 1.25rem;
}

.media-slot-icon {
    opacity: 0.6;
}

.media-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Con foto real no se reserva el alto del placeholder */
.media-slot:has(> img) {
    min-height: 0;
    display: block;
}

/* AGM Global: el texto ocupa todo el ancho disponible */
#agm-global .prose {
    max-width: none;
}

/* Dúo de logotipos: dos imágenes lado a lado, sin tarjeta ni animación */
.logo-duo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 4rem 0 2.5rem;
    flex-wrap: wrap;
}

.logo-duo img {
    max-height: 170px;
    width: auto;
    max-width: 360px;
    object-fit: contain;
}

/* Tira de patrocinadores: desfile continuo, pausa al pasar el ratón */
.patrocinadores {
    overflow: hidden;
    margin-top: 2.5rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.patrocinadores-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: patrocinadoresScroll 30s linear infinite;
}

.patrocinadores-track img {
    max-height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin-right: 4rem;
    filter: grayscale(1);
    opacity: 0.75;
}

.patrocinadores:hover .patrocinadores-track {
    animation-play-state: paused;
}

.patrocinadores-track img:hover {
    filter: none;
    opacity: 1;
}

@keyframes patrocinadoresScroll {
    to {
        transform: translateX(-50%);
    }
}

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

/* ==========================================================================
   3. TRAZABILIDAD LIMPIA (SIN FOTOS EN INICIO)
   ========================================================================== */
.traceability-clean-section {
    background-color: #f9fbfd;
    padding: 6rem 0 7rem;
}

.traceability-lead {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 2.5rem;
    line-height: 1.65;
}

.traceability-clean-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: min(3.5rem, 8vw) min(4rem, 8vw);
    box-shadow: var(--shadow-soft);
    text-align: left;
}

.traceability-statement {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

.traceability-statement strong {
    display: block;
    margin-top: 0.5rem;
}

.traceability-impact {
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.traceability-impact strong {
    color: var(--text-primary);
}

.traceability-closing {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--agm-navy);
    border-top: 1px solid var(--border-light);
    padding-top: 1.75rem;
    margin: 0;
}

/* ==========================================================================
   6. PREGUNTAS FRECUENTES (details/summary nativos, sin JS)
   ========================================================================== */
.faq-section {
    background-color: #fff;
}

.faq-list {
    max-width: 60rem;
}

.faq-item {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

.faq-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--agm-navy);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--vm-blue);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
    .faq-item p {
        transition: grid-template-rows 0.35s ease;
    }

    .faq-item[open] p {
        animation: faqIn 0.3s ease both;
    }
}

@keyframes faqIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.faq-item summary:hover {
    color: var(--vm-blue);
}

.faq-item p {
    display: grid;
    grid-template-rows: 0fr;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0.75rem 0 0;
    max-width: 52rem;
}

.faq-item p > span {
    overflow: hidden;
    min-height: 0;
}

.faq-item[open] p {
    grid-template-rows: 1fr;
}

/* Separación entre la lista y el enlace a más preguntas */
.faq-more {
    margin-top: 2.5rem;
}

/* ==========================================================================
   FOOTER CORPORATIVO
   ========================================================================== */
.site-footer {
    background-color: var(--agm-navy-deep);
    color: #94a3b8;
    padding-top: 4.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 4rem;
}

@media (min-width: 600px) {
    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.footer-brand-by {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    margin-bottom: 1.25rem;
}

.footer-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 340px;
}

.footer-location {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 1rem;
}

.footer-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.15s;
}

.footer-links a[href^='mailto:'] {
    overflow-wrap: anywhere;
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-bottom {
    background-color: #0b1526;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-inner {
        flex-direction: row;
        text-align: left;
    }
}

.footer-bottom p {
    margin: 0;
}

.footer-credits {
    color: #94a3b8;
}

/* ==========================================================================
   PÁGINAS DE TEXTO (Quiénes somos y siguientes): hero compacto, prosa y
   sub-navegación fija a los apartados
   ========================================================================== */
.page-hero-compact {
    background:
        linear-gradient(
            135deg,
            rgba(17, 29, 51, 0.94) 0%,
            rgba(30, 53, 91, 0.82) 45%,
            rgba(78, 115, 223, 0.7) 100%
        ),
        url('../img/fondo-hero-1920.webp') center / cover no-repeat,
        #111d33;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: var(--hero-pad-top);
    padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

@media (max-height: 760px) {
    .page-hero-compact {
        padding-top: 2rem;
    }
}

.page-hero-compact .page-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-align: center;
}

.page-hero-compact .page-hero-body {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.page-hero-compact .page-hero-body p {
    font-size: 1.3rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.page-hero-compact .page-hero-body p:last-child {
    margin-bottom: 0;
}

.sub-nav {
    position: sticky;
    /* 12px bajo la cabecera a propósito: queda visualmente pegada a ella. */
    top: 5.625rem;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border-color);
}

.sub-nav-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    overflow-x: auto;
    /* Sin barra de scroll: ya se entiende que desliza */
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.sub-nav-inner::-webkit-scrollbar {
    display: none;
}

.sub-nav a {
    position: relative;
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    padding: 0.5rem 0.5rem;
}

.sub-nav a:hover,
.sub-nav a.active {
    color: var(--vm-blue-ink);
}

.sub-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--vm-blue);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s ease;
}

.sub-nav a.active::after {
    transform: scaleX(1);
}

.sub-nav[data-dir='down'] a.active::after {
    transform-origin: left center;
}

.sub-nav[data-dir='down'] a:not(.active)::after {
    transform-origin: right center;
}

.sub-nav[data-dir='up'] a.active::after {
    transform-origin: right center;
}

.sub-nav[data-dir='up'] a:not(.active)::after {
    transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
    .sub-nav a::after {
        transition: none;
    }
}

/* Páginas con sub-nav: la pila fija es más alta (cabecera + sub-nav) */
.sub-nav ~ .section {
    scroll-margin-top: 9.25rem;
}

/* Destino de salto programático: el estado activo ya orienta, sin contorno */
main .section[tabindex='-1']:focus {
    outline: none;
}

.prose {
    max-width: none;
}

.prose p {
    font-size: 1.15rem;
    color: var(--text-primary);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--text-primary);
}

.prose ul {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Migas de pan sobre heroes oscuros */
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e2e8f0;
}

.breadcrumbs li + li::before {
    content: '/';
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumbs a {
    color: #93c5fd;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #fff;
}

.breadcrumbs [aria-current] {
    color: #fff;
}

.section-alt {
    background-color: #fff;
}

.media-float {
    margin: 0 auto;
    max-width: 26rem;
}

/* Misión: imagen en medio, textos alternados a los lados */
.mision-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.mision-media {
    margin: 0;
}

.mision-media img {
    width: min(360px, 100%);
    height: auto;
    margin-inline: auto;
}

.mision-text-1,
.mision-text-2,
.mision-text-3 {
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
}

.mision-text-1 {
    background-color: var(--agm-navy);
}

.mision-text-1 p {
    color: #fff;
}

.mision-text-2 {
    background-color: #4b6fdb;
}

.mision-text-2 p {
    color: #fff;
}

.mision-text-3 {
    background-color: #d6e6fa;
}

.mision-text-3 p {
    color: var(--agm-navy);
}

.mision-text-1 .feature-title,
.mision-text-2 .feature-title {
    color: #fff;
}

.mision-text-1 strong,
.mision-text-2 strong {
    color: #fff;
    font-weight: 800;
}

/* Pilares numerados al estilo editorial del inicio */
#pilares .prose {
    counter-reset: pilar;
}

#pilares .feature-title::before {
    counter-increment: pilar;
    content: '0' counter(pilar);
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(78, 115, 223, 0.3);
    margin-bottom: 1rem;
}

/* Retos: intro a todo el ancho como la tabla */
#retos .prose {
    max-width: none;
    margin-bottom: 2.5rem;
}
/* Retos: marca en cada propuesta */
.data-table tbody td:last-child::before {
    content: '✓';
    margin-right: 0.5rem;
    color: var(--vm-blue-ink);
    font-weight: 700;
}

/* Sprite SVG oculto (defs): fuera del flujo sin estilos inline (CSP) */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Pilares flanqueados por columnas clásicas en escritorio */
.pilares-layout {
    display: grid;
    gap: 2.5rem;
}

.pilar-col {
    display: none;
}

@media (min-width: 992px) {
    .pilares-layout {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 4rem;
    }

    .pilar-col {
        display: block;
        width: clamp(72px, 8vw, 104px);
        height: auto;
    }

    .pilar-col-right {
        transform: scaleX(-1);
    }
}

/* Prueba en móvil: solo la columna izquierda junto al contenido */
@media (max-width: 991px) {
    .pilares-layout {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: stretch;
        column-gap: 1.25rem;
    }

    .pilares-layout .pilar-col {
        display: block;
        width: clamp(48px, 14vw, 64px);
        height: calc(100% + 2.5rem);
        margin-top: -1rem;
        margin-bottom: -1.5rem;
    }

    .pilares-layout .pilar-col-right {
        display: none;
    }
}

/* Pilares en 2×2 a partir de tablet */
.pilares-grid {
    display: grid;
    gap: 1.5rem;
    max-width: none;
}

@media (min-width: 768px) {
    .pilares-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 992px) {
    .js #mision .mision-text-1.reveal-on-scroll,
    .js #mision .mision-text-3.reveal-on-scroll,
    .js .pilares-grid .pilar.reveal-on-scroll:nth-child(odd) {
        transform: translateX(-56px);
    }

    .js #mision .mision-text-2.reveal-on-scroll,
    .js .pilares-grid .pilar.reveal-on-scroll:nth-child(even) {
        transform: translateX(56px);
    }

    #mision .reveal-on-scroll.revealed,
    .pilares-grid .reveal-on-scroll.revealed {
        transform: none;
    }
}

/* Flotación de la imagen, como el logo del inicio */
.mision-media img {
    animation: misionFloat 6s ease-in-out 1.2s infinite;
}

@keyframes misionFloat {
    0%,
    100% {
        transform: translateX(1.5rem) translateY(0);
    }
    50% {
        transform: translateX(1.5rem) translateY(-8px);
    }
}

/* En móvil la imagen queda fija y visible; solo las cards animan */
@media (max-width: 991px) {
    #mision .mision-media.reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    #mision .mision-media img {
        animation: none;
        /* Compensación óptica: el racimo pesa a la izquierda de la imagen */
        transform: translateX(0.75rem);
    }
}

/* Innovación como cierre centrado */
#innovacion {
    padding-bottom: 1.5rem;
}

#innovacion .section-title {
    text-align: center;
}

#innovacion .prose {
    margin-inline: auto;
    text-align: center;
}

#innovacion .prose p {
    font-size: 1.25rem;
}

#innovacion .feature-quote-block {
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .mision-grid {
        grid-template-columns: 1fr clamp(244px, 37svh, 373px) 1fr;
        grid-template-rows: minmax(0, 56fr) minmax(0, 10fr) minmax(0, 34fr);
        gap: 0 2rem;
        height: clamp(340px, 52svh, 520px);
    }

    .mision-media {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    .mision-media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: translateX(1.5rem);
    }

    .mision-text-1 {
        grid-column: 1;
        grid-row: 1;
    }

    .mision-text-2 {
        grid-column: 3;
        grid-row: 2;
        margin-left: -3rem;
    }

    .mision-text-3 {
        grid-column: 1;
        grid-row: 3;
    }

    /* En escritorio los rótulos los pone la imagen; el h3 queda para lector */
    .mision-grid .feature-title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (min-width: 992px) {
    .mision-pin {
        height: 250vh;
        height: 250svh;
    }

    .mision-stage {
        position: sticky;
        top: 9.25rem;
        height: calc(100vh - 9.25rem);
        height: calc(100svh - 9.25rem);
        display: flex;
        align-items: center;
    }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
    .mision-pin {
        height: auto;
    }

    .mision-stage {
        position: static;
        height: auto;
        display: block;
        padding-top: 0;
    }
}

/* Estrecho: la imagen cede ancho y mengua el hueco para que las cards no choquen */
@media (min-width: 992px) and (max-width: 1199px) {
    .mision-grid {
        grid-template-columns: 1fr clamp(180px, 30svh, 280px) 1fr;
        gap: 0 1rem;
    }

    .mision-text-1,
    .mision-text-3 {
        margin-right: -1rem;
    }

    .mision-text-2 {
        margin-left: -1rem;
    }
}

/* Portátil: las cards compactan para mantener la proporción con la imagen */
@media (min-width: 992px) and (max-width: 1400px) {
    .mision-text-1,
    .mision-text-2,
    .mision-text-3 {
        padding: 1.1rem 1.25rem;
    }

    .mision-text-1 p,
    .mision-text-2 p,
    .mision-text-3 p {
        font-size: 1.05rem;
    }
}

/* El rótulo lo pone la imagen; el h2 queda para lector */
#mision .section-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.table-scroll {
    overflow-x: auto;
    margin: 0 0 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.05rem;
    line-height: 1.6;
    background: #fff;
}

.data-table th,
.data-table td {
    text-align: left;
    vertical-align: top;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table thead th {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--agm-navy);
    background: var(--bg-soft-blue);
    border-bottom: 2px solid var(--agm-navy);
    white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td:first-child {
    font-weight: 700;
    color: var(--agm-navy);
    white-space: nowrap;
}

.data-table tbody td {
    color: var(--text-secondary);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
    background-color: var(--bg-soft-blue);
}

/* ==========================================================================
   CONTACTO: formulario + columna de datos (como la referencia, en azul)
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 992px) {
    .contact-layout {
        grid-template-columns: 1.2fr 1fr;
        gap: 2rem;
    }

    .contact-info {
        margin-top: 0.75rem;
    }
}

.contact-info {
    border-top: 1px solid var(--border-color);
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-info-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.contact-info-icon-accent {
    color: var(--vm-blue-ink);
}

.contact-info-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.contact-info-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    margin: 0;
}

.contact-info-value a {
    color: inherit;
    text-decoration: none;
}

.contact-info-value a:hover {
    color: var(--vm-blue-ink);
    text-decoration: underline;
}

.contact-map {
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

@media (max-width: 767px) {
    .contact-map iframe {
        height: 300px;
    }
}

/* Formulario de contacto */
.contact-form {
    max-width: 46rem;
}

.form-field {
    margin-bottom: 1.25rem;
}

/* Honeypot anti-spam: fuera de pantalla, nunca con display:none */
.form-field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: 0;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--agm-navy);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    font-family: var(--font-copy);
    font-size: 1.05rem;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--vm-blue);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.2);
}

.form-textarea {
    min-height: 9rem;
    resize: vertical;
}

.form-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.form-check-input {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
    accent-color: var(--vm-blue);
}

.form-check .form-check-label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0;
}

.form-required {
    color: #b91c1c;
    margin-left: 0.15rem;
}

.form-legend {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1rem;
    margin-bottom: 0;
}

.form-status {
    font-size: 1rem;
    margin-bottom: 1rem;
    min-height: 1.5em;
}

.form-status[data-type='success'] {
    color: var(--agm-navy);
    font-weight: 700;
}

.form-status[data-type='error'] {
    color: #b91c1c;
    font-weight: 700;
}

.form-input[aria-invalid='true'] {
    border-color: #b91c1c;
}

.form-input[aria-invalid='true']:focus {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}

.form-check-input[aria-invalid='true'] {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
}

.form-submit {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: var(--vm-blue);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.85rem 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit:hover:not(:disabled) {
    background: var(--vm-blue-dark);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Página de contacto especial: hero a sangre completa y escala mayor */
.contact-page .page-hero-title {
    font-size: clamp(3rem, 7vw, 5.25rem);
}

.contact-page .page-hero-compact .page-hero-body p {
    font-size: 1.25rem;
}

.contact-page .form-label {
    font-size: 1.1rem;
}

.contact-page .form-input {
    font-size: 1.15rem;
    padding: 0.9rem 1.1rem;
}

.contact-page .form-textarea {
    min-height: 11rem;
}

.contact-page .form-submit {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

.contact-page .contact-info-title {
    font-size: 1.05rem;
}

.contact-page .contact-info-value {
    font-size: 1.4rem;
}

/* Retos en móvil: tarjetas apiladas en vez de tabla con scroll horizontal */
@media (max-width: 767px) {
    .table-scroll {
        overflow: visible;
    }

    .data-table {
        background: transparent;
    }

    .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tbody tr {
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-soft);
        padding: 1.25rem 1.25rem 1.1rem;
        margin-bottom: 1rem;
    }

    .data-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .data-table th,
    .data-table td {
        border-bottom: none;
        padding: 0;
    }

    .data-table tbody th,
    .data-table tbody td:first-child {
        white-space: normal;
    }

    .data-table tbody th {
        font-size: 1.1rem;
        margin-bottom: 0.35rem;
    }

    .data-table tbody td {
        font-size: 1rem;
    }

    .data-table tbody tr:hover th,
    .data-table tbody tr:hover td {
        background: transparent;
    }

    .data-table tbody tr:hover {
        background: var(--bg-soft-blue);
    }
}
