/* Estilos generales */
body {
  font-family: 'Poppins', sans-serif;
  
}

/* Whatsapp flotante */
.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
    text-decoration: none;
  }

  .whatsapp:hover {
    background-color: #1ebe5d;
  }

  .whatsapp-icon {
    width: 30px;
    height: 30px;
    filter: invert(1);
  }

/* Acordeón cerrado */
.submenu-acordeon .dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

/* Acordeón abierto */
.submenu-acordeon.open .dropdown {
  max-height: 500px; /* puedes ajustar si tienes más contenido */
}

/* Evita saltos bruscos */
.submenu-acordeon .dropdown li {
  padding: 8px 16px;
}


/* Navbar */
.navbar {
  padding: 15px 0;
  background-color: #0d163e !important; /* Azul corporativo */
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}


.navbar-brand img {
  max-height: 70px;
  height: auto;
  width: auto;
}

.navbar-nav {
  width: 100%;
  justify-content: center;
}

.navbar-nav .nav-item {
  padding: 0 15px;
}

.navbar-nav .nav-link {
  color: white !important;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover {
  color: #c81851 !important;
}

/* Estilo base del submenú */
.submenu {
  position: relative;
  display: inline-block;
}

.submenu a {
  color: white; /* Letras blancas */
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  display: block;
  color: white !important;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.3s ease-in-out;
}

.submenu .dropdown {
  display: none; /* Ocultar por defecto */
  position: absolute;
  background-color: #0d163e; /* Azul de la empresa */
  min-width: 200px;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
}

.submenu .dropdown li {
  padding: 10px;
  text-align: left;
}

/* Letras blancas dentro del submenú */
.submenu .dropdown li a {
  color: white; 
  display: block;
  padding: 10px;
  transition: background 0.3s ease-in-out;
}

/* Mostrar submenú cuando pasas el mous       e */
.submenu:hover .dropdown {
  display: block;
}

/* Efecto hover: Fondo rosa */
.submenu .dropdown li a:hover {
  background-color: #c81851;
}

.flecha-sub {
  font-size: 10px;
  margin-left: 15px;
  vertical-align: middle;
}
  

/* Submenú anidado dentro de "Laminados" */
.submenu-anidado {
  position: relative;
  display: inline-block;
}

/* Submenú anidado sin fondo extra ni sombra */
.submenu-anidado .dropdown-sub {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 0.2;
}

/* Mostrar al pasar el mouse */
.submenu-anidado:hover .dropdown-sub {
  display: block;
}

/* Estilo para los ítems del submenú anidado */
.dropdown-sub li a {
  color: white;
  padding: 2px 10px; /* un poco a la derecha para que se vea como jerarquía */
  display: block;
  font-size: 16px;
  font-weight: normal;
  transition: background 0.3s ease-in-out;
}

/* Hover igual que el principal */
.dropdown-sub li a:hover {
  background-color: #c81851;
}



/* Sección Hero (Video de fondo) */
/* Estilo base en escritorio (ya correcto) */
.hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Capa de opacidad encima del video */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 255, 0.05); /* Azul con 5% de opacidad */
  z-index: 1; /* se coloca sobre el video */
}


.overlay {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
}

/* Botón de Conexsa */
.btn-primary {
  background-color: #c81851;
  border-color: #c81851;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: #9c0d3f;
  border-color: #9c0d3f;
}

/* Contenedor principal */
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem; /* Espacio entre tarjetas */
  padding: 20px;

}


/* Contenedor de la tarjeta */
.card-wrap {
  width: min(90%, 300px); /* Ajusta el ancho según la pantalla */
  max-width: 350px; /* No pasa de este tamaño */
  aspect-ratio: 3 / 4; /* Mantiene proporción */
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Tarjeta con efecto 3D */
.card {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 15px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  transform: rotateX(0deg) rotateY(0deg);
}

/* Efecto de inclinación */
.card-wrap:hover .card {
  transform: rotateX(10deg) rotateY(-10deg);
}

/* Imagen de fondo */
.card-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: grayscale(40%);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

/* Cuando pasas el mouse, se quita el gris y se oscurece */
.card-wrap:hover .card-bg {
  opacity: 0.7;
  filter: grayscale(0%);
}

/* Frente de la tarjeta */
.card-front {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1;
}

/* Título en la parte frontal */
.card-front h1 {
  position: relative;
  font-size: clamp(16px, 4vw, 24px);
  font-weight: bold;
  color: white;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
  text-align: center;
  line-height: 1.2;
  transition: opacity 0.5s ease-in-out;
  z-index: 1;
}

/* Fondo oscuro detrás del texto */
.card-front::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, rgba(6, 6, 68, 0.2), rgba(169, 27, 96, 0.2));
  z-index: 0;
}

/* Ocultar título al hacer hover */
.card-wrap:hover .card-front h1 {
  opacity: 0;
}

/* Información de la tarjeta */
.card-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 20px;
  background: rgba(19, 18, 62, 0.8);
  color: white;
  transform: translateY(100%);
  transition: transform 0.6s ease-in-out;
  text-align: center;
  font-size: clamp(12px, 3vw, 16px);
  z-index: 2;
}

/* Mostrar información en hover */
.card-wrap:hover .card-info {
  transform: translateY(0);
}

.card-info p {
  font-size: 14px;
  line-height: 1.5;
}


/* ==================== RESPONSIVE ==================== */

/* Keyframes */
@keyframes showInfoOnce {
  0% { transform: translateY(100%); }
  10% { transform: translateY(0); }
  90% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@keyframes hideTitle {
  0% { opacity: 1; }
  10% { opacity: 0; }
  90% { opacity: 0; }
  100% { opacity: 1; }
}

/* ================== PARA PANTALLAS DE 390x844 ================== */
@media (max-width: 768px) {


  .hero {
    height: calc(100vw / 1.78); /* Ajusta si tu video no es 16:9 */
  }

  .background-video {
    width: 100vw;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
  }

  .container{
    gap: 0.2rem !important;
    justify-content: center;
  }


  .card{
    width: 85%;
    height: 90%;
    margin: 0 auto;
  }

  .card-info.animate {
    animation: showInfoOnce 5s ease-in-out forwards;
  }

  .card-front h1.hide {
    animation: hideTitle 5s ease-in-out forwards;
  }

  .card-wrap:hover .card,
  .card-wrap:hover .card-bg,
  .card-wrap:hover .card-info,
  .card-wrap:hover .card-front h1 {
    all: unset !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
    pointer-events: none !important;
  }

  .card-wrap {
    pointer-events: none;
  }
}

/* ============ FUERZA LA DESACTIVACIÓN DE HOVER ============ */
body.no-hover .card-wrap:hover .card,
body.no-hover .card-wrap:hover .card-bg,
body.no-hover .card-wrap:hover .card-info,
body.no-hover .card-wrap:hover .card-front h1 {
  all: unset !important;
  transform: none !important;
  opacity: 1 !important;
  animation: none !important;
  pointer-events: none !important;
}

/* ================== PARA MÓVILES VERTICAL 700x1024================== */
@media (min-width: 700px) and (max-width: 1024px) {

  .hero {
    height: calc(100vw / 1.78); /* Ajusta aquí si tu video no es 16:9 */
  }

  .background-video {
    width: 100vw;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
  }

  .card-info.animate {
    animation: showInfoOnce 5s ease-in-out forwards;
  }

  .card-front h1.hide {
    animation: hideTitle 5s ease-in-out forwards;
  }

  /* Desactiva cualquier efecto al hacer hover (simulado por tap en móviles) */
  .card-wrap:hover .card,
  .card-wrap:hover .card-bg,
  .card-wrap:hover .card-info,
  .card-wrap:hover .card-front h1 {
    all: unset !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
    pointer-events: none !important;
  }

  /* Desactiva la interacción táctil sobre .card-wrap para evitar clics */
  .card-wrap {
    pointer-events: none;
  }
}

/* ============ FUERZA LA DESACTIVACIÓN DE HOVER ============ */
body.no-hover .card-wrap:hover .card,
body.no-hover .card-wrap:hover .card-bg,
body.no-hover .card-wrap:hover .card-info,
body.no-hover .card-wrap:hover .card-front h1 {
  all: unset !important;
  transform: none !important;
  opacity: 1 !important;
  animation: none !important;
  pointer-events: none !important;
}





