/* ============================================================
   INNOVACIÓN EN LA ACCIÓN — Reproducción Exacta de Mockups
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,600;12..96,700;12..96,800&family=Aller:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap");

:root {
    --font-display: "Bricolage Grotesque", sans-serif;
    /* títulos, logo, nav */
    --font-body: "Aller", sans-serif;
    /* cuerpos de texto   */
}

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

body,
html {
    width: 100%;
    height: 100%;
    font-family: "Aller", sans-serif;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fondo de red aplicado de forma fija para que no se mueva */
body {
    background-image: url("../assets/img/fondo_red.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #fff;
}

/* ── CONTENEDOR FULL-PAGE SCROLL ───────────────────────────── */
.snap-container {
    height: 100vh;
    width: 100vw;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

.snap-section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ── NAVEGACIÓN GLOBAL RESPONSIVA ──────────────────────────── */
.global-nav {
    position: fixed;
    top: 40px;
    right: 50px;
    z-index: 9999;
}

.mobile-menu-btn {
    display: none;
    background: #fff;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    color: #3b2b7e;
}

.mobile-menu-btn svg {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    background: transparent;
}

.nav-link.active {
    background-color: #3b2b7e;
    color: #fff;
}

.nav-link-ext {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1.5px solid #e0e0e0;
    transition: all 0.2s;
    margin-right: 6px;
}
.nav-link-ext:hover {
    color: #3b2b7e;
    border-color: #3b2b7e;
    background: rgba(59,43,126,0.05);
}

.nav-search {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

.nav-search svg {
    width: 22px;
    height: 22px;
    color: #3b2b7e;
}

/* ── SECCIÓN: INICIO (HERO) CAPAS E INTERSECCIONES AVANZADAS ── */

/* CAPA 1: Bloque de Texto Gris Degradado */
.hero-banner-wrapper {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    left: 6%;
    width: 100%;
    /* Se limita a 55% para que la derecha desaparezca tras la foto */
    z-index: 1;
    /* Detrás de la foto */
}

.hero-banner {
    /* Degradado gris sutil y bordes redondeados */
    background: linear-gradient(135deg, #f9f9f9 0%, #e8e8e8 100%);
    padding: 45px 60px;
    border-radius: 20px;
    box-shadow: 15px 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-banner h1 {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(38px, 4vw, 64px);
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-banner .purple-text {
    color: #5c3a92;
}

/* CAPA 2: Fotografía Principal (Curva hacia la izquierda) */
.hero-photo-wrap {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Cubre la parte derecha del banner de texto */
    /* Aplicamos la curva matemática generada en el HTML */
    clip-path: url(#photo-curve);
    pointer-events: none;
}

.hero-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 85% center;
    pointer-events: auto;
}

/* Div de fondo — más confiable que img con clip-path SVG */
.hero-photo-bg {
    width: 100%;
    height: 100%;
    background-image: url('../assets/img/hero_foto.png');
    background-size: cover;
    /* ── AJUSTA ESTE VALOR para mover el foco de la foto ──
        X%: 0=izquierda, 100%=derecha
        Y%: 0=arriba, 100%=abajo
        Sube el X% para ver más hacia la derecha (la mujer que habla) */
    background-position: 82% center;
    pointer-events: auto;
}

/* CAPA 3: Forma Verde (Curva hacia la derecha) */
.hero-green-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    height: 110%;
    background-color: #00a650;
    z-index: 2;
    /* Mismo nivel que la foto, pero no se pisan porque están en lados opuestos */
    /* Aplicamos la curva matemática generada en el HTML */
    clip-path: url(#green-curve);
}

/* CAPA 4: Triángulo Naranja Invertido (La pieza central del rompecabezas) */
.hero-orange-btn {
    position: absolute;
    width: 220px;
    height: 120px;
    left: 42.1%;
    /* ajusta según tu pantalla */
    bottom: 0;
    background: #e87a00;
    clip-path: path("M 60 0 C 35 20 0 80 0 120 L 280 120 C 50 160 400 210 60 0 Z"
        );
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 2vh;
    text-decoration: none;
}

/* Animación sutil de salto */
@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

.hero-orange-btn span {
    color: rgb(59, 43, 126);
    font-size: clamp(10px, 1vw, 15px);
    font-weight: 800;
    text-transform: lowercase;
    margin-bottom: 0px;
    margin-left: -80px;
}

.hero-orange-btn svg {
    width: clamp(40px, 3vw, 28px);
    height: clamp(40px, 3vw, 28px);
    /* Color morado definido en el HTML (stroke) */
    animation: bounce-subtle 1.8s ease-in-out infinite;
    margin-left: -80px;
}

/* Logo superior izquierdo */
.hero-logo-block {
    position: absolute;
    top: 40px;
    left: 2%;
    width: 48%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-block img {
    width: 100%;
    max-width: 380px;
    height: auto;
}

.hero-tagline {
    font-style: italic;
    font-size: clamp(13px, 1.2vw, 16px);
    color: #444;
    margin-top: 15px;
    text-align: left;
}

/* ── PÁGINAS INTERNAS (Registro, Repositorio, Protocolo) ───── */
.page-content {
    padding: 80px 10% 110px 10%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page-title {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(38px, 4vw, 54px);
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

/* Nav links usan Bricolage también — son textos clave cortos */
.nav-link {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #3b2b7e;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s;
}

.color-green .page-title {
    color: #00a650;
}

.color-orange .page-title {
    color: #e87a00;
}

.color-red .page-title {
    color: #e60000;
}

.page-intro {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1100px;
}

.page-icon {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
}

.page-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.12));
}

.page-text {
    flex: 1;
    font-size: 18px;
    color: #222;
    /* line-height: 1.45; */
    padding-top: 15px;
}

.page-text p {
    margin-bottom: 24px;
}

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

.page-frame {
    flex: 1;
    border: 1px solid #5c3a92;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
}

/* ── FOOTER INTERNO FIEL AL MOCKUP ─────────────────────────── */
.custom-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #fff;
    display: flex;
    z-index: 50;
    overflow: hidden;
}

.footer-bg-purple {
    width: 42%;
    background: #5c3a92;
    color: #fff;
    padding: 15px 70px 15px 8%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    z-index: 5;
    position: relative;
}

.footer-bg-purple p {
    font-size: 11px;
    line-height: 1.3;
    opacity: 0.95;
}

.footer-bg-green {
    width: 80px;
    background: #00a650;
    clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%);
    margin-left: -40px;
    z-index: 10;
}

.footer-logos {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 5vw;
    gap: 50px;
}

.partner-logo {
    font-size: 20px;
    font-weight: 800;
    color: #333;
}

.partner-logo.kimirina {
    color: #0056a3;
    font-style: italic;
}

.partner-logo.frontline {
    font-weight: 900;
    line-height: 0.9;
    text-align: center;
    font-size: 18px;
}

.partner-logo.globalfund {
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── RESPONSIVIDAD Y MENÚ HAMBURGUESA ──────────────────────── */
@media (max-width: 1300px) {
    .hero-banner-wrapper {
        width: 85%;
        left: 5%;
    }

    .page-text {
        font-size: 18px;
    }
}

@media (max-width: 992px) {
    .global-nav {
        top: 20px;
        right: 20px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        right: 0;
        background: #fff;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        border: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    /* Ajustes para evitar cortes extraños en tablet/móvil */
    .hero-banner-wrapper {
        width: 80%;
        z-index: 10;
    }

    .hero-banner {
        padding: 30px 40px;
    }

    .custom-footer {
        height: auto;
        min-height: 90px;
        flex-direction: column;
    }

    .footer-bg-purple {
        width: 100%;
        clip-path: none;
        padding: 15px 5%;
    }

    .footer-bg-green {
        display: none;
    }

    .footer-logos {
        padding: 20px;
        justify-content: center;
        gap: 30px;
        flex-wrap: wrap;
    }

    .snap-section:not(:last-child) .custom-footer {
        display: none;
    }
}

@media (max-width: 600px) {

    /* En móvil la intersección geométrica es muy pequeña, simplificamos las curvas */
    svg defs clipPath {
        display: none;
    }

    .hero-photo-wrap {
        clip-path: none;
        opacity: 0.2;
    }

    .hero-green-shape {
        display: none;
    }

    .hero-orange-btn {
        left: 50%;
        transform: translateX(-50%);
        width: 140px;
        height: 15vh;

        position: absolute;
        width: 120px;
        height: 80px;
        left: 50%;
        /* ajusta según tu pantalla */
        bottom: 0;
        background: #e87a00;
        clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding-bottom: 2vh;
        text-decoration: none;
    }

    .hero-orange-btn span {
        color: rgb(59, 43, 126);
        font-size: clamp(10px, 1vw, 15px);
        font-weight: 800;
        text-transform: lowercase;
        margin-top: 20px;
        margin-bottom: 0px;
        margin-left: -0px;
    }

    .hero-orange-btn svg {
        width: clamp(40px, 3vw, 28px);
        height: clamp(40px, 3vw, 28px);
        /* Color morado definido en el HTML (stroke) */
        animation: bounce-subtle 1.8s ease-in-out infinite;
        margin-left: -0px;
    }

    .hero-logo-block {
        width: 85%;
        left: 7.5%;
        top: 90px;
    }

    .hero-banner-wrapper {
        width: 90%;
        top: 55%;
        left: 5%;
    }

    .hero-banner {
        padding: 25px;
    }

    .hero-banner h1 {
        font-size: 30px;
    }

    .page-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .page-content {
        padding-top: 130px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .page-icon {
        width: 110px;
        height: 110px;
    }

    .page-text {
        font-size: 12px;
        padding-top: 0;
    }

    .page-title {
        font-size: 28px;
    }
}

/* ── REPOSITORIO: crece con el contenido ───────────────────── */
#repositorio {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

#repositorio .page-content {
    height: auto !important;
}

#repositorio .page-frame {
    height: auto !important;
    overflow: visible !important;
    flex: none !important;
}

