/* CONFIGURACIÓN GLOBAL */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

/* =========================================================
   TIPOGRAFÍA GENERAL DEL HEADER
========================================================= */
header a,
.mega-menu a {
  font-family: 'Inter', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* =========================================================
   HEADER GENERAL (PC + MÓVIL)
========================================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: background 0.4s ease;
  z-index: 10000;
}

header.scrolled,
header:hover {
  background-color: rgba(15,15,15,0.9);
  backdrop-filter: blur(6px);
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0f0f0f;
  opacity: 0;
  transition: .3s;
  z-index: -1;
}

/* =========================================================
   LOGO
========================================================= */
.logo-img {
  height: 50px;
  width: auto;
  transition: .3s;
}

.logo-img:hover { transform: scale(1.1); }

/* =========================================================
   MENÚ PRINCIPAL (PC)
========================================================= */
.nav-container {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.nav-container a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
}

/* =========================================================
   DROPDOWN (PC)
========================================================= */
.dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.arrow { font-size: 12px; transition: .3s; }

@media (min-width: 1240px) {
  .mega-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top:190%;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    background: #0f0f0f;
    padding: 20px 30px;
    border-radius: 6px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 1000;
  }

  .mega-menu::before {
    content: "";
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #0f0f0f;
  }

  .mega-dropdown:hover .mega-menu {
    opacity: 1; visibility: visible; transform: translateX(-50%) scaleY(1);
  }

  .mega-dropdown:hover .arrow { transform: rotate(180deg); }
}

/* Enlaces del mega menú */
.mega-menu a {
  font-size: 13px;
  padding: 8px 0 8px 35px;
  transition: .2s;
}

.mega-menu a:hover {
  color: #FFD700;
}

.mega-menu a::after {
  content: "➜";
  opacity: 0;
  margin-left: 6px;
  transition: .3s;
}

.mega-menu a:hover::after {
  opacity: 1;
  transform: translateX(3px);
}

/* =========================================================
   BOTÓN "NOSOTROS"
========================================================= */
.right-container a {
  border: 2px solid #fff;
  padding: 1px 32px;
  border-radius: 40px;
  height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: .3s;
}

.right-container a:hover {
  background: #fff;
  color: #0f0f0f;
  transform: scale(1.05);
}

/* =========================================================
   MENÚ HAMBURGUESA (MÓVIL)
========================================================= */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 11000;
}

.hamburger span {
  width: 28px; height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: .3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   MODO MÓVIL (max 1240px)
========================================================= */
@media (max-width: 1240px) {

  header {
    height: 60px !important;
    padding: 5px 20px !important;
    background: #0f0f0f !important;
    backdrop-filter: none !important;
  }

  .logo-img { height: 38px !important; }

  /* Mostrar hamburguesa */
  .hamburger { display: flex; }

  /* Ocultar botón NOSOTROS */
  .right-container { display: none; }

  /* Menú móvil */
  .nav-container {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #0f0f0f !important;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: .35s;
    z-index: 9998;
  }

  .nav-container.show {
    opacity: 1;
    transform: scaleY(1);
  }

  /* Submenú acordeón */
  .mega-menu {
    position: relative;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 20px;
    transition: .35s;
  }

  .mega-menu.open {
    max-height: 500px;
    opacity: 1;
  }

  .mega-menu::before { display: none !important; }
}

/* Letras blancas cuando el header está normal */
header a,
header .nav-container a {
  color: white;
  transition: color .3s ease;
}

/* Letras negras cuando haces scroll */
header.scrolled a,
header.scrolled .nav-container a {
  color: black !important;
}


/* Botón en normal */
.right-container a {
  border: 2px solid #fff;
  color: #fff;
}

/* Botón al scrollear */
header.scrolled .right-container a {
  border-color: #000;
  color: #000;
}

/* ============================= */
/* 🌅 SECCIÓN HERO - VERSIÓN PC */
/* ============================= */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Fondo */
.hero img.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Contenedor tetris */
.tetris-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    z-index: 2;
    overflow: hidden;
}

/* PIEZA (padre: movimiento y crecimiento) */
.pieza {
    flex: 1;
    height: 100%;
    transform: translateX(100%);
    opacity: 0;
    animation-fill-mode: forwards;
    pointer-events: none;
    overflow: hidden; 
    transition: flex 0.35s ease, opacity .25s ease;
}

/* IMG (hijo: animación hover) */
.pieza img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform .60s ease, opacity .25s ease;
}

/* Cuando entra */
.pieza.activo {
    animation: slideIn 1.5s ease forwards;
}

/* Hover suave que EMPUJA las demás piezas */
.pieza.hover-enabled:hover {
    flex: 1.9; /* ⭐ La pieza crece físicamente */
    cursor: pointer;
}

.pieza.hover-enabled:hover img {
    transform: scale(1.08); /* inflado suave real */
    transition: transform .35s ease;
}

/* Animación entrada */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== HERO PC ===== */
.hero-pc {
    display: block;
}

.hero-mobile {
    display: none;
}


/* ===== HERO MÓVIL (0px – 1239px) ===== */
@media (max-width: 1239px) {
    .hero-pc {
        display: none !important;
    }

  .hero-mobile {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100vh;
    overflow: hidden; /* evita scroll raro */
 background-color: transparent !important;
}

.hero-mobile-bg {
    width: 100%;
    height: auto;
    max-height: 100vh;  /* nunca pasa del alto */
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

    .hero-mobile-content {
        position: relative;
        z-index: 2;
        width: 100%;
        text-align: center;
        color: white;
        padding: 20px;
        margin-top: 30%;
        font-family: 'Poppins', sans-serif;
    }

    .hero-mobile-content h1 {
        font-size: 28px;
        font-weight: 600;
    }

    .hero-mobile-content p {
        font-size: 16px;
    }
}

/* FIX: Evitar que el header tape la imagen en celular */
@media (max-width: 1240px) {
  .hero-mobile {
    padding-top: 60px; /* misma altura del header */
  }
}

/* 1️⃣ Bloquear scroll horizontal siempre */
html, body {
  overflow-x: hidden !important;
}

/* 2️⃣ Evitar saltos verticales causados por el hero */
@media (max-width: 1240px) {

  body {
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
  }

  .hero-mobile {
    width: 100%;
    height: auto !important;
    margin: 0;
    padding: 0;
    margin-top: 60px; /* para que no lo tape el header */
    overflow: hidden !important;
  }

  .hero-mobile-bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain !important;
  }
}

/* 3️⃣ Evita empujes del menú en móvil */
@media (max-width: 1240px) {
  .nav-container {
    overflow: hidden !important;
  }
}

/* ======================================= */
/* 📱 SECCIÓN SIMPLE DE IMÁGENES – MÓVIL   */
/* ======================================= */
@media (max-width: 1238px) {

  .acordeon-imagenes-mobile {
    width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    background: #0f0f0f;
    overflow-x: hidden;
  }

  .acordeon-img-item {
    width: 100%;
    margin-bottom: 20px;
  }

  .acordeon-img-box {
    width: 100%;
  }

  .acordeon-img-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
}

/* Ocultar en PC */
@media (min-width: 1239px) {
  .acordeon-imagenes-mobile {
    display: none !important;
  }
}

/* Contenedor */
.imagen-full {
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* Ambas imágenes responden al ancho */
.imagen-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* 🖥️ Imagen PC predeterminada */
.img-pc {
  display: block;
}

/* 📱 Imagen móvil empieza oculta */
.img-movil {
  display: none;
}

/* 📱 Mostrar imagen móvil desde 0 a 600px */
@media (max-width: 600px) {
  .img-pc {
    display: none !important;
  }
  .img-movil {
    display: block !important;
  }
}



/* ============================ */
/* 📸 2 IMÁGENES RESPONSIVE     */
/* ============================ */

.seccion-doble-img {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Ambas imágenes son fluidas */
.seccion-doble-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ---- IMAGEN DE PC ---- */
.img-pc {
  display: block;
}

/* ---- IMAGEN DE MÓVIL ---- */
.img-movil {
  display: none;
}

/* ======= SOLO MÓVIL ======= */
@media (max-width: 600px) {
  .img-pc {
    display: none !important;  /* Se oculta en móvil */
  }
  .img-movil {
    display: block !important; /* Se muestra en móvil */
  }
}

/* FORZAR que solo se vea 1 imagen en PC */
.img-movil {
  display: none !important;
}

.img-pc {
  display: block !important;
}

/* Mostrar solo móvil desde 0 a 600px */
@media (max-width: 600px) {
  .img-pc {
    display: none !important;
  }
  .img-movil {
    display: block !important;
  }
}

/* ======================= */
/*        FOOTER           */
/* ======================= */

.main-footer {
  background: #0f0f0f;
  color: #fff;
  font-family: 'Inter', sans-serif;
  padding: 60px 20px 0;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

/* Columnas */
.footer-col h4 {
  font-size: 15px;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.footer-col a {
  display: block;
  color: #ccc;
  font-size: 14px;
  margin-bottom: 10px;
  text-decoration: none;
  transition: 0.3s;
}

.footer-col a:hover {
  color: #FFD700;
  transform: translateX(4px);
}

/* Logo */
.footer-logo img {
  max-width: 220px;
  margin-bottom: 15px;
}

.footer-logo p {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
}

/* Redes */
.footer-social a {
  display: flex;
  align-items: center;
  gap: 6px;
}


/* Barra inferior */
.footer-bottom {
  margin-top: 50px;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  background: #000;
  color: #aaa;
}

/* ======================= */
/*        FOOTER MÓVIL      */
/* ======================= */
@media (max-width: 900px) {

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

}

@media (max-width: 600px) {

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col a {
    justify-content: center;
  }

  .footer-logo img {
    margin: 0 auto 15px;
  }
}
