/* =========================================
   1. VARIABLES GLOBALES (Identidad PNL)
   ========================================= */
:root {
    /* Paleta de Colores */
    --color-primary: #0a1f44;      /* Azul Marino Oscuro */
    --color-secondary: #c92a2a;    /* Rojo Intenso */
    --color-accent: #b08d55;       /* Dorado/Bronce */
    
    --color-text: #212529;         /* Gris casi negro */
    --color-text-light: #6c757d;   /* Gris medio */
    --color-light: #f8f9fa;        /* Fondo gris muy suave */
    --color-white: #ffffff;
    
    /* Tipografías */
    --font-headings: 'Oswald', 'Impact', sans-serif; 
    --font-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    
    --max-width: 1200px;           
    --border-radius: 2px;          
}

/* =========================================
   2. RESETEO BÁSICO
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-headings);
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--color-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease-in-out;
}

/* =========================================
   3. HEADER
   ========================================= */
header {
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 4px solid var(--color-secondary);
}

.top-bar {
    background-color: var(--color-text);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: bold;
}

.top-bar ul {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.top-bar a:hover { color: var(--color-accent); }

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* LOGO (Controlado para que no se deforme) */
.logo img {
    height: auto;
    width: auto;
    max-height: 85px;  
    max-width: 300px;
    display: block;
}

.main-header nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-header nav a {
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
}

.main-header nav a:hover { color: var(--color-secondary); }

/* BOTÓN "AFÍLIATE AQUÍ" */
.btn-donate {
    padding: 10px 25px;              
    border-radius: var(--border-radius); 
    font-family: var(--font-headings);   
    font-size: 1rem;               
    letter-spacing: 1px;             
    text-transform: uppercase;       
    border: 1px solid #0a1f44;       
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    font-weight: 700;
    display: inline-block;
    background-color: #fff9c4 !important; 
    color: #0a1f44 !important;            
}

.btn-donate:hover {
    background-color: #f4eb8f !important;
    transform: translateY(-2px);          
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* =========================================
   4. HERO (BANNER) - MÁXIMO CONTRASTE
   ========================================= */
#hero {
    /* Fondo con imagen y capa oscura */
    background: linear-gradient(rgba(10, 31, 68, 0.7), rgba(10, 31, 68, 0.6)), url('imagenes/fondo.jpg');
    background-size: cover;
    background-position: center center;
    
    color: var(--color-white);
    text-align: center;
    
    /* Centrado y Espaciado */
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh; /* Altura generosa en PC */
}

/* REEMPLAZO DE FUERZA BRUTA PARA EL H1 */
#hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    color: #ffffff !important; /* Fuerza el color blanco */
    margin-bottom: 20px;
    
    /* Fondo oscuro semi-transparente */
    background: rgba(0, 0, 0, 0.75) !important; 
    padding: 15px 30px;
    border-radius: 4px;
    
    /* Borde inferior rojo */
    border-bottom: 4px solid #c92a2a !important;
    
    display: inline-block;
    max-width: 95%;
    text-shadow: none; /* Quitamos sombra al texto porque ya tiene caja de fondo */
    
    /* Asegura que la caja se dibuje correctamente */
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* REEMPLAZO PARA EL H2 */
#hero h2 {
    font-family: 'Roboto', sans-serif; /* Asegura la fuente */
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: none;
    color: #f1f1f1 !important;
    
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 15px 25px;
    border-radius: 4px;
    
    max-width: 800px;
    margin-bottom: 2rem;
    display: inline-block; /* Importante para que la caja envuelva el texto */
}

/* TEXTO DESTACADO (Párrafo pequeño) */
#hero p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffda6a; /* Amarillo dorado */
    text-shadow: 1px 1px 2px #000000;
    
    /* Fondo estilo "etiqueta" azul */
    background-color: rgba(10, 31, 68, 0.9);
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 30px;
    display: inline-block;
}

.btn-cta {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 15px 40px;
    border-radius: var(--border-radius);
    font-family: var(--font-headings);
    font-size: 1.1rem;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: inline-block;
    transition: 0.3s;
}

.btn-cta:hover {
    background-color: #b32424;
    transform: translateY(-3px);
}

/* =========================================
   5. SECCIONES Y LAYOUT GENERAL
   ========================================= */
section {
    padding: 5rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    border-bottom: 1px solid #eee;
}

h3 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-secondary);
}

#que-es { text-align: center; }
#que-es p { max-width: 900px; margin: 0 auto; font-size: 1.1rem; }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-primary);
    border-radius: var(--border-radius);
    font-family: var(--font-headings);
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 1rem;
    cursor: pointer;
}
.btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* =========================================
   6. CONSEJEROS: GRILLA EN PC / SLIDER EN MÓVIL
   ========================================= */
#candidatos {
    background-color: var(--color-light); 
    text-align: center;
    padding: 5rem 2rem;
}

.slider-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* ESTILO PC: GRILLA AUTOMÁTICA (Todas las fotos visibles) */
.slides-container {
    display: grid;
    /* Columnas automáticas que se adaptan al ancho */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 30px;
    padding: 10px;
    list-style: none;
}

.slide {
    background: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    width: 100%; 
}

.slide:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--color-primary);
}

.slide img {
    width: 100%;
    height: 300px; /* Altura uniforme para todos */
    object-fit: cover; 
    object-position: top center; 
    border-bottom: 5px solid var(--color-secondary);
}

.slide-info {
    padding: 1.5rem;
    text-align: left;
}

.slide h4 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.slide p { font-size: 0.9rem; font-weight: bold; color: #555; text-transform: uppercase; }
.slide small { color: #777; font-style: italic; display: block; margin-top: 5px; }

/* Ocultar flechas en PC (no se usan en grilla) */
.slide-arrow { display: none; }

/* =========================================
   7. EJES, PILARES Y FORMULARIO
   ========================================= */
/* Grillas de 3 columnas en PC */
.steps-container, .levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step, .level-card {
    background: var(--color-light);
    padding: 3rem 2rem;
    border: 1px solid #ddd;
    height: 100%;
}
.level-card {
    background: var(--color-white);
    border-top: 5px solid var(--color-primary);
}
.level-card:hover { border-top-color: var(--color-secondary); }

/* Formulario */
#contacto-recursos {
    background-color: var(--color-white);
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 5rem;
    align-items: start;
}

.contact-form-wrapper {
    background-color: var(--color-primary); 
    padding: 3rem;
    border-radius: var(--border-radius);
    color: var(--color-white);
}

.contact-form-wrapper h3 { color: white; margin-bottom: 0.5rem; text-align: left; }
.contact-form-wrapper h3::after { display: none; }

label { display: block; margin-bottom: 5px; font-weight: bold; text-transform: uppercase; font-size: 0.9rem; }
input, textarea {
    width: 100%; padding: 15px; margin-bottom: 20px;
    border: none; background-color: rgba(255,255,255,0.95);
    border-radius: var(--border-radius);
}
input:focus, textarea:focus { outline: 2px solid var(--color-accent); background-color: #fff; }

button[type="submit"] {
    width: 100%; background-color: var(--color-secondary);
    color: white; font-weight: 800; padding: 15px; border: none;
    text-transform: uppercase; font-family: var(--font-headings);
    cursor: pointer; transition: 0.3s;
}
button[type="submit"]:hover { background-color: #b32424; }

/* Footer & Detalles */
details { border: 1px solid #ddd; margin-bottom: 15px; background: var(--color-light); }
summary { padding: 1.5rem; font-weight: bold; cursor: pointer; color: var(--color-primary); font-family: var(--font-headings); }
details p { padding: 1.5rem; background: #fff; }

footer {
    background-color: #111; color: #888;
    padding: 4rem 2rem; text-align: center;
    border-top: 5px solid var(--color-secondary);
}
.footer-links ul { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-bottom: 2rem; }
.footer-links a { color: #fff; text-transform: uppercase; font-weight: bold; font-size: 0.9rem; }
.footer-compliance { font-size: 0.85rem; margin-bottom: 1rem; }

/* =========================================
   8. RESPONSIVE (CELULARES) - ESTILO CARRUSEL
   ========================================= */
@media (max-width: 900px) {
    /* Header Vertical */
    .main-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    .logo img {
        max-height: 100px;
        margin: 0 auto;
    }
    .main-header nav ul {
        flex-direction: column;
        gap: 15px;
        padding: 10px 0;
    }
    
    /* Columnas a 1 sola fila */
    .steps-container, .levels-grid, #contacto-recursos {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* --- TRANSFORMACIÓN A SLIDER MÓVIL (Carrusel deslizable) --- */
    #candidatos { padding: 3rem 1rem; }

    .slides-container {
        display: flex; /* Vuelve a ser flexible para deslizar */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        grid-template-columns: none; /* Anula la grilla */
        gap: 20px;
        padding-bottom: 20px;
    }
    
    .slide {
        min-width: 260px; /* Tamaño fijo de tarjeta en celular */
        flex: 0 0 260px;
    }
    
    .slide img {
        height: 250px; /* Foto un poco más chica */
    }
    
    .contact-form-wrapper { padding: 1.5rem; }
}