/* =========================================================
   CPC Layout: Reference
   File: assets/css/cpc-layout-reference.css
   Depends on: cpc-base.css
   ========================================================= */

/* Reference cards use slightly smaller radius */
.custom-posts.wrapper.layout-reference {
  gap: 60px 30px;
}
.custom-posts.wrapper.layout-reference .cp-content {
  gap: 30px;
  justify-content: flex-start;
}
.custom-posts.wrapper.layout-reference .cp-card {
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
}

/* Thumb wrapper for reference (same visual as related) */
.custom-posts.wrapper.layout-reference .cp-card .cp-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md, 14px);
  contain: paint;
}

/* Thumb image behavior */
.custom-posts.wrapper.layout-reference .cp-card .cp-thumb img {
  display: block;
  width: 100%;
  object-fit: cover;
  transform-origin: center center;
  transition: all 0.2s ease-out;
  height: 300px;
}

/* Title sizing on mobile is handled in base responsive rules, but keep default reference typography */
.custom-posts.wrapper.layout-reference .cp-card .cp-title {
  color: #000000;
  line-height: 1;
  font-weight: 700;
  font-size: 20px;
}

/* Reference excerpt is slightly bigger in your spec */
.custom-posts.wrapper.layout-reference .cp-card .cp-excerpt {
  font-size: 16px;
  line-height: 20px;
}

/* Hover effects (match your earlier combined hover rules) */
@media (hover: hover) and (pointer: fine) {
  .custom-posts.wrapper.layout-reference .cp-card:hover .cp-thumb img {
    transform: scale(1.02) !important;
  }
}

/* Optional: Reference tags (you used these in reference templates) */
.reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reference-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #eafaea;
  opacity: 1;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 16px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  cursor: default;
  font-weight: 500;
}

/*
.reference-tag:hover,
.reference-tag.is-active {
  background: #60c15d;
  color: #fff;
}
*/

/* Mobile tweaks (kept small; most mobile rules should live in base) */
@media (max-width: 768px) {
  .custom-posts.wrapper.layout-reference {
    gap: 40px 20px;
  }
  .custom-posts.wrapper.layout-reference .cp-content {
    gap: 20px;
    padding: 12px 0 0;
  }
  .custom-posts.wrapper.layout-reference .cp-card .cp-content .cp-title {
    font-size: 18px;
  }

  .custom-posts.wrapper.layout-reference .cp-card .cp-excerpt {
    font-size: 14px;
    line-height: 20px;
  }

  /* Slider overflow rule you had for reference */
  .custom-posts.wrapper.layout-reference.is-slider .slick-list.draggable {
    overflow: hidden;
  }
  .custom-posts.wrapper.layout-reference .cp-card,
  .custom-posts.wrapper.layout-reference .cp-card .cp-thumb {
    border-radius: var(--radius-sm, 8px);
  }
  .custom-posts.wrapper.layout-reference .cp-card .cp-thumb img {
    max-height: 222px;
  }
  .reference-tag {
    padding: 6px 12px;
  }
}
