/* ==================== ESTILOS GALERÍA DE VIDEOS ==================== */
/* Diseño PREMIUM - Mejores prácticas UI/UX */

/* Hero Section - Espectacular */
.hero-videos {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 7rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-videos::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero-videos::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(30px, 30px) rotate(180deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-videos h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.hero-videos p {
  font-size: 1.75rem;
  font-weight: 300;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sección de Contenido */
.seccion-contenido {
  padding: 5rem 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.videos-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Filtros Premium */
.filtro-videos {
  background: white;
  padding: 2.5rem;
  border-radius: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 4rem;
  border-top: 5px solid var(--primary);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.busqueda-videos {
  flex: 1;
  min-width: 300px;
  padding: 1.125rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--gray-900);
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.busqueda-videos:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15);
  background: white;
  transform: translateY(-2px);
}

.busqueda-videos::placeholder {
  color: var(--gray-500);
}

.filtro-tipo {
  flex: 0 0 250px;
  padding: 1.125rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--gray-900);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232e7d32' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.5rem center;
  padding-right: 3rem;
}

.filtro-tipo:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15);
  background-color: white;
  transform: translateY(-2px);
}

/* Videos Grid Premium */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.video-item {
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 3px solid transparent;
  position: relative;
}

.video-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.video-item:hover::before {
  transform: scaleX(1);
}

.video-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px rgba(46, 125, 50, 0.25);
  border-color: var(--primary);
  z-index: 10;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
  overflow: hidden;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-item:hover .video-thumbnail img {
  transform: scale(1.15);
}

.video-thumbnail svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.video-play-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.2);
  transition: width 0.6s, height 0.6s;
}

.video-item:hover .video-play-button::before {
  width: 120px;
  height: 120px;
}

.video-item:hover .video-play-button {
  background: white;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.4);
}

.video-play-button svg {
  width: 0;
  height: 0;
}

.video-play-button::after {
  content: "▶";
  font-size: 2rem;
  color: var(--primary);
  margin-left: 6px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.video-duration {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.video-info {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.video-item:hover .video-info h3 {
  color: var(--primary);
}

.video-info > p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex: 1;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f3f4f6;
  flex-wrap: wrap;
}

.video-meta span {
  font-size: 0.938rem;
  color: var(--gray-600);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-meta .duracion {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border-radius: 2rem;
  border: 2px solid var(--gray-200);
  color: var(--primary);
  font-weight: 700;
}

.video-meta .fecha {
  color: var(--gray-700);
}

.btn-reproducir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.btn-reproducir::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-reproducir:hover::before {
  width: 300px;
  height: 300px;
}

.btn-reproducir:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.btn-reproducir::after {
  content: "▶";
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-reproducir:hover::after {
  transform: translateX(4px);
}

/* Paginación Premium */
.paginacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 5rem;
  padding: 2rem;
  background: white;
  border-radius: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--primary);
}

.pag-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.pag-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.pag-btn:hover::before {
  width: 300px;
  height: 300px;
}

.pag-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.pag-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pag-info {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border-radius: 2rem;
  border: 2px solid var(--gray-200);
}

/* Sección Playlists Premium */
.playlist-section {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  padding: 4rem 3rem;
  border-radius: 2rem;
  margin-bottom: 4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--primary);
}

.playlist-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.playlist-section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
}

.playlists-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.playlist-item {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  border-left: 5px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.playlist-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.playlist-item:hover::before {
  transform: scaleY(1);
}

.playlist-item:hover {
  transform: translateX(12px);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.2);
}

.playlist-item h4 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.playlist-item:hover h4 {
  color: var(--primary);
}

.playlist-item p {
  font-size: 0.938rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.playlist-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.938rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.playlist-item a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

/* Sección Canal YouTube Premium */
.canal-youtube {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 3rem;
  border-radius: 2rem;
  color: white;
  text-align: center;
  box-shadow: 0 15px 50px rgba(46, 125, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.canal-youtube::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.canal-youtube h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.canal-youtube > p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.btn-suscribir-yt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 3rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-suscribir-yt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.btn-suscribir-yt:hover::before {
  transform: scaleX(1);
}

.btn-suscribir-yt:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-suscribir-yt .icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.btn-suscribir-yt:hover .icon {
  transform: scale(1.2) rotate(5deg);
}

/* Responsive Design */
@media (max-width: 1600px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
  }

  .playlists-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-videos {
    padding: 6rem 0 5rem;
  }

  .hero-videos h1 {
    font-size: 3rem;
  }

  .hero-videos p {
    font-size: 1.5rem;
  }

  .seccion-contenido {
    padding: 4rem 0;
  }

  .filtro-videos {
    flex-direction: column;
  }

  .busqueda-videos,
  .filtro-tipo {
    width: 100%;
    min-width: auto;
  }

  .playlist-section {
    padding: 3rem 2rem;
  }

  .playlist-section h2 {
    font-size: 2rem;
  }

  .canal-youtube {
    padding: 3rem 2rem;
  }

  .canal-youtube h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-videos {
    padding: 5rem 0 4rem;
  }

  .hero-videos h1 {
    font-size: 2.5rem;
  }

  .hero-videos p {
    font-size: 1.25rem;
  }

  .filtro-videos {
    padding: 2rem;
  }

  .videos-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .video-info {
    padding: 1.5rem;
  }

  .video-info h3 {
    font-size: 1.25rem;
  }

  .paginacion {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .pag-btn {
    width: 100%;
  }

  .playlists-grid {
    grid-template-columns: 1fr;
  }

  .playlist-item {
    padding: 2rem 1.5rem;
  }

  .playlist-section {
    padding: 2.5rem 1.5rem;
  }

  .playlist-section h2 {
    font-size: 1.75rem;
  }

  .canal-youtube {
    padding: 2.5rem 1.5rem;
  }

  .canal-youtube h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-videos h1 {
    font-size: 2rem;
  }

  .hero-videos p {
    font-size: 1.125rem;
  }

  .filtro-videos {
    padding: 1.5rem;
  }

  .video-info h3 {
    font-size: 1.125rem;
  }

  .video-info > p {
    font-size: 0.938rem;
  }

  .btn-reproducir {
    padding: 0.875rem 1.5rem;
    font-size: 0.938rem;
  }

  .playlist-section h2 {
    font-size: 1.5rem;
  }

  .canal-youtube h2 {
    font-size: 1.5rem;
  }

  .canal-youtube > p {
    font-size: 1.125rem;
  }
}
