/*
 * Elaaf Posts List — Archive layout
 * Image RIGHT, text box LEFT (RTL flex)
 */

.elaaf-posts-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 10px 0;
}

/* Row: RTL flex → first DOM child = RIGHT, second = LEFT */
.elaaf-post-row {
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: stretch;
  min-height: 340px;
  overflow: hidden;
}

/* ── Image (first in DOM → RIGHT in RTL) ── */
.elaaf-row-image {
  display: block;
  flex: 1 1 62%;
  overflow: hidden;
  max-width: 62%;
}

.elaaf-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.elaaf-post-row:hover .elaaf-row-image img {
  transform: scale(1.04);
}

.elaaf-no-image {
  background: #2a2a2a;
}

/* ── Text box (second in DOM → LEFT in RTL) ── */
.elaaf-row-text {
  flex: 1 1 38%;
  max-width: 38%;
  background: #1e1e1e;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  direction: rtl;
}

/* ── Title ── */
.elaaf-row-title {
  margin: 0 0 20px;
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 700;
}

.elaaf-row-title a {
  color: #ffffff !important;
  text-decoration: none !important;
  transition: color 0.25s;
}

.elaaf-row-title a:hover {
  color: #c96fa5 !important;
}

/* ── Divider ── */
.elaaf-row-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin: 0 0 20px;
}

/* ── Excerpt ── */
.elaaf-row-excerpt {
  color: #cccccc;
  font-size: 0.93rem;
  line-height: 1.8;
  margin: 0 0 28px;
  flex: 1;
}

/* ── Button ── */
.elaaf-row-btn {
  display: inline-block;
  align-self: flex-start;
  padding: 10px 26px;
  background: transparent;
  color: #ffffff !important;
  border: 1.5px solid #ffffff;
  border-radius: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.25s, border-color 0.25s;
}

.elaaf-row-btn:hover {
  background: #c96fa5;
  border-color: #c96fa5;
  color: #ffffff !important;
}

/* ── Empty state ── */
.elaaf-no-posts {
  text-align: center;
  color: #888;
  padding: 40px 0;
  direction: rtl;
}

/* ════════════════════════════
   MOBILE
════════════════════════════ */
@media (max-width: 767px) {
  .elaaf-post-row {
    flex-direction: column;
    min-height: unset;
    direction: rtl;
  }

  /* On mobile: image on top, text below */
  .elaaf-row-image {
    flex: unset;
    max-width: 100%;
    width: 100%;
    height: 220px;
  }

  .elaaf-row-text {
    flex: unset;
    max-width: 100%;
    width: 100%;
    padding: 24px 20px;
  }

  .elaaf-row-title {
    font-size: 1.05rem;
    margin-bottom: 14px;
  }

  .elaaf-row-excerpt {
    font-size: 0.87rem;
    margin-bottom: 20px;
  }

  .elaaf-row-btn {
    padding: 8px 20px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .elaaf-row-image { flex: 1 1 55%; max-width: 55%; }
  .elaaf-row-text  { flex: 1 1 45%; max-width: 45%; padding: 28px 22px; }
  .elaaf-row-title { font-size: 1.1rem; }
}
