/* ==================================== */
/* VARIABLES Y RESET           */
/* ==================================== */

:root {
    /* Paleta de Colores Moderna */
    --primary-color: #2c3e50; /* Gris Carbón (Oscuro, Header y Footer) */
    --secondary-color: #3498db; /* Azul Acero (Vibrante, Enlaces/Bordes) */
    --accent-color: #2ecc71;   /* Verde Menta (Acento visual) */
    --text-color: #34495e;     /* Gris Oscuro (Texto) */
    --bg-light: #ecf0f1;       /* Gris muy claro (Fondo de secciones) */
    --white-color: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

.section-padding {
    padding: 60px 5%;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2em;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
    padding-bottom: 10px;
    width: 100%;
}

/* ==================================== */
/* 1. HEADER, LOGO Y MENÚ             */
/* ==================================== */

.header {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- NUEVO CONTENEDOR LOGO + TÍTULO --- */
.header-branding {
    display: flex; /* Asegura que el logo y el h1 estén en línea */
    align-items: center;
}

/* --- LOGO --- */
.logo-container {
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo-img {
    height: 80px; /* Tamaño del logo en el header */
    width: auto;
    margin-right: 15px; /* Espacio entre el logo y el texto Hombres de Honor */
}

/* --- TÍTULO JUNTO AL LOGO --- */
.logo-title-h1 {
    font-size: 2.2em; /* Tamaño grande */
    color: var(--white-color);
    margin: 0;
    padding: 0;
    line-height: 1.1;
    white-space: nowrap; /* Evita que se rompa en varias líneas */
}


/* --- Menú de Escritorio --- */
.nav-list {
    list-style: none;
    display: flex;
}

.nav-list a {
    color: var(--white-color);
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.nav-list a:hover {
    background-color: var(--secondary-color);
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 30px;
    cursor: pointer;
    display: none;
    z-index: 1001;
}

/* ==================================== */
/* 2. SLIDER DE IMÁGENES (Hero Section) */
/* ==================================== */

.slider-container {
    height: 70vh;
    position: relative;
    overflow: hidden;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider img.active {
    opacity: 1;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.8);
    color: var(--white-color);
    padding: 30px 5%;
    text-align: center;
    z-index: 10;
}

.slider-caption h1 {
    font-size: 2.5em;
    margin: 0;
    border: none;
    padding: 0;
}

/* ==================================== */
/* 3. BLOQUES DE EVENTOS (Grid)     */
/* ==================================== */

.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.evento-block {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--white-color);
    transition: transform 0.3s;
}

.evento-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.evento-block img {
    height: 200px;
    object-fit: cover;
    width: 100%;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.evento-block h3 {
    padding: 15px;
    font-size: 1.2em;
    color: var(--primary-color);
}

/* ==================================== */
/* 4. BLOQUES DE INFORMACIÓN (Grid)   */
/* ==================================== */

.section-info-bg {
    background-color: var(--bg-light);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.info-block {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--white-color);
    transition: border-color 0.3s;
}

.info-block:hover {
    border-color: var(--secondary-color);
}

.info-block img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid var(--accent-color);
}

.info-block h3 {
    font-size: 1.1em;
    color: var(--text-color);
}


/* ==================================== */
/* 5. FOOTER                */
/* ==================================== */

.footer {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 30px 5%;
    font-size: 0.9em;
}

.footer p {
    margin-bottom: 5px;
}


/* ==================================== */
/* MEDIA QUERIES (Móvil) - Off-Canvas Fix */
/* ==================================== */

@media (max-width: 768px) {
    
    /* Mantenemos el header-branding visible y ajustado */
    .header-branding {
        display: flex;
        align-items: center;
    }

    /* REDUCIMOS EL TAMAÑO DEL TÍTULO PARA QUE QUEPA EN LA BARRA MÓVIL */
    .logo-title-h1 {
        font-size: 1.2em; 
    }
    
    /* Muestra el botón de las 3 rayas */
    .menu-toggle {
        display: block; 
        position: relative; 
        z-index: 1001;
    }
    
    /* Oculta el menú grande de desktop */
    .nav {
        /* Configuración Off-Canvas */
        position: fixed;
        top: 0;
        left: -250px; /* Oculto fuera de pantalla */
        width: 250px;
        height: 100%;
        background: var(--primary-color);
        transition: left 0.3s ease;
        padding-top: 0;
        z-index: 999; /* Se desliza por debajo del botón */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    }

    .nav.open {
        left: 0; /* Muestra el menú */
    }

    .nav-list {
        flex-direction: column;
        /* Padding que empuja el menú hacia abajo para no tapar el header */
        padding-top: 60px; 
    }

    .nav-list a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .logo-img {
        height: 35px; /* Ajuste el tamaño del logo para móvil */
        margin-right: 10px; /* Separación entre logo y título móvil */
    }
    
    .slider-caption h1 {
        font-size: 1.8em;
    }
}