/* ==========================================================================
   LINK BERKAH – Video Edukasi
   ========================================================================== */

.vd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vd-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-card); color: inherit; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.vd-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -22px rgba(5, 150, 105, .5); }
.vd-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* kartu tegak, mengikuti format video pendek */
.vd-figure { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #064e3b; }
.vd-figure img, .vd-figure video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.vd-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #047857; font-size: 1rem;
  box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .55); transition: transform .2s var(--ease);
}
.vd-play i { margin-left: 3px; }
.vd-card:hover .vd-play { transform: translate(-50%, -50%) scale(1.1); }
.vd-body { padding: 10px 12px 12px; }
.vd-body h2 {
  margin: 0; font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: .85rem; font-weight: 700; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vd-body time { display: block; margin-top: 6px; font-size: .72rem; font-weight: 600; color: var(--muted); }

.vd-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: .84rem; font-weight: 700; color: #047857; text-decoration: none; }
.vd-watch { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.vd-player { aspect-ratio: 16 / 9; background: #000; }
.vd-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.vd-watch.is-tegak .vd-player { aspect-ratio: 9 / 16; width: 100%; max-width: calc(75vh * .5625); margin: 0 auto; }
.vd-file { display: block; width: 100%; max-height: 75vh; background: #000; }
.vd-missing { padding: 48px 20px; text-align: center; color: var(--muted); }
.vd-text { padding: 16px 18px 20px; }
.vd-text h1 { margin: 0 0 8px; font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.vd-text time { font-size: .76rem; font-weight: 600; color: var(--muted); }
.vd-text p { margin: 12px 0 0; font-size: .9rem; line-height: 1.65; color: #475569; }
.vd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.vd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 140px;
  min-height: 44px; padding: 0 16px; border: 1px solid #a7f3d0; border-radius: 12px;
  font-size: .85rem; font-weight: 700; color: #047857; background: #fff; text-decoration: none;
}
.vd-btn.is-primary { border-color: transparent; background: linear-gradient(120deg, #10b981, #0d9488); color: #fff; }
.vd-more-title { margin: 22px 0 12px; font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--ink); }

@media (min-width: 640px) {
  .vd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1024px) {
  .vd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .vd-body h2 { font-size: .95rem; }
  .vd-watch { max-width: 960px; margin: 0 auto; }
  /* video tegak: pemutar di kiri, keterangan di kanan */
  .vd-watch.is-tegak { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .vd-watch.is-tegak .vd-player { width: calc(75vh * .5625); max-width: none; }
  .vd-watch.is-tegak .vd-file { width: auto; max-width: 480px; height: 75vh; }
  .vd-text { padding: 28px 32px; }
  .vd-text h1 { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .vd-card, .vd-play { transition: none; }
}
