/* [ytf_archive] shortcode — card grid + load-more.
   Class names intentionally match the salient-child theme cards so both look identical. */

.ytf-archive .ytf-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.ytf-archive .ytf-related-card {
  --index: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: ytfFadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(var(--index) * 80ms);
}
.ytf-archive .ytf-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: inherit;
}

.ytf-archive .ytf-related-thumb {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f9fafb;
}
.ytf-archive .ytf-related-thumb img {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ytf-archive .ytf-related-card:hover .ytf-related-thumb img {
  transform: scale(1.04);
}

.ytf-archive .ytf-related-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ytf-archive .ytf-related-card:hover .ytf-related-play { opacity: 1; }
.ytf-archive .ytf-related-play svg {
  width: 18px; height: 18px;
  fill: white;
  margin-left: 2px;
}

.ytf-archive .ytf-related-body {
  padding: 16px 18px 20px;
}
.ytf-archive .ytf-related-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ytf-archive .ytf-related-date {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
}

.ytf-archive .ytf-load-more-wrap {
  text-align: center;
  margin-top: 48px;
  margin-bottom: 48px;
}
.ytf-archive .ytf-load-more {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: white;
  background: #991b1b;
  border: none;
  padding: 14px 40px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.ytf-archive .ytf-load-more:hover { background: #7f1616; }
.ytf-archive .ytf-load-more:active { transform: scale(0.98); }
.ytf-archive .ytf-load-more:disabled { opacity: 0.6; cursor: not-allowed; }

@keyframes ytfFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 999px) {
  .ytf-archive .ytf-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ytf-archive .ytf-related-grid { grid-template-columns: 1fr; gap: 20px; }
}
