/* ============================================================
   LATEST VIDEOS - homepage YouTube cards
   Loaded only on the OK Home template (front page) via
   ok_enqueue_latest_videos_styles() in functions.php.

   The grid container (.ok-youtube-grid) already provides the
   responsive 3 / 2 / 1 column layout in style.css, so this file
   only styles the individual video cards. All colors use brand
   CSS variables so the cards follow the dark/light theme toggle.
   ============================================================ */

.ok-video-card {
  display: flex;
  flex-direction: column;
  background: var(--ok-card-bg);
  border: 1px solid var(--ok-card-border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ok-video-card:hover,
.ok-video-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--ok-shadow);
  outline: none;
}

.ok-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ok-bg-alt);
  overflow: hidden;
}

.ok-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Red play button drawn in pure CSS (no image request). */
.ok-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}

.ok-video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #ffffff;
}

.ok-video-card:hover .ok-video-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(230, 57, 70, 1);
}

.ok-video-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ok-video-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--ok-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ok-video-cta {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ok-red);
  margin-top: auto;
}

.ok-video-card:hover .ok-video-cta {
  text-decoration: underline;
}

/* Fallback cards (shown when the API key is missing or the request
   fails). They reuse the card shell but center a play glyph on a
   plain branded panel instead of a thumbnail image. */
.ok-video-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ok-bg-accent), var(--ok-bg-alt));
}
