html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
}

main {
    padding-top: var(--header-height);
}

:root {
    --de-azul: #0000ff;
    --de-azul-oscuro: #0000b3;
    --de-cian: #32dbfd;
    --de-morado: #674ea7;
    --de-gris: #464646;
    --de-gris-claro: #5a5a5a;
    --de-teal: #1c9e96;
    --de-naranja: #f4a62a;
    --de-bg: #ffffff;
    --de-radius: 16px;
    --de-shadow: 0 8px 30px rgba(0, 0, 60, 0.08);
    --de-font-title: 'Gilroy-Bold', 'Montserrat', sans-serif;
    --de-content-max: 1750px;
}

main {
    background: var(--de-bg);
}

:focus-visible {
    outline: 3px solid var(--de-azul);
    outline-offset: 3px;
}

/* ============ HERO ============ */
.de-hero {
    background: linear-gradient(120deg, var(--de-azul-oscuro) 0%, var(--de-azul) 45%, var(--de-cian) 100%);
    padding: clamp(48px, 8vw, 88px) 24px clamp(56px, 9vw, 96px);
    color: #fff;
}

.de-hero__inner {
    max-width: var(--de-content-max);
    margin: 0 auto;
}

.de-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #fff;
}

.de-hero__title {
    font-family: var(--de-font-title);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0 0 18px;
    line-height: 1.1;
}

.de-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 850px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px;
    font-weight: 500;
}

.de-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(28px, 6vw, 64px);
}

.de-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.de-stat__num {
    font-family: var(--de-font-title);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--de-cian);
    text-align: center;
}

.de-stat__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* ============ SECCIONES GENERALES ============ */
.de-section {
    max-width: var(--de-content-max);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 64px) 24px;
}

.de-section--tight {
    padding-top: 0;
}

.de-section--last {
    padding-top: 0;
    padding-bottom: clamp(56px, 8vw, 88px);
}

.de-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.de-section__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--de-azul);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 16px;
}

.de-section__header h2 {
    font-family: var(--de-font-title);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--de-gris);
    margin: 0;
}

.de-lead {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
    font-weight: 500;
    color: var(--de-gris-claro);
    margin: -12px 0 28px;
}

.de-lead strong {
    color: var(--de-azul);
    font-weight: 700;
}

/* ============ BLOQUE DE TEXTO / MODELO ============ */
.de-model {
    background: #fff;
    border-radius: var(--de-radius);
    box-shadow: var(--de-shadow);
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    overflow: hidden;
}

.de-model--single {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
}

.de-model__text {
    padding: clamp(24px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.de-model__text p {
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
    line-height: 1.7;
    font-weight: 500;
    color: var(--de-gris-claro);
    margin: 0;
    max-width: 90ch;
}

.de-model__aside {
    background: linear-gradient(120deg, #eef2ff 0%, #e6fbff 100%);
    border-left: 1px solid #dde6ff;
    padding: clamp(24px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.de-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(0.78rem, 0.74rem + 0.1vw, 0.85rem);
    font-weight: 700;
    color: var(--de-azul);
}

.de-model__aside-title {
    font-family: var(--de-font-title);
    font-size: clamp(1.3rem, 2.6vw, 1.6rem);
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--de-gris);
}

.de-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.de-chips li {
    background: #fff;
    border: 1px solid #dde6ff;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--de-gris);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.de-chips i {
    color: var(--de-azul);
    font-size: 0.8rem;
}

/* ============ TARJETAS ============ */
.de-cards {
    display: grid;
    gap: 24px;
}

.de-cards--ejes {
    grid-template-columns: repeat(6, 1fr);
}

.de-cards--ejes .de-card {
    grid-column: span 2;
}

.de-cards--ejes .de-card:nth-child(n+4) {
    grid-column: span 3;
}

.de-cards--proc {
    grid-template-columns: repeat(3, 1fr);
}

.de-card {
    --de-accent: var(--de-azul);
    background: #fff;
    border-radius: var(--de-radius);
    box-shadow: var(--de-shadow);
    border-top: 5px solid var(--de-accent);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.de-card--blue   { --de-accent: var(--de-azul); }
.de-card--cyan   { --de-accent: var(--de-cian); }
.de-card--purple { --de-accent: var(--de-morado); }
.de-card--gray   { --de-accent: var(--de-gris); }
.de-card--teal   { --de-accent: var(--de-teal); }
.de-card--orange { --de-accent: var(--de-naranja); }

.de-card__icon {
    background: #f5f6f9;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-card__icon i,
.de-card__num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--de-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.de-card__num {
    font-family: var(--de-font-title);
    font-weight: 700;
    font-size: 1.6rem;
}

.de-card__body {
    padding: 22px 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.de-card__label {
    font-size: clamp(0.92rem, 0.88rem + 0.15vw, 1rem);
    font-weight: 700;
    color: var(--de-azul);
    margin: 0;
}

.de-card__title {
    font-family: var(--de-font-title);
    font-size: clamp(1.15rem, 1.05rem + 0.25vw, 1.35rem);
    font-weight: 700;
    margin: 0;
    color: var(--de-gris);
    line-height: 1.3;
}

/* ============ LISTA DENTRO DE TARJETA ============ */
.de-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.de-card__list li {
    font-size: clamp(0.94rem, 0.9rem + 0.15vw, 1.05rem);
    font-weight: 500;
    color: var(--de-gris-claro);
    line-height: 1.5;
    padding-left: 18px;
    position: relative;
}

.de-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--de-accent);
}

/* ============ FIGURAS (IMÁGENES AMPLIABLES) ============ */
.de-figs {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.de-fig {
    margin: 0;
    background: #fff;
    border-radius: var(--de-radius);
    box-shadow: var(--de-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.de-fig--mt { margin-top: 24px; }
.de-fig--mb { margin-bottom: 24px; }

.de-fig__btn {
    position: relative;
    flex-grow: 1;
    background: #f5f6f9;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-fig__btn img {
    width: 100%;
    height: auto;
    display: block;
    padding: 18px;
    box-sizing: border-box;
}

.de-fig--mt .de-fig__btn img,
.de-fig--mb .de-fig__btn img {
    max-width: 1400px;
}

.de-fig__zoom {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    pointer-events: none;
}

.de-fig__caption {
    padding: 14px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--de-gris-claro);
    text-align: center;
    border-top: 1px solid #eef0f4;
}

/* ============ LIGHTBOX ============ */
.de-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 20, 0.88);
    display: none;
    padding: 48px 24px;
    overflow: auto;
    z-index: 2000;
}

.de-lightbox.is-open {
    display: flex;
}

.de-lightbox img {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.de-lightbox__close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1;
}

.de-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* =============== PANTALLAS ULTRA ANCHAS =============== */
@media (min-width: 2200px) {
    :root {
        --de-content-max: 2000px;
    }
}

@media (min-width: 1500px) {
    .de-cards--ejes {
        grid-template-columns: repeat(5, 1fr);
    }
    .de-cards--ejes .de-card,
    .de-cards--ejes .de-card:nth-child(n+4) {
        grid-column: auto;
    }
}

/* =============== RESPONSIVE =============== */
@media (max-width: 1100px) {
    .de-cards--ejes {
        grid-template-columns: repeat(2, 1fr);
    }
    .de-cards--ejes .de-card,
    .de-cards--ejes .de-card:nth-child(n+4) {
        grid-column: auto;
    }
    .de-cards--ejes .de-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .de-model {
        grid-template-columns: 1fr;
    }
    .de-model__aside {
        border-left: none;
        border-top: 1px solid #dde6ff;
    }
}

@media (max-width: 720px) {
    .de-hero__stats {
        gap: 24px;
    }
    .de-model__text,
    .de-model__aside {
        padding: 28px;
    }
    .de-cards--proc {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .de-cards--ejes {
        grid-template-columns: 1fr;
    }
    .de-cards--ejes .de-card:last-child {
        grid-column: auto;
    }
}

/* =============== ACCESIBILIDAD =============== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 900px) {
    .de-figs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    /* En móvil la imagen se ve más grande y se desplaza para poder leer el texto */
    .de-lightbox img {
        max-width: none;
        max-height: none;
        width: 220vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .de-lightbox__close {
        transition: none;
    }
}
