body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

header {
    background-color: #5b0000;
    color: white;
    padding: 10px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: left;
    height: 160px;
}

.header-col-img {
    flex: 0 0 12%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.header-col-img img {
    margin: 0;
    border: none;
    display: block;
    width: auto;
}

.header-col-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 0 0 88%;
}

.header-col-text h1 {
    margin: 0 0 5px 0;
    font-size: 40px;
}

.header-col-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
}

.header-divider {
    all: unset;
    width: calc(100% - 150px);
    border: none;
    border-top: 2px solid #ffffff;
    margin: 8px 0 8px 0;
    margin-right: 0;
}

.titulo {
    font-size: 22px;
    margin: 0;
}


.header-col-text-nav {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: flex-end;
    justify-content: space-between;
}

.header-col-text-nav h1 {
    margin: 0 0 5px 0;
}

.header-col-text-nav nav {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    margin-right: 150px;
    box-sizing: border-box;
    max-width: calc(100% - 150px);
}

.header-col-text-nav nav ul {
    display: flex;
    flex-direction: row;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-col-text-nav nav ul li {
    margin: 0;
    padding: 0;
}

.header-col-text-nav nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.header-col-text-nav nav ul li a:hover {
    color: #ffd700;
}

/*primer carrusel*/
.carousel-item img {
    /*height: 480px;*/
    height: 350px;
    width: 100%;
    object-fit: cover;
}

section {
    width: 100%;
}

/* Estilos para la sección de botones */
#section-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.btn-custom {
    background-color: #5b0000;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s, color 0.2s;
    width: 24%;
    height: 70px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-custom:hover {
    background-color: #7a0000;
    transform: translateY(-3px);
    color: #ffd700;
}

/* Estilos para la sección de noticias */
#section-news {
    padding-left: 8%;
    padding-right: 8%;
}

#section-news .noticias {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;

}

.noticias {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    width: 100%;
}

.noticias>* {
    flex: 1;
}

.noticias article {
    border: 1px solid #7a0000;
    border-radius: 5px;
    padding-left: 50px;
    padding-right: 50px;
}

blockquote {
    border-left: 4px solid #7a0000;
    padding-left: 16px;
    margin: 16px 0 16px 16px;
    color: #333;
    font-style: italic;
    background: #f9f9f9;
}

.img-vision-mision {
    width: 100%;
    height: 400px;
    margin-top: 25px;
}

.header-divider-news {
    border: none;
    border-top: 2px solid #000000;
    margin: 8px 0 8px 0;
    margin-right: 0;

}

/* Estilos para la sección de avisos y comunicados */
#section-avisos-comunicados {
    padding-left: 7%;
    padding-right: 7%;
    margin-bottom: 20px;
}

.carousel-col {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 1%;
    height: 500px;

}

.carousel-col>* {
    flex: 1;
}

.carousel-col img {
    margin-left: 80px;
    object-fit: fill;
    border: 1px solid #10007a;
    background-color: yellowgreen;
    max-width: 43%;
    max-height: 500px;
}

.carousel-col p {
    margin-right: 80px;
    padding-left: 15px;
}
/* Estilos exclusivos para los controles del segundo carrusel (avisos) */
#carousel-style.carousel-control-prev,
#carousel-style.carousel-control-next {
    background-color: #660000eb !important;
    /* Azul oscuro, cambia a tu gusto */
    border-radius: 50%;
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s;
    z-index: 2;
}

#carousel-style.carousel-control-prev:hover,
#carousel-style.carousel-control-next:hover {
    background-color: #ffffff !important;
    opacity: 1;
}

#carousel-style .carousel-control-prev-icon,
#carousel-style .carousel-control-next-icon {
    filter: invert(1) brightness(2);
}
/*articulos*/
.articulos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 8%;
    margin-bottom: 20px;
}
.articulo {
    /*border: 1px solid #000000;*/
    display: flex;
    flex-direction: row;
    background-color: #fff;
    transition: box-shadow 0.3s, transform 0.2s, background-color 0.3s;
}
.articulo:hover {
    box-shadow: 0 8px 24px rgb(255, 255, 255);
    background-color: #ffffff;
    transform: translateY(-5px) scale(1.01);
}

.articulo a {
    background-color: #5b0000;
    text-decoration: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.2s, transform 0.2s;
    align-self: flex-end;
}
.articulo a:hover {
    background-color: #920000;
    color: #ffd700;
    transform: translateY(-3px);
}
.articulo>* {
    flex: 1;
}
.articulo img {
    width: 50%;
    max-width: 50%;
    min-width: 50%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #7a0000;
}
.fecha {
    color: #7a0000;
    margin-bottom: 10px;
    text-decoration: #7a0000 underline;
    font-weight: bold;
    margin-left: 10px;
    padding-bottom: 0;
    margin-bottom: 0;
}
.articulo-texto{
    display: flex;
    flex-direction: column;
    max-height: 100%;
    justify-content: space-between;
    margin: 25px;
    padding: 0;
}
.btn-leer-mas {
    align-self: flex-end;
    background-color: #5b0000;
    text-decoration: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.2s, transform 0.2s;
}
.btn-leer-mas:hover {
    background-color: #7a0000;
    color: #ffd700;
    transform: translateY(-3px);
}
.articulo-texto p {
    max-height: 100px;           
    word-break: break-word;
}
/* Estilos para la sección final */
#section-final {
    display: flex;
    flex-direction: row;
    max-width: 100%;
    color: #7a0000;
    align-items: center;
}
#section-final>* {
    flex: 1;
}
#section-final .final-div-1 {
    max-width: 50%;
    align-items: center;
    display: flex;
    justify-content: flex-end;
}
.final-div-1 iframe {
    border: 1px solid #7a0000;
    border-radius: 10px;
    margin: 25px 20px 25px auto; /* 20px a la derecha */
}
#section-final .final-div-2 {
    max-width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#section-final .final-div-2 .contactos {
    text-align: left;
    width: 100%;
    margin-left: 35%;
    color: #000000;
}
#section-final .final-div-2 .divider-contactos {
    width: 68%;
    border: none;
    border-top: 2px solid #000000;
    align-self: flex-start;
    margin-left: 18%;
}
#section-final .final-div-2 button{
    background-color: #5b0000;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s, color 0.2s;
    width: 60%;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

#section-final .final-div-2 button svg {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
#section-final .final-div-2 button h4 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
#section-final .final-div-2 button a{
    text-decoration: none;
    color: white;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 50%;
}
#section-final .final-div-2 button a svg {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}
#section-final .final-div-2 button:hover {
    background-color: #7a0000;
    transform: translateY(-3px);
    color: #ffd700;
}
#section-final .final-div-2 button a:hover {
    color: #ffd700;
}
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    bottom: 0;
    display: flex;
}
.footer-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-left: 20px;
    font-size: 14px;
    gap: 0;
    margin: 0;
}

.footer-text > * {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 2;
}

@media (max-width: 992px) {
    /* Header */
    header {
        flex-direction: column;
        height: auto;
        text-align: center;
        padding: 15px;
    }

    .header-col-img {
        flex: unset;
        margin-bottom: 10px;
        padding: 0;
    }

    .header-col-text {
        align-items: center;
        flex: unset;
    }

    .header-col-text-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .header-col-text-nav nav {
        margin-right: 0;
    }

    .header-col-text h1 {
        font-size: 28px;
        text-align: center;
    }

    .header-col-text h2 {
        font-size: 16px;
        text-align: center;
    }

    /* Botones principales */
    #section-buttons {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 10px;
    }

    .btn-custom {
        width: 48%;
        height: auto;
        padding: 12px;
        font-size: 14px;
    }

    /* Noticias */
    #section-news .noticias {
        flex-direction: column;
        padding: 0;
    }

    .noticias article {
        padding: 20px;
    }

    .img-vision-mision {
        height: auto;
    }

    /* Carrusel avisos */
    .carousel-col {
        flex-direction: column;
        height: auto;
    }

    .carousel-col img {
        max-width: 80%;
        margin: 0 auto 15px;
    }

    .carousel-col p {
        margin: 0;
        padding: 0 10px;
        text-align: justify;
    }

    /* Artículos */
    .articulos {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .articulo {
        flex-direction: column;
        text-align: center;
    }

    .articulo img {
        width: 100%;
        height: auto;
        margin-left: 25%;
    }

    .articulo-texto {
        padding: 10px;
        margin-left: 15%;
        margin-right: 15%;
    }

    /* Sección final */
    #section-final {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 10px;
    }

    #section-final iframe {
        width: 100%;
        height: 250px;
    }

    .final-div-2 {
        text-align: center;
        width: 100%;
    }

    .final-div-2 button {
        margin: 5px;
        width: 45%;
    }

    .final-div-2 h4 {
        font-size: 14px;
    }

    /* Footer */
    footer {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        justify-content: center;
        align-items: center;
    }

    footer img {
        margin-bottom: 10px;
        width: 25%;
    }

    .footer-text p {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .btn-custom {
        width: 100%;
    }

    .final-div-2 button {
        width: 100%;
    }
}
