/* assets/css/similar-videos.css
   ------------------------------------------------------------
   Similar Videos cards (match screenshot style) + TRUE 4:3 thumbs
*/

/* Theme bars for letterbox/pillarbox */
:root{
  --sv-fill: rgba(10, 40, 28, 0.92);
  --sv-fill2: rgba(6, 24, 17, 0.92);
}

/* Section title row */
.similar-videos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.similar-videos-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.similar-videos-head a {
  text-decoration: none;
  opacity: .85;
}
.similar-videos-head a:hover { opacity: 1; }

/* Grid layout */
.similar-videos-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1200px) {
  .similar-videos-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .similar-videos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Card */
.sv-card {
  background: rgba(11, 52, 38, 0.62); /* deep green glass */
  border: 1px solid rgba(98, 255, 190, 0.14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}

.sv-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  border-color: rgba(98, 255, 190, 0.22);
}

/* =========================================================
   ✅ Thumb area = FIXED 4:3
   - wrapper enforces 4:3
   - image uses object-fit: contain so it NEVER crops
   - empty area becomes pillarbox/letterbox in theme colors
========================================================= */
.sv-thumb {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;

  /* enforce 4:3 */
  aspect-ratio: 4 / 3;
  overflow: hidden;

  /* bar background */
  background: linear-gradient(90deg, var(--sv-fill2), var(--sv-fill), var(--sv-fill2));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Make sure img fills wrapper height/width */
.sv-thumb img {
  width: 100%;
  height: 100%;
  display: block;

  /* key: keeps full image, adds bars automatically */
  object-fit: contain;
  object-position: center;

  /* remove any inherited constraints */
  max-width: none;
}

/* Optional subtle vignette like your UI */
.sv-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
}

/* Duration badge (top-right like screenshot) */
.sv-badge-dur {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 10px;
  letter-spacing: .2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

/* Content */
.sv-body {
  padding: 12px 12px 14px;
}

.sv-title {
  font-weight: 750;
  color: rgba(255,255,255,.95);
  font-size: 1rem;
  line-height: 1.15;
  margin: 0 0 6px 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-meta {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin: 0;
}

/* Size pill (green pill bottom like screenshot) */
.sv-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;

  color: #0b2a1e;
  background: rgba(87, 255, 168, 0.28);
  border: 1px solid rgba(87, 255, 168, 0.28);
}

/* Optional: make entire card clickable via inner link */
.sv-link {
  text-decoration: none;
  color: inherit;
}
.sv-link:hover { color: inherit; }

/* If no thumb */
.sv-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.35);
}

/* Fallback for very old browsers (rare) */
@supports not (aspect-ratio: 4 / 3) {
  .sv-thumb{
    height: 0;
    padding-top: 75%; /* 4:3 */
  }
  .sv-thumb img{
    position:absolute;
    inset:0;
  }
}
