h1 {
    text-align: center;
}

.border {
    padding: 10px;
    height: 100px;
}

#section4 {
    position: relative;
    overflow: hidden;
}

#section3 {
    padding: 15vmin;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#section2 {
    position: relative;
    overflow: hidden;
    margin-top: 100px;
}

.game {
    width: 1000px;
    height: 1000px;
    bottom: -2vh;
    left: 35vw;
    background: url('../images/resources/portrait/face.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    transform: rotate(-45deg) scale(90%);
    overflow: hidden;
    position: relative;
}

.glass {
    width: 1000px;
    height: 1000px;
    background: url('../images/resources/portrait/glasses.png') no-repeat center center;
    background-size: cover;
    position: absolute; /* Necesario para superponerse */
    top: 0;
    left: 0;
    z-index: 100; /* Asegura que esté encima de todo */
    pointer-events: none; /* Inhabilita interacciones del ratón */
}

.puzzle {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    overflow: hidden;
    width: 426.6667px;
    height: 426.6667px;
    background-color: #eaeaea;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(90%);
    z-index: 2;
    box-shadow: 0px 0px 120px rgba(234, 234, 234, 0.4);
}

.piece {
    width: 106.66667px;
    height: 106.66667px;
}

.piece img {
    width: 106.66667px;
    height: 106.66667px;
    box-shadow: 0px 0px 50px rgba(234, 234, 234, 0.2);
}

#front_cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #16161d;
    display: block;
    z-index: 0;
  }

/* Estilo para el contenedor de los iconos */
#cover {
    display: flex;
    background-color: #16161d;
    flex-direction: column; /* Coloca los elementos en una columna */
    justify-content: center; /* Centra los elementos verticalmente */
    align-items: center; /* Centra los elementos horizontalmente */
    height: calc(var(--vh, 1vh) * 100); /* Ocupa toda la altura de la pantalla */
    text-align: center;
    z-index: 1; /* Coloca el cover por encima de otras secciones */
}


#logo_cover {
    margin-bottom: 40px; /* Espacio entre el logo y los iconos */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5; /* Asegura que el logo esté encima de los iconos */
    width: 80%; /* Asegura que el logo se ajuste al contenedor */
    max-width: 300px; /* Ajusta el tamaño máximo del logo */
    transform: translateY(-30%)
}

#logo_cover img {
    width: 25vmin; /* Hace que la imagen ocupe todo el contenedor */
    min-width: 150px;
    height: auto; /* Mantiene la relación de aspecto */
}

#icons {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6; /* Asegura que los iconos estén por encima del canvas */
    transform: translateY(-40%)
}

/* Ajusta el tamaño de los iconos */
#icons img {
    height: 15vmin; /* La altura de los iconos será el 25% del mínimo entre el ancho y la altura del viewport */
    width: auto; /* Mantiene la relación de aspecto */
    margin: 0 2vmin; /* Espaciado entre los iconos */
}

#juande {
    text-align: center;
    margin-top: 20px; /* Ajusta el espacio entre el div icons y juande */
    z-index: 6;
}

/* Layout en móviles */
@media (max-width: 768px) {
    #icons {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Dos iconos por fila */
        grid-template-rows: auto auto; /* Dos filas */
        gap: 20px;
        transform: translateY(-10%)
    }

    #icons img {
        height: 25vmin; /* Ajusta el tamaño para móviles */
        width: auto;
        margin: 0;
    }

    /* Asegura que el último icono se centre en la fila siguiente */
    #icons img:nth-child(3) {
        grid-column: 1 / -1; /* Coloca el tercer icono en toda la fila */
        justify-self: center; /* Centra el icono */
    }
}

#text_over_video {
    width: 25vw;
    min-width: 310px;
    color: #16161d;
    z-index: 30;
    position: relative;
    transform: translate(-50%, -50%);
}

#video-container {
    position: absolute;
    background: #ffffff;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Asegura que el video no sobresalga del contenedor */
    z-index: 0;
    mix-blend-mode: multiply;
}

#video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que el video ocupe toda la sección */
}


.grid {
    display: grid;
    gap: 0.5px;
  }
  
  .grid > div {
    color: rgb(20, 15, 15);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }
  
  /* Desktop */
  @media (min-width: 1024px) {
    .grid {
      grid-template-columns: repeat(6, 1fr);
      grid-template-rows: auto;
    }
  
    .grid > :nth-child(15) {
      grid-column: span 2;
    }
  }
  
  /* Tablet */
  @media (min-width: 768px) and (max-width: 1023px) {
    .grid {
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: auto;
    }
  
    .grid > :nth-child(15) {
      grid-column: span 2;
    }
  }
  
  /* Mobile */
  @media (max-width: 767px) {

    .game {
        bottom: -10vh;
        left: -70vw;
        background: url('../images/resources/portrait/face.jpg') no-repeat center center;
        background-size: cover;
        position: relative;
        transform: rotate(-45deg) scale(100%);
        overflow: hidden;
    }

    
    .grid {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: auto;
    }
  
    .grid > :nth-child(15) {
      grid-column: span 3;
    }

  }

  #logo_section_text {
    display: flex;
    flex-direction: column; /* Apila los elementos verticalmente */
    justify-content: center; /* Centra los elementos verticalmente */
    align-items: center; /* Centra los elementos horizontalmente */
    text-align: center; /* Centra el texto */
    height: auto; /* Permite que el contenido determine la altura */
}

.logo_section_3 {
    width: 120px;
    opacity: 0; /* Comienza invisible */
    animation: fadeIn 1s ease-in-out forwards; /* Animación */
}


/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
    .logo_section_3 {
        width: 80px; /* 1/3 del ancho de la pantalla */
    }
}

/* Definición de la animación */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}


/* Estilos para texto movimiento */

.animated-text {
    font-size: 9rem;
    font-weight: 900;
}

.full_back {
    width: 100vw;
    height: auto;
}


.FEAT-spacer {
    height: 100vh; /* Espacio antes y después de la animación para simular scroll */
}

#FEAT-lottie-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#FEAT-lottie-animation {
    width: 100%;
    height: auto;
}

.keyhole.rafaga-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vw;
    height: 40vmin;
    transform: translate(-50%, -50%);
    z-index: 999;
    background-color: #eaeaea;
    padding: 20px;
    border-radius: 0vmin;
    transition: width 0.6s ease-in-out, height 1s ease-out, border-radius 0.5s ease-out;
}

.keyhole.rafaga-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vw;
    height: 40vmin;
    transform: translate(-50%, -50%);
    border-radius: 0vmin; /* Igual al contenedor */
    background-color: transparent; /* No afecta el diseño */
    pointer-events: auto; /* Permite capturar eventos */
}

.keyhole.rafaga-container:hover {
    width: 50vmin;
    height: 50vmin;
    border-radius: 50vmin;
}


.button_key {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30vmin;
    height: 30vmin;
    transform: translate(-50%, -50%);
    z-index: 999;
    background-color: #eaeaea;
    padding: 5vmin;
    border-radius: 30vmin;
    transition: width 0.2s ease-out, height 0.2s ease-out, border-radius 0.2s ease-out, background-color 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    cursor: pointer;
}

.button_key::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vw;
    height: 40vmin;
    transform: translate(-50%, -50%);
    border-radius: 0vmin;
    background-color: transparent;
    z-index: -1;
}

.button_key:hover {
    width: 10vmin;
    height: 10vmin;
    background-color: #d83312;
    border-radius: 10vmin;
}

.button_key .a_trabajos_home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.button_key .a_trabajos_home p {
    margin: 0;
    color: #16161d;
}


.button_key .a_trabajos_home button:hover {
    background-color: #666;
}

.button_key #access {
    display: none;
    width: 70%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.button_key:hover .a_trabajos_home {
    display: none;
}

.button_key:hover #access {
    display: block;
}

.sticky-logo {
  position: sticky;
  top: 0; /* Se queda pegado cuando llega al top */
  z-index: 1000; /* Asegura que esté por encima de otros elementos */
  padding: 5vmin; /* Opcional */
  width: 120px;
  margin-bottom: -200px ;

}


.touch-button {
    padding: 20px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 40px; /* Ajusta el tamaño según la imagen */
    height: auto;
    z-index: 1000;
    transition: width 0.3s ease;
    cursor: none !important;
  }

  .touch-button:hover {
    width: 80px;
  }
  

  @media (orientation: portrait) {
    .game {
        opacity: 0;
    }
}

