/* ======================================================
   WV Extension — self-contained styling
   ====================================================== */

/* AD SLOTS — reserved space (prevents layout shift) */
.ad-slot {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}
.ad-slot.ad-rectangle {
  min-height: 260px;
  margin: 8px auto 36px;
  max-width: 336px;
}

/* FEATURED POST — hero layout (desktop: image left, content right, single card) */
.featured-post .wp-block-post-template {
  display: block !important;
}
.featured-post .wp-block-post-template > li {
  list-style: none;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.featured-post .wp-block-post-featured-image {
  flex: 0 0 46%;
  align-self: stretch;
}
.featured-post .wp-block-post-featured-image img {
  width: 100%;
  height: 40%;
  min-height: 220px;
  max-height: 340px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e0ddd3;
  display: block;
}
.featured-post-content {
  flex: 1 1 54%;
  min-width: 0;
}
.featured-post .wp-block-post-terms {
  display: block;
  margin-top: 0;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--theme-palette-color-1, #2f7d5e);
}
.featured-post .wp-block-post-terms a {
  color: inherit;
  text-decoration: none;
}
.featured-post .wp-block-post-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  margin: 10px 0 12px;
}
.featured-post .wp-block-post-title a {
  color: #1c2321;
  text-decoration: none;
}
.featured-post .wp-block-post-excerpt {
  font-size: 16px;
  color: #555;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* GRID POST CARDS */
.grid-post-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 44px;
  margin: 0 0 32px;
  padding: 0;
}
.grid-post-query .wp-block-post-template > li {
  list-style: none;
  background: #fff;
  border: 1px solid #eceae4;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.grid-post-query .wp-block-post-template > li:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.grid-post-query .wp-block-post-featured-image {
  margin: 0;
}
.grid-post-query .wp-block-post-featured-image img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.grid-post-query .wp-block-post-terms,
.grid-post-query .wp-block-post-title,
.grid-post-query .wp-block-post-excerpt,
.grid-post-query .wp-block-read-more {
  padding-left: 16px;
  padding-right: 16px;
}
.grid-post-query .wp-block-post-terms {
  display: block;
  margin-top: 14px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--theme-palette-color-1, #2f7d5e);
}
.grid-post-query .wp-block-post-terms a {
  color: inherit;
  text-decoration: none;
}
.grid-post-query .wp-block-post-title {
  font-size: 18px;
  line-height: 1.35;
  margin: 6px 0 8px;
}
.grid-post-query .wp-block-post-title a {
  color: #1c2321;
  text-decoration: none;
}
.grid-post-query .wp-block-post-title a:hover {
  color: var(--theme-palette-color-1, #2f7d5e);
}
.grid-post-query .wp-block-post-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PAGINATION */
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 32px 0;
  font-size: 14px;
}
.wp-block-query-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.wp-block-query-pagination a,
.wp-block-query-pagination span {
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  color: #1c2321;
}
.wp-block-query-pagination .current span,
.wp-block-query-pagination span.current {
  background: var(--theme-palette-color-1, #2f7d5e);
  color: #fff;
}
.wp-block-query-pagination .next,
.wp-block-query-pagination .prev {
  font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 680px) {
  .grid-post-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .featured-post .wp-block-post-template > li {
    flex-direction: column;
    gap: 0;
  }
  .featured-post .wp-block-post-featured-image {
    flex: none;
    width: 100%;
  }
  .featured-post .wp-block-post-featured-image img {
    height: 220px;
    min-height: 0;
    max-height: none;
  }
  .featured-post-content {
    margin-top: 20px;
  }
  .featured-post .wp-block-post-title {
    font-size: 20px;
    max-width: 100%;
  }
  .featured-post .wp-block-post-excerpt {
    max-width: 100%;
  }
}
