:root {
    --azul-corporativo: #0d2c61;
    --azul-acento: #0a84ff;
    --azul-oscuro: #061c43;
    --azul-hover: #0066cc;
    --texto-principal: #334155;
    --borde-dashed: #cbd5e1;
    --blanco-translucido: rgba(255, 255, 255, 0.96);
    
    /* Colores de éxito y alertas estándar institucionales */
    --verde-exito: #1c843c;
    --verde-hover: #15662e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f5f7fb;
    color: var(--texto-principal);
    overflow-x: hidden; /* Evita scrolls horizontales raros */
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    background: var(--azul-corporativo); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
    height: 70px;
    object-fit: contain;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar a:hover {
    color: var(--azul-acento);
}

.btn-login-nav {
    background: var(--azul-acento); 
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-login-nav:hover {
    background: var(--azul-hover);
    transform: translateY(-1px);
}

/* Alertas generales */
.alerta-negativo {
    background-color: #FFF2CC !important; /* Amarillo suave tipo Excel */
    color: #806000 !important;            /* Texto marrón/oscuro para legibilidad */
    font-weight: bold;
}

/* ==========================================================================
   HERO CON SLIDER INCORPORADO (EXTREMO A EXTREMO)
   ========================================================================== */
.hero-slider-container {
    position: relative;
    width: 100vw;
    min-height: 85vh;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    overflow: hidden;
}

.hero-slider-container .swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slider-container .swiper-slide {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* EFECTO DE ANIMACIÓN ZOOM-IN CINEMATOGRÁFICO */
.slide-zoom-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 0s;
}

.swiper-slide-active .slide-zoom-bg {
    animation: zoomInEffect 7s ease-out forwards;
}

@keyframes zoomInEffect {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

/* Layer oscuro protector */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 18, 51, 0.65);
    z-index: 1;
    pointer-events: none;
}

.hero-center-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 650px;
    text-align: center;
    color: #ffffff;
}

/* FLECHAS BLANCAS CIRCULARES */
.hero-slider-container .swiper-button-next,
.hero-slider-container .swiper-button-prev {
    color: var(--azul-corporativo) !important; 
    background: rgba(255, 255, 255, 0.85); 
    width: 55px;
    height: 55px;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

.hero-slider-container .swiper-button-next:after,
.hero-slider-container .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

.hero-slider-container .swiper-button-next:hover,
.hero-slider-container .swiper-button-prev:hover {
    background: #ffffff;
    transform: scale(1.1);
    color: var(--azul-acento) !important;
}

.hero-slider-container .swiper-button-next { right: 30px; }
.hero-slider-container .swiper-button-prev { left: 30px; }

/* ==========================================================================
   FORMULARIO ADAPTADO SOBRE EL HERO BANNER
   ========================================================================== */
.upload-form {
    background: var(--blanco-translucido);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: none;
    text-align: left;
}

.upload-form label {
    display: block;
    font-weight: 600;
    color: #003a8c;
    margin-bottom: 8px;
    font-size: 14px;
}

.upload-form input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px dashed var(--borde-dashed);
    border-radius: 8px;
    background: #ffffff;
    color: var(--texto-principal);
    cursor: pointer;
}

.upload-form button {
    width: 100%;
    background: var(--azul-acento);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.upload-form button:hover {
    background: var(--azul-hover);
    transform: translateY(-1px);
}

/* Selector de Municipios institucionalizado */
.upload-form select {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 24px;
    border: 2px dashed var(--borde-dashed);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--texto-principal);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23334155'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.upload-form select:hover {
    border-color: #003a8c;
    background-color: #f8fafc;
}

.upload-form select:focus {
    border-color: var(--azul-acento);
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

.upload-form select option {
    background-color: #ffffff;
    color: var(--texto-principal);
    padding: 12px;
}

.upload-form select option:disabled {
    color: #94a3b8;
}

/* Botón de Generar Cruce */
.upload-form button[type="submit"] {
    width: 100%;
    background: #003a8c; 
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 58, 140, 0.2);
    margin-top: 4px;
}

.upload-form button[type="submit"]:hover {
    background: #002e7a;
    box-shadow: 0 6px 20px rgba(0, 46, 122, 0.35);
    transform: translateY(-1px);
}

.upload-form button[type="submit"]:active {
    transform: translateY(1px);
}

/* Cuadro de aviso para usuarios no autenticados */
.access-prompt {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.lock-text {
    color: var(--texto-principal);
    font-size: 16px;
    font-weight: 500;
}

.btn-cta-login {
    display: inline-block;
    margin-top: 15px;
    background: var(--verde-exito); /* Verde homogeneizado con el dashboard */
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-cta-login:hover {
    background: var(--verde-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   TARJETAS DE CONTENIDO
   ========================================================================== */
.cards {
    display: flex;
    gap: 30px;
    padding: 60px;
}

.card {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,.08);
}

.card h3 {
    color: #003a8c;
    margin-bottom: 15px;
    font-weight: 600;
}

/* ==========================================================================
   SECCIÓN INFORMATIVA (BLOQUE AZUL)
   ========================================================================== */
.blue-section {
    background: var(--azul-corporativo); 
    color: white;
    margin: 50px;
    border-radius: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px;
}

.blue-text {
    width: 50%;
}

.blue-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 600;
}

.blue-image img {
    width: 450px;
    border-radius: 20px;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background: var(--azul-oscuro); 
    color: white;
    text-align: center;
    padding: 40px;
}

footer img {
    height: 80px;
    margin-bottom: 15px;
    object-fit: contain;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 20px;
    }
    .hero-slider-container {
        padding: 40px 10px;
        min-height: auto;
    }
    .cards {
        flex-direction: column;
        padding: 30px 20px;
    }
    .blue-section {
        flex-direction: column;
        margin: 20px;
        padding: 40px 20px;
        text-align: center;
    }
    .blue-text {
        width: 100%;
        margin-bottom: 30px;
    }
    .blue-image img {
        width: 100%;
    }
}



/* ==========================================================================
   MENÚ HAMBURGUESA — NAVBAR RESPONSIVE
   ========================================================================== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 20;
}

.nav-toggle .bar {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación a "X" cuando el menú está abierto */
.navbar.menu-abierto .nav-toggle .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar.menu-abierto .nav-toggle .bar:nth-child(2) { opacity: 0; }
.navbar.menu-abierto .nav-toggle .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
    .navbar {
        padding: 15px 20px;
        position: relative;
    }

    .nav-toggle {
        display: block;
    }

    .navbar ul {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(75vw, 320px);
        background: var(--azul-oscuro);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 90px 30px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -6px 0 20px rgba(0,0,0,0.3);
        z-index: 15;
    }

    .navbar.menu-abierto ul {
        transform: translateX(0);
    }

    .navbar ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .navbar ul li a {
        display: block;
        padding: 16px 0;
        font-size: 1.05rem;
    }

    .btn-login-nav {
        display: inline-block;
        margin-top: 10px;
        text-align: center;
    }

    /* Fondo oscuro detrás del panel cuando está abierto */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 14;
    }
    .navbar.menu-abierto ~ .nav-overlay {
        display: block;
    }
}

@media (max-width: 600px) {
    .hero-center-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    .hero-center-content p {
        font-size: 0.9rem;
    }
    .hero-slider-container {
        padding: 30px 15px;
        min-height: 70vh;
    }
    .upload-form {
        padding: 22px 18px;
    }
    .upload-form button,
    .upload-form input,
    .upload-form select {
        font-size: 14px;
    }
    .hero-slider-container .swiper-button-next,
    .hero-slider-container .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
}