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

body, html {
  height: 100%;
  width: 100%;
  font-family: 'Montserrat',sans-serif;
  color: #fff;
  overflow: hidden;
  cursor: none;
}

/* NAVIGATION */
.nav {
  display: flex;
  gap: 25px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.nav a:hover {
  color: #ddd;
}

/* HERO TEXT */
.hero {
  position: absolute;
  top: 250px;
  left: 80px;
  z-index: 10;
  max-width: 500px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* GALERÍA */
.gallery-container {
  position: relative;
  height: 100vh;
  width: 100%;
}

.full-image {
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  transition: background-image 0.8s ease-in-out;
  position: relative;
}

/* MINIATURAS */
.thumbnails-section {
  position: absolute;
  bottom: 30px;  /* regula la altura de las felcas */
  right: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 20;
}

.thumbnails {
  overflow: hidden;
  width: 700px; /* más espacio horizontal */
  height: 220px; /* miniaturas más grandes */
}

.thumb-track {
  display: flex;
  transition: transform 0.5s ease;
}

.thumb {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin-left: 15px;
  cursor: pointer;
  opacity: 0.7;
  transition: transform 0.3s, opacity 0.3s;
}

.thumb:hover,
.thumb.active {
  opacity: 1;
  transform: scale(1.05);
  border: 2px solid #fff;
}

/* FLECHAS DE MINIATURAS */
.thumb-nav {
  display: flex;
  top: 40px;
  justify-content: flex-end;
  margin-top: 30px;
  gap: 10px;
}

.thumb-btn {
  background: rgba(255,255,255,0.4);
  border: none;
  color: #000;
  font-size: 2rem;
  padding: 5px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

.thumb-btn:hover {
  background: rgba(255,255,255,0.8);
}

/* ==============================
   AJUSTE RESPONSIVE – FLECHAS Y MINIATURAS
   ============================== */

@media (max-width: 768px) {

  /* Contenedor de miniaturas */
  .thumbnails-section {
    position: absolute;
    bottom: 80px;   /* sube todo el bloque */
    right: 20px;
  }

  /* Flechas de navegación */
  .thumb-nav {
    position: absolute;
    top: -90px;     /* sube SOLO las flechas */
    right: 0;
    display: flex;
    gap: 10px;
  }

  /* Botones */
  .thumb-btn {
    font-size: 1.6rem;
    padding: 6px 12px;
  }
}

/* ===============================
   OVERLAY OTROS PROYECTOS
================================ */

.next-projects {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.next-projects.active {
  opacity: 1;
  pointer-events: auto;
}

.next-projects h2 {
  color: #fff;
  font-size: 2.4rem;
  margin-bottom: 60px;
}

.next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.next-card {
  position: relative;
  width: 280px;
  height: 380px;
  overflow: hidden;
  border-radius: 20px;
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.6s ease;
}

.next-projects.active .next-card {
  transform: translateY(0);
  opacity: 1;
}

/* ENTRADA SECUENCIAL */
.next-projects.active .next-card:nth-child(1) { transition-delay: 0.2s; }
.next-projects.active .next-card:nth-child(2) { transition-delay: 0.4s; }
.next-projects.active .next-card:nth-child(3) { transition-delay: 0.6s; }

.next-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.next-card span {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.next-card:hover span {
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .next-grid {
    grid-template-columns: 1fr;
  }

  .next-card {
    width: 80vw;
    height: 260px;
  }
}

/* ===============================
   BOTÓN CERRAR OVERLAY
================================ */

.close-overlay {
  position: absolute;
  top: 40px;
  right: 50px;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.close-overlay:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Evitar que el click en tarjetas cierre el overlay */
.next-grid {
  position: relative;
  z-index: 5;
}

