/* ============================================
   EKAM 2026 - NAVASOFT ERP
   Corporate Website Stylesheet

   Indice (buscar el titulo para saltar al bloque):
   1-6    Variables, reset, base, tipografia, botones, header
   7      Hero (+ "Hero: escena ilustrada" mas abajo)
   8.1    Propuesta de valor (commercial summary)
   10-13  Modulos, capturas de NAVASOFT y video
   15-16  Clientes (carrusel) y relacion EKAM -> NAVASOFT
   17-20  Formulario, pagina legal, footer, WhatsApp
   21-22  Animaciones, responsive base y asistente virtual
   Capas de ajuste posteriores: "Mobile overflow guard", "Design polish pass",
   "Manager mockup alignment", "Final responsive polish", "Premium pass"
   LANDING (propuesta del ingeniero): pantallas nuevas del inicio
   Bloques fusionados (pagina de inicio en 12 secciones)
   Paginas de contenido (sectores/, soluciones/, recursos/)

   Este archivo lo cargan TODAS las paginas: aqui va solo lo compartido.
   Las reglas de secciones que existen unicamente en la portada estan en css/home.css,
   que index.html carga despues de este archivo.

   Reglas de mantenimiento:
   - Un cambio nuevo se agrega en el bloque de su componente, no al final.
   - Si una clase solo se usa en index.html, su regla va en css/home.css.
   - Antes de subir cambios de CSS, comparar capturas (ver DEPLOY-SERVIDOR.md).
   ============================================ */

/* 1. VARIABLES */
:root {
    --color-primary-dark: #071A2B;
    --color-primary: #1677B8;
    --color-primary-hover: #0f5f94;
    --color-primary-light: #20A4F3;
    --color-primary-subtle: #e8f4fd;
    --color-accent: #F59E0B;
    --color-accent-dark: #D67A00;

    --color-background: #F6F9FC;
    --color-surface: #FFFFFF;

    --color-text: #152536;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;

    --color-border: #E5EAF0;
    --color-border-light: #F0F3F7;

    --color-success: #10B981;
    --color-error: #EF4444;
    --color-warning: #F59E0B;

    --font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Montserrat', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --text-xs: clamp(0.75rem, 0.7rem + 0.15vw, 0.8125rem);
    --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
    --text-base: clamp(0.9375rem, 0.9rem + 0.15vw, 1.0625rem);
    --text-lg: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
    --text-xl: clamp(1.1875rem, 1.1rem + 0.3vw, 1.3125rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem);
    --text-3xl: clamp(1.75rem, 1.5rem + 0.8vw, 2.125rem);
    --text-4xl: clamp(2rem, 1.6rem + 1.2vw, 2.75rem);
    --text-5xl: clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem);
    --text-6xl: clamp(2.75rem, 2rem + 2.2vw, 4rem);

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    --space-5xl: 7rem;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;

    --shadow-sm: 0 1px 2px rgba(7, 26, 43, 0.04);
    --shadow-md: 0 4px 12px rgba(7, 26, 43, 0.06);
    --shadow-lg: 0 8px 24px rgba(7, 26, 43, 0.08);
    --shadow-xl: 0 12px 40px rgba(7, 26, 43, 0.1);

    --header-height: 92px;
    --container-max: 1200px;
    --transition-fast: 200ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* 2. RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 1.25rem);
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

html,
body {
    max-width: 100%;
}

main {
    max-width: 100%;
    overflow-x: clip;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

input, select, textarea {
    font: inherit;
    border: none;
    outline: none;
    background: none;
}

/* 3. BASE */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(1rem, 0.5rem + 2vw, 2rem);
}

.section {
    padding: clamp(2.25rem, 1.5rem + 2.5vw, 4.5rem) 0;
}

.section--alt {
    background-color: var(--color-background);
}

/* 4. TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(1rem, 0.75rem + 0.75vw, 2rem);
}

.section__label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.section__label--light {
    color: var(--color-primary-light);
}

.section__title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
}

.section__title--light {
    color: #fff;
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* Enlace para saltar al contenido: visible solo al recibir foco con el teclado. */
.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-primary-dark);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

#contenido:focus {
    outline: none;
}

/* Pagina de error 404 */
.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.error-page__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.error-page__links a {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.error-page__links a:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-subtle);
}

/* 5. BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-accent), #ff8a00);
    /* Texto oscuro: el blanco sobre este naranja no llega al contraste AA (2,2:1). */
    color: var(--color-primary-dark);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.22);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #ffac24, var(--color-accent-dark));
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
}

.btn--outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
}

.btn--outline:hover {
    background-color: var(--color-primary);
    color: #fff;
}

.btn--lg {
    padding: 0.8125rem 2rem;
    font-size: var(--text-base);
    border-radius: var(--radius-xl);
}

/* 6. HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    /* Blanco sólido: el logo tiene fondo blanco y no debe notarse sobre secciones oscuras. */
    background: #fff;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

.header--scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header__logo--brand {
    width: clamp(360px, 26vw, 465px);
    height: 90px;
    overflow: visible;
}

.header__brand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    image-rendering: auto;
}

.header__nav {
    display: flex;
}

.header__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header__link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.header__link:hover,
.header__link--active {
    color: var(--color-primary);
}

.header__link--active {
    font-weight: 600;
}

.header__cta {
    flex-shrink: 0;
    font-size: var(--text-xs);
    padding: 0.5rem 1.25rem;
}

.header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.header__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.header__toggle--active .header__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__toggle--active .header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.header__toggle--active .header__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 26, 43, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.mobile-overlay--active {
    display: block;
    opacity: 1;
}

/* 7. HERO */
.hero {
    position: relative;
    padding: calc(var(--header-height) + clamp(1rem, 0.75rem + 1vw, 1.65rem)) 0 clamp(1.7rem, 1.2rem + 1.6vw, 2.65rem);
    overflow: hidden;
    background:
        linear-gradient(132deg, rgba(255,255,255,0) 0 51%, rgba(193, 230, 255, 0.42) 51% 100%),
        radial-gradient(circle at 77% 16%, rgba(32, 164, 243, 0.24), transparent 29rem),
        linear-gradient(135deg, #ffffff 0%, #f5fbff 52%, #dcefff 100%);
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(480px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 1rem + 2.5vw, 3.35rem);
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.125rem;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-primary);
    background: transparent;
    border: 0;
    border-radius: 999px;
    margin-bottom: var(--space-md);
    letter-spacing: 0.12em;
    padding-left: 0;
    text-transform: uppercase;
}

.hero__title {
    font-size: clamp(3rem, 2.1rem + 2.65vw, 4.65rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 0.98;
    color: var(--color-primary-dark);
    max-width: 720px;
}

.hero__subtitle {
    font-size: var(--text-lg);
    color: #224466;
    line-height: 1.62;
    margin-bottom: 0.85rem;
    max-width: 625px;
}

.hero__subtitle--lead {
    max-width: 620px;
    color: #18375a;
    font-size: clamp(1.12rem, 0.95rem + 0.48vw, 1.38rem);
    line-height: 1.45;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: nowrap;
    margin-bottom: 1.15rem;
}

.hero__proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: 100%;
    margin-top: clamp(1rem, 0.7vw, 1.35rem);
    border: 1px solid rgba(8, 119, 201, 0.10);
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 20px 48px rgba(8, 119, 201, 0.12);
    overflow: hidden;
}

.hero__proof span {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 92px;
    padding: 0.95rem 1.05rem;
    border-right: 1px solid rgba(8, 119, 201, 0.12);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    line-height: 1.35;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    transform: none;
}

.hero__visual::before {
    content: '';
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8, 119, 201, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero__bg-shape {
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(8, 119, 201, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* 8.1 COMMERCIAL SUMMARY */
.commercial-summary {
    padding: clamp(3rem, 2rem + 4vw, 6rem) 0;
    background:
        linear-gradient(132deg, rgba(255,255,255,0) 0 58%, rgba(193, 230, 255, 0.28) 58% 100%),
        linear-gradient(180deg, var(--color-surface) 0%, #edf7ff 100%);
}

.ai-section {
    background:
        radial-gradient(circle at 72% 18%, rgba(245, 158, 11, 0.22), transparent 24rem),
        linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-deep) 100%);
    color: #fff;
    overflow: hidden;
}

.ai-section__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: center;
}

.section__subtitle--light {
    color: rgba(255, 255, 255, 0.74);
}

.ai-flow {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.18);
}

.ai-flow span,
.ai-flow strong {
    width: min(100%, 260px);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 800;
}

.ai-flow > span {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
}

.ai-flow > strong {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
}

.ai-flow i {
    display: block;
    width: 2px;
    height: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), var(--color-accent));
}

.ai-flow div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
}

/* 12. SHOWCASE */
.showcase {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.showcase__tabs {
    display: flex;
    padding: var(--space-sm);
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border-light);
    gap: var(--space-xs);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.showcase__tab {
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.showcase__tab:hover {
    color: var(--color-text);
    background: rgba(255,255,255,0.6);
}

.showcase__tab--active {
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.showcase__viewport {
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase__panel {
    width: 100%;
    display: none;
}

.showcase__panel--active {
    display: block;
}

/* Marco de ventana: presenta la captura como una aplicacion de escritorio. */
.showcase__image-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 1.75rem 0 0;
    overflow: hidden;
    border: 1px solid #0c2238;
    border-radius: var(--radius-xl);
    background: #0c2238;
    box-shadow: var(--shadow-xl);
    cursor: zoom-in;
}

.showcase__image-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.75rem;
    background:
        radial-gradient(circle at 1rem 50%, #ff5f57 0 0.28rem, transparent 0.31rem),
        radial-gradient(circle at 2rem 50%, #febc2e 0 0.28rem, transparent 0.31rem),
        radial-gradient(circle at 3rem 50%, #28c840 0 0.28rem, transparent 0.31rem),
        linear-gradient(180deg, #12314d, #0c2238);
}

.showcase__zoom {
    position: absolute;
    right: var(--space-md);
    bottom: var(--space-md);
    padding: 0.45rem 0.75rem;
    color: #fff;
    background: rgba(8, 35, 58, 0.82);
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.image-viewer {
    width: min(1100px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.image-viewer::backdrop {
    background: rgba(5, 20, 35, 0.78);
    backdrop-filter: blur(4px);
}

.image-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.video-demo__player {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.video-demo__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.video-demo__play span {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid var(--color-primary);
}

.video-demo__play--hidden {
    opacity: 0;
    pointer-events: none;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(245px, 18vw, 282px);
    height: clamp(136px, 10vw, 154px);
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid rgba(8, 119, 201, 0.12);
    border-radius: var(--radius-lg);
    padding: clamp(1.125rem, 0.5rem + 1vw, 1.5rem);
    box-shadow: 0 14px 34px rgba(7, 26, 43, 0.055);
    transition: transform 280ms ease, box-shadow var(--transition-base), border-color var(--transition-fast);
}

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

.empresa-block__brand-logo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 86px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(8, 119, 201, 0.10);
    border-radius: var(--radius-lg);
    padding: 0.45rem 0.65rem;
}

/* 17. CONTACT FORM */
.contact-form {
    max-width: 720px;
    margin: 0 auto;
    background: var(--color-surface);
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
    color: var(--color-text);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(8, 119, 201, 0.1);
    background: var(--color-surface);
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
    color: var(--color-text-muted);
}

.contact-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.contact-form__textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form__input--error,
.contact-form__select.contact-form__input--error {
    border-color: var(--color-error);
}

.contact-form__error {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: 4px;
    min-height: 1em;
}

/* 18. LEGAL PAGE */
.legal-page {
    padding-top: calc(var(--header-height) + clamp(1rem, 0.9rem + 0.8vw, 1.5rem));
    background:
        linear-gradient(132deg, rgba(255,255,255,0) 0 58%, rgba(193, 230, 255, 0.28) 58% 100%),
        linear-gradient(180deg, #fff 0%, #edf7ff 100%);
}

.legal-page__inner {
    max-width: 820px;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    border: 1px solid rgba(8, 119, 201, 0.12);
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 38px rgba(8, 119, 201, 0.09);
}

.legal-page h1 {
    margin-bottom: var(--space-lg);
    color: var(--color-primary-dark);
    font-size: clamp(2rem, 1.5rem + 1.2vw, 3rem);
    letter-spacing: -0.02em;
}

.legal-page h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-primary-dark);
    font-size: var(--text-xl);
}

.legal-page p {
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.legal-page p + p {
    margin-top: var(--space-sm);
}

/* 19. FOOTER */
.footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.7);
    padding: clamp(2rem, 2rem + 3vw, 4.5rem) 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr) 1.2fr;
    gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    padding-bottom: clamp(1.5rem, 1rem + 1vw, 2.5rem);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: var(--space-md);
}

.footer__logo-icon-wrap {
    display: block;
    flex: 0 0 86px;
    width: 86px;
    height: 42px;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}

.footer__logo-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.footer__logo-text {
    font-size: var(--text-base);
    font-weight: 800;
    color: #fff;
}

.footer__desc {
    font-size: var(--text-sm);
    line-height: 1.7;
    max-width: 280px;
}

.footer__heading {
    font-size: var(--text-sm);
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer__list a {
    font-size: var(--text-sm);
    color: rgba(255,255,255,0.6);
    transition: color var(--transition-fast);
}

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

.footer__bottom {
    padding: var(--space-md) 0;
    text-align: center;
}

.footer__bottom p {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.4);
}

/* 20. WHATSAPP */
.whatsapp-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    transition: all var(--transition-base);
}

.whatsapp-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}

/* 21. ANIMATIONS */

/* Entrada sutil: recorrido corto y rapido para que el contenido no deje huecos al hacer scroll. */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.animate-on-scroll--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-stagger > .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.animate-stagger > .animate-on-scroll:nth-child(2) { transition-delay: 40ms; }
.animate-stagger > .animate-on-scroll:nth-child(3) { transition-delay: 80ms; }
.animate-stagger > .animate-on-scroll:nth-child(4) { transition-delay: 120ms; }
.animate-stagger > .animate-on-scroll:nth-child(5) { transition-delay: 160ms; }
.animate-stagger > .animate-on-scroll:nth-child(6) { transition-delay: 200ms; }

/* Focus */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

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

/* <= 1100px: menu hamburguesa (siete enlaces + boton no caben en una linea en laptops pequenas).
   Si cambia este valor, revisar .header__menu-cta y el JS (main.js, sectores.js). */
@media (max-width: 68.75em) {
    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--color-surface);
        z-index: 1001;
        padding: calc(var(--header-height) + 1rem) 1.5rem 2rem;
        box-shadow: -4px 0 24px rgba(0,0,0,0.1);
        visibility: hidden;
        transition: right var(--transition-base), visibility 0s linear 0.3s;
        overflow-y: auto;
    }

    /* Cerrado queda fuera del orden de tabulación; abierto vuelve a ser visible al instante */
    .header__nav--open {
        right: 0;
        visibility: visible;
        transition-delay: 0s;
    }

    .header__menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .header__link {
        padding: 0.75rem 1rem;
        font-size: var(--text-base);
    }

    .header__cta {
        display: none;
    }

    .header__toggle {
        display: flex;
    }
}

/* <= 1024px */
@media (max-width: 64em) {

    .modules__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* <= 768px */
@media (max-width: 48em) {
    .hero {
        padding-bottom: clamp(1.5rem, 1rem + 1vw, 2.5rem);
    }

    .hero__inner,
    .hero__content,
    .hero__visual {
        min-width: 0;
        max-width: 100%;
    }

    .modules__grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer__heading {
        margin-bottom: var(--space-md);
    }
}

/* <= 480px */
@media (max-width: 30em) {
    .header__logo {
        gap: 0.5rem;
    }

    .whatsapp-btn {
        bottom: 0.75rem;
        right: 1rem;
        width: 46px;
        height: 46px;
    }

    .showcase__tab {
        padding: 0.5rem 0.875rem;
        font-size: var(--text-xs);
    }
}

/* Print */
@media print {
    .header,
    .whatsapp-btn,
    .mobile-overlay {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .chatbot,
    .chatbot__launcher,
    .chatbot__launcher-label,
    .chatbot__panel {
        display: none !important;
    }
}

/* 22. EKAM ASISTENTE VIRTUAL */
.chatbot__launcher {
    position: fixed;
    right: 1.55rem;
    bottom: calc(1.5rem + 66px);
    z-index: 910;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 14px rgba(7, 26, 43, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.72;
    animation: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.chatbot__launcher-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 16%;
    display: block;
}

.chatbot__launcher:hover,
.chatbot__launcher:focus-visible {
    transform: scale(1.06);
    opacity: 1;
}

.chatbot--open .chatbot__launcher {
    animation: none;
    box-shadow: 0 4px 16px rgba(7, 26, 43, 0.2);
}

.chatbot__launcher-label {
    position: fixed;
    right: calc(1.5rem + 72px);
    bottom: calc(1.5rem + 96px);
    z-index: 905;
    margin: 0;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    box-shadow: var(--shadow-md);
    display: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
    white-space: nowrap;
}

.chatbot__launcher-label--hidden,
.chatbot--open .chatbot__launcher-label {
    opacity: 0;
}

.chatbot__panel {
    position: fixed;
    right: 1.5rem;
    bottom: calc(1.5rem + 166px);
    z-index: 1050;
    width: 370px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 1.5rem - 166px);
    height: min(600px, calc(100vh - 1.5rem - 166px));
    min-height: min(420px, calc(100vh - 1.5rem - 166px));
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.chatbot--open .chatbot__panel {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.chatbot__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-primary-dark);
    color: #ffffff;
}

.chatbot__header-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.chatbot__header-info {
    flex: 1;
    min-width: 0;
}

.chatbot__header-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.chatbot__header-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.85);
}

.chatbot__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    display: inline-block;
}

.chatbot__close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.chatbot__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chatbot__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.chatbot__messages {
    flex: none;
    overflow: visible;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot__message {
    display: flex;
    max-width: 88%;
}

.chatbot__message--bot {
    align-self: flex-start;
    align-items: flex-end;
    gap: 0.5rem;
}

.chatbot__message--user {
    align-self: flex-end;
}

.chatbot__message-avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 1px solid var(--color-border);
}

.chatbot__message-bubble {
    padding: 0.6rem 0.8rem;
    font-size: var(--text-sm);
    line-height: 1.45;
    border-radius: var(--radius-xl);
    overflow-wrap: break-word;
}

.chatbot__message--bot .chatbot__message-bubble {
    background: var(--color-primary-subtle);
    color: var(--color-text);
    border-top-left-radius: 0.25rem;
}

.chatbot__message--user .chatbot__message-bubble {
    background: var(--color-primary);
    color: #ffffff;
    border-top-right-radius: 0.25rem;
}

.chatbot__message--welcome .chatbot__message-bubble {
    background: var(--color-primary-subtle);
}

.chatbot__welcome-robot {
    display: block;
    width: 92px;
    height: auto;
    margin: 0.25rem 0 0.35rem;
    object-fit: contain;
}

.chatbot__typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 0.1rem 0;
}

.chatbot__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.4;
    animation: chatbot-blink 1.2s infinite;
}

.chatbot__typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot__typing span:nth-child(3) {
    animation-delay: 0.4s;
}

.chatbot__replies {
    flex-shrink: 0;
    padding: 0.75rem 0.9rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--color-background);
    border-top: 1px solid var(--color-border-light);
    max-height: none;
    overflow: visible;
}

.chatbot__reply,
.chatbot__action {
    font-family: var(--font-family);
    text-align: left;
    width: 100%;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chatbot__reply {
    padding: 0.7rem 0.9rem;
    background: #ffffff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.chatbot__reply:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-subtle);
}

.chatbot__action {
    padding: 0.6rem 0.9rem;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.chatbot__action:hover {
    background: var(--color-primary);
    color: #ffffff;
}

.chatbot__action--primary {
    background: var(--color-primary);
    color: #ffffff;
}

.chatbot__action--primary:hover {
    background: var(--color-primary-hover);
    color: #ffffff;
}

.chatbot__action--ghost {
    background: #ffffff;
    color: var(--color-text-secondary);
    border-color: var(--color-border);
    font-weight: 500;
}

.chatbot__action--ghost:hover {
    background: var(--color-primary-subtle);
    color: var(--color-text);
}

.chatbot__reply:disabled,
.chatbot__action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.chatbot__form {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem 0.35rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.chatbot__input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.8rem;
    font-family: var(--font-family);
    /* 16px evita el zoom automatico de iOS al enfocar */
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.chatbot__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #ffffff;
}

.chatbot__input:disabled {
    opacity: 0.6;
}

.chatbot__send {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    background: var(--color-primary);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.chatbot__send:hover {
    background: var(--color-primary-hover);
}

.chatbot__note {
    flex-shrink: 0;
    margin: 0;
    padding: 0 0.9rem 0.6rem;
    font-size: var(--text-xs);
    line-height: 1.35;
    color: var(--color-text-secondary);
    background: var(--color-surface);
}

@keyframes chatbot-blink {
    0%, 80%, 100% {
        opacity: 0.4;
    }
    40% {
        opacity: 1;
    }
}

@media (max-height: 50em) and (min-width: 30.0625em) {
    .chatbot__welcome-robot {
        width: 62px;
    }

    .chatbot__messages {
        gap: 0.55rem;
        padding-bottom: 0.65rem;
    }
}

@media (max-width: 30em) {
    .chatbot__launcher {
        display: none;
    }

    .chatbot__launcher-label {
        display: none;
    }

    .chatbot__panel {
        display: none;
    }

    .chatbot__reply,
    .chatbot__action {
        text-align: center;
    }
}

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

    .chatbot__typing span {
        animation: none;
        opacity: 0.6;
    }
}

/* Mobile overflow guard: keep dense ERP visuals inside the viewport. */
@media (max-width: 48em) {
    .hero,
    .hero .container,
    .hero__inner,
    .hero__content,
    .hero__visual {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .chatbot__launcher-label {
        display: none;
    }
}

/* Design polish pass: brand visibility, real-product hero, and anchor landing. */
section[id],
.section[id] {
    scroll-margin-top: calc(var(--header-height) + 1.4rem);
}

@media (max-width: 64em) {
    .header__logo--brand {
        width: clamp(286px, 35vw, 356px);
        height: 80px;
    }
}

/* 1025-1279px: seis enlaces + boton; logo y enlaces un poco mas compactos para que quepan en una linea. */
@media (min-width: 64.0625em) and (max-width: 79.9375em) {
    .header__logo--brand {
        width: clamp(280px, 24vw, 330px);
    }

    .header__link {
        padding: 0.5rem 0.6rem;
    }
}

/* 901-1024px: el menu completo sigue visible; logo y enlaces mas compactos para que quepa. */
@media (min-width: 56.3125em) and (max-width: 64em) {
    .header__logo--brand {
        width: 210px;
        height: 72px;
    }

    .header__menu {
        gap: 0;
    }

    .header__link {
        padding: 0.5rem 0.5rem;
    }

    .header__cta {
        padding: 0.5rem 0.9rem;
    }
}

@media (max-width: 48em) {
    .header__logo--brand {
        width: clamp(220px, 58vw, 285px);
        height: 72px;
    }

    .hero {
        padding-top: calc(var(--header-height) + 0.9rem);
    }
}

@media (max-width: 30em) {
    .header__logo--brand {
        width: clamp(190px, 56vw, 230px);
        height: 66px;
    }
}

/* Final responsive polish: keep the first viewport lighter on tablets. */
@media (min-width: 40.0625em) and (max-width: 56.25em) {
    .hero {
        padding-top: calc(var(--header-height) + 0.65rem);
        padding-bottom: 1.55rem;
    }
}

@media (max-width: 48em) {
    .chatbot__launcher,
    .chatbot__launcher-label {
        display: none !important;
    }

    .whatsapp-btn,
    .solutions-whatsapp,
    .sector-whatsapp {
        right: 0.75rem !important;
        bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
        width: 44px !important;
        height: 44px !important;
        z-index: 850;
    }

    .mobile-hero-floating-hidden .whatsapp-btn {
        display: none !important;
    }
}

/* Premium pass: product-led hero, proof blocks and calmer floating UI. */

@media (min-width: 48.0625em) {
    .chatbot__launcher-label {
        display: none !important;
    }
}

@media (max-width: 48em) {
    .hero {
        padding-top: calc(var(--header-height) + 0.5rem);
        padding-bottom: 1.15rem;
    }
}

.hero__cta-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn__arrow {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.hero__cta-main:hover .btn__arrow {
    transform: translateX(3px);
}

.hero-scene__chip svg {
    flex-shrink: 0;
    width: 1.45em;
    height: 1.45em;
    color: #1a6fc0;
}

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

@keyframes heroScenePulse {
    0% { stroke-dashoffset: 100; opacity: 1; }
    24% { stroke-dashoffset: 14; opacity: 1; }
    25%, 100% { stroke-dashoffset: 14; opacity: 0; }
}

/* =====================================================================
   LANDING (propuesta del ingeniero): pantallas nuevas
   ===================================================================== */
:root {
    --color-deep: #123B63;
    --color-deep-dark: #0b2a47;
}

/* ---- 03 NAVASOFT: plataforma ---- */
.navasoft-platform {
    padding: clamp(3rem, 2rem + 4vw, 6rem) 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(32, 164, 243, 0.22), transparent 26rem),
        linear-gradient(135deg, var(--color-deep-dark) 0%, var(--color-deep) 100%);
    color: #fff;
    overflow: hidden;
}

.navasoft-platform__points svg {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #7dccff;
}

/* Lineas que reparten desde NAVASOFT hacia las tres areas */
.nv-diagram__branches::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: rgba(125, 204, 255, 0.6);
}

.nv-diagram__branches::after {
    content: "";
    position: absolute;
    top: -22px;
    left: 50%;
    width: 2px;
    height: 22px;
    background: rgba(125, 204, 255, 0.6);
}

.nv-diagram__col::before {
    content: "";
    position: absolute;
    top: -22px;
    left: 50%;
    width: 2px;
    height: 22px;
    background: rgba(125, 204, 255, 0.6);
}

/* ---- Tarjetas simples (diferenciadores, cumplimiento, problemas) ---- */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);
}

.problem-card {
    padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.problem-card:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 119, 184, 0.28);
    box-shadow: 0 18px 40px rgba(18, 59, 99, 0.1);
}

.problem-card__text {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* ---- 06 ERP + IA: cierre del flujo ---- */

.ai-flow > em {
    width: min(100%, 260px);
    padding: 0.8rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.7);
    border-radius: var(--radius-md);
    color: #ffd48a;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

/* ---- 07 Tres tipos de IA ---- */
.ia-types__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
}

.ia-type {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    background: linear-gradient(180deg, #fff, #f6faff);
    box-shadow: 0 16px 36px rgba(18, 59, 99, 0.08);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.ia-type:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(18, 59, 99, 0.14);
}

.ia-type__list li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* ---- 08 Sectores ---- */
.sector-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.85rem, 0.5rem + 1vw, 1.25rem);
}

.sector-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 104px;
    padding: 1.25rem 1.4rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--color-deep), var(--color-deep-dark));
    color: #fff;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.sector-tile::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(32, 164, 243, 0.35), transparent 70%);
    transition: transform var(--transition-base);
}

.sector-tile:hover,
.sector-tile:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(18, 59, 99, 0.25);
}

.sector-tile:hover::after {
    transform: scale(1.3);
}

/* ---- 11 Desarrollo a medida ---- */
.custom-dev {
    padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 22rem),
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-deep) 100%);
    color: #fff;
}

.custom-dev__flow li {
    position: relative;
    width: min(100%, 300px);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

/* ---- 12 Metodologia ---- */
.method__steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(0.75rem, 1vw, 1.1rem);
}

.method__steps::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 8%;
    right: 8%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.method__step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.method__step h3 {
    margin-bottom: 0.35rem;
    color: var(--color-deep);
    font-size: var(--text-base);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.method__step p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
}

/* ---- 13 Experiencia + clientes ---- */
.experience {
    padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(32, 164, 243, 0.22), transparent 30rem),
        linear-gradient(180deg, var(--color-deep) 0%, var(--color-deep-dark) 100%);
    color: #fff;
}

/* ---- 17 CTA final ---- */
.final-cta {
    padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(32, 164, 243, 0.25), transparent 26rem),
        radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.18), transparent 22rem),
        linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-deep) 100%);
    color: #fff;
    text-align: center;
}

/* ---- 18 Footer ---- */
.footer__tagline {
    margin: -0.35rem 0 0.75rem;
    color: #7dccff;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer__social {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #fff;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.footer__social a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.footer__contact span {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}

.footer__contact a {
    overflow-wrap: anywhere;
}

/* ---- Responsive de las pantallas nuevas ---- */
@media (max-width: 71.875em) {

    .method__steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 2rem;
    }

    .method__steps::before {
        display: none;
    }
}

@media (max-width: 64em) {

    .problem-grid,
    .sector-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ia-types__grid {
        grid-template-columns: 1fr;
        max-width: 640px;
        margin-inline: auto;
    }
}

@media (max-width: 40em) {
    .problem-grid,
    .sector-tiles {
        grid-template-columns: 1fr;
    }

    .method__steps {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .method__step {
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 1rem;
        align-items: start;
        text-align: left;
    }

    .nv-diagram__node svg {
        width: 14px;
        height: 14px;
    }
}

.compliance-strip__list svg {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 8px;
    border-radius: 10px;
    background: var(--color-primary-subtle);
    color: var(--color-primary);
}

/* EKAM Academy: lineas de capacitacion y franja de cierre con modalidades */
.academy .section__header {
    max-width: 760px;
}

.academy-card__details {
    margin-top: auto;
    padding-top: 1.1rem;
    border-top: 1px solid var(--color-border);
}

/* En escritorio los temas siempre se ven; el boton para desplegar solo existe en celular. */
.academy-card__details summary {
    display: none;
}

@media (max-width: 40em) {

    .academy-card__details summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        color: var(--color-primary);
        font-size: var(--text-sm);
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }

    .academy-card__details summary::-webkit-details-marker {
        display: none;
    }

    .academy-card__details summary::after {
        content: "";
        width: 0.55rem;
        height: 0.55rem;
        margin-right: 0.25rem;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform var(--transition-fast);
    }

    .academy-card__details[open] summary::after {
        transform: rotate(-135deg);
    }

    .academy-card__details ul {
        padding: 0.25rem 0 0.75rem;
    }
}

/* Legibilidad: descripciones de tarjetas un punto mas grandes desde 641px.
   En celular se conservan los tamanos compactos definidos en cada bloque. */
@media (min-width: 40.0625em) {
    .module-card__desc,
    .ia-type__list li,
    .method__step p,
    .problem-card__text {
        font-size: 0.9375rem;
    }
}

/* ---- Paginas de contenido (sectores/, soluciones/, recursos/) ---- */
.content-detail {
    padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.page-art,
.solution-detail__visual.page-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background:
        radial-gradient(circle at 70% 35%, rgba(32, 164, 243, 0.35), transparent 55%),
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-deep) 100%);
}

.page-art svg {
    width: min(55%, 240px);
    height: auto;
    color: rgba(255, 255, 255, 0.28);
}

.content-meta {
    margin-top: 0.5rem;
    color: var(--color-text-secondary);
    font-size: var(--text-sm) !important;
}

.related-links {
    padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0;
}

.related-links h2 {
    margin-bottom: 1rem;
    color: var(--color-deep);
    font-size: var(--text-2xl);
    font-weight: 900;
}

.related-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.related-links a {
    display: inline-block;
    padding: 0.55rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-deep);
    font-size: var(--text-sm);
    font-weight: 700;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.related-links a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.article-body {
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0;
}

.article {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    background: #fff;
}

.article h2 {
    margin: 2rem 0 0.75rem;
    color: var(--color-deep);
    font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.65rem);
    font-weight: 800;
}

.article h2:first-child {
    margin-top: 0;
}

.article p,
.article li {
    color: var(--color-text);
    font-size: var(--text-base);
    line-height: 1.75;
}

.article p + p {
    margin-top: 0.9rem;
}

.article ul {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.article li::marker {
    color: var(--color-primary);
}

.article__cta {
    margin-top: 2.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--color-deep-dark) 0%, var(--color-deep) 100%);
    text-align: center;
}

.article__cta h2 {
    margin: 0 0 0.4rem;
    color: #fff;
}

.article__cta p {
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.78);
}

.resources {
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: #fff;
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 119, 184, 0.35);
    box-shadow: 0 18px 40px rgba(18, 59, 99, 0.12);
}

.resource-card__meta {
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resource-card h2 {
    color: var(--color-deep);
    font-size: var(--text-xl);
    font-weight: 800;
    line-height: 1.3;
}

.resource-card p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.resource-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 700;
}

@media (max-width: 64em) {

    .resource-grid {
        grid-template-columns: 1fr;
        max-width: 640px;
    }
}

/* =====================================================================
   VERSION COMPACTA PARA CELULAR (<= 640px)
   El contenido es el mismo que en escritorio; en celular se muestra
   en grillas de 2 columnas, carruseles deslizables y textos esenciales.
   ===================================================================== */
@media (max-width: 40em) {
    /* Ritmo vertical general */
    .section,
    .navasoft-platform,
    .custom-dev,
    .experience,
    .final-cta {
        padding-top: 2.25rem;
        padding-bottom: 2.25rem;
    }

    .section__header {
        margin-bottom: 1.25rem;
    }

    .section__title {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
    }

    .section__subtitle {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    /* Modulos: 3 x 3 de accesos directos (icono + nombre) */
    .modules__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .compliance-strip__list svg {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .ia-types__grid,
    .ia-types__grid--dark {
        display: flex;
        gap: 0.75rem;
        max-width: none;
        margin-inline: -1rem;
        padding: 0 1rem 0.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .ia-types__grid::-webkit-scrollbar {
        display: none;
    }

    .ia-type {
        flex: 0 0 82%;
        padding: 1.25rem;
        scroll-snap-align: start;
    }

    /* Sectores: 3 x 3 con icono y nombre */
    .sector-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .sector-tile {
        flex-direction: column;
        justify-content: center;
        gap: 0.45rem;
        min-height: 96px;
        padding: 0.75rem 0.35rem;
        text-align: center;
    }

    .sector-tile__icon svg {
        width: 24px;
        height: 24px;
    }

    .custom-dev__flow li {
        width: auto;
        padding: 0.55rem 0.25rem;
        font-size: 0.64rem;
        letter-spacing: 0.02em;
    }

    /* Metodologia: 2 columnas, numero + etapa + frase */
    .method__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.75rem;
    }

    .method__step {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .method__step h3 {
        font-size: 0.85rem;
    }

    .method__step p {
        font-size: 0.78rem;
        line-height: 1.45;
    }

    /* Problemas: 2 x 3 con icono y titulo */
    .problem-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .problem-card__icon svg {
        width: 20px;
        height: 20px;
    }

    /* Footer: marca arriba y enlaces en 2 columnas */
    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1rem;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .footer__heading {
        margin-bottom: 0.75rem;
    }

    /* Enlaces del footer con area tactil comoda (aprox. 40px de alto) */
    .footer__list {
        gap: 0;
    }

    .footer__list a,
    .footer__contact span {
        display: inline-block;
        padding: 0.6rem 0;
        font-size: 0.88rem;
        line-height: 1.3;
    }

    .footer__social a {
        width: 44px;
        height: 44px;
    }

    .carousel-dots__dot {
        position: relative;
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .carousel-dots__dot::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.35);
        transform: translate(-50%, -50%);
        transition: width var(--transition-fast), background var(--transition-fast);
    }

    .carousel-dots__dot--active::before {
        width: 22px;
        background: var(--color-accent);
    }
}

/* =====================================================================
   AJUSTES DE LA AUDITORÍA (22/10/2026): adaptación a tablet y celular
   ===================================================================== */
/* Copyright del pie legible (antes 3.8:1) */
.footer__bottom p {
    color: rgba(255, 255, 255, 0.62);
}

/* Enlaces dentro de textos legales: se distinguen del texto */
.legal-page p a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* Botón del menú móvil: área de 44 px y queda encima del panel abierto para poder cerrarlo */
.header__toggle {
    position: relative;
    z-index: 1002;
    width: 44px;
    height: 44px;
    padding: 10px;
}

/* 641-1024px: sectores en 3 columnas y pie en 2 columnas */
@media (min-width: 40.0625em) and (max-width: 64em) {
    .sector-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sector-tile {
        gap: 0.75rem;
        padding: 1rem;
    }

    .sector-tile__name {
        font-size: clamp(0.92rem, 0.6rem + 0.7vw, 1.05rem);
    }

    /* La tarjeta entera es el enlace; sin flecha caben los nombres largos */
    .sector-tile__arrow {
        display: none;
    }

    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

/* Tipos de IA: 3 columnas en tablet grande, 2 + 1 en tablet */
@media (min-width: 48.0625em) and (max-width: 64em) {
    .ia-types__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
    }
}

@media (min-width: 40.0625em) and (max-width: 48em) {
    .ia-types__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .ia-types__grid > :last-child {
        grid-column: 1 / -1;
    }
}

/* Privacidad y 404 en celular: el inicio de la tarjeta no queda bajo el encabezado */
@media (max-width: 40em) {
    .section.legal-page {
        padding-top: calc(var(--header-height) + 1.25rem);
    }
}

/* Contraste mínimo 4.5:1 en textos de apoyo (mismo tono, un poco más oscuro) */
.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
    color: var(--color-text-secondary);
}

.error-page__links a:hover {
    color: var(--color-primary-hover);
}

/* Lectura: líneas de unas 70 letras en guías y textos legales */
.article {
    max-width: 660px;
}

.legal-page__inner {
    max-width: 720px;
    width: calc(100% - 2 * clamp(1rem, 0.5rem + 2vw, 2rem));
}

/* Guías: el título del encabezado comparte el mismo borde izquierdo que el artículo */
main:has(.article-body) .solutions-hero__heading {
    max-width: 660px;
    margin-inline: auto;
}

/* Recursos en tablet: la columna de guías queda centrada */
@media (max-width: 64em) {
    .resource-grid {
        margin-inline: auto;
    }
}

/* Páginas de sector en celular: el contenido va antes que la ilustración decorativa */
@media (max-width: 56.25em) {
    .page-art,
    .solution-detail__visual.page-art {
        min-height: 180px;
    }
}

@media (max-width: 38.75em) {
    .solution-detail__visual.page-art {
        order: 0;
    }
}

/* Títulos equilibrados: sin una palabra sola en la última línea */
h1,
h2,
h3,
.final-cta p {
    text-wrap: balance;
}

/* Botones apilados con el mismo alto (el de borde tiene 2px de borde) */
.btn--primary {
    border: 2px solid transparent;
}

/* "Solicitar demostración" dentro del menú de celular */
.header__menu-cta {
    display: none;
}

@media (max-width: 68.75em) {
    .header__nav .header__menu {
        width: 100%;
    }

    .header__menu-cta {
        display: block;
        align-self: stretch;
        margin-top: 1rem;
    }

    .header__menu-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Pantallas bajas (zoom grande en laptop): encabezado más compacto */
@media (max-height: 31.25em) and (min-width: 30.0625em) {
    :root {
        --header-height: 64px;
    }

    .header__logo--brand {
        height: 56px;
    }
}

/* Textos pequeños del diagrama de desarrollo a medida: mínimo 12px */
@media (max-width: 40em) {
    .custom-dev__flow li {
        font-size: 0.75rem;
    }
}

/* Título de Academy: no se parte en 3 líneas en pantallas muy anchas */
.academy .section__title {
    max-width: 18em;
}

/* >= 1101px: la caja del logo solo mide lo que ocupa el dibujo (antes tenía hasta 270px vacíos) */
@media (min-width: 68.8125em) {
    .header__logo--brand {
        width: 200px;
    }
}
