@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Asegura que el body ocupe al menos toda la altura de la pantalla */
}

header {
    background: #aa0d0d;
    color: white;
    padding: 15px;
    text-align: center;
}

header h1 {
    margin: 10px 0 25px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    font-weight: bold;
}

header .escudo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: auto;
    z-index: 1;
}

nav {
    margin: 20px auto 10px auto; /* Add this to center the menu with the offset h1 */
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.7em; /* Aumentar tamaño de los elementos del menú */
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

main {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Permite que el contenido ocupe el espacio disponible */
}

.noticia {
    background: white;
    padding: 15px;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animación al pasar el ratón */
}

.noticia:hover {
    transform: scale(1.05); /* Aumento del tamaño al pasar el ratón */
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
    transform-origin: center; /* Asegura que el zoom sea desde el centro */
}

.noticia img {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 5px;
}

.noticia h2, .noticia h3 {
    color: #aa0d0d;
    font-size: 1.5em;
    font-family: 'Montserrat', sans-serif;
}

.noticia p {
    color: #333;
    font-size: 1em;
}

.noticia a {
    display: block;
    margin-top: 10px;
    color: #aa0d0d;
    font-weight: bold;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
}

footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: auto; /* Empuja el footer hacia el final */
}

/* Media Queries for responsiveness */
@media (max-width: 1025px) {
    header {
        flex-direction: row;
        justify-content: center;
    }

    header h1 {
        margin-left: 0;
    }

    header .escudo {
        width: 150px;
    }

    nav {
        margin-left: 0; /* Adjust center offset for tablet */
    }

    main {
        padding: 15px;
    }

    .noticia {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 160px;
        padding: 15px;
    }

    header h1 {
        margin-left: 0;
        margin-top: 60px;
    }

    header .escudo {
        width: 100px;
        left: 15px;
        top: 15px;
        transform: none;
    }

    nav {
        margin-top: 15px;
        margin-left: 0; /* Reset margin for mobile */
        width: 100%;
    }

    nav ul {
        gap: 15px;
    }

    .noticia:hover {
        transform: scale(1.03); /* Reducido el zoom en pantallas pequeñas */
    }
}

@media (max-width: 480px) {
    header {
        min-height: 180px;
        padding-bottom: 20px;
    }

    header .escudo {
        width: 80px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    header h1 {
        font-size: 1.5em;
        margin-top: 50px;
    }

    .noticia:hover {
        transform: scale(1.02); /* Reducción aún mayor en móviles */
    }
}
