/* ============================================== */
/* RESET Y BASE */
/* ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Contenedor principal que limita el ancho del contenido de la página */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================== */
/* ENCABEZADO */
/* ============================================== */
.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #00004d;
    color: white;
    padding: 15px 40px;
}

/* 1. Logo */
.logo {
    margin-right: 30px; 
    line-height: 0; 
}

.logo img {
    height: 85px; 
    width: auto;
    display: block;
}

/* 2. Menú de Navegación */
.menu {
    display: flex;
    gap: 30px; 
    align-items: center;
    margin-inline: auto; 
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1.1em; 
    font-family: 'Roboto', Arial, sans-serif; 
    font-weight: 500; 
    margin: 0; 
    padding: 0;
}

.menu a:hover {
    text-decoration: underline;
}

/* 3. Botón de Acción */
.header-acciones {
    margin-left: 20px; 
}

.btn-accion {
    display: inline-block;
    padding: 10px 18px;
    background-color: #f39c12; 
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    border: 2px solid #f39c12;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-accion:hover {
    background-color: #e68900;
    border-color: #e68900;
}

/* ============================================== */
/* CARRUSEL DE NOTICIAS */
/* ============================================== */
.carrusel-noticias {
    width: 100vw; 
    margin: 0; 
    margin-top: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carrusel-ventana {
    overflow: hidden; 
}

.carrusel-contenedor {
    display: flex;
    width: 300%; 
    transition: transform 0.8s ease;
}

.carrusel-contenedor > div { 
    width: calc(100% / 3); 
    flex-shrink: 0;
    text-align: center;
}

.carrusel-contenedor > div img {
    width: 100%;
    height: 530px;
    object-fit: cover;
}

.btn-izquierda,
.btn-derecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2em;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

.btn-izquierda {
    left: 10px;
}

.btn-derecha {
    right: 10px;
}

/* ============================================== */
/* GALERÍA DESTACADA (5 CUADROS GRID) */
/* ============================================== */
.grid-5-cuadros {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: repeat(2, 200px);
    gap: 15px;
    margin: 30px 0;
}

.cuadro {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.cuadro:hover {
    transform: scale(1.02);
}

.cuadro img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
}

/* Posicionamiento Grid */
.grid-5-cuadros > .cuadro:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 2; }
.grid-5-cuadros > .cuadro:nth-child(2) { grid-column: 1 / 2; grid-row: 2 / 3; }
.grid-5-cuadros > .cuadro:nth-child(3) { grid-column: 2 / 3; grid-row: 1 / 3; }
.grid-5-cuadros > .cuadro:nth-child(4) { grid-column: 3 / 4; grid-row: 1 / 2; }
.grid-5-cuadros > .cuadro:nth-child(5) { grid-column: 3 / 4; grid-row: 2 / 3; }


/* ============================================== */
/* GALERÍA DE NOTICIAS CON FILTROS */
/* ============================================== */
/* Regla de Reset General para TODAS las imágenes (Colócala arriba) */


#galeria-noticias {
    padding: 60px 0;
    background-color: #f8f8f8;
}
img {
    max-width: 100%;
    height: auto; 
    /* Esta regla puede ir en la parte superior de tu archivo CSS */
}
#galeria-noticias h2 {
    text-align: center;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.intro-text {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 1.1em;
}

/* --- Filtros de Clasificación --- */
.filtros-deportivos {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap; 
}

.filtro-btn {
    background-color: #ecf0f1;
    color: #34495e;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s, transform 0.1s;
}

.filtro-btn:hover {
    background-color: #bdc3c7;
}

.filtro-btn.activo {
    background-color: #3498db;
    color: white;
}

/* --- Galería de Noticias (Grid) --- */
/* --- Estructura del Contenedor de la Galería (Verificación) --- */
/* --- Modificación en el Contenedor Principal (Grid) --- */
.contenedor-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    justify-items: stretch;
    width: 100%; 
}
.tarjeta-noticia a img {
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
}

/* Contenedor de la Imagen (<a>) */
.tarjeta-noticia > a {
    display: block;
    height: 250px; /* Altura fija deseada */
    width: 100%; 
    overflow: hidden;
}

/* La Imagen (<img>) */
.tarjeta-noticia a img {
    /* CLAVE: Ocupar 100% del contenedor fijo de 250px */
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    display: block; 
}
.tarjeta-noticia.oculta {
    /* ... */ 
}

.tarjeta-noticia:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.tarjeta-noticia img {
    width: 100%;
    height: 200px; 
    object-fit: cover;
}

.tarjeta-noticia .info {
    padding: 20px;
}

.tarjeta-noticia .tag {
    display: inline-block;
    background-color: #f39c12; 
    color: white;
    padding: 4px 8px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 3px;
    margin-bottom: 10px;
}

.tarjeta-noticia h3 {
    font-size: 1.3em;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.tarjeta-noticia p {
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.tarjeta-noticia small {
    display: block;
    color: #bdc3c7;
    font-size: 0.8em;
    margin-bottom: 15px;
}

.btn-leer-mas {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #3498db;
    transition: color 0.3s, border-bottom 0.3s;
}

.btn-leer-mas:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}


/* ============================================== */
/* FOOTER (PIE DE PÁGINA) */
/* ============================================== */
footer {
    background-color: #00004d;
    color: #ecf0f1;
    padding-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    width: 120px;
    height: auto;
    margin-bottom: 10px;
}
.footer-col {
    flex-basis: 22%;
    min-width: 200px;
}

.newsletter-col input[type="email"] {
        width: 85%;
        
    }
    
    .newsletter-col button {
        width: 50%;
        padding: 10px 0;
        color: #ffffff;
        background-color: #f39c12;  
        font-size: 18px;
    }
                  
.footer-col h3 {
    font-size: 1.2em;
    color: #f0f3f5;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}
/* --- Estilos para los Enlaces dentro del Footer --- */

/* 1. Estado Normal y Enlaces Visitados */
.footer-col a {
    color: #f0f3f5; /* Color blanco/gris claro para los enlaces (usando el mismo que el h3) */
    text-decoration: none; /* Quita el subrayado predeterminado */
}

/* 2. Estado Visitado (Para forzar que siga siendo blanco) */
.footer-col a:visited {
    color: #f0f3f5; /* FUERZA el color blanco incluso si el enlace ya fue visitado */
}

/* 3. Estado Hover (Al pasar el ratón) */
.footer-col a:hover {
    color: #3498db; /* Cambia al color del borde del h3 (#3498db) para dar un efecto visual de interacción */
    text-decoration: underline; /* Añade subrayado al pasar el ratón */
}
/* ... (El resto del footer se mantiene) ... */

.menu-hamburguesa-icono {
    display: none; 
    font-size: 2em;
    cursor: pointer;
    order: 3; 
    margin-left: 20px; 
    color: white; 
}


/* ============================================== */
/* 🚀 MEDIA QUERY: RESPONSIVE (Bloque ÚNICO y Correcto) 🚀 */
/* ============================================== */

/* --- AJUSTE para Tablets (992px y menos) --- */
@media (max-width: 992px) {
    /* 💥 Galería de Noticias: 2 Columnas */
    .contenedor-galeria {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- AJUSTE para Móviles (768px y menos) --- */
@media (max-width: 768px) {
    
    /* --- ENCABEZADO: Responsive --- */
    .encabezado {
        flex-direction: row; 
        justify-content: space-between; 
        padding: 15px 20px;
        position: relative; 
    }

    .menu-hamburguesa-icono {
        display: block; 
    }
    
    .logo img {
        height: 50px; 
    }

    .menu {
        display: none;
        position: absolute; 
        top: 80px; 
        left: 0;
        right: 0;
        width: 100%;
        background-color: #00004d; 
        flex-direction: column; 
        align-items: center; 
        padding: 20px 0;
        z-index: 1000; 
        margin-inline: 0; 
        gap: 15px; 
    }
    
    .menu a {
        padding: 8px 0;
        width: 80%;
        text-align: center;
    }

    .menu .header-acciones {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 15px;
    }
    
    /* --- CARRUSEL: Responsive --- */
    .carrusel-noticias {
        width: 100%; 
        margin: 0;
        padding: 0;
    }

    .carrusel-contenedor > div img {
        height: 180px; 
        object-fit: contain;
    }
    
    /* --- GALERÍA DESTACADA (5 CUADROS): Responsive Simétrico --- */
    .grid-5-cuadros {
        grid-template-columns: repeat(4, 1fr); 
        grid-template-rows: 135px 280px 135px; 
        gap: 8px; 
        margin: 10px 5px; 
    }

    .cuadro {
        height: 100%; 
        padding: 0; 
        margin: 0; 
        box-sizing: border-box; 
    }
    
    .grid-5-cuadros > .cuadro:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
    .grid-5-cuadros > .cuadro:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }
    .grid-5-cuadros > .cuadro:nth-child(3) { grid-column: 1 / 5; grid-row: 2 / 3; }
    .grid-5-cuadros > .cuadro:nth-child(4) { grid-column: 1 / 3; grid-row: 3 / 4; }
    .grid-5-cuadros > .cuadro:nth-child(5) { grid-column: 3 / 5; grid-row: 3 / 4; }
    
    .caption {
        font-size: 0.7em; 
        padding: 5px;
        height: 40px; 
        overflow: hidden; 
        line-height: 1.2; 
    }
    
    .cuadro img {
        height: calc(100% - 40px);
        object-fit: cover;
    }
    
    /* --- GALERÍA DE NOTICIAS: 1 Columna para Móvil --- */
    .contenedor-galeria {
        grid-template-columns: 1fr; 
    }
    
    .filtros-deportivos {
        flex-wrap: wrap; 
        gap: 8px;
        padding: 0 10px;
    }

    /* --- PIE DE PÁGINA: Apilar las columnas --- */
    .footer-container {
        flex-direction: column;
        padding: 0 20px;
        gap: 20px;
    }
    
    .footer-col {
        flex-basis: 100%; 
        min-width: unset; 
        margin-bottom: 10px; 
    }

    .newsletter-col input[type="email"] {
        width: 65%;
    }
    
    .newsletter-col button {
        width: 30%;
        padding: 20px 0;
        color: #ffffff;
        background-color: #f39c12;  
        font-size: 18px;
    }
}               