* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🔒 evitar selección */
body {
  font-family: 'Poppins', sans-serif;
  color: #222;
  user-select: none;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #eae6f2;
  transition: 0.3s;
  font-family: Helvetica, Arial, sans-serif;
}

.header.scrolled {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
}

.container {
  width: 85%;
  margin: auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo img {
  width: 100px;
}


.logo span {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #4b4b5a;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo span {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav a {
  margin-left: 25px;
  text-decoration: none;
  color: #333;
}

.nav .active {
  border-bottom: 2px solid black;
}

/* HERO */
.hero {
  position: relative;
  height: 600px;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 120%;
  min-width: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
}

.hero-content {
  position: relative;
  color: white;
  max-width: 550px;
}

.hero-content h1 {
  margin-bottom: 15px;
}

.hero-content p {
  margin-bottom: 20px;
}

/* BOTÓN */
.btn {
  background: #7c5cff;
  padding: 12px 28px;
  border-radius: 25px;
  color: white;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  background: #5a3ee6;
  transform: translateY(-2px);
}

/* 🔥 FIX: BOTÓN SKIP FUERA DEL MEDIA */
#skipIntro {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: 0.3s;
  z-index: 20;
}

#skipIntro:hover {
  background: rgba(255,255,255,0.25);
}

/* GALERÍA */
.gallery {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 70px;
}
.subtitle {
  color: #666;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 0px;
}

.img-box {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  transition: 0.4s;
}

.fade-img {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-img.show {
  opacity: 1;
}

.img-box:hover {
  transform: scale(1.05);
}

/* 🔒 overlay protección */
.protect {
  position: relative;
}

.protect::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

/* BLOG */
.blog {
  padding: 70px 0;
}

.blog-cards {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.blog-card {
  transition: 0.3s;
}

.blog-card:hover {
  transform: translateY(-10px);
}

.blog-card img {
  width: 100%;
  border-radius: 15px;
  pointer-events: none;
}

/* FOOTER */
.footer {
  background: #2f2747;
  color: white;
  padding: 50px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  width: 85%;
  margin: auto;
}

.footer input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
}

.footer button {
  margin-top: 10px;
  padding: 10px;
  background: #7c5cff;
  border: none;
  color: white;
}

/* ANIMACIONES */
.fade {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
}

.fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* SCROLL SUAVE */
html {
  scroll-behavior: smooth;
}

/* SECCIÓN RETO */
.reto {
  padding: 20px 0 80px;
}

.reto-texto {
  max-width: 700px;
  margin: 10px auto 0px;
  color: #555;
  line-height: 1.6;
}

.reto-galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.reto-img {
  flex: 0 0 440px;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.4s;
}

.reto-titulo {
  margin-top: 0;
}

/* ===== CARRUSEL RETO ===== */

.reto-carrusel {
  width: 100%;
  max-width: 900px;      /* mismo ancho visual que antes */
  margin: 20px auto 0;
  overflow: hidden;      /* 🔥 recorta lo que sobra */
  border-radius: 12px;   /* 🔥 bordes redondeados visibles */
}

.carrusel-track {
  display: flex;
  gap: 20px;
  align-items: center;
  transition: transform 0.6s ease;
  width: max-content; /* 🔥 esto es lo que faltaba */
}

.reto-img.active {
  transform: scale(1.15);
}

.reto-img.side {
  transform: scale(0.9);
  opacity: 0.6;
}

.reto-titulo {
  display: block;
  margin: 0 auto;
  max-width: 400px;
  width: 85%;
}

/* texto debajo */
.carrusel-texto {
  margin-top: 30px;
  text-align: center;
  color: #555;
  font-size: 18px;
  font-weight: 600;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: opacity 0.3s ease;
}

.reto-img:hover {
  transform: scale(1.03);
}

.reto h2 {
  text-align: center;
}

.reto .container {
  width: 100%;
  margin: 0;
}

.reto .gallery {
  padding: 0;
  margin-top: 0px;
}

/* ===== INTRO (CORREGIDO) ===== */

#intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 2s ease;
}

.intro-group {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  padding: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

.intro-group.active {
  opacity: 1;
  transform: translateY(0);
}

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

.intro-item img {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
}

.intro-group.active .intro-item img {
  transform: scale(1.12);
}

.intro-item p {
  margin-top: 18px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.intro-logo {
  position: absolute;
  opacity: 0;
  transform: scale(0.6);
  transition: all 1.5s ease;
  z-index: 10;
}

.intro-logo.show {
  opacity: 1;
  transform: scale(1);
}

.intro-logo img {
  width: 50vw;
  max-width: 600px;
}

/* 🔥 FIX REAL */
#intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: black;
  opacity: 0;
  transition: opacity 1.5s ease;
  z-index: 1;
  pointer-events: none;
}

#intro.logo-active::after {
  opacity: 0.85;
}

.intro-reto {
  position: absolute;
  opacity: 0;
  transform: scale(0.7);
  transition: all 1.5s ease;
  z-index: 10;
}

.intro-reto.show {
  opacity: 1;
  transform: scale(1);
}

.intro-reto img {
  width: 50vw;
  max-width: 600px;
}

.titulo-galeria {
  text-align: center;
  margin: 20px 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: #4b4b5a;
}

.marca {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #888;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

#intro.closing .intro-logo {
  transform: scale(0.3);
  opacity: 0;
}

/* ===== FILOSOFÍA ===== */

.filosofia {
position: relative;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: url("img/filosofia-bg.webp") center/cover no-repeat;
overflow: hidden;
}

.filosofia-overlay {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.55);
}

.filosofia-content {
position: relative;
text-align: center;
color: white;
max-width: 800px;
padding: 40px 20px;
}

.filosofia-content h1 {
margin-bottom: 25px;
font-size: 36px;
}

.filosofia-texto {
text-align: justify;
line-height: 1.8;
font-size: 17px;
color: #e0e0e0;
}

.filosofia-texto p {
margin-bottom: 30px;
}

.filosofia-frase {
font-size: 22px;
font-weight: 600;
margin-top: 30px;
color: #ffffff;
opacity: 0.9;
}

/* ===== BLOQUES CON IMAGEN ===== */

.bloque {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 50px 0;
}

.bloque.reverse {
  flex-direction: row-reverse;
}

.bloque .texto {
  flex: 1;
}

.bloque .imagen {
  width: 400px;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  flex-shrink: 0;
}

/* imágenes iniciales */
.img-1 { background-image: url("img/1G1.webp"); }
.img-2 { background-image: url("img/2G.webp"); }
.img-3 { background-image: url("img/3G.webp"); }
.img-4 { background-image: url("img/4G.webp"); }

@media (min-width: 769px) {
  .reto-texto {
    max-width: 1100px;
  }
}

.guias {
  padding: 40px 0;
}

.guias-container {
  display: flex;
  width: 85%;
  margin: auto;
  gap: 40px;
}

/* IZQUIERDA */
.guias-lista {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.guia {
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.guia .foto {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin: auto;
}

.guia span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

.guia.active {
  transform: scale(1.1);
}

/* DERECHA */
.guia-detalle {
  flex: 1;
}

.guia-texto {
  margin-bottom: 20px;
}

.guia-carrusel {
  width: 100%;
  max-width: 700px;
  height: 400px;
  border-radius: 15px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.guia-detalle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

}

/* flechas */
.flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 25px;
  background: rgba(0,0,0,0.4);
  color: white;
  padding: 10px;
  cursor: pointer;
  left: 0;
}

.flecha.left { left: 10px; }
.flecha.right { right: 10px; }

/* MOBILE */
@media (max-width: 768px) {
  .guias-container {
    flex-direction: column;
  }

  .guias-lista {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
  }

  .guia {
    min-width: 100px;
  }

  .guia-carrusel {
    height: 250px;
  }
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

  .bloque {
    flex-direction: column;
    gap: 20px;
  }

  .bloque.reverse {
    flex-direction: column;
  }

  .bloque .imagen {
    width: 100%;
  }

}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

  .reto-galeria {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .blog-cards {
    flex-direction: column;
  }

  .footer-container {
    flex-direction: column;
    gap: 30px;
  }

  .intro-group {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-item p {
    font-size: 14px;
  }

  .intro-logo img {
    width: 80vw;
    max-width: none;
  }

  .intro-reto img {
    width: 80vw;
    max-width: none;
  }

  .logo {
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }

  .logo span {
    font-size: 18px;
  }

  .logo span {
    display: none;
  }
  .container {
    width: 100%;
    padding: 0 10px;
  }

  .reto-carrusel {
    width: calc(100% + 40px);
    margin-left: -10px;
  }

  .reto {
    overflow-x: hidden;
  }

  .reto-texto {
    font-size: 15px;
    line-height: 1.7;
    margin: 30px auto 0px;
}


}