/* LuigiVelo.ch — Videos (cards responsive, modern) */

@layer pages {
  .videos {
    margin-block: 1.25rem 1.5rem;
  }

  .videos-header p {
    color: var(--text-muted);
    margin: 0.25rem 0 1rem;
  }

  .videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  @media (min-width: 720px) {
    .videos-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .video-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
  }

  .video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #000 center/cover no-repeat;
    background-image: var(--thumb);
    isolation: isolate;
  }
  .video-thumb::before {
    /* overlay suave */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0.1) 55%,
      transparent
    );
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .video-thumb .play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
  }
  .video-thumb .play span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
  }
  .video-thumb .play svg {
    width: 28px;
    height: 28px;
    fill: var(--brand-600);
  }

  .video-thumb .badge {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.25rem 0.45rem;
    border-radius: 8px;
  }

  .video-card:hover .video-thumb::before {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.2) 55%,
      transparent
    );
  }
  .video-card:hover .video-thumb .play span {
    transform: scale(1.06);
  }

  .video-meta {
    padding: 0.75rem 0.9rem 1rem;
    display: grid;
    gap: 0.35rem;
  }
  .video-title {
    font-weight: 800;
    line-height: 1.25;
  }
  .video-title a {
    color: var(--text);
    text-decoration: none;
  }
  .video-title a:hover {
    color: var(--brand-700);
    text-decoration: underline;
  }

  /* Cuando el iframe se carga */
  .video-iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    border: 0;
    display: block;
  }

  @media (prefers-reduced-motion: reduce) {
    .video-card:hover .video-thumb .play span {
      transform: none;
    }
  }
}
