/* ── Display Post Plugin Styles ── */

.dp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

/* ── Card ── */
.dp-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.dp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

/* ── Thumbnail ── */
.dp-thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dp-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.dp-card:hover .dp-thumb {
  transform: scale(1.06);
}

.dp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 60%);
  transition: opacity 0.3s ease;
  opacity: 0.6;
}

.dp-card:hover .dp-overlay {
  opacity: 0.8;
}

/* No thumbnail fallback */
.dp-no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-no-thumb-icon {
  font-size: 3rem;
  z-index: 1;
}

/* ── Body ── */
.dp-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}

/* ── Meta row ── */
.dp-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dp-cat {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 50px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.dp-cat:hover {
  opacity: 0.85;
}

.dp-date {
  font-size: 0.78rem;
  color: #999;
}

/* ── Title ── */
.dp-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.dp-title a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.dp-title a:hover {
  color: #667eea;
}

/* ── Excerpt ── */
.dp-excerpt {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* ── Button (colors overridden per-instance via inline <style>) ── */
.dp-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1.3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  align-self: flex-start;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.3s ease,
    color 0.2s ease;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}

.dp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.55);
  color: #fff;
}

/* ── No posts message ── */
.dp-no-posts {
  text-align: center;
  color: #999;
  padding: 2rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .dp-grid {
    grid-template-columns: 1fr;
  }
}
