html,
body {
    overflow-x: hidden;
    /* Elimina el scroll horizontal */
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to top, rgba(30, 35, 38, .8), rgba(30, 35, 38, 1)),
        url(../img/fondo2.webp);
    background-size: cover;
    /* Esto asegura que la imagen cubra todo el área sin distorsionarse */
    background-repeat: no-repeat;
    /* Esto evita que la imagen se repita */
    background-position: center center;
    /* Posiciona la imagen en el centro */
    background-attachment: fixed;
    /* Fija la imagen de fondo para que no se mueva al scrollear */
    color: #ffffff !important;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    /* Asegura que el body cubra toda la altura de la ventana */
}

header {
    text-align: center;
    padding: 0px;
    background: #1f1f1f75;
    width: 100%;
    position: relative;
}

.botn {
    background-color: #00ffcc;
    color: #121212;
    padding: 10px 20px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

.botn:hover {
    background-color: #00cc99;
}



.btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: #00ffcc;
    color: #121212;
    text-decoration: none;
    border-radius: 5px;
}

.botn-trad {
    position: absolute;
    top: 20px;
    right: 20px;
    /* Esto coloca el botón en la esquina derecha */
    padding: 10px 20px;
    background: #00ffcc;
    color: #121212;
    border: none;
    /* Ya que es un botón, no una etiqueta 'a', eliminamos el border por defecto */
    border-radius: 5px;
    cursor: pointer;
    /* Cambia el cursor a una mano al pasar por encima */
}

h1,
h2,
h3 {
    color: #00ffcc;
}

h2 {
    text-align: center;
}

main {
    width: 80%;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

#contenido-principal {
    display: flex;
    width: 100%;
    gap: 20px;
    margin-bottom: 50px;
}

.contenedor {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.left-column,
.right-column {
    flex: 1;
    background: #1f1f1f;
    padding: 20px;
    border-radius: 10px;
}

.center-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}



@media (max-width: 768px) {
    .video-container {
        position: relative;
        padding-bottom: 56.25%;
        /* 16:9 */
        height: 0;
        overflow: hidden;
        max-width: 100%;
    }

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

}

.video-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: -15px;
}

video {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.tech {
    background: #2a2a2a;
    padding: 10px 20px;
    border-radius: 5px;
}

p {
    line-height: 1.6;
}


/* Carrusel */


.contenedor-carrusel {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    max-width: 50%;
    height: auto;
    margin: 0px auto 0px;

}

.contenedor-carrusel .carousel-control-prev,
.contenedor-carrusel .carousel-control-next {
    position: absolute;
    cursor: pointer;
    background-color: transparent;
    border: 2px solid #ffffff;
    width: 50px;
    /* Ancho deseado */
    height: 52px;
    /* Altura deseada */
    margin: auto -105px auto;
    padding: 0 0;
    font-size: 16px;
    color: #fff;

}



@media (max-width: 666px) {

    .contenedor-carrusel .carousel-control-prev,
    .contenedor-carrusel .carousel-control-next {
        position: absolute;
        width: 60px;
        /* Ancho deseado */
        height: 60px;
        /* Altura deseada */
        margin: 60px -95px auto;
        padding: 10px 22px;

    }
}

@media (max-width: 666px) and (min-width: 740px) {

    .contenedor-carrusel .carousel-control-prev,
    .contenedor-carrusel .carousel-control-next {
        position: absolute;
        width: 60px;
        /* Ancho deseado */
        height: 60px;
        /* Altura deseada */
        margin: 338px 5px auto;
        padding: 10px 22px;

    }
}


.contenedor-carrusel .carousel-indicators {
    margin: -60px;
}

@media (max-width: 968px) {
    .contenedor-carrusel .carousel-indicators {
        display: none;
    }
}


.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.image-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
}

/* Modal CSS para maximizar */
.modal-dialog-centered {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.modal-xl {
    max-width: 100%;
}

.modal-body {
    background-color: #000000;
}

#projectCarousel {
    width: 100%;
}

#projectCarousel .carousel-item {
    height: 90vh;
    /* OK: esto no rompe */
    /* NO tocar display acá */
}

#projectCarousel .carousel-item img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* centra horizontal */
}



.videos {
    margin-top: -90px;
}

/* Media Query para pantallas más pequeñas */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 768px) {
    .modal-body img {
        max-width: 110%;
        /* Ajusta el ancho máximo para que ocupe todo el ancho disponible */
        max-height: 90vh;
        /* Reduzca la altura máxima para adaptarse mejor a la pantalla del móvil */
    }
}

/* Media Queries */
@media (max-width: 768px) {
    main {
        width: 90%;
    }

    .header {
        width: 90%;
    }


    #contenido-principal {
        flex-direction: column;
        gap: 20px;
    }

    .left-column,
    .right-column,
    .center-column {
        width: 100%;
        /* Usa todo el ancho del contenedor en pantallas móviles */
        max-width: 100%;
        /* Evita desbordamientos */
        box-sizing: border-box;
        /* Incluye el padding y borde */
    }


    .video-container video {
        max-width: 100%;
    }

    .btn-back {
        position: fixed;
        font-size: 8px;
        /* Reduce el tamaño del texto */
        padding: 5px 8px;
        /* Ajusta el espacio interior */
        width: auto;
        /* Asegúrate de que el ancho sea adaptable */
        top: 10px;
        /* Ajusta la distancia desde la parte superior */
        left: 285px;
        background: linear-gradient(135deg, #00ffcc, #0066ff);
        /* Fondo degradado */
        color: #ebe7e7;
        /* Texto oscuro */
        border: none;
        /* Sin borde */
        border-radius: 30px;
        /* Esquinas redondeadas */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        /* Sombra */
        text-decoration: none;
        /* Sin subrayado */
        z-index: 9999;
        /* Asegura que esté al frente */
        cursor: pointer;
        /* Cambia el cursor al pasar sobre el botón */
        transition: all 0.3s ease;
        /* Animación suave */
        font-family: 'Roboto', sans-serif;
        /* Fuente moderna */
        letter-spacing: 1px;
        /* Espaciado entre letras */
    }

    .btn-back:hover {
        background: linear-gradient(135deg, #0066ff, #00ffcc);
        /* Fondo degradado inverso */
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
        /* Sombra */
        transform: scale(1.05);
        /* Efecto de ampliación */
    }

    .botn-trad {
        position: fixed;
        top: 10px;
        right: 320px;
        /* Ajusta para pantallas pequeñas */
        font-size: 8px;
        /* Reduce el tamaño del texto para móviles */
        padding: 5px 8px;
        /* Ajusta el espacio interior */
        background: linear-gradient(135deg, #00ffcc, #0066ff);
        color: #ebe7e7;
        border: none;
        border-radius: 30px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 9999;
        cursor: pointer;
        transition: all 0.3s ease;
        font-family: 'Roboto', sans-serif;
        letter-spacing: 1px;
    }

}