/* Archivo: css/styles.css */
#comunicacion {
    padding: 20px;
    background-color: #eaeaea;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

#comunicacion h2 {
    margin-bottom: 20px;
    font-family: 'MonReg', sans-serif;
    font-size: 50px;
    opacity: 0.7;
}

.carrusel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.contenedor-noticias {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    margin-bottom: 10px;
}

.noticia {
    flex: 0 0 calc(25% - 20px);
    margin-right: 20px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    min-width: 0; /* Añadido para evitar problemas de desbordamiento */
}

.noticia img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 5px;
}

.noticia .fecha {
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
    opacity: 0.7;
}

.noticia h3 {
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.noticia .leer-mas {
    color: #9D2449;
    text-decoration: none;
    font-weight: bold;
}

.noticia .leer-mas:hover {
    text-decoration: underline;
}

.flecha {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 15px;
    z-index: 2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flecha.izquierda {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.flecha.derecha {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Estilos de modales*/
#modalTitulo {
    color: #621132; /* Cambia este valor por el color que prefieras */
    font-weight: bold;
    margin-bottom: 10px;
}
#modalTexto {
    text-align: center;
    white-space: pre-line;
    line-height: 1.6;
    margin-top: 10px;
    font-size: 16px;
}
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    max-width: 700px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.close {
    color: #000;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
opacity: 0.7;
}
/*-------------------*/
.noticias-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.noticia button {
    margin-top: 10px;
    padding: 8px 12px;
    border: none;
    background-color: #621132;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.noticia button:hover {
    background-color: #4c0d26;
}
.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}
/* Media Queries */
@media (max-width: 1024px) {
    .noticia {
        flex: 0 0 calc(33.333% - 20px); /* 3 noticias por vista */
    }
    
    #comunicacion h2 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .noticia {
        flex: 0 0 calc(50% - 20px); /* 2 noticias por vista */
    }
    
    #comunicacion h2 {
        font-size: 35px;
    }
    
    .noticia h3 {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    #comunicacion h2 {
        font-size: 30px;
        padding: 0;
        margin: 0 0 1px 0; 
    }
    #comunicacion{
        padding: 10px;
    }
    .noticia {
        flex: 0 0 calc(100% - 20px); /* 1 noticia por vista */
        margin: 10px;
        padding: 15px;
    }
    
    .noticia a{
        font-family: 'MonBla',sans-serif;
    }
    .flecha {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}