/* ═══════════════════════════════════════════════════════════════
   LIBERTAD DE EXPRESIÓN — YouTube Integration Styles
   File: assets/css/youtube.css
   ═══════════════════════════════════════════════════════════════ */

/* ── PAGE WRAPPER ── */
.ldx-youtube-page { background: var(--ldx-fondo); }
.ldx-yt-wrapper {
  max-width: var(--ldx-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── INTRO ── */
.ldx-yt-intro {
  padding: 44px 0 40px;
  border-bottom: 2px solid var(--ldx-gris-claro);
}
.ldx-yt-intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ldx-yt-eyebrow { display: flex; align-items: center; }
.ldx-yt-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ldx-rojo);
  color: #fff;
  font-family: var(--ldx-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
}
.ldx-yt-badge svg { width: 14px; height: 14px; }
.ldx-yt-intro-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.ldx-yt-channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--ldx-rojo);
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 3px;
  font-family: var(--ldx-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.ldx-yt-channel-btn:hover { background: var(--ldx-rojo-dark); transform: translateY(-2px); color: #fff; }
.ldx-yt-channel-btn svg { width: 15px; height: 15px; }
.ldx-yt-sub-note {
  font-family: var(--ldx-sans);
  font-size: 12px;
  color: var(--ldx-gris-medio);
  white-space: nowrap;
}
.ldx-yt-sub-note strong { color: var(--ldx-gris-oscuro); }
.ldx-yt-title {
  font-family: var(--ldx-serif);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--ldx-azul);
  margin-bottom: 14px;
}
.ldx-yt-title span { color: var(--ldx-rojo); }
.ldx-yt-desc {
  font-family: var(--ldx-body-font);
  font-size: 15px;
  color: var(--ldx-gris-medio);
  line-height: 1.8;
  max-width: 780px;
}


/* ── SECTION LABELS ── */
.ldx-yt-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 0 24px;
}
.ldx-yt-section-label span {
  font-family: var(--ldx-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ldx-rojo);
  white-space: nowrap;
}
.ldx-yt-section-line { flex: 1; height: 1px; background: var(--ldx-gris-claro); }
.ldx-yt-section-header { margin-bottom: 24px; }
.ldx-yt-section-title {
  font-family: var(--ldx-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ldx-azul);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ldx-yt-section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 22px;
  background: var(--ldx-rojo);
  border-radius: 2px;
}

/* ── FEATURED GRID ── */
.ldx-yt-featured-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}
.ldx-yt-featured-video {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.ldx-yt-featured-video img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s;
}
.ldx-yt-featured-video:hover img { opacity: 0.68; }
.ldx-yt-play-lg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  background: var(--ldx-rojo);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: transform 0.2s, background 0.2s;
  pointer-events: none;
}
.ldx-yt-featured-video:hover .ldx-yt-play-lg { transform: translate(-50%, -50%) scale(1.1); background: var(--ldx-rojo-dark); }
.ldx-yt-play-lg svg { width: 24px; height: 24px; margin-left: 4px; }
.ldx-yt-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-family: var(--ldx-sans);
  font-size: 11px; font-weight: 700;
  padding: 3px 7px; border-radius: 3px;
  pointer-events: none;
}
.ldx-yt-featured-info { padding: 14px 0 0; }
.ldx-yt-cat {
  font-family: var(--ldx-sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ldx-rojo); margin-bottom: 8px;
}
.ldx-yt-featured-info h2 {
  font-family: var(--ldx-serif);
  font-size: 20px; font-weight: 700; line-height: 1.3;
  color: var(--ldx-azul); margin-bottom: 10px;
}
.ldx-yt-featured-info p {
  font-family: var(--ldx-body-font);
  font-size: 14px; color: var(--ldx-gris-medio); line-height: 1.7; margin-bottom: 12px;
}
.ldx-yt-meta-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ldx-sans);
  font-size: 12px; color: var(--ldx-gris-medio);
}

/* ── QUEUE SIDEBAR ── */
.ldx-yt-queue { display: flex; flex-direction: column; gap: 4px; }
.ldx-yt-queue-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.ldx-yt-queue-item:hover { background: #f8f8f8; border-color: var(--ldx-gris-claro); }
.ldx-yt-queue-thumb {
  position: relative; border-radius: 3px; overflow: hidden;
  aspect-ratio: 16/9; background: #000;
}
.ldx-yt-queue-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; }
.ldx-yt-play-sm {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  background: rgba(196,18,48,0.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ldx-yt-play-sm svg { width: 9px; height: 9px; margin-left: 2px; }
.ldx-yt-qduration {
  position: absolute; bottom: 3px; right: 3px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 4px; border-radius: 2px;
  pointer-events: none;
}
.ldx-yt-queue-info h4 {
  font-family: var(--ldx-sans);
  font-size: 12px; font-weight: 600; color: var(--ldx-negro);
  line-height: 1.35; margin-bottom: 4px;
}
.ldx-yt-qmeta {
  font-family: var(--ldx-sans);
  font-size: 11px; color: var(--ldx-gris-medio);
  display: flex; gap: 8px;
}

/* ── VIDEOS GRID ── */
.ldx-yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.ldx-yt-card {
  background: #fff;
  border-radius: 4px; overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--ldx-gris-claro);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ldx-yt-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26,58,107,0.2);
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}
.ldx-yt-card-thumb {
  position: relative; overflow: hidden; aspect-ratio: 16/9; background: #000;
}
.ldx-yt-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.9;
  transition: opacity 0.3s, transform 0.4s;
}
.ldx-yt-card:hover .ldx-yt-card-thumb img { opacity: 0.68; transform: scale(1.04); }
.ldx-yt-play-md {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: rgba(196,18,48,0.92); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s; pointer-events: none;
}
.ldx-yt-card:hover .ldx-yt-play-md { transform: translate(-50%, -50%) scale(1.1); }
.ldx-yt-play-md svg { width: 14px; height: 14px; margin-left: 3px; }
.ldx-yt-card-body { padding: 14px 16px 18px; }
.ldx-yt-card-body h3 {
  font-family: var(--ldx-serif);
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--ldx-azul); margin-bottom: 10px;
}
.ldx-yt-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ldx-sans);
  font-size: 11px; color: var(--ldx-gris-medio);
}
.ldx-yt-views { display: flex; align-items: center; gap: 4px; }
.ldx-yt-views svg { width: 12px; height: 12px; }

/* ── LOAD MORE ── */
.ldx-yt-pagination { text-align: center; padding-bottom: 64px; }
.ldx-yt-load-more {
  background: none;
  border: 2px solid var(--ldx-gris-claro);
  color: var(--ldx-gris-oscuro);
  font-family: var(--ldx-sans);
  font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 13px 40px; border-radius: 3px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.ldx-yt-load-more:hover { border-color: var(--ldx-rojo); color: var(--ldx-rojo); }
.ldx-yt-load-more svg { width: 13px; height: 13px; }

/* ── LOADING STATE ── */
.ldx-yt-loading {
  font-family: var(--ldx-sans);
  color: var(--ldx-gris-medio);
  padding: 40px 0;
  grid-column: 1 / -1;
}

/* ── LIGHTBOX ── */
.ldx-yt-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(10,20,40,0.92); z-index: 9999;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ldx-yt-lightbox.open { display: flex; animation: ldxFadeIn 0.2s ease; }
@keyframes ldxFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ldx-yt-lightbox-inner {
  position: relative; width: 100%; max-width: 920px;
  animation: ldxScaleIn 0.22s ease;
}
@keyframes ldxScaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ldx-yt-lightbox-video {
  position: relative; aspect-ratio: 16/9;
  background: #000; border-radius: 6px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.ldx-yt-lightbox-video iframe { width: 100%; height: 100%; border: none; display: block; }
.ldx-yt-lightbox-close {
  position: absolute; top: -40px; right: 0;
  background: none; border: none; color: rgba(255,255,255,0.65);
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-family: var(--ldx-sans);
  font-size: 13px; font-weight: 600;
  transition: color 0.2s; padding: 4px 0;
}
.ldx-yt-lightbox-close:hover { color: #fff; }
.ldx-yt-lightbox-close svg { width: 17px; height: 17px; }
.ldx-yt-lightbox-info {
  margin-top: 14px; padding: 0 2px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
}
.ldx-yt-lightbox-cat {
  font-family: var(--ldx-sans);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #e87070; margin-bottom: 4px;
}
.ldx-yt-lightbox-info h3 {
  font-family: var(--ldx-serif);
  font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px;
}
.ldx-yt-lightbox-date {
  font-family: var(--ldx-sans);
  font-size: 12px; color: rgba(255,255,255,0.5);
}
.ldx-yt-lightbox-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; text-decoration: none; padding: 9px 16px;
  border-radius: 3px; font-family: var(--ldx-sans);
  font-size: 12px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.2s;
}
.ldx-yt-lightbox-link:hover { background: rgba(196,18,48,0.25); border-color: rgba(196,18,48,0.5); color: #fff; }
.ldx-yt-lightbox-link svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE WIDGET
   ═══════════════════════════════════════════════════════════════ */
.ldx-yt-widget {
  background: var(--ldx-azul);
  padding: 40px 0 48px;
  margin: 48px 0;
}
.ldx-yt-widget-header {
  max-width: var(--ldx-max-width);
  margin: 0 auto 28px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ldx-yt-widget-title {
  font-family: var(--ldx-serif);
  font-size: 22px; font-weight: 900;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.ldx-yt-widget-title svg { width: 22px; height: 22px; color: var(--ldx-rojo); }
.ldx-yt-widget-badge {
  background: var(--ldx-rojo);
  color: #fff;
  font-family: var(--ldx-sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px; border-radius: 3px;
  vertical-align: middle;
}
.ldx-yt-widget-see-all {
  font-family: var(--ldx-sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,0.6); text-decoration: none;
  transition: color 0.2s;
}
.ldx-yt-widget-see-all:hover { color: #fff; }
.ldx-yt-widget-grid {
  max-width: var(--ldx-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ldx-yt-widget-card { cursor: pointer; }
.ldx-yt-widget-thumb {
  position: relative; border-radius: 4px; overflow: hidden;
  aspect-ratio: 16/9; background: #000; margin-bottom: 12px;
}
.ldx-yt-widget-thumb img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.85;
  transition: opacity 0.3s;
}
.ldx-yt-widget-card:hover .ldx-yt-widget-thumb img { opacity: 0.65; }
.ldx-yt-widget-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: var(--ldx-rojo); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s; pointer-events: none;
}
.ldx-yt-widget-card:hover .ldx-yt-widget-play { transform: translate(-50%, -50%) scale(1.1); }
.ldx-yt-widget-play svg { width: 16px; height: 16px; margin-left: 3px; }
.ldx-yt-widget-dur {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-family: var(--ldx-sans);
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 3px;
  pointer-events: none;
}
.ldx-yt-widget-info h3 {
  font-family: var(--ldx-serif);
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: #fff; margin-bottom: 6px;
}
.ldx-yt-widget-info span {
  font-family: var(--ldx-sans);
  font-size: 12px; color: rgba(255,255,255,0.5);
}

/* Skeleton loader */
.ldx-yt-widget-skeleton {
  border-radius: 4px;
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: ldxSkeleton 1.5s infinite;
}
@keyframes ldxSkeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .ldx-yt-featured-grid { grid-template-columns: 1fr 260px; }
}
@media (max-width: 768px) {
  .ldx-yt-intro { grid-template-columns: 1fr; gap: 28px; }
  .ldx-yt-intro-cta { align-items: flex-start; }
  .ldx-yt-featured-grid { grid-template-columns: 1fr; }
  .ldx-yt-queue { display: none; }
  .ldx-yt-grid { grid-template-columns: repeat(2, 1fr); }
  .ldx-yt-widget-grid { grid-template-columns: 1fr; }
  .ldx-yt-title { font-size: 26px; }
}
@media (max-width: 480px) {
  .ldx-yt-grid { grid-template-columns: 1fr; }
}
