/* =====================
   RESET Y BASE GENERAL
   ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scrollbar-width: none;
  position: relative; /* Necesario para que el z-index funcione correctamente */
  width: 100%;
  min-height: 100vh;
  font-family: 'Bebas Neue', sans-serif;

  background: linear-gradient(135deg, #e0c021, #c02234, #732c64, #088a38);
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
  overflow-x: hidden;
  z-index: 0; /* o ninguno */
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  pointer-events: none;
}


body {
  scrollbar-width: none;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* =====================
   TIPOGRAFÍA Y TEXTOS
   ===================== */
h1, h2, h3 {
  color: #f4eefc;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

h1, h2 {
  margin: 0; /* Elimina los márgenes predeterminados */
}

h1 {
  font-size: clamp(48px, 6vw, 90px);
}

h2 {
  font-size: clamp(36px, 5vw, 70px);
  margin-top: clamp(0px, 1vw, 10px); /* Ajustado a 0 o muy pequeño */
}


h3 {
  font-family: 'Courier New', Courier, monospace;
font-size: clamp(18px, 2vw, 24px);
align-items: left;
}

.text-section {
  margin-left: auto;
  margin-right: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(14px, 1.2vw, 20px);
  line-height: 1.6;
  border-radius: 2vw;
  color: white;
  text-align: justify;
  text-align-last: center;
  font-weight: normal;
  padding: clamp(20px, 4vw, 60px);
  max-width: 65vw;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  margin: 0 auto;
}


.legal-box {
  background-color: #000000b7;
  margin-bottom: 1rem;
  border-left: 2px solid white;
  border-right: 2px solid white;
  border-top: 1px solid white;
  border-bottom: 1px solid white;
  padding: clamp(10px, 2vw, 20px) clamp(20px, 4vw, 60px);
  border-radius: 2vw;
}




/* =====================
   SECCIONES Y FLECHAS
   ===================== */
section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.arrow {
  position: absolute;
font-size: clamp(20px, 4vw, 40px);
  color: transparent;
  opacity: 0;
  cursor: pointer;
  transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
  z-index: 20;
  user-select: none;
  pointer-events: none;
}

body:hover .arrow {
  color: white;
  opacity: 0.6;
  pointer-events: auto;
  transition-delay: 0.2s;
}

.arrow:hover {
  opacity: 1;
  transform: translateY(-8px) scale(1.4); /* Un poco más grande al hacer hover */
  text-shadow:
    0 0 7px #fff,
    0 0 14px #fff;
}


.arrow.up {
  top: 1.5vw;
  left: 50%;
  transform: translateX(-50%);
}

.arrow.down {
  bottom: 1.5vw;
  left: 50%;
  transform: translateX(-50%);
}

section:hover .arrow {
  opacity: 0.3;
}

/* =====================
   FLIP CARDS
   ===================== */
.flip-container {
  position: absolute;
  perspective: 1000px;
  width: clamp(160px, 12vw, 180px);
  height: clamp(160px, 12vw, 180px);
  z-index: 2;
}


.flip-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-container:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-front {
  background-color: rgba(0, 0, 0, 0.2); /* base semitransparente */
  backdrop-filter: blur(4px); /* desenfoque del fondo */
  color: white;
  font-family: 'Courier New', monospace;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 15px;
  line-height: 1.2;
  border-radius: 15px;
  height: 100%;
  width: 100%;
  position: absolute;
  backface-visibility: hidden;
}

.img1 .flip-front {
  background-color: rgba(224, 192, 33, 0.3); /* amarillo translúcido */
}

.img2 .flip-front {
  background-color: rgba(192, 34, 52, 0.3); /* rojo translúcido */
}

.img3 .flip-front {
  background-color: rgba(115, 44, 100, 0.3); /* morado translúcido */
}

.img4 .flip-front {
  background-color: rgba(8, 138, 56, 0.3); /* verde translúcido */
}


.flip-back {
  background-color: rgb(0, 0, 0);
  color: white;
  font-size: clamp(16px, 3vw, 22px);
  padding: 10px;
  transform: rotateY(180deg);
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}

.flip-container {
  width: 14vw;
  height: 55vh; /* más alto */
  position: absolute;
  perspective: 1000px;
  z-index: 2;
}

.img1 {
  top: 25%;
  left: 10%;
}

.img2 {
  top: 25%;
  left: 33%;
}

.img3 {
  top: 25%;
  left: 57%;
}

.img4 {
  top: 25%;
  left: 80%;
}


@media (max-width: 1024px) {
  .flip-zone {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh; /* Menor separación aún */
    padding: 3vh 0;
    z-index: 10;
    background: transparent;
  }

  .flip-container {
    position: relative !important;
    width: 65vw !important;
    height: 16vh !important; /* MÁS BAJO */
    margin: 1vh 0 !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    background: transparent;
    z-index: 10;
  }

  .flip-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    position: relative;
  }

  .flip-container:hover .flip-inner,
  .flip-container:active .flip-inner {
    transform: rotateY(180deg);
  }

  .flip-front, .flip-back {
    position: absolute;
    height: 100%;
    width: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: clamp(12px, 2.3vw, 18px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 10;
  }

  .flip-front {
    font-weight: bold;
  }

  .flip-back {
    background-color: black;
    transform: rotateY(180deg);
    font-weight: normal;
  }

  /* Elimina posicionamiento absoluto */
  .img1, .img2, .img3, .img4 {
    top: auto !important;
    left: auto !important;
  }
}


/* =====================
   IMAGEN PRINCIPAL
   ===================== */
.image-only-section {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
.main-image {
  position: absolute;
  inset: 0; /* atajo para top: 0; right: 0; bottom: 0; left: 0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: grayscale(100%);
}

/* =====================
   VIDEO
   ===================== */
.video-wrapper {
  margin: 5vw auto;
  display: flex;
  justify-content: center;
  width: 70%;
}

.video-wrapper video {
  max-width: 70%;
  height: auto;
}

.video-desktop {
  display: block;
  padding-top: 3vw;
    padding-bottom: 3vw;
  text-align: center;
}

.video-mobile {
  display: none;
}

/* =====================
   ANIMACIÓN ENTRADA Y OVERLAY
   ===================== */
.anim-element {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  filter: blur(4px);
  transition: all 1.2s ease;
}

.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

#white-overlay {
  position: fixed;
  width: 0;
  height: 0;
  border-radius: 30px;
  background-color: white;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: all 1.5s ease;
  pointer-events: none;
}

#white-overlay.active {
  width: 3000px;
  height: 3000px;
  border-radius: 0;
}

/* =====================
   NAVBAR Y PROGRESO
   ===================== */
.navbar a.activo {
  color: #FFD700; /* amarillo, por ejemplo */
  font-weight: bold;
  text-decoration: underline;
}


.navbar {
  background-color: black;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5vw 2.7vw;
  z-index: 1000;
  transition: transform 0.4s ease, background-color 0.3s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4vw;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: clamp(14px, 1.2vw, 18px);
  text-transform: uppercase;
  letter-spacing: clamp(0.8px, 0.1vw, 1.5px);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: clamp(-3px, -0.3vw, -4px);
  left: 0;
  width: 0%;
  height: clamp(1px, 0.15vw, 2px);
  background-color: white;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.progress-bar {
  width: 13vw;
  height: 0.4vw;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.2vw;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.progress {
  height: 100%;
  width: 0%;
  background-color: white;
  transition: width 0.2s ease-out;
}

.navbar.scrolled {
  background-color: rgb(0, 0, 0);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.navbar.hidden:hover {
  transform: translateY(0);
}

.nav-hover-zone {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5vw;
  width: 100%;
  z-index: 999;
}



/* TUTORIAL MODAL */
.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.tutorial-content {
  width: clamp(320px, 80vw, 900px); /* Más ancho */
  max-height: 90vh; /* Más alto */
  min-height: clamp(200px, 50vh, 600px); /* Opcional, más altura mínima */
  background: #111;
  border-radius: clamp(1em, 2vw, 1.25rem);
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.tutorial-content button {
  margin-top: clamp(1em, 2vw, 1.25rem);
  padding: clamp(0.5em, 1vw, 0.75rem) clamp(1em, 2vw, 1.25rem);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-family: 'Courier New', monospace;
  background-color: rgb(30, 30, 30);
  color: #ffffff;
  border: none;
  border-radius: clamp(0.5em, 1vw, 0.625rem);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  z-index: 2;
  position: relative;
}

.tutorial-content button:hover {
  background-color: #5a191d;
  color: #ffffff;
}

/* =====================
   VENTANAS DE TUTORIAL (flip)
   ===================== */

.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  perspective: 1500px;
}

.tutorial-content {
  width: clamp(280px, 40vw, 500px);
  min-height: clamp(200px, 30vh, 350px);
  background: #111;
  border-radius: clamp(1em, 2vw, 1.25rem);
  padding: clamp(1em, 1.5vw, 1.25rem);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

/* ESTADO INICIAL DEL FLIP CONTENEDOR */
.tutorial-flip-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.tutorial-front,
.tutorial-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.tutorial-back {
  transform: rotateY(180deg);
}

.tutorial-flip {
  transform: rotateY(180deg);
}

/* TEXTO Y BOTONES */
.tutorial-text {
  color: white;
  font-family: 'Courier New', monospace;
  font-size: clamp(16px, 1.4vw, 20px);
  text-align: center;
}

.tutorial-content video {
  width: 100%;
  max-height: 85vh; /* mayor altura */
  object-fit: contain;
  margin-top: 1vw;
  
}


.tutorial-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(1em, 2vw, 2em);
  margin-top: clamp(0.5em, 1.5vw, 1.5em);
}

.tutorial-buttons button {
  padding: clamp(0.5em, 1vw, 0.75rem) clamp(1em, 2vw, 1.25rem);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-family: 'Courier New', monospace;
  background-color: rgb(30, 30, 30);
  color: #ffffff;
  border: none;
  border-radius: clamp(0.5em, 1vw, 0.625rem);
  cursor: pointer;
  transition: background-color 0.3s;
}

.tutorial-buttons button:hover {
  background-color: #5a191d;
}

/* =====================
   NUBE FINAL DE TUTORIAL
   ===================== */
#nube-tutorial {
  position: relative; /* para que quede fijo en pantalla */
  background-color: #333;
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 260px;
  font-family: 'Bebas Neue', cursive, sans-serif;
  font-size: 22px;
  z-index: 9999;
  display: none; /* se muestra vía JS */
  transition: opacity 0.5s ease;
  opacity: 1;
  text-align: center;
}

#nube-tutorial .nube-contenido p {
  margin: 0 0 12px 0;
}

#nube-tutorial button {
  background-color: #FFF;
  color: #B86B5B;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Bebas Neue', cursive, sans-serif;
  transition: background-color 0.3s ease;
}

#nube-tutorial button:hover {
  background-color: #d5a38f;
}

/* flechita hacia arriba */
.nube-tutorial::after {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #333;
}

.nube-contenido p {
  margin: 0;
  font-size: 14px;
  color: #ffffff;
}

#btn-final-listo {
  margin-top: 8px;
  padding: 4px 10px;
  border: none;
  background-color: #B86B5B;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#btn-final-listo:hover {
  background-color: #000000;
}

#video-tutorial.tutorial-modal {
  background-color: rgba(0, 0, 0, 0.85) !important;
  color: white;
}

#video-tutorial video {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.7);
  max-width: 90vw;
  max-height: 60vh;
  display: block;
  margin: 0 auto 20px auto;
}


/*Responsive celu*/

@media (max-width: 767px) {
  .arrow {
    display: none !important;
  }

  #seccion2 .text-section {
    padding: 15px;
    border-width: 1px;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0 auto;
    max-width: 95vw;
  }

  #seccion3 .text-section {
    padding: 15px;
    border-width: 1px;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0 auto;
    max-width: 95vw;
  }
}

@media (max-width: 767px) {
  .legal-box {
    padding: 15px;
    border-width: 1px;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0 auto;
    max-width: 95vw;
  }
}

/*Barra fijada*/

@media (max-width: 767px) {
  html, body {
    scrollbar-width: none;
    height: 100%;
    position: relative;
  }

  .navbar {
    padding: 1.2vw 2.7vw;
  }

  a[href="index.html"],
  #tutorial-link,
  a[href="creditos.html"] {
    font-size: 0;
    color: transparent;
    position: relative;
  }

  a[href="index.html"]::before,
  #tutorial-link::before,
  a[href="creditos.html"]::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  a[href="index.html"]::before {
    background-image: url('../img/adicional/inicio_icono.webp');
  }

  #tutorial-link::before {
    background-image: url('../img/adicional/tutorial_icono.webp');
  }

  a[href="creditos.html"]::before {
    background-image: url('../img/adicional/nosotrxs_icono.webp');
  }

  .nav-links {
    gap: 7vw;
  }

  .nav-links a:not([href="index.html"]):not(#tutorial-link):not([href="creditos.html"]) {
    font-size: 10px;
  }

  .progress-bar {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .tutorial-content {
    padding: 1.5rem;
    max-width: 90vw;
  }

  .tutorial-text {
    font-size: 1rem;
  }

  .tutorial-buttons button {
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
  }
}

@media (max-width: 600px) {
  .nube-tutorial::after {
    display: none;
  }
}
