/**
 * Video CPT styles — archive grid + single embed wrapper.
 */

/* Embed wrapper (16:9 responsive) */
.aic-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.aic-video-embed iframe,
.aic-video-embed blockquote {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* For Instagram/TikTok blockquote (uses script-based render) — let it size naturally */
.aic-video-embed:has(blockquote.instagram-media),
.aic-video-embed:has(blockquote.tiktok-embed) {
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  min-height: 500px;
}
.aic-video-embed blockquote {
  position: static;
  height: auto;
}

/* ─── Archive grid ─── */
.aic-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}

.aic-video-card {
  display: block;
  background: #fff;
  border: 1px solid #e8ecef;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.aic-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: color-mix(in srgb, var(--primary-color, #09CA8F) 40%, transparent);
}

.aic-video-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
}

.aic-video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.aic-video-card:hover .aic-video-card__thumb { transform: scale(1.04); }
.aic-video-card__thumb--placeholder { background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%); }

.aic-video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: .9;
  transition: opacity .2s, transform .2s;
}
.aic-video-card:hover .aic-video-card__play {
  opacity: 1;
  transform: scale(1.08);
}

.aic-video-card__duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.aic-video-card__platform {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
}
.aic-video-card__platform--youtube   { background: #ff0000; }
.aic-video-card__platform--vimeo     { background: #1ab7ea; }
.aic-video-card__platform--facebook  { background: #1877f2; }
.aic-video-card__platform--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.aic-video-card__platform--tiktok    { background: #000; }

.aic-video-card__body {
  padding: 16px 18px 18px;
}

.aic-video-card__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0 0 8px;
}

.aic-video-card__excerpt {
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 10px;
}

.aic-video-card__date {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}
