/* css/afiliacion.css */

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fb;
    color: #333;
}

/* ==========================================
   HEADER INSTITUCIONAL COMPLETO
   ========================================== */
header:not(.hero) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    background: linear-gradient(90deg, #0b2a4a, #163f6b);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* espacio entre imagen y texto */
}

.logo img {
    width: 40px;  /* ajusta tamaño */
    height: 40px;
    object-fit: contain;
}

.logo h1 {
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: white;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* ==========================================
   HERO CORPORATIVO DE AFILIACIÓN
   ========================================== */
header.hero {
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url("../img/hero.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h1 {
    font-size: 38px;
    color: white;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    max-width: 750px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ==========================================
   NUEVA SECCIÓN: PROCEDIMIENTO (PASOS DE AFILIACIÓN)
   ========================================== */
.procedimiento-afiliacion {
    background: #ffffff;
    max-width: 700px;
    margin: 40px auto 0 auto;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.procedimiento-afiliacion h2 {
    color: #0b2a4a;
    font-size: 1.4rem;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.steps-afiliacion {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.step-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Línea conectora horizontal entre círculos */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 3px;
    background-color: #cbd5e1;
    z-index: 1;
}

.step-num {
    width: 40px;
    height: 40px;
    background-color: #0b2a4a;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(11, 42, 74, 0.2);
}

.step-item p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
    font-weight: 500;
}

.step-item a {
    color: #163f6b;
    text-decoration: underline;
    font-weight: 600;
}

/* ==========================================
   ESTRUCTURA DE CONTENEDORES Y FORMULARIOS
   ========================================== */
.contenedor-afiliacion {
    max-width: 700px;
    margin: 20px auto 40px auto;
    padding: 0 20px;
}

.seccion-formulario {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.titulo-formulario {
    color: #0b2a4a;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6rem;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 10px;
}

.grupo-campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.grupo-campo label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #475569;
}

.grupo-campo input, 
.grupo-campo select {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.grupo-campo input:focus, 
.grupo-campo select:focus {
    outline: none;
    border-color: #163f6b;
}

.grupo-doble {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* BOTONES Y VARIANTES DE COLOR */
.btn-enviar {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    transition: 0.3s;
    font-family: inherit;
    background-color: #3b82f6;
    color: white;
}

.btn-enviar:hover {
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* SECCIÓN INTERMEDIA - TRÁMITE DE FIRMA */
.seccion-paso-firma {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-left: 5px solid #3b82f6;
}

.contenido-paso-firma p {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.5;
}

.numero-paso {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0b2a4a;
    margin-bottom: 10px;
}

.btn-enlace-firma {
    display: block;
    text-align: center;
    background: linear-gradient(45deg, #0b2a4a, #1e6acb);
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-enlace-firma:hover {
    box-shadow: 0 5px 15px rgba(30, 106, 203, 0.3);
    transform: translateY(-1px);
}

/* SUBIDA DE ARCHIVOS CON ENTORNO DASHED MANTENIDO */
#contenedorSubidaAfiliacion {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 30px;
}

.titulo-subida {
    border-bottom-color: #10b981;
}

.btn-registro {
    background-color: #10b981 !important;
    color: white;
}

.btn-registro:hover {
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.upload input[type="file"] {
    padding: 10px;
    background: #ffffff;
    cursor: pointer;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

/* ==========================================
   FOOTER INSTITUCIONAL COMPLETO
   ========================================== */
footer {
    background: #0b2a4a;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

footer p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* ==========================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================== */
@media(max-width: 900px) {
    header:not(.hero) {
        padding: 20px;
    }
    .hero h1 {
        font-size: 30px;
    }
}

@media (max-width: 700px) {
    .menu-toggle {
        display: block;
    }
    nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0b2a4a;
        display: none;
    }
    nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    nav.active {
        display: block;
    }
    header.hero {
        height: 320px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .grupo-doble {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Adaptación vertical de los pasos del procedimiento */
    .steps-afiliacion {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    .step-item {
        width: 100%;
    }
    .step-item:not(:last-child)::after {
        top: calc(100% + 5px);
        left: 50%;
        width: 3px;
        height: 15px;
    }
}