/* ==========================================================
   YARPP 카드형 썸네일 스타일 (Light Mode Fixed)
   Final for <a class="yarpp-thumbnail"> 구조
   작성자: DailyFinLab
   ========================================================== */

.yarpp-thumbnails-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
}

/* 🔹 각 썸네일 카드 (a 태그 전체를 카드화) */
.yarpp-thumbnail {
  display: inline-block;
  width: 200px;
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  background-color: var(--card-bg);
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* 🔹 썸네일 이미지 — 비율 유지 + 잘림 방지 */
/* YARPP 플러그인이 <img> 에 height 를 인라인 style 속성으로 직접
   출력하므로, !important 없는 외부 스타일시트로는 이길 수 없다. */
.yarpp-thumbnails-horizontal .yarpp-thumbnail-default,
.yarpp-thumbnails-horizontal .yarpp-thumbnail > img {
  width: 93%;
  height: 100px !important;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--divider);
}

/* 🔹 제목 (span) */
.yarpp-thumbnails-horizontal .yarpp-thumbnail-title {
  display: block;
  padding: 0px 8px 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  text-align: center;
  max-height: 4em; /* 2줄 정도 표시 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* 🔹 호버 효과 */
.yarpp-thumbnail:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 0, 0, 0.15);
}

/* 🔹 반응형 (모바일 2열 이하 정렬) */
@media (max-width: 768px) {
  .yarpp-thumbnail {
    width: calc(50% - 12px);
  }
}
@media (max-width: 480px) {
  .yarpp-thumbnail {
    width: 100%;
  }
}
