/* ================================================================
   EDUCATION UPDATES — RELATED POSTS CSS
   File: related-posts.css
   Paste into: Appearance → Customize → Additional CSS
              OR append to child theme style.css

   Covers both layouts:
     .eu-rp-layout--horizontal  → 3-column equal grid
     .eu-rp-layout--mixed       → featured card + smaller grid
================================================================ */


/* ── SECTION WRAPPER ─────────────────────────────────────────── */

.eu-related-posts {
  margin: 40px 0 8px;
  font-family: 'Figtree', sans-serif;
}


/* ── SECTION HEADER ──────────────────────────────────────────── */

.eu-rp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.eu-rp-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.eu-rp-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}

.eu-rp-title {
  font-family: 'Syne', sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #1e2235 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.eu-rp-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #e2e8f0, transparent);
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT 1 — HORIZONTAL (3-column equal grid)
═══════════════════════════════════════════════════════════════ */

.eu-rp-grid--horizontal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT 2 — MIXED (featured top + small grid below)
═══════════════════════════════════════════════════════════════ */

/* Featured (wide) card wrapper */
.eu-rp-featured-wrap {
  margin-bottom: 16px;
}

/* Small cards grid below featured */
.eu-rp-grid--small {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}


/* ── BASE CARD ───────────────────────────────────────────────── */

.eu-rp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 18px rgba(37, 99, 235, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.eu-rp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(37, 99, 235, 0.17);
}


/* ── IMAGE AREA ──────────────────────────────────────────────── */

.eu-rp-card-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* Image heights by type */
.eu-rp-card--horizontal .eu-rp-card-img-wrap { height: 170px; }
.eu-rp-card--featured   .eu-rp-card-img-wrap { height: 260px; }
.eu-rp-card--small      .eu-rp-card-img-wrap { height: 130px; }

.eu-rp-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: transform 0.4s ease !important;
}

.eu-rp-card:hover .eu-rp-card-img {
  transform: scale(1.05);
}

/* Emoji placeholder */
.eu-rp-card-img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

/* Gradient overlay on image bottom */
.eu-rp-card-img-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(30, 34, 53, 0.18), transparent);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.eu-rp-card:hover .eu-rp-card-img-overlay {
  opacity: 0;
}


/* ── CARD BODY ───────────────────────────────────────────────── */

.eu-rp-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}


/* ── CATEGORY BADGE ──────────────────────────────────────────── */

.eu-rp-cat-badge {
  display: inline-block !important;
  padding: 2px 10px !important;
  border-radius: 50px !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  margin-bottom: 8px !important;
  transition: filter 0.2s ease !important;
  align-self: flex-start !important;
  -webkit-text-fill-color: currentColor !important;
}

.eu-rp-cat-badge:hover {
  filter: brightness(0.9) !important;
}


/* ── CARD TITLE ──────────────────────────────────────────────── */

.eu-rp-card-title {
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  color: #1e2235 !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: none !important;
  line-height: 1.35 !important;
  flex-grow: 0;
}

/* Title font size by card type */
.eu-rp-card--horizontal .eu-rp-card-title { font-size: 0.98rem !important; }
.eu-rp-card--featured   .eu-rp-card-title { font-size: 1.15rem !important; }
.eu-rp-card--small      .eu-rp-card-title { font-size: 0.88rem !important; }

.eu-rp-card-title a {
  color: inherit !important;
  text-decoration: none !important;
  -webkit-text-fill-color: #1e2235 !important;
  transition: color 0.2s ease !important;
}

.eu-rp-card-title a:hover {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}


/* ── EXCERPT ────────────────────────────────────────────────── */

.eu-rp-card-excerpt {
  font-size: 0.84rem !important;
  color: #64748b !important;
  line-height: 1.65 !important;
  margin: 0 0 10px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  flex-grow: 1;
}

.eu-rp-card--small .eu-rp-card-excerpt {
  display: none !important;   /* hide excerpt on small cards — tight space */
}


/* ── META ROW ────────────────────────────────────────────────── */

.eu-rp-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #94a3b8;
}

.eu-rp-date,
.eu-rp-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  color: #94a3b8;
  white-space: nowrap;
}

.eu-rp-date i,
.eu-rp-read-time i {
  font-size: 0.7rem;
  color: #cbd5e1;
}

/* Read → arrow button */
.eu-rp-read-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: auto !important;
  padding: 5px 12px !important;
  border-radius: 50px !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  font-family: 'Figtree', sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  -webkit-text-fill-color: #fff !important;
}

.eu-rp-read-btn:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.eu-rp-read-btn i {
  font-size: 0.65rem;
}


/* ── FEATURED CARD specific overrides (mixed layout) ──────────── */

.eu-rp-card--featured {
  flex-direction: row !important;  /* horizontal on desktop */
}

.eu-rp-card--featured .eu-rp-card-img-wrap {
  width: 45%;
  min-width: 200px;
  height: auto !important;
  flex-shrink: 0;
}

.eu-rp-card--featured .eu-rp-card-img {
  height: 100% !important;
}

.eu-rp-card--featured .eu-rp-card-body {
  padding: 22px 24px;
}

.eu-rp-card--featured .eu-rp-card-excerpt {
  -webkit-line-clamp: 3 !important;
}


/* ── RESPONSIVE ───────────────────────────────────────────────── */

/* Tablet: 2-column horizontal grid */
@media (max-width: 860px) {
  .eu-rp-grid--horizontal {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Featured card: stack on tablet */
  .eu-rp-card--featured {
    flex-direction: column !important;
  }

  .eu-rp-card--featured .eu-rp-card-img-wrap {
    width: 100%;
    height: 220px !important;
  }
}

/* Mobile: single column */
@media (max-width: 560px) {
  .eu-rp-grid--horizontal,
  .eu-rp-grid--small {
    grid-template-columns: 1fr;
  }

  .eu-rp-card--horizontal .eu-rp-card-img-wrap { height: 180px; }
  .eu-rp-card--small      .eu-rp-card-img-wrap { height: 160px; }

  .eu-rp-card--small .eu-rp-card-excerpt {
    display: -webkit-box !important;  /* show excerpt on mobile single-col */
    -webkit-line-clamp: 2 !important;
  }

  .eu-rp-card-title { font-size: 0.97rem !important; }

  /* Hide read-time on very small cards to save space */
  .eu-rp-read-time { display: none; }
}


/* ================================================================
   EDUCATION UPDATES — RELATED POSTS: UI FIX
   File: inc/related-posts/related-posts-fix.css

   PASTE INTO: Appearance → Customize → Additional CSS
   (Add after your existing Related Posts CSS)

   CHANGES (CSS-only, no PHP needed):
   - Hides category badge (e.g. "TIMETABLE")
   - Hides publishing date
   - Hides reading time (e.g. "1 min read")
   - Keeps: featured image, title, excerpt, Read button

   SIDE EFFECT: .eu-rp-card-meta row now only has the Read button.
   We align it to the left so it doesn't look lonely on the right.
================================================================ */

/* Hide category badge */
.eu-rp-cat-badge {
display: none !important;
}

/* Hide date */
.eu-rp-date {
display: none !important;
}

/* Hide reading time */
.eu-rp-read-time {
display: none !important;
}

/* Meta row now only has Read button — left-align it */
.eu-rp-card-meta {
border-top: none !important;
padding-top: 0 !important;
justify-content: flex-start !important;
}

/* Remove margin-left: auto that was pushing Read button to the right */
.eu-rp-read-btn {
margin-left: 0 !important;
}

/* Tighten card body gap since category badge is gone */
.eu-rp-card-body {
gap: 0 !important;
padding-top: 14px !important;
}

/* Excerpt sits directly below title with small gap */
.eu-rp-card-excerpt {
margin-top: 6px !important;
margin-bottom: 12px !important;
}
