/**
 * EDS Blog Posts Widget — Frontend Stylesheet v1.1.3
 * eDesign Space · https://edesignspace.com/
 *
 * Image Position uses Elementor prefix_class (non-responsive).
 * Elementor injects one class onto its wrapper element:
 *   .eds-img-pos-top | .eds-img-pos-left | .eds-img-pos-right
 *   .eds-img-pos-bottom | .eds-img-pos-none
 */

/* ── Grid ───────────────────────────────────────────────────────────────────── */
.eds-posts__grid {
  display: grid;
  grid-template-columns: repeat(var(--eds-cols, 3), 1fr);
  gap: var(--eds-row-gap, 32px) var(--eds-col-gap, 24px);
}

/* ── Post base ───────────────────────────────────────────────────────────────── */
.eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

/* ── Image Position ──────────────────────────────────────────────────────────── */

/* TOP (also the no-class default) */
.eds-img-pos-top .eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-direction: column;
}

/* BOTTOM */
.eds-img-pos-bottom .eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-direction: column-reverse;
}

/* LEFT */
.eds-img-pos-left .eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-direction: row;
  align-items: flex-start;
}
.eds-img-pos-left .eds-post__thumbnail {
  flex: 0 0 38%;
  max-width: 38%;
}
.eds-img-pos-left .eds-post__text {
  flex: 1;
  min-width: 0;
}

/* RIGHT */
.eds-img-pos-right .eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-direction: row-reverse;
  align-items: flex-start;
}
.eds-img-pos-right .eds-post__thumbnail {
  flex: 0 0 38%;
  max-width: 38%;
}
.eds-img-pos-right .eds-post__text {
  flex: 1;
  min-width: 0;
}

/* NONE */
.eds-img-pos-none .eds-post__thumbnail {
  display: none !important;
}

/* ── Mobile: always stack to column regardless of desktop position ────────────
   On small screens left/right layouts would be too cramped. We force column
   so content is always readable. The thumbnail width is also reset to 100%.  */
@media (max-width: 767px) {
  .eds-img-pos-left .eds-post,
  .eds-img-pos-right .eds-post {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    flex-direction: column;
  }
  .eds-img-pos-left .eds-post__thumbnail,
  .eds-img-pos-right .eds-post__thumbnail {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ── Cards Skin ─────────────────────────────────────────────────────────────── */
.eds-posts--cards .eds-post__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.eds-posts--cards .eds-post__card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.13);
  transform: translateY(-3px);
}
.eds-posts--cards .eds-post__thumbnail { flex-shrink: 0; }
.eds-posts--cards .eds-post__text {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.eds-posts--cards .eds-post__read-more {
  margin-top: auto;
  padding-top: 12px;
}

/* ── Thumbnail ──────────────────────────────────────────────────────────────── */
.eds-post__thumbnail {
  overflow: hidden;
}

.eds-post__thumbnail-wrap {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding-bottom: 66%; /* default ratio; overridden by thumbnail_ratio Elementor selector */
  background: #f3f4f6;
}

.eds-post__thumbnail-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

/* Zoom hover */
.eds-posts--img-zoom-in  .eds-post:hover .eds-post__thumbnail-wrap img { transform: scale(1.06); }
.eds-posts--img-zoom-out .eds-post__thumbnail-wrap img                  { transform: scale(1.06); }
.eds-posts--img-zoom-out .eds-post:hover .eds-post__thumbnail-wrap img  { transform: scale(1); }

/* No featured image placeholder */
.eds-post__thumbnail--none {
  background: #f3f4f6;
  aspect-ratio: 3/2;
}

/* ── Text ────────────────────────────────────────────────────────────────────── */
.eds-post__text {
  min-width: 0;
}

/* ── Meta ────────────────────────────────────────────────────────────────────── */
.eds-post__meta-data {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.4;
}
.eds-post__meta-data a       { color: inherit; text-decoration: none; }
.eds-post__meta-data a:hover { text-decoration: underline; }
.eds-meta-sep { opacity: 0.5; margin: 0 2px; user-select: none; }

/* ── Title ───────────────────────────────────────────────────────────────────── */
.eds-post__title { margin: 0 0 10px; padding: 0; line-height: 1.3; }
.eds-post__title a { text-decoration: none; color: inherit; transition: color 0.18s ease; }
.eds-post__title a:hover { opacity: 0.8; }

/* ── Excerpt ─────────────────────────────────────────────────────────────────── */
.eds-post__excerpt { margin-bottom: 15px; }
.eds-post__excerpt p { margin: 0; line-height: 1.65; color: #6b7280; }

/* ── Read More ───────────────────────────────────────────────────────────────── */
.eds-post__read-more {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: #6366f1;
  transition: color 0.18s ease, background-color 0.18s ease;
  line-height: 1.4;
}
.eds-post__read-more:hover { color: #4f46e5; }

/* ── No Results ─────────────────────────────────────────────────────────────── */
.eds-posts__no-results {
  padding: 24px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.eds-posts__pagination {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.eds-posts__page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  line-height: 1;
}
.eds-posts__page-btn:hover     { background: #f3f4f6; color: #111827; text-decoration: none; }
.eds-posts__page-btn.is-active { background: #6366f1; border-color: #6366f1; color: #fff; }
.eds-posts__page-btn.is-disabled { opacity: 0.4; pointer-events: none; cursor: default; }

/* ── Load More ───────────────────────────────────────────────────────────────── */
.eds-posts__load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #6366f1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
  line-height: 1;
}
.eds-posts__load-more:hover { background: #4f46e5; transform: translateY(-1px); }
.eds-posts__load-more:disabled,
.eds-posts__load-more.is-loading { opacity: 0.7; pointer-events: none; cursor: default; }
.eds-posts__no-more { text-align: center; color: #9ca3af; font-size: 14px; padding: 8px 0; }

/* ── Spinner ─────────────────────────────────────────────────────────────────── */
.eds-posts__spinner {
  display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 0;
}
.eds-posts__spinner span {
  display: inline-block; width: 8px; height: 8px; background: #6366f1;
  border-radius: 50%; animation: eds-bounce 1.2s infinite ease-in-out;
}
.eds-posts__spinner span:nth-child(1) { animation-delay: 0s; }
.eds-posts__spinner span:nth-child(2) { animation-delay: 0.2s; }
.eds-posts__spinner span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eds-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1.0); opacity: 1; }
}
.eds-posts__infinite-sentinel { height: 1px; width: 100%; margin-top: -1px; }

/* ── Responsive columns ─────────────────────────────────────────────────────
   Elementor's add_responsive_control with selector:
     {{WRAPPER}} .eds-posts__grid { --eds-cols: {{VALUE}}; }
   generates the correct CSS at each breakpoint automatically.
   The grid reads var(--eds-cols, 3) — no additional CSS needed here.      */
