/* ==========================================================================
   videos.css — Página de archivo de videos (/videos/ y taxonomía video_eje).
   Requiere: main.css (variables, .btn, .container) y blog.css (.blog-filter,
   .cat-badge, .site-main--flush).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Encabezado del canal — espejo de blog-header
   -------------------------------------------------------------------------- */
.videos-header {
  padding-block: var(--space-8) var(--space-6);
  background-color: var(--color-marfil);
  position: relative;
}

/* Línea inferior: degradado de 3 ejes en "Todos", sólida al entrar en un eje */
.videos-header::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #B88147 0%, #2F5D50 50%, #4A342C 100%);
}

.videos-header--mp::after { background: var(--color-cobre); }
.videos-header--md::after { background: var(--color-verde); }
.videos-header--pc::after { background: var(--color-marron); }

/* Eyebrow: color del eje activo */
.videos-header--mp .videos-header__eyebrow { color: var(--color-cobre); }
.videos-header--md .videos-header__eyebrow { color: var(--color-verde); }
.videos-header--pc .videos-header__eyebrow { color: var(--color-marron); }

.videos-header__eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cobre);
  margin-bottom: var(--space-3);
}

.videos-header__title {
  font-family: var(--font-titulo);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-marron);
  margin-bottom: var(--space-4);
}

.videos-header__desc {
  font-family: var(--font-cuerpo);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.75;
  color: var(--color-taupe);
  max-width: 52ch;
  margin-bottom: var(--space-3);
}

.videos-header__schedule {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-taupe);
  margin-bottom: var(--space-5);
}

/* --------------------------------------------------------------------------
   2. Botón de suscripción a YouTube
   -------------------------------------------------------------------------- */
.yt-subscribe-btn {
  /* Hereda .btn y .btn--primary de main.css */
  text-transform: none;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   3. Video destacado
   -------------------------------------------------------------------------- */
.video-featured-wrap {
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--color-beige);
  margin-bottom: var(--space-4);
}

.video-featured__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-marron);
  cursor: pointer;
  margin-bottom: var(--space-5);
  outline: none;
}

.video-featured__media:focus-visible {
  box-shadow: 0 0 0 3px var(--color-cobre);
}

.video-featured__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}

.video-featured__media:hover .video-featured__thumb,
.video-featured__media:focus-visible .video-featured__thumb {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   4. Botón de play (compartido: destacado y tarjetas)
   -------------------------------------------------------------------------- */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background-color: rgba(47, 93, 80, 0.88);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background-color 0.2s, transform 0.2s;
}

.video-featured__media:hover .video-play-btn,
.video-featured__media:focus-visible .video-play-btn,
.video-card__media:hover .video-play-btn,
.video-card__media:focus-visible .video-play-btn {
  background-color: var(--color-verde);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--color-marfil);
  margin-left: 3px; /* centrado óptico del triángulo */
}

.video-play-btn--small {
  width: 44px;
  height: 44px;
}

.video-play-btn--small svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

/* --------------------------------------------------------------------------
   5. Cuerpo del video destacado
   -------------------------------------------------------------------------- */
.video-featured__body .cat-badge {
  display: block;
  margin-bottom: var(--space-3);
}

.video-featured__title {
  font-family: var(--font-titulo);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-marron);
  margin-bottom: var(--space-3);
}

.video-featured__meta {
  font-family: var(--font-small);
  font-size: 0.8rem;
  color: var(--color-taupe);
  margin-bottom: var(--space-3);
}

.video-featured__desc {
  font-family: var(--font-small);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-texto-suave);
  max-width: 56ch;
}

.video-featured__desc p { margin: 0; }

/* --------------------------------------------------------------------------
   6. Grilla de videos
   -------------------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-block: var(--space-4) var(--space-10);
}

/* --------------------------------------------------------------------------
   7. Tarjeta de video
   -------------------------------------------------------------------------- */
.video-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-beige);
  margin-bottom: var(--space-3);
  cursor: pointer;
  outline: none;
}

.video-card__media:focus-visible {
  box-shadow: 0 0 0 3px var(--color-cobre);
}

.video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}

.video-card__media:hover .video-card__thumb,
.video-card__media:focus-visible .video-card__thumb {
  opacity: 0.85;
}

.video-card__body .cat-badge {
  display: block;
  margin-bottom: var(--space-2);
}

.video-card__title {
  font-family: var(--font-titulo);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-marron);
  margin-bottom: var(--space-2);
}

.video-card__excerpt {
  font-family: var(--font-small);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--color-texto-suave);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card__excerpt p { margin: 0; }

/* --------------------------------------------------------------------------
   8. Cierre con botón de suscripción (cuando hay videos)
   -------------------------------------------------------------------------- */
.videos-subscribe-footer {
  padding-block: var(--space-16);
  border-top: 1px solid var(--color-beige);
  text-align: center;
}

/* --------------------------------------------------------------------------
   9. Estado vacío
   -------------------------------------------------------------------------- */
.videos-empty {
  padding-block: var(--space-16);
  text-align: center;
  max-width: 40ch;
  margin-inline: auto;
}

.videos-empty__eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cobre);
  margin-bottom: var(--space-4);
}

.videos-empty__message {
  font-family: var(--font-titulo);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-marron);
  margin-bottom: var(--space-3);
}

.videos-empty__sub {
  font-family: var(--font-cuerpo);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--color-taupe);
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   10. Responsivo — tablet (768px)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {

  .videos-header {
    padding-block: var(--space-12) var(--space-8);
  }

  .video-featured-wrap {
    padding-block: var(--space-12);
  }

  /* Destacado: 2 columnas (media | texto) */
  .video-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }

  .video-featured__media {
    margin-bottom: 0;
  }

  .video-play-btn {
    width: 72px;
    height: 72px;
  }

  .video-play-btn svg {
    width: 26px;
    height: 26px;
  }

  /* Grilla: 2 columnas */
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   11. Responsivo — desktop (1100px)
   -------------------------------------------------------------------------- */
@media (min-width: 1100px) {

  .videos-header {
    padding-block: var(--space-16) var(--space-12);
  }

  /* Grilla: 3 columnas */
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
