* {
  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;
}

/* =====================
   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;
}

/* === SECCIONES GENERALES CON MARGEN Y ESTILO NUEVO === */
.intro, .credit-section, .frase-final,
.bloque-mixto, .bloque-imagen-primero {
  margin-top: 7vw;
  margin-bottom: 7vw;
  margin-left: auto;
  margin-right: auto;
  max-width: 65vw;
  padding: 0 0vw;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(16px, 1.5vw, 24px);
  line-height: 1.6;
  color: white;
  text-align: justify;
  text-align-last: center;
  font-weight: normal;
}

/* === TÍTULOS === */
.intro h1, .credit-section h2, .bloque-mixto .texto h2, .bloque-imagen-primero .texto h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 3vw, 48px);
  text-align: center;
  color: white;
  margin-bottom: 1vw;
}

/* === BLOQUES CRÉDITOS MIXTOS === */
.bloque-mixto {
  max-width: 65vw;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1vw;
  flex-wrap: wrap;
  perspective: 65vw;
}

.bloque-mixto .texto {
  flex: 1;
  min-width: 250px;
  perspective: 65vw;
}

.bloque-mixto .texto p {
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.6;
  text-align: justify;
  text-align-last: center;
}

.bloque-mixto .media {
  flex: 1;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bloque-mixto img {
  width: 100%;
  max-width: 100%;
  max-height: 600px; /* antes 400px */
  border-radius: 12px;
  object-fit: cover;

}

/* === BLOQUES IMAGEN PRIMERO === */
.bloque-imagen-primero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  flex-wrap: wrap;
  max-width: 65vw;
}

.bloque-imagen-primero .media {
  flex: 1;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bloque-imagen-primero img {
  width: 100%;
  max-width: 100%;
  max-height: 600px;
  border-radius: 16px;

  object-fit: cover;
}

.bloque-imagen-primero .texto {
  flex: 1;
}

.bloque-imagen-primero .texto p {
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.6;
  color: #e0d7f0;
  text-align: justify;
  text-align-last: center;
}

/* === MODAL TUTORIAL === */
.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;
}

.tutorial-content video {
  width: 100%;
  max-height: 50vh;
  border-radius: clamp(0.5em, 1vw, 0.75rem);
  object-fit: contain;
}

.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;
  position: relative;
  z-index: 2;
}

.tutorial-content button:hover {
  background-color: #5a191d;
  color: #ffffff;
}

/* === ANIMACIÓN SCROLL === */
.anim-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.anim-element.visible {
  opacity: 1;
  transform: translateY(0);
}


/* === FOOTER === */
footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  color: #f4eefc;
  font-size: 18px;
}

footer a {
  color: #f4eefc;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: #f4eefc;
  transition: width 0.4s ease;
}

footer a:hover {
  color: #ffffff;
}

footer a:hover::after {
  width: 100%;
}

/* === FLIP CARD === */
.flip-card {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  perspective: 1000px;
  cursor: pointer;
  margin: 0 auto; /* para centrar */
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  overflow: hidden;

}

.flip-front img,
.flip-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flip-back {
  transform: rotateY(180deg);
}

/* ------------------------------
   LOGOS DE LAS CARRERAS
   -------------------------------*/

.logos-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;               /* espacio entre logos */
  padding: 2rem 1rem;
  flex-wrap: wrap;         /* permite que se acomoden si no caben */
  /*background-color: #751f5e; /* el color de fondo como en tu imagen */
}

.logo-box {
  flex: 0 1 300px;         /* tamaño base de cada logo, puede crecer o reducir */
  text-align: center;
}

.logo-box img {
  width: 100%;             /* que ocupe todo el contenedor */
  /*max-width: 380px;        /* no crece más allá de este ancho */
  height: auto;
  transition: transform 0.3s ease;
}

.logo-box-dm img {
  width: 100%;             /* que ocupe todo el contenedor */
  max-width: 380px;        /* no crece más allá de este ancho */
  height: auto;
  transition: transform 0.3s ease;
}

.logo-box img:hover {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .logo-box-dm img {
     width: 100%;             /* que ocupe todo el contenedor */
     max-width: 300px;        /* no crece más allá de este ancho */
    height: auto;
    transition: transform 0.3s ease;
  }
}


.vineta-estatica,
.vineta-estatica-sola {
  max-width: 30vw;
  margin: clamp(60px, 8vw, 100px) auto clamp(20px, 4vw, 60px); /* más espacio arriba y centrado */
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.vineta-estatica img,
.vineta-estatica-sola img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  margin-top: clamp(10px, 2vw, 30px);
  margin-bottom: clamp(10px, 2vw, 30px);
}

#logos-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
  gap: 1.5rem;
  max-width: 65vw;
  margin: 0 auto;
  justify-items: center;
}

#logos-container .vineta-estatica {
  max-width: 30vw;
  margin: 0;
}

/* Responsive para pantallas más chicas */
@media (max-width: 480px) {
  #logos-container {
    grid-template-columns: 1fr 1fr; /* Sigue en 2 columnas */
    max-width: 90vw;               /* Más ancho en móviles */
  }

  #logos-container .vineta-estatica {
    max-width: 45vw; /* Ajusta el tamaño para que quepan bien */
  }
}
.vineta-estatica-grande {
  max-width: 45vw;     /* más ancho que el normal */
  margin: 15vw auto;    /* centrado y con espacio vertical */
}

.vineta-estatica-grande img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  .vineta-estatica-grande {
    max-width: 70vw;
  }
}


/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .bloque-imagen-primero {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
  }

  .bloque-imagen-primero .media,
  .bloque-imagen-primero .texto {
    width: 100%;
    max-width: 90vw;
  }

  .bloque-imagen-primero img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    margin-top: 1rem;
  }

  .bloque-imagen-primero .texto p {
    font-size: clamp(16px, 1.5vw, 20px);
    padding: 1rem 0;
    color: #e0d7f0;
  }
}

@media (max-width: 768px) {
  .bloque-mixto {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bloque-mixto .media {
    width: 100%;
    max-width: 90vw;
    margin-bottom: 1rem;
  }

  .bloque-mixto img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;

  }

  .bloque-mixto .texto {
    width: 100%;
    max-width: 90vw;
  }

  .intro h1 {
    font-size: 38px;
  }

  .intro p {
    font-size: 18px;
  }

  .credit-section h2 {
    font-size: 24px;
  }

  .credit-section p {
    font-size: 16px;
  }
}

/*Responsive celu*/

@media (max-width: 767px) {
  .arrow {
    display: none !important;
  }

  #seccion2 .text-section {
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 10px 15px;
    margin: 0 auto;
    max-width: 95vw;
  }
}

/*Barra fijada*/

@media (max-width: 767px) {
  /* Oculta scroll en body */
  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;
  }
}

@media (max-width: 768px) {
  .intro {
    max-width: 90vw;
    padding: 0 5vw;
    text-align: center;
  }

  .intro p {
    font-size: 16px;
    line-height: 1.6;
  }
}
