@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black');
@import url('https://fonts.cdnfonts.com/css/poppins');

.banner{
    width: 100%;
    min-height: 30rem;
    text-align: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin-top: -10rem;
}
.banner .slider{
    position: absolute;
    width: 200px;
    height: 180px;
    top: 10%;
    left: calc(50% - 100px);
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: autoRun 60s linear infinite;
}
@keyframes autoRun{
    from{
        transform: perspective(1000px) rotateX(-45deg) rotateY(0deg);
    }to{
        transform: perspective(1000px) rotateX(-45deg) rotateY(360deg);
    }
}

.banner .slider:hover {
    animation-play-state: paused;
}

.banner .slider .item{
    position: absolute;
    inset: 0 0 0 0;
    transform:
        rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
        rotateX(30deg)
        translateZ(400px);
    border-radius: 15px;
    overflow: hidden;
}
.banner .slider .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}
.banner .slider .item img:hover {
    transform: scale(1.1);
    filter: grayscale(100%);
}

.imagediv {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  top: 0;
  z-index: 3;
}

.centered-image{
  width: auto;
  height: 30vh;
  object-fit: cover;
  border-radius: 15px;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); */
}

.videodiv{
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: absolute;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 25rem;
  pointer-events: none;
}

.bgvideo {
  position: absolute;
  top: -25rem;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  max-width: 100vw !important;
  overflow: hidden;
}

.titulo{
  z-index: 3;
  position: relative;
  margin-top: 5rem;
  color: white;
  font-size: 6em;
  width: 100%;
  text-align: center;
  font-family: 'ICA Rubrik';
}

.carrusel1{ filter: drop-shadow(8px 7px 4px rgba(0, 0, 0, 0.4)); background-size: cover; background-image: url(images/m-conquistas.png); }
.carrusel2{ filter: drop-shadow(8px 7px 4px rgba(0, 0, 0, 0.4)); background-size: cover; background-image: url(images/m-democracia.png); }
.carrusel3{ filter: drop-shadow(8px 7px 4px rgba(0, 0, 0, 0.4)); background-size: cover; background-image: url(images/m-exploracion.png); }
.carrusel4{ filter: drop-shadow(8px 7px 4px rgba(0, 0, 0, 0.4)); background-size: cover; background-image: url(images/m-industrializacion.png); }
.carrusel5{ filter: drop-shadow(8px 7px 4px rgba(0, 0, 0, 0.4)); background-size: cover; background-image: url(images/m-politica.png); }

.carrusel1:hover{ background-image: url(images/s-conquistas.png); }
.carrusel2:hover{ background-image: url(images/s-democracia.png); }
.carrusel3:hover{ background-image: url(images/s-exploracion.png); }
.carrusel4:hover{ background-image: url(images/s-industrializacion.png); }
.carrusel5:hover{ background-image: url(images/s-politica.png); }

.indust-video{
  position: relative;
  width: 100%;
  overflow: hidden;
}
.indvideo{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
.indust-textura{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 98%;
  /*background-image: url(images/azul.png);*/
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  pointer-events: none;
}
.indust-image{
  position: absolute;
  right: 1rem;
  z-index: 3;
  top: 1rem;
  width: 10rem;
}
.indust-texto{
  display: flex;
  margin: 2rem;
  min-height: 35rem;
}
.legado-texto{
  display: flex;
  margin: 2rem;
  min-height: 26rem;
}
.explor-texto{
  display: flex;
  margin: 2rem;
  min-height: 26rem;
}
.democ-texto{
  display: flex;
  margin: 2rem;
  min-height: 20rem;
}
.conquis-texto{
  display: flex;
  margin: 2rem;
  min-height: 28rem;
}
.grid-item {
  flex: 1;
  padding: 2rem;
  border-left: 1.5px solid #59b6e1;
}
.grid-item:first-child {
  border-left: none;
}
.text-blue{
  color: #2aabe2;
  font-weight: bolder;
  font-size: 6em;
  font-family: 'ICA Rubrik';
  line-height: 0.9;
}
.text-red{
  color: #dd121c;
  font-weight: bolder;
  font-size: 6em;
  font-family: 'ICA Rubrik';
  line-height: 0.9;
}
.text-orange{
  color: #f7931f;
  font-weight: bolder;
  font-size: 6em;
  font-family: 'ICA Rubrik';
  line-height: 0.9;
}
.text-black-justified{
  color: black;
  font-size: 1em;
  text-align: justify;
}
.legado-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 100%;
  margin-top: -22rem;
}
.indust-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 100%;
  margin-top: 1rem;
  padding-left: 10rem;
}
.democ-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 100%;
  margin-top: -5rem;
  padding-left: 15rem;
}
.conquis-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 90%;
  margin-left: 8%;
  margin-top: -20rem;
}
.polit-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 100%;
  margin-top: -43rem;
}
.explor-descr{
  z-index: 999;
  position: relative;
  pointer-events: none;
  width: 100%;
  margin-left: -5rem;
  margin-top: -7rem;
}
.footer{
  color: #5d5d5d;
  padding: 2rem;
  width: 100%;
  text-align: center;
  font-family: 'ICA Rubrik';
  font-size: 1em;
}
.menu-container {
  z-index: 9999;
  position: absolute;
  right: 0;
  top: 0;
  padding: 1rem;
  text-align: right;
}
.hamburger {
  font-size: 3em;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 1rem;
    /*color: black;*/
    position: relative;
    z-index: 9;
}
.menu-list {
    height: 100vh;
    top: 0;
    right: 0;
    padding-right: 2rem;
    padding-left: 2rem;
    padding-top: 7rem;
  cursor: pointer;
  list-style: none;
  /*padding: 0;*/
  /*margin: 0;*/
  position: absolute;
  /*top: 100%;*/
  /*right: 3rem;*/
  display: none;
  text-align: right;
  font-size: 1.4em;
}
.menu-list li {
  color: white;
  margin: 0.5rem 0;
}
.nodecor{
  text-decoration: none;
}
.menu-list li a{
  color: white;
  font-family: 'ICA Rubrik';
}
.menu-list li a:hover{
  color: #2aabe2;
}

/* MODO RESPONSIVE */

@media screen and (max-width: 767px) {
    .ocultomovil{
        display:none;
    }
    .banner {
      margin-top: -12rem;
    }
    .banner .slider{
        width: 160px;
        height: 140px;
        left: calc(47% - 50px);
    }
    .banner .slider .item{
        transform:
            rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
            rotateX(20deg)
            translateZ(260px);
    }
    .imagediv {
      margin-top: 0.5rem;
    }
    .centered-image{
      height: 22vh;
    }
    .titulo{
      font-size: 2em;
    }
    .bgvideo{
      top: -40rem;
    }
    .indust-texto{
      flex-direction: column;
      margin-bottom: 5rem;
    }
    .explor-texto{
      flex-direction: column;
      margin-bottom: 5rem;
    }
    .legado-texto{
      flex-direction: column;
    }
    .democ-texto{
      flex-direction: column;
    }
    .conquis-texto{
      flex-direction: column;
    }
    .grid-item {
      border-left: none;
      border-top: 1.5px solid #59b6e1;
    }
    .grid-item:first-child {
      border-top: none;
      padding-left: 0;
    }
    .indust-descr{
      margin-top: 14rem;
      padding-left: 0;
    }
    .democ-descr{
      margin-top: 10rem;
      padding-left: 0rem;
    }
    .legado-descr{
      margin-top: 18rem;
    }
    .explor-descr{
      margin-left: 0rem;
      margin-top: 16rem;
    }
    .conquis-descr{
      margin-top: 12rem;
      width: 100%;
      margin-left: 0;
    }
    .hamburger{
        color: black;
    }
    .menu-list {
      background-color: white;
    }
    .menu-list li {
      color: black;
    }
    .menu-list li a{
      color: black;
    }
}



    .social-row {
      display: flex;
      gap: 20px;
    }
    .social-button {
      background: none;
      border: none;
      font-size: 30px;
      color: white;
      cursor: pointer;
      transition: transform 0.2s;
    }
    .social-button:hover {
      transform: scale(1.2);
    }

/* disenho para carrusel de videos */


/* Contenedor principal del carrusel */
.carousel-container-indust{
    position: absolute;
    width: 66%;
    left: 0;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}
.carousel-container-legado{
    position: absolute;
    width: 66%;
    left: 0;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}
.carousel-container-explor{
    position: absolute;
    width: 66%;
    right: 0;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}
.carousel-container-democ{
    position: absolute;
    width: 66%;
    left: 0;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}
.carousel-container-conquis{
    position: absolute;
    width: 66%;
    left: 0;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}
.carousel-container {
    position: relative;
    width: 50%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 15px;
    padding-left: 60px;
    padding-right: 60px;
}

/* Contenedor que envuelve la pista del carrusel para el overflow */
.carousel-track-wrapper {
    overflow-x: auto; /* Permite el desplazamiento horizontal */
    scroll-behavior: smooth; /* Desplazamiento suave al usar el scroll */
    -webkit-overflow-scrolling: touch; /* Mejora el scroll en dispositivos iOS */
    padding: 10px 0; /* Pequeño padding interno para los items */
}

/* Oculta la barra de desplazamiento en navegadores WebKit (Chrome, Safari) */
.carousel-track-wrapper::-webkit-scrollbar {
    display: none;
}
/* Oculta la barra de desplazamiento en IE y Edge */
.carousel-track-wrapper {
    -ms-overflow-style: none;
    /* Oculta la barra de desplazamiento en Firefox */
    scrollbar-width: none;
}


/* Pista del carrusel: Contiene todos los elementos de video */
.carousel-track {
    display: flex; /* Usa Flexbox para alinear los 'video-item' horizontalmente */
    gap: 20px; /* Espacio entre cada 'video-item' */
    flex-wrap: nowrap; /* ¡CORRECCIÓN CLAVE! Asegura que los ítems no se envuelvan a la siguiente línea */
    /* Añadimos un min-width para asegurar que el track sea lo suficientemente ancho para todos los items */
    /* (Número de items * ancho de item) + (Número de gaps * ancho de gap) */
    /* Para 6 items: (6 * 300px) + (5 * 20px) = 1800px + 100px = 1900px */
    min-width: 1900px; /* Ajusta este valor si añades o quitas videos */
}

/* Estilos para cada 'video-item' (la tarjeta que contiene el video/arte y la info) */
.video-item {
    flex: 0 0 auto; /* No crecer, no encoger, y mantener el tamaño basado en su contenido */
    width: 300px; /* Ancho fijo para cada tarjeta de video */
    background-color: #fff; /* Fondo blanco para la tarjeta */
    border-radius: 12px; /* Esquinas redondeadas para la tarjeta */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Sombra suave para un efecto 3D */
    overflow: hidden; /* Asegura que cualquier contenido que se desborde se recorte */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transiciones suaves para hover */
    cursor: pointer; /* Cambia el cursor para indicar que es interactivo */
}

/* Efecto al pasar el mouse sobre un 'video-item' */
.video-item:hover {
    transform: translateY(-8px) scale(1.03); /* Se levanta y agranda ligeramente */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* La sombra se hace más pronunciada */
}

/* Contenedor para la imagen y el video (para superponerlos) */
.video-wrapper {
    position: relative; /* Establece el contexto de posicionamiento para los hijos absolutos */
    width: 100%;
    /* Truco para mantener una relación de aspecto 16:9 (altura = 56.25% del ancho) */
    padding-bottom: 56.25%; /* (9 / 16) * 100% */
    background-color: #000; /* Fondo negro mientras carga el video o si no hay imagen */
}

/* Estilos para la imagen de arte (thumbnail) */
.video-thumbnail {
    position: absolute; /* Posiciona la imagen absolutamente dentro de .video-wrapper */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubrirá todo el espacio, recortando si es necesario */
    transition: opacity 0.3s ease, z-index 0s 0.3s; /* Transición de opacidad, z-index después de la transición */
    z-index: 2; /* Asegura que la imagen esté por encima del video por defecto */
    border-radius: 12px 12px 0 0; /* Bordes redondeados solo arriba */
}

/* Estilos para el reproductor de video */
.video-player {
    position: absolute; /* Posiciona el video absolutamente dentro de .video-wrapper */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubrirá todo el espacio, recortando si es necesario */
    z-index: 1; /* Por debajo de la imagen por defecto */
    border-radius: 12px 12px 0 0; /* Bordes redondeados solo arriba */
}

/* Efecto al pasar el mouse sobre el 'video-item' */
.video-item:hover .video-thumbnail {
    opacity: 0;
    z-index: 0; /* CAMBIO: Mueve la imagen de arte detrás del video para que no bloquee los controles */
    transition: opacity 0.3s ease, z-index 0s 0s; /* Z-index cambia inmediatamente al inicio de la transición */
}

.video-item:hover .video-player {
    z-index: 3; /* CAMBIO: Asegura que el reproductor de video esté por encima de todo y sea interactivo */
}


/* Estilos para el contenedor de información (título y descripción) */
.video-info {
    padding: 15px;
    text-align: left;
}

.video-info h2 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 10px;
    color: #007bff; /* Color azul para el título */
    font-weight: bold;
    font-family: 'ICA Rubrik';
}

.video-info p {


    color: black;
    font-size: 1em;
    text-align: justify;
}

/* Estilos para los botones de navegación del carrusel */
.carousel-button {
    position: absolute;
    top: 50%; /* Centra verticalmente */
    transform: translateY(-50%); /* Ajuste fino para centrado */
    background-color: rgba(0, 0, 0, 0.6); /* Fondo semi-transparente */
    color: white;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 10; /* Asegura que estén por encima de todo */
    border-radius: 5px;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    display: flex; /* Para centrar el icono */
    align-items: center;
    justify-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8); /* Oscurece al pasar el mouse */
}

.carousel-button.prev {
    left: 0; /* Posiciona el botón izquierdo en el borde del contenedor */
}

.carousel-button.next {
    right: 0; /* Posiciona el botón derecho en el borde del contenedor */
}

/* MEDIA QUERIES para Responsividad (ajustes para diferentes tamaños de pantalla) */

/* Para pantallas de tabletas (máximo 768px de ancho) */
@media screen and (max-width: 767px) {
    .video-item {
        width: 250px; /* Reduce el ancho de las tarjetas */
    }
    .carousel-track {
        gap: 15px; /* Reduce el espacio entre tarjetas */
        /* Ajusta el min-width para tabletas */
        min-width: calc(6 * 250px + 5 * 15px); /* (6 * 250) + (5 * 15) = 1500 + 75 = 1575px */
    }
    h1 {
        font-size: 2rem; /* Reduce el tamaño del título principal */
    }
    .carousel-button.prev {
        left: 0; /* Ajusta posición de botones para pantallas más pequeñas */
    }
    .carousel-button.next {
        right: 0;
    }
    .carousel-container-indust{
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
        margin-top: -6rem;
    }
    .carousel-container-legado{
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
    }
    .carousel-container-explor{
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
        margin-top: -5rem;
    }
    .carousel-container-democ{
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
        margin-top: -10rem;
    }
    .carousel-container-conquis{
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
        margin-top: -3rem;
    }
    .carousel-container {
        padding-left: 40px;
        padding-right: 40px;
        width: 100%;
    }
}