/* ==========================================================================
   VIDEOS INFORMATIVOS - LÁSER CENTER IQUITOS
   Estilos propios de la página de videos. Los tokens de color/tipografía
   (--primary, --secondary, --dark, etc.) y el header/footer viven en
   style.css; este archivo solo agrega lo específico de esta página.
   ========================================================================== */

/* Por si el subtítulo del hero no está definido en style.css */
.page-hero .subtitle {
  display: inline-block;
  color: var(--primary);
  font-family: var(--font-family-title);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ==========================================================================
   SECCIÓN Y GRID
   ========================================================================== */
.videos-section {
  padding: 20px 0 100px;
  background: var(--white);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  min-height: 200px;
}

/* ==========================================================================
   TARJETA DE VIDEO
   ========================================================================== */
.video-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--gray-light);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  background: var(--dark);
  overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card .info {
  padding: 20px;
}

.video-card .info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--dark);
}

.video-card .info p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

.badge-tipo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  margin-bottom: 10px;
}

.badge-tipo.local {
  background: rgba(0, 191, 165, 0.1);
  color: #0d8f7d;
}

/* ==========================================================================
   FACADE DE YOUTUBE (miniatura + botón de play, carga el iframe al click)
   ========================================================================== */
.video-facade {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  cursor: pointer;
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
}

.video-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.08) 60%);
  transition: background-color 0.3s ease;
}

.video-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  z-index: 2;
  transition: var(--transition);
}

.video-facade__play i {
  transform: translateX(2px);
}

.video-facade:hover .video-facade__play,
.video-facade:focus-visible .video-facade__play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary);
  border-color: var(--primary);
}

.video-facade:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: -3px;
}

/* ==========================================================================
   ESTADOS: SKELETON / VACÍO / ERROR
   ========================================================================== */
.videos-skeleton {
  display: contents;
}

.video-card--skeleton {
  height: 280px;
  position: relative;
  overflow: hidden;
  background: var(--gray-light);
  border: none;
  box-shadow: none;
}

.video-card--skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: skeletonShine 1.4s ease-in-out infinite;
}

@keyframes skeletonShine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.videos-empty-state,
.videos-error-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  grid-column: 1 / -1;
}

.videos-empty-state i,
.videos-error-state i {
  font-size: 48px;
  color: var(--gray-medium);
  display: block;
  margin-bottom: 16px;
}

.videos-error-state i {
  color: var(--danger);
}

.videos-empty-state h3,
.videos-error-state h3 {
  font-size: 20px;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.videos-empty-state p,
.videos-error-state p {
  font-size: 14px;
}

/* ==========================================================================
   RESUMEN Y PAGINACIÓN
   ========================================================================== */
.videos-summary {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 32px;
}

.videos-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.videos-pagination:empty {
  margin-top: 0;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--gray-light);
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-family-title);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.page-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.page-dots {
  border: none;
  background: none;
  cursor: default;
  color: var(--gray-medium);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .videos-section {
    padding: 10px 0 70px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .video-facade__play {
    width: 54px;
    height: 54px;
    font-size: 16px;
  }
}
