/* ==========================================================================
   Componentes reutilizables
   ========================================================================== */

/* ---------- Barra de color (firma visual del canal) ---------- */
.color-bars {
  height: 6px;
  background: var(--color-bars);
}
.color-bars--thin { height: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(5, 7, 8, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand__logo {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow-gold);
  object-fit: cover;
}
.brand__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand__tag {
  display: block;
  margin-top: 3px;
  font-size: 0.6875rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0; padding: 0;
  list-style: none;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--gold-300); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.header-actions .btn--subscribe { display: none; }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease);
}
.menu-toggle:hover { border-color: var(--border-strong); }

@media (min-width: 900px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
  .header-actions .btn--subscribe { display: inline-flex; }
}

/* ---------- Menú móvil ---------- */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: var(--z-drawer);
  padding: var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.drawer.is-open { opacity: 1; transform: none; visibility: visible; }
.drawer .nav__list { flex-direction: column; align-items: stretch; gap: var(--space-1); }
.drawer .nav__link { justify-content: flex-start; font-size: var(--fs-base); border-radius: var(--radius-sm); }
.drawer .btn { width: 100%; margin-top: var(--space-4); }
@media (min-width: 900px) { .drawer { display: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.btn--primary {
  background: var(--gold-gradient);
  color: var(--on-gold);
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover { color: var(--on-gold); filter: brightness(1.08); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { color: var(--text); background: rgba(227, 176, 88, 0.1); border-color: var(--gold-500); }
.btn--live { background: var(--live); color: #fff; }
.btn--live:hover { color: #fff; filter: brightness(1.1); }
.btn--subscribe { min-height: 44px; background: #fff; color: #0f0f0f; }
.btn--subscribe:hover { color: #0f0f0f; background: var(--gold-100); }
.btn--subscribe .icon { color: #ff0000; }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Indicador en vivo ---------- */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.live-pill__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.live-pill.is-live { background: var(--live-soft); border-color: rgba(239, 43, 63, 0.5); color: #ffd7dc; }
.live-pill.is-live .live-pill__dot { background: var(--live); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 43, 63, 0.7); }
  100% { box-shadow: 0 0 0 10px rgba(239, 43, 63, 0); }
}

/* ---------- Encabezado de sección ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.eyebrow::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--color-bars);
  border-radius: 2px;
}
.section-title { font-size: var(--fs-2xl); font-style: italic; }
.section-lead { max-width: 60ch; margin-top: var(--space-3); color: var(--text-muted); }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-weight: 700;
  font-size: var(--fs-sm);
}
.link-arrow .icon { transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Tarjeta de video ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 600px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }

.video-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.video-card:hover { border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow-card); }

.video-card__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}
.video-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity var(--dur) var(--ease);
}
.video-card:hover .video-card__thumb img { opacity: 0.8; }
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.video-card__play span {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--gold-300);
  color: var(--gold-100);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.video-card:hover .video-card__play span { background: var(--gold-500); color: var(--on-gold); }
.video-card__play .icon { width: 22px; height: 22px; margin-left: 3px; }

.video-card__badge {
  position: absolute;
  top: var(--space-3); left: var(--space-3);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.75);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
}
.video-card__badge--live { background: var(--live); color: #fff; }

.video-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  padding: var(--space-4) var(--space-4) var(--space-6);
}
.video-card__title {
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card__title a { color: var(--text); }
.video-card__title a:hover { color: var(--gold-300); }
.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: auto;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.video-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Los Shorts usan miniatura 16:9 en la cuadrícula; el modal los reproduce en vertical */

/* Skeleton de carga (reserva espacio, evita saltos) */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius);
}
.skeleton--card { aspect-ratio: 16 / 13; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state {
  grid-column: 1 / -1;
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

/* ---------- Reproductor (facade: carga el iframe al hacer clic) ---------- */
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.player iframe { width: 100%; height: 100%; border: 0; }
.player__facade {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.player__facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity var(--dur) var(--ease); }
.player__facade:hover img { opacity: 0.9; }
.player__facade-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: var(--on-gold);
  box-shadow: var(--shadow-gold);
}
.player__facade-btn .icon { width: 32px; height: 32px; margin-left: 5px; }

/* ---------- Chips de filtro ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--gold-gradient); color: var(--on-gold); border-color: transparent; }

/* ---------- Campo de búsqueda ---------- */
.field {
  position: relative;
  display: flex;
  align-items: center;
}
.field .icon { position: absolute; left: 14px; color: var(--text-dim); pointer-events: none; }
.input, .select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--fs-base);
  transition: border-color var(--dur) var(--ease);
}
.field .input { padding-left: 44px; }
.input::placeholder { color: var(--text-dim); }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--gold-300); box-shadow: 0 0 0 3px rgba(242, 196, 106, 0.25); }
.select { cursor: pointer; appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3bfbd' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }

/* ---------- Modal de video ---------- */
.video-modal {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}
.video-modal::backdrop { background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(4px); }
.video-modal__frame { aspect-ratio: 16 / 9; background: #000; }
.video-modal__frame.is-short { aspect-ratio: 9 / 16; max-height: 75vh; margin-inline: auto; }
.video-modal__frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-6);
}
.video-modal__title { font-size: var(--fs-lg); font-style: normal; font-family: var(--font-body); }
.video-modal__close {
  position: absolute;
  top: var(--space-3); right: var(--space-3);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
  transition: background-color var(--dur) var(--ease);
}
.video-modal__close:hover { background: var(--gold-500); color: var(--on-gold); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-16);
  background: linear-gradient(180deg, var(--surface) 0%, #030404 100%);
  border-top: 1px solid var(--border);
}
.site-footer__grid {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-12);
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 {
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.site-footer p, .site-footer li { color: var(--text-muted); font-size: var(--fs-sm); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }
.site-footer ul a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; color: var(--text-muted); }
.site-footer ul a:hover { color: var(--gold-300); }
.site-footer__about { display: grid; gap: var(--space-4); max-width: 42ch; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

/* Header compacto en móviles pequeños: el indicador en vivo muestra solo el punto */
@media (max-width: 479px) {
  .site-header .live-pill {
    justify-content: center;
    width: 44px; height: 44px;
    padding: 0;
  }
  .site-header .live-pill [data-live-text] {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .brand__tag { display: none; }
}
