/**
 * ULagos Videos - Frontend Styles (SCSS Source)
 *
 * Nomenclatura BEM-like con prefijo ulagos_tv_
 * Mobile-first, Flexbox/Grid
 *
 * Basado en frontend.scss de ULagos TV.
 *
 * @package ULagos_Videos
 */
.ulagos_tv_inline_iframe,
.ulagos_tv_inline_video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

/* Google Drive iframe fit */
.ulagos_tv_episode_thumbnail .ulagos_tv_inline_iframe[src*="drive.google.com"] {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.ulagos_tv_embed_responsive {
  position: relative;
  display: block;
  height: 0;
  padding: 0;
  overflow: hidden;
}
.ulagos_tv_embed_responsive iframe,
.ulagos_tv_embed_responsive embed,
.ulagos_tv_embed_responsive object,
.ulagos_tv_embed_responsive video,
.ulagos_tv_embed_responsive img {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  border: 0;
  -o-object-fit: cover;
     object-fit: cover;
}
.ulagos_tv_embed_responsive--16by9 {
  padding-bottom: 56.25%;
}
.ulagos_tv_embed_responsive--thumbnail {
  padding-bottom: 56.25%;
}

.ulagos_tv_hero {
  padding: 80px 0;
  border-bottom: 1px solid #e2e8f0;
}

.ulagos_tv_hero_image_wrapper {
  -webkit-box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
          box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}
.ulagos_tv_hero_image_wrapper:hover {
  -webkit-transform: translateY(-8px);
          transform: translateY(-8px);
}
.ulagos_tv_hero_image_wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.ulagos_tv_hero_title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ulagos_tv_hero_description {
  font-size: 1.125rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 24px;
}

.ulagos_tv_episodes_section {
  padding: 80px 0;
}

.ulagos_tv_section_title_wrapper {
  margin-bottom: 48px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 20px;
}

.ulagos_tv_section_title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.ulagos_tv_section_title_accent {
  width: 4px;
  height: 32px;
  background: #3b82f6;
  border-radius: 2px;
  margin-right: 16px;
  display: inline-block;
}

.ulagos_tv_tabs_container {
  margin-bottom: 32px;
}

.ulagos_tv_tabs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.ulagos_tv_tab {
  padding: 10px 24px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
  position: relative;
}
.ulagos_tv_tab:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}
.ulagos_tv_tab--active {
  background: #fff;
  color: #3b82f6;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}
.ulagos_tv_tab--active:hover {
  color: #3b82f6;
  background: #fff;
}

.ulagos_tv_card_link {
  color: inherit;
  text-decoration: none;
  display: block;
  -webkit-transition: color 0.2s;
  transition: color 0.2s;
}

.ulagos_tv_episode_card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}
.ulagos_tv_episode_card[data-video-type] {
  cursor: pointer;
}
.ulagos_tv_episode_card--playing {
  -webkit-transform: translateY(-8px) !important;
          transform: translateY(-8px) !important;
  -webkit-box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
          box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}
.ulagos_tv_episode_card--playing .ulagos_tv_episode_thumbnail img {
  display: none !important;
}
.ulagos_tv_episode_card--playing .ulagos_tv_play_overlay {
  display: none !important;
}
.ulagos_tv_episode_card:hover {
  -webkit-transform: translateY(-8px);
          transform: translateY(-8px);
  -webkit-box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
          box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.2);
}
.ulagos_tv_episode_card:hover .ulagos_tv_episode_thumbnail img {
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}
.ulagos_tv_episode_card:hover .ulagos_tv_play_overlay {
  opacity: 1;
}

.ulagos_tv_episode_thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
  /* Playing state - ensure iframe fills container */
}
.ulagos_tv_episode_card--playing .ulagos_tv_episode_thumbnail {
  aspect-ratio: unset;
  height: 100%;
}
.ulagos_tv_episode_thumbnail img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -webkit-transition: -webkit-transform 0.4s ease;
  transition: -webkit-transform 0.4s ease;
  transition: transform 0.4s ease;
  transition: transform 0.4s ease, -webkit-transform 0.4s ease;
}

.ulagos_tv_play_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
  background: rgba(0, 0, 0, 0.15);
}

.ulagos_tv_episode_info {
  padding: 24px;
  -webkit-box-flex: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.ulagos_tv_episode_title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.4;
}

.ulagos_tv_episode_date {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: auto;
}

.ulagos_tv_error {
  text-align: center;
  color: #ef4444;
  font-size: 1rem;
  padding: 40px 20px;
}

.ulagos_tv_loading {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}
.ulagos_tv_loading::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 20px auto 0;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  -webkit-animation: ulagos_tv_spin 0.8s linear infinite;
          animation: ulagos_tv_spin 0.8s linear infinite;
}

@-webkit-keyframes ulagos_tv_spin {
  to {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}

@keyframes ulagos_tv_spin {
  to {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
.ulagos_videos_count_badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .ulagos_tv_hero {
    padding: 40px 0;
  }
  .ulagos_tv_episodes_section {
    padding: 40px 0;
  }
  .ulagos_tv_episode_info {
    padding: 16px;
  }
  .ulagos_tv_episode_title {
    font-size: 1rem;
  }
}