/* General reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Condensed', sans-serif;
    background-color: #fff;
    color: #333;
    overflow-x: hidden; /* Asegura que no haya desplazamiento horizontal */
}

/* Header */
header {
    background-color: #091640;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 0; /* Asegura que no haya margen extra */
}

header .logo {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    margin-right: 20px;
}

header .logo img {
    width: 100%;
    height: auto;
}

header .logo a {
    color: #009fd9;
    font-size: 24px;
    text-decoration: none;
}

/* Links del menú */
header .links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

header .links a {
    color: #009fd9; /* Color de los links */
    font-size: 18px;
    text-decoration: none;
}

header .links a:visited {
    color: #009fd9; /* Aseguramos que los links visitados también mantengan este color */
}

header .links a:hover {
    color: #fff; /* Color blanco al pasar el ratón */
    text-decoration: underline;
}

header .links a:focus {
    outline: none;
    color: #fff; /* Asegura que también se vea bien en enfoque */
}

.background-container {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

#background-video-1 {
    opacity: 1;
}

#background-video-2 {
    opacity: 0;
}

#background-video-3 {
    opacity: 0;
}

main {
    text-align: center;
    margin: 20px 0;
}

/* Estilo del buscador */
header .search-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 30px;
    padding: 5px 15px;
    border: 1px solid #ccc;
    width: 300px; /* Ancho ajustado */
}

header .search-container input {
    border: none;
    outline: none;
    padding: 8px;
    font-size: 16px;
    border-radius: 30px;
    flex: 1;
}

header .search-container button {
    background-color: #009fd9;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

header .search-container button i {
    color: white;
    font-size: 16px;
}

.spacer {
    height: 40px; /* Altura ajustable para el espacio */
    width: 100%; /* Asegura que ocupe todo el ancho */
    display: block; /* Garantiza que se comporte como un elemento de bloque */
}

/* Contenedor de las noticias */
.news-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 20px;
}

.news-item {
    width: 200px;
    text-align: left;
    transition: transform 0.3s ease-in-out;
}

.news-item:hover {
    transform: scale(1.1);
}

.news-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.news-title {
    margin-top: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    color: #333;
    text-align: left;
}

/* Estilo de las noticias extendidas en columnas */
.extended-news-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
    margin: 0 20px;
}

.extended-news-item {
    width: 32%; /* Tres columnas por defecto */
    margin-bottom: 30px;
    font-family: 'IBM Plex Sans Condensed', sans-serif;
    text-align: left;
}

.extended-news-item img {
    width: 100%;
    border-radius: 8px;
}

.extended-news-title {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    margin-top: 10px;
    color: #333;
}

.extended-news-text {
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    line-height: 1.5;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #091640;
    color: #fff;
    padding: 40px 20px;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-column {
    width: 30%;
    text-align: left;
}

.footer-column h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style-type: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #bbb;
}

/* VERSION PC (Desktop) */
@media (min-width: 1025px) {
    header {
        justify-content: space-between;
    }

    header .logo {
        max-width: 200px;
        margin-right: 20px;
    }

    header .links {
        display: flex;
        justify-content: center;
        flex-direction: row;
        gap: 15px;
    }

    header .links a {
        font-size: 18px;
    }

    .footer-column {
        width: 30%;
    }

    .news-container {
        flex-direction: row;
    }

    .extended-news-container {
        justify-content: space-between;
    }

    .extended-news-item {
        width: 32%;
    }

    .extended-news-container {
        text-align: left;
    }
}

/* VERSION MÓVIL (Mobile) */
@media (max-width: 1024px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px; /* Asegura que el contenido no se corte */
    }

    header .logo {
        max-width: 90%;
        margin-bottom: 10px;
        object-fit: contain;
    }

    header .links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    header .search-container {
        width: 90%;
    }

    .news-container {
        flex-direction: column;
        align-items: center;
        margin: 0 20px; /* Igualar márgenes a ambos lados */
    }

    .news-item {
        width: 90%;
        margin-bottom: 20px;
    }

    .extended-news-container {
        text-align: center;
    }

    .extended-news-item {
        width: 100%;
    }

    .footer-content {
        display: block;
    }

    .footer-column {
        width: 100%;
        margin-bottom: 20px;
    }
}
