/* ============================================================
   OKU YouTube Video Showcase — Premium Electronics Brand Style
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── CSS Variables ── */
:root {
  --oku-bg:         #f4f4f6;
  --oku-card-bg:    #ffffff;
  --oku-border:     #e8e8ee;
  --oku-shadow:     0 2px 16px rgba(0,0,0,0.08);
  --oku-shadow-h:   0 8px 32px rgba(0,0,0,0.16);
  --oku-accent:     #e8041a;      /* Bold red – electronics brand feel */
  --oku-accent-2:   #0d0d0d;
  --oku-text-h:     #0d0d0d;
  --oku-text-b:     #4a4a5a;
  --oku-text-m:     #808094;
  --oku-radius:     14px;
  --oku-radius-sm:  8px;
  --oku-font-head:  'Syne', sans-serif;
  --oku-font-body:  'DM Sans', sans-serif;
  --oku-transition: 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  --oku-ease:       0.22s ease;
}

/* ── Section Wrapper ── */
.oku-yvs-section {
  font-family: var(--oku-font-body);
  padding: 40px 0 56px;
  background: transparent;
}

/* ── Section Header ── */
.oku-yvs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.oku-yvs-title {
  font-family: var(--oku-font-head);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 800;
  color: var(--oku-text-h);
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  line-height: 1.15;
  position: relative;
}

/* Accent underline bar */
.oku-yvs-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--oku-accent);
  margin-top: 7px;
}

/* ── View All Button ── */
.oku-yvs-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--oku-font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--oku-accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 18px;
  border: 1.5px solid var(--oku-accent);
  border-radius: 100px;
  transition: background var(--oku-ease), color var(--oku-ease), transform var(--oku-ease);
}

.oku-yvs-viewall svg {
  width: 15px;
  height: 15px;
  transition: transform var(--oku-ease);
}

.oku-yvs-viewall:hover {
  background: var(--oku-accent);
  color: #fff;
  transform: translateY(-1px);
}

.oku-yvs-viewall:hover svg {
  transform: translateX(3px);
}

/* ── Grid ── */
.oku-yvs-grid {
  display: grid;
  grid-template-columns: repeat(var(--oku-cols, 4), 1fr);
  gap: 20px;
}

/* ── Card ── */
.oku-yvs-card {
  background: var(--oku-card-bg);
  border: 1px solid var(--oku-border);
  border-radius: var(--oku-radius);
  overflow: hidden;
  box-shadow: var(--oku-shadow);
  cursor: pointer;
  transition:
    transform var(--oku-transition),
    box-shadow var(--oku-transition),
    border-color var(--oku-ease);
  outline: none;
  will-change: transform;
}

.oku-yvs-card:hover,
.oku-yvs-card:focus-visible {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--oku-shadow-h);
  border-color: rgba(232, 4, 26, 0.22);
}

.oku-yvs-card:focus-visible {
  outline: 2px solid var(--oku-accent);
  outline-offset: 2px;
}

/* ── Thumbnail Wrapper ── */
.oku-yvs-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}

/* Shimmer loading animation shown before image loads */
.oku-yvs-thumb-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #1e1e1e 25%,
    #2a2a2a 50%,
    #1e1e1e 75%
  );
  background-size: 200% 100%;
  animation: oku-shimmer 1.4s infinite;
  z-index: 0;
}

@keyframes oku-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Once image loads, shimmer disappears */
.oku-yvs-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.45s ease, filter 0.3s ease, opacity 0.3s ease;
  filter: brightness(0.92);
  opacity: 0;
}

/* Fade in once loaded — triggered by JS */
.oku-yvs-thumb.is-loaded {
  opacity: 1;
}

.oku-yvs-card:hover .oku-yvs-thumb {
  transform: scale(1.06);
  filter: brightness(0.75);
}

/* ── Overlay ── */
.oku-yvs-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0) 60%
  );
  transition: background var(--oku-ease);
}

.oku-yvs-card:hover .oku-yvs-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.1) 60%
  );
}

/* ── Play Button ── */
.oku-yvs-play-btn {
  width: 64px;
  height: 64px;
  transition: transform var(--oku-transition), opacity var(--oku-ease);
  opacity: 0.88;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

.oku-yvs-play-btn svg {
  width: 100%;
  height: 100%;
}

.oku-yvs-card:hover .oku-yvs-play-btn {
  transform: scale(1.15);
  opacity: 1;
}

/* ── Card Info ── */
.oku-yvs-info {
  padding: 14px 16px 16px;
}

.oku-yvs-card-title {
  font-family: var(--oku-font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--oku-text-h);
  margin: 0 0 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.oku-yvs-card-desc {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--oku-text-m);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ────────────────────────────────────────────────────────────
   LIGHTBOX
   ──────────────────────────────────────────────────────────── */
.oku-yvs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.oku-yvs-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
  background: rgba(0, 0, 0, 0.88);
}

.oku-yvs-lb-inner {
  position: relative;
  width: 90vw;
  max-width: 960px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.oku-yvs-lightbox.is-open .oku-yvs-lb-inner {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.oku-yvs-lb-ratio {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
}

.oku-yvs-lb-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.oku-yvs-lb-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity var(--oku-ease), transform var(--oku-ease);
  z-index: 10;
}

.oku-yvs-lb-close:hover {
  opacity: 1;
  transform: scale(1.15) rotate(90deg);
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */

/* Tablet – force 2 cols */
@media (max-width: 1024px) and (min-width: 601px) {
  .oku-yvs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .oku-yvs-play-btn {
    width: 52px;
    height: 52px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .oku-yvs-section {
    padding: 28px 0 40px;
  }

  .oku-yvs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .oku-yvs-title {
    font-size: 1.1rem;
  }

  .oku-yvs-title::after {
    width: 28px;
    height: 2.5px;
    margin-top: 5px;
  }

  .oku-yvs-viewall {
    font-size: 0.72rem;
    padding: 6px 12px;
  }

  .oku-yvs-play-btn {
    width: 42px;
    height: 42px;
  }

  .oku-yvs-info {
    padding: 10px 12px 12px;
  }

  .oku-yvs-card-title {
    font-size: 0.78rem;
  }

  .oku-yvs-lb-inner {
    width: 96vw;
    border-radius: 10px;
  }
}

/* Very small mobile – single column */
@media (max-width: 360px) {
  .oku-yvs-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Accessibility: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .oku-yvs-card,
  .oku-yvs-thumb,
  .oku-yvs-play-btn,
  .oku-yvs-lightbox,
  .oku-yvs-lb-inner {
    transition: none !important;
    animation: none !important;
  }
}
