/* WP Custom Fields — Frontend Shortcode Styles */

/* ── Grid cards ─────────────────────────────── */
.wpcf-posts.wpcf-cards {
  display: grid;
  gap: 24px;
}
.wpcf-cols-1 { grid-template-columns: 1fr; }
.wpcf-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpcf-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpcf-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .wpcf-cols-3, .wpcf-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wpcf-cols-2, .wpcf-cols-3, .wpcf-cols-4 { grid-template-columns: 1fr; }
}

.wpcf-posts .wpcf-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.wpcf-posts .wpcf-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.wpcf-card-thumb img {
  width: 100%; height: 200px;
  object-fit: cover; display: block;
}

.wpcf-card-body {
  padding: 20px;
  display: flex; flex-direction: column; flex: 1;
}

.wpcf-card-title {
  font-size: 18px; font-weight: 700;
  margin: 0 0 8px; line-height: 1.3;
}
.wpcf-card-title a {
  color: inherit; text-decoration: none;
}
.wpcf-card-title a:hover { color: #f97316; }

.wpcf-card-excerpt {
  font-size: 14px; color: #6b7280; line-height: 1.6; margin-bottom: 14px;
}

.wpcf-card-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: #f97316; font-size: 13px; font-weight: 600;
  text-decoration: none; margin-top: auto; padding-top: 12px;
}
.wpcf-card-link:hover { color: #ea6c0a; }

/* ── Custom fields on cards ──────────────────── */
.wpcf-custom-fields {
  margin: 0 0 14px; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.wpcf-field-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px;
}
.wpcf-field-label {
  font-weight: 600; color: #374151;
  white-space: nowrap; flex-shrink: 0;
  min-width: 80px;
}
.wpcf-field-value { color: #6b7280; min-width: 0; }
.wpcf-field-value img.wpcf-img { max-width: 100%; height: auto; border-radius: 6px; }

/* ── List template ───────────────────────────── */
.wpcf-posts.wpcf-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden;
  background: #fff;
}
.wpcf-list-item {
  padding: 16px 20px; border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}
.wpcf-list-item:last-child { border-bottom: none; }
.wpcf-list-item:hover { background: #fafafa; }
.wpcf-list-title {
  font-size: 16px; font-weight: 600; margin: 0 0 6px;
}
.wpcf-list-title a { color: inherit; text-decoration: none; }
.wpcf-list-title a:hover { color: #f97316; }
.wpcf-list-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #6b7280; }
.wpcf-list-meta strong { color: #374151; }

/* ── Table template ──────────────────────────── */
.wpcf-table-wrap { overflow-x: auto; }
.wpcf-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 10px;
  overflow: hidden;
}
.wpcf-table th {
  background: #f9fafb; padding: 12px 16px;
  text-align: left; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}
.wpcf-table td {
  padding: 13px 16px; border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.wpcf-table tr:last-child td { border-bottom: none; }
.wpcf-table tr:hover td { background: #fafafa; }
.wpcf-table a { color: #f97316; text-decoration: none; font-weight: 600; }
.wpcf-table .wpcf-view-link { font-size: 13px; }

/* ── Misc field types ────────────────────────── */
.wpcf-bool { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.wpcf-bool.yes { background: #d1fae5; color: #065f46; }
.wpcf-bool.no  { background: #fee2e2; color: #991b1b; }

.wpcf-gallery { display: flex; flex-wrap: wrap; gap: 6px; }
.wpcf-gallery-img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }

.wpcf-repeater-list { list-style: none; margin: 0; padding: 0; }
.wpcf-repeater-item { padding: 5px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.wpcf-repeater-item:last-child { border-bottom: none; }

.wpcf-no-posts { padding: 24px; text-align: center; color: #9ca3af; font-size: 14px; }
