.image-container4 {
    position: relative;
    max-width: 100%;
    min-height: 400px; /* Define una altura mínima para la imagen de fondo */
    margin: 0 auto;
    overflow: hidden;
    background-image: url('../img/proyectos/fondo-proyectos.webp');
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.text-overlay {
    text-align: justify;
    padding: 20px;
    box-sizing: border-box;
    max-width: 90%; /* Aumenta el ancho máximo para extender el texto */
    margin: 0 auto;
}

.text-overlay h1 {
    font-weight: bold;
}

.text-overlay h1,
.text-overlay h3 {
    margin-bottom: 20px;
}

/* Estilos para dispositivos pequeños */
@media (max-width: 768px) {
    .image-container3 {
        padding: 10px;
    }

    .text-overlay {
        padding: 10px;
        max-width: 95%; /* Aumenta el ancho máximo en dispositivos pequeños */
    }

    .text-overlay h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .text-overlay h3 {
        font-size: 1rem;
    }
}

/* SECCIÓN DE LAS TARJETAS */
/* Estilo general */
.light {
    background: #D1C9BE;
}

a,
a:hover {
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

#pageHeaderTitle {
    margin: 2rem 0;
    text-transform: uppercase;
    text-align: center;
    font-size: 2.5rem;
}

.carrouselUl {
    list-style-type: disc;
    padding-left: 20px;
    margin-left: 0;
}

.carrouselUl li {
    display: list-item !important;
    list-style-position: inside;
    list-style-type: disc;
}

/* Tarjetas */
.postcard {
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 21px -12px rgba(0, 0, 0, 0.66);
    border-radius: 10px;
    margin: 0 auto 2rem auto;
    overflow: hidden;
    position: relative;
    color: #ffffff;
    width: 100%;
    max-width: 1400px;
    height: auto;
    align-items: stretch;
}

.postcard.light {
    background-color: #e1e5ea;
}

.t-dark {
    color: #18151f;
}

.postcard a {
    color: inherit;
}

.postcard h1,
.postcard .h1 {
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.postcard__img {
    width: 100%;
    height: auto;
}

.carousel-inner {
    height: 100%;
    display: flex;
    align-items: center;
}

.carousel-inner img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
}

.postcard__bar {
    width: 50px;
    height: 10px;
    margin: 10px 0;
    border-radius: 5px;
    background-color: #424242;
    transition: width 0.2s ease;
}

.postcard__text {
    padding: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 300px; /* Ajuste para asegurar espacio suficiente */
}


.postcard__preview-txt {
    overflow: visible;
    text-align: justify;
    height: auto;
    white-space: normal;
    text-overflow: unset;
}

.postcard__tagbox {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    font-size: 18px;
    padding: 0;
    justify-content: center;
}

.tag__item {
    display: inline-block;
    background: rgba(83, 83, 83, 0.4);
    border-radius: 3px;
    padding: 5px 12px;
    margin: 0 5px 5px 0;
    cursor: default;
    user-select: none;
    transition: background-color 0.3s;
}

.tag__item:hover {
    background: rgba(83, 83, 83, 0.8);
}

.postcard:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: linear-gradient(-70deg, #424242, transparent 50%);
    opacity: 1;
    border-radius: 10px;
}

.postcard:hover .postcard__bar {
    width: 100px;
}

@media screen and (min-width: 769px) {
    .postcard {
        flex-wrap: inherit;
    }

    .postcard__tagbox {
        justify-content: start;
    }

    .postcard__img {
        max-width: 350px;
        height: auto;
        transition: transform 0.3s ease;
    }

    .postcard__text {
        padding: 3rem 5rem;
        width: calc(100% - 400px);
    }

    .media.postcard__text:before {
        content: "";
        position: absolute;
        display: block;
        background: #18151f;
        top: -20%;
        height: 130%;
        width: 55px;
    }

    .postcard:hover .postcard__img {
        transform: scale(1.1);
    }

    .postcard:nth-child(2n+1) {
        flex-direction: row;
    }

    .postcard:nth-child(2n+0) {
        flex-direction: row-reverse;
    }

    .postcard:nth-child(2n+1) .postcard__text::before {
        left: -12px !important;
        transform: rotate(4deg);
    }

    .postcard:nth-child(2n+0) .postcard__text::before {
        right: -12px !important;
        transform: rotate(-4deg);
    }
}

@media screen and (min-width: 1024px) {
    .postcard__text {
        padding: 2rem 4rem;
    }

    .postcard__text:before {
        content: "";
        position: absolute;
        display: block;
        top: -20%;
        height: 130%;
        width: 55px;
    }
}

/* Colores de las tarjetas */
.orange .postcard__tagbox .play:hover {
    background-color: #f4a322;
    color: black;
}

.orange .postcard__title:hover {
    color: #f4a322;
}

.orange .postcard__bar {
    background-color: #f4a322;
}

.orange:before {
    background-image: linear-gradient(-30deg, rgba(244, 163, 34, 0.1), transparent 50%);
}

.orange:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(244, 163, 34, 0.1), transparent 50%);
}

.green .postcard__tagbox .play:hover {
    background-color: #79dd09;
    color: black;
}

.green .postcard__title:hover {
    color: #79dd09;
}

.green .postcard__bar {
    background-color: #79dd09;
}

.green:before {
    background-image: linear-gradient(-30deg, rgba(121, 221, 9, 0.1), transparent 50%);
}

.green:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(121, 221, 9, 0.1), transparent 50%);
}

.blue .postcard__tagbox .play:hover {
    background-color: #0076bd;
}

.blue .postcard__title:hover {
    color: #0076bd;
}

.blue .postcard__bar {
    background-color: #0076bd;
}

.blue:before {
    background-image: linear-gradient(-30deg, rgba(0, 118, 189, 0.1), transparent 50%);
}

.blue:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(0, 118, 189, 0.1), transparent 50%);
}

.red .postcard__tagbox .play:hover {
    background-color: #bd150b;
}

.red .postcard__title:hover {
    color: #bd150b;
}

.red .postcard__bar {
    background-color: #bd150b;
}

.red:before {
    background-image: linear-gradient(-30deg, rgba(189, 21, 11, 0.1), transparent 50%);
}

.red:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(189, 21, 11, 0.1), transparent 50%);
}

.yellow .postcard__tagbox .play:hover {
    background-color: #bdbb49;
    color: black;
}

.yellow .postcard__title:hover {
    color: #bdbb49;
}

.yellow .postcard__bar {
    background-color: #bdbb49;
}

.yellow:before {
    background-image: linear-gradient(-30deg, rgba(189, 187, 73, 0.1), transparent 50%);
}

.yellow:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(189, 187, 73, 0.1), transparent 50%);
}

/* Purple */
.purple .postcard__tagbox .play:hover {
    background-color: #800080;
    color: white;
}

.purple .postcard__title:hover {
    color: #800080;
}

.purple .postcard__bar {
    background-color: #800080;
}

.purple:before {
    background-image: linear-gradient(-30deg, rgba(128, 0, 128, 0.1), transparent 50%);
}

.purple:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(128, 0, 128, 0.1), transparent 50%);
}

/* Teal */
.teal .postcard__tagbox .play:hover {
    background-color: #008080;
    color: white;
}

.teal .postcard__title:hover {
    color: #008080;
}

.teal .postcard__bar {
    background-color: #008080;
}

.teal:before {
    background-image: linear-gradient(-30deg, rgba(0, 128, 128, 0.1), transparent 50%);
}

.teal:nth-child(2n):before {
    background-image: linear-gradient(30deg, rgba(0, 128, 128, 0.1), transparent 50%);
}

/* Estilo adicional para pantallas grandes */
@media screen and (min-width: 769px) {
    .green:before {
        background-image: linear-gradient(-80deg, rgba(121, 221, 9, 0.1), transparent 50%);
    }

    .green:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(121, 221, 9, 0.1), transparent 50%);
    }

    .blue:before {
        background-image: linear-gradient(-80deg, rgba(0, 118, 189, 0.1), transparent 50%);
    }

    .blue:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(0, 118, 189, 0.1), transparent 50%);
    }

    .red:before {
        background-image: linear-gradient(-80deg, rgba(189, 21, 11, 0.1), transparent 50%);
    }

    .red:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(189, 21, 11, 0.1), transparent 50%);
    }

    .yellow:before {
        background-image: linear-gradient(-80deg, rgba(189, 187, 73, 0.1), transparent 50%);
    }

    .yellow:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(189, 187, 73, 0.1), transparent 50%);
    }

    .purple:before {
        background-image: linear-gradient(-80deg, rgba(128, 0, 128, 0.1), transparent 50%);
    }

    .purple:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(128, 0, 128, 0.1), transparent 50%);
    }

    .teal:before {
        background-image: linear-gradient(-80deg, rgba(0, 128, 128, 0.1), transparent 50%);
    }

    .teal:nth-child(2n):before {
        background-image: linear-gradient(80deg, rgba(0, 128, 128, 0.1), transparent 50%);
    }
}

/* Estilo para el contenedor del carrusel en pantalla completa */
.fullscreen-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    display: none; /* Ocultar inicialmente */
}

/* Contenedor de la imagen para mantener la relación de aspecto */
.fullscreen-carousel__img-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ajuste de tamaño para las imágenes cuando están en pantalla completa */
.fullscreen-carousel__img {
    max-width: 55%; /* Ajusta el tamaño de la imagen al 90% del ancho de la pantalla */
    max-height: 55%; /* Ajusta la altura de la imagen al 90% de la altura de la pantalla */
    width: auto;
    height: auto;
    object-fit: contain; /* Mantiene la proporción de la imagen */
    align-items: center;
    margin-left: 20%;
}


/* Estilo para los controles de navegación */
.fullscreen-carousel .carousel-control-prev,
.fullscreen-carousel .carousel-control-next {
    width: 5%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Estilo para los iconos de navegación */
.fullscreen-carousel .carousel-control-prev {
    left: 10px;
}

.fullscreen-carousel .carousel-control-next {
    right: 10px;
}

.fullscreen-carousel .carousel-control-prev-icon,
.fullscreen-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    background-size: 30px 30px;
}

/* Estilo para el botón de cerrar el carrusel */
.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
    margin-right: 20px;
}

/* Efecto hover para el botón de cerrar */
.close-fullscreen:hover {
    color: #026167;
    transition: color 0.3s ease;
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    /* Ajusta el tamaño del carrusel en pantallas pequeñas */
    .fullscreen-carousel__img {
        width: 100%; /* Asegura que la imagen ocupe todo el ancho disponible */
        max-width: none; /* Evita que se limite el tamaño máximo */
        margin: 0 auto; /* Centra la imagen horizontalmente */
    }

    /* Ajusta el tamaño y posición de los controles de navegación */
    .fullscreen-carousel .carousel-control-prev,
    .fullscreen-carousel .carousel-control-next {
        width: 10%;
        font-size: 24px; /* Ajusta el tamaño del icono si es necesario */
    }

    /* Ajusta el tamaño y posición del botón de cerrar */
    .close-fullscreen {
        font-size: 40px;
        top: 10px;
        right: 10px;
    }
}

/* Ajustes para pantallas muy pequeñas (por ejemplo, móviles en retrato) */
@media (max-width: 480px) {
    /* Ajusta aún más el tamaño del carrusel */
    .fullscreen-carousel__img {
        width: 100%;
    }

    /* Ajusta el tamaño de los controles y el botón de cerrar para pantallas muy pequeñas */
    .fullscreen-carousel .carousel-control-prev,
    .fullscreen-carousel .carousel-control-next {
        width: 15%;
        font-size: 20px; /* Ajusta el tamaño del icono si es necesario */
    }

    .close-fullscreen {
        font-size: 40px;
        top: 5px;
        right: 5px;
    }
}
