*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: rgb(17, 32, 63);
    --blue: rgb(29, 71, 126);
    --blue-dark: rgb(30, 58, 138);
    --teal: rgb(6, 50, 49);
    --text-dark: rgb(15, 15, 15);
    --accent: rgb(75, 158, 217);
    --white: #ffffff;
    --bg-page: #f5f6f8;
    --font-head: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --max-w: 1280px;
    --pad-x: 80px;
    --section-gap: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-dark);
}

/* ── WRAPPER ──────────────────────────────────────────── */
.landing-proyecto {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    padding: 48px var(--pad-x) 80px;
}

/* ── TITULO SECCIÓN ───────────────────────────────────── */
.section-title {
    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════
       1. PASTILLAS DATOS DESTACADOS
    ═══════════════════════════════════════════════════════ */
.datos-destacados {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.dato-card {
    flex: 1 1 240px;
    background: var(--white);
    border-radius: 8px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 2px 10px rgba(17, 32, 63, 0.07);
}

.dato-card__inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dato-card__tipo {
    font-size: 14px;
    font-weight: 600;
    color: rgb(40, 41, 67);
    line-height: 1.2;
}

.dato-card__valor {
    font-size: 36px;
    font-weight: 700;
    color: var(--blue-dark);
    letter-spacing: 0.012em;
    line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════
       2. TÍTULO + DESCRIPCIÓN DEL PROYECTO
    ═══════════════════════════════════════════════════════ */
.proyecto-intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: var(--max-w);
}

.proyecto-intro__titulo {
    font-family: var(--font-head);
    font-size: 48px;
    font-weight: 600;
    color: var(--blue);
    line-height: 1.375;
}

.proyecto-intro__desc {
    font-size: 18px;
    font-weight: 400;
    color: var(--teal);
    line-height: 30px;
}

/* ═══════════════════════════════════════════════════════
       3. VIDEO + EL RETO / LA SOLUCIÓN
    ═══════════════════════════════════════════════════════ */
.reto-solucion {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: var(--max-w);
    background: white;
    padding: 25px;
    border-radius: 10px;
}

/* Video player */
.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/7;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

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

.video-wrap__controls {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-play {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-play:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-play svg {
    width: 16px;
    height: 16px;
}

.video-progress {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
}

.video-progress__fill {
    width: 30%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

.video-progress__dot {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
}

/* Reto y Solución */
.reto-solucion__bloques {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.bloque-texto__titulo {
    font-family: var(--font-head);
    font-size: 36px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 16px;
}

.bloque-texto__cuerpo {
    font-size: 18px;
    font-weight: 400;
    color: var(--teal);
    line-height: 30px;
}

/* ═══════════════════════════════════════════════════════
       4. RESULTADOS
    ═══════════════════════════════════════════════════════ */
.resultados {
    max-width: var(--max-w);
}

.resultados__grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.resultado-card {
    flex: 1 1 200px;
    background: var(--navy);
    border-radius: 8px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resultado-card__numero {
    font-family: var(--font-head);
    font-size: 48px;
    font-weight: 500;
    color: var(--white);
    line-height: 1;
}

.resultado-card__label {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════
       5. ODS
    ═══════════════════════════════════════════════════════ */
.ods {
    max-width: var(--max-w);
}

.ods__grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.ods__item {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

/* ═══════════════════════════════════════════════════════
       6. TESTIMONIOS
    ═══════════════════════════════════════════════════════ */
.testimonios {
    max-width: var(--max-w);
}

.testimonios__grid {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.testimonio-card {
    flex: 1 1 280px;
    background: var(--white);
    border-radius: 8px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 2px 10px rgba(17, 32, 63, 0.07);
}

.testimonio-card__quote {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    line-height: 1.6;
}

.testimonio-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonio-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-page);
}

.testimonio-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonio-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonio-card__nombre {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-dark);
}

.testimonio-card__rol {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
}

.testimonio-card__lugar {
    font-size: 12px;
    font-weight: 400;
    color: rgba(15, 15, 15, 0.6);
}

/* ═══════════════════════════════════════════════════════
       7. GALERÍA — SLIDER
    ═══════════════════════════════════════════════════════ */
.galeria {
    width: 100%;
}

.galeria__header {
    max-width: var(--max-w);
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.galeria__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.galeria__btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.galeria__btn:hover {
    background: var(--blue);
}

.galeria__btn:hover svg path {
    stroke: var(--white);
}

.galeria__btn svg {
    width: 18px;
    height: 18px;
}

.galeria__btn svg path {
    stroke: var(--blue);
    transition: stroke 0.2s;
}

/* Slider track */
.galeria__slider-outer {
    width: 100%;
    overflow: hidden;
}

.galeria__track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Slide: imagen de fondo + overlay con texto */
.galeria__slide {
    flex: 0 0 calc(33.333% - 11px);
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 554px;
    cursor: pointer;
}

.galeria__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.galeria__slide:hover img {
    transform: scale(1.04);
}

.galeria__slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 32, 63, 0.85) 0%, rgba(17, 32, 63, 0.1) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    gap: 12px;
}

.galeria__slide-titulo {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.4;
}

.galeria__slide-desc {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dots */
.galeria__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.galeria__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(17, 32, 63, 0.25);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.galeria__dot.active {
    background: var(--blue);
    transform: scale(1.3);
}

/* ═══════════════════════════════════════════════════════
       RESPONSIVE
    ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    :root {
        --pad-x: 40px;
        --section-gap: 60px;
    }

    .galeria__slide {
        flex: 0 0 calc(50% - 8px);
        height: 440px;
    }

    .proyecto-intro__titulo {
        font-size: 38px;
    }

    .section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    :root {
        --pad-x: 20px;
        --section-gap: 48px;
    }

    .proyecto-intro__titulo {
        font-size: 28px;
    }

    .proyecto-intro__desc {
        font-size: 16px;
    }

    .section-title {
        font-size: 26px;
    }

    .bloque-texto__titulo {
        font-size: 26px;
    }

    .bloque-texto__cuerpo {
        font-size: 16px;
    }

    /* Datos destacados: 1 por fila en móvil */
    .dato-card {
        flex: 1 1 100%;
    }

    .dato-card__valor {
        font-size: 28px;
    }

    /* Resultados: 2 por fila */
    .resultado-card {
        flex: 1 1 calc(50% - 12px);
        padding: 28px 20px;
    }

    .resultado-card__numero {
        font-size: 36px;
    }

    .resultado-card__label {
        font-size: 16px;
    }

    /* ODS */
    .ods__item {
        width: 90px;
        height: 90px;
    }

    /* Testimonios: 1 por fila */
    .testimonio-card {
        flex: 1 1 100%;
    }

    /* Galería: 1 slide visible en móvil */
    .galeria__slide {
        flex: 0 0 85vw;
        height: 380px;
    }

    /* Ocultar nav en móvil (se usa swipe) */
    .galeria__nav {
        display: none;
    }

    .video-wrap {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .dato-card__valor {
        font-size: 24px;
    }

    .resultado-card {
        flex: 1 1 100%;
    }

    .ods__item {
        width: 72px;
        height: 72px;
    }

    .galeria__slide {
        flex: 0 0 92vw;
        height: 320px;
    }

    .galeria__slide-titulo {
        font-size: 16px;
    }
}


/* ══ GALERÍA — fuera del article ══════════════════════════ */

.galeria {
    width: 100%;
    margin-top: 72px;
    overflow: hidden;
}

/* Título: usa padding-left para que el texto se alinee
   con el contenido del article */
.galeria__titulo {
    /* Mismo indent que el article:
     (viewport - max-width) / 2 + padding interno del article */
    padding-left: calc((100vw - 1440px) / 2 + 80px);
    padding-right: 0;
    margin-bottom: 40px;
    display: block;
}

/* Scroll container: ancho 100%, SIN padding (evita el box-sizing problem) */
.galeria__scroll {
    width: 100%;
    display: flex;
    gap: 16px;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    /* scroll-padding-left alinea el snap con el mismo offset que el título */
    scroll-padding-left: calc((100vw - 1440px) / 2 + 80px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    box-sizing: border-box;
}

.galeria__scroll::-webkit-scrollbar {
    display: none;
}

.galeria__scroll.is-dragging {
    cursor: grabbing;
}

/* Solo el PRIMER item lleva margin-left para alinearse con el título */
.galeria__item:first-child {
    margin-left: calc((100vw - 1440px) / 2 + 80px);
}

/* Último item: espaciador final para que no quede pegado al borde */
.galeria__item:last-child {
    margin-right: 40px;
}

.galeria__item {
    flex: 0 0 416px;
    height: 554px;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.galeria__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    transition: transform 0.4s ease;
}

.galeria__item:hover img {
    transform: scale(1.03);
}

/* ── Responsive ────────────────────────────────────────── */

/* Viewport ≤ 1440px: article ocupa todo el ancho, solo queda su padding */
@media (max-width: 1440px) {
    .galeria__titulo {
        padding-left: 80px;
    }

    .galeria__scroll {
        scroll-padding-left: 80px;
    }

    .galeria__item:first-child {
        margin-left: 80px;
    }
}

@media (max-width: 1024px) {
    .galeria {
        margin-top: 56px;
    }

    .galeria__titulo {
        padding-left: 40px;
    }

    .galeria__scroll {
        scroll-padding-left: 40px;
    }

    .galeria__item:first-child {
        margin-left: 40px;
    }

    .galeria__item {
        flex: 0 0 340px;
        height: 440px;
    }
}

@media (max-width: 768px) {
    .galeria {
        margin-top: 48px;
    }

    .galeria__titulo {
        padding-left: 20px;
    }

    .galeria__scroll {
        scroll-padding-left: 20px;
        gap: 12px;
    }

    .galeria__item:first-child {
        margin-left: 20px;
    }

    .galeria__item {
        flex: 0 0 80vw;
        height: 300px;
    }

    .galeria__item:last-child {
        margin-right: 20px;
    }
}

@media (max-width: 480px) {
    .galeria__item {
        flex: 0 0 88vw;
        height: 240px;
    }
}