/* Estilos personalizados para los paneles (lo que Bootstrap no cubre) */

.hover-panels {
  height: 650px;
}

.hover-panels .panel {
  flex: 1 1 0%;
  min-width: 80px;
  cursor: pointer;
  transition: box-shadow .25s ease;
}

/* Imagen de fondo del panel */
.hover-panels .panel .panel-bg {
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Video del panel */
.hover-panels .panel .panel-video {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  object-fit: cover;
  object-position: center;
  background-color: #000;
}

/* Cuando el panel está activo, mostrar video y ocultar imagen */
.hover-panels .panel.active .panel-bg {
  opacity: 0;
}

.hover-panels .panel.active .panel-video {
  opacity: 1;
}

/* Panel content - padding específico no cubierto por Bootstrap */
.panel-content {
  padding: 28px;
  box-sizing: border-box;
  overflow: hidden;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: auto !important;
}

/* Animaciones de texto del panel */
.panel-head {
  opacity: 1;
}

.panel-head h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  color: #fff;
}

.panel-head .short {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

/* Descripción expandida */
.panel-more {
  opacity: 0;
  margin-top: 12px;
}

.panel-more .full {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  max-width: 420px;
}

/* Overlay gradiente de oscurecimiento */
.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Estado activo: overlay más oscuro */
.panel.active::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.7) 100%);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.45);
}

/* Responsive: 2x2 grid en mobile */
@media (max-width: 991px) {
  .hover-panels {
    width: 100% !important;
    height: 700px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .hover-panels .panel {
    flex: 0 0 50% !important;
    height: 350px !important;
    min-width: unset !important;
  }

  /* En mobile: BLOQUEAR COMPLETAMENTE los textos */
  .panel-head {
    all: initial !important;
    opacity: 1 !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    color: #fff !important;
    display: block !important;
  }

  .panel-head h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    color: #fff !important;
  }

  .panel-head .short {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.92) !important;
  }

  .panel-more {
    all: initial !important;
    display: none !important;
    margin-top: 12px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    pointer-events: none !important;
  }

  .panel-more .full {
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.95) !important;
  }

  /* Cuando el panel está activo en mobile */
  .hover-panels .panel.active .panel-head {
    display: none !important;
  }

  .hover-panels .panel.active .panel-more {
    display: block !important;
  }

  /* Cuando hay un panel activo, ocultar los otros */
  .hover-panels.has-active .panel:not(.active) {
    display: none !important;
  }

  /* Panel expandido en mobile abarque todo */
  .hover-panels .panel.active {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important;
  }

}