/* Grid layout for cards */
.esirl-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1120px;
  margin: 2rem auto;
}

/* Force exactly 3 columns on larger screens */
@media (min-width: 1024px) {
  .esirl-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Base card style (overridden by square variant where needed) */
.esirl-card {
  display: block;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.esirl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border-color: rgba(79, 70, 229, 0.3);
}

/* Square image cards with overlay (shared across IRL sites) */

.esirl-card.esirl-card--square {
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}

.esirl-card-square-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.esirl-card-thumb-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* always square */
  overflow: hidden;
  border-radius: 18px;
  background: #f3f4f6;
}

.esirl-card-thumb-img,
.esirl-card-thumb-fallback {
  width: 100%;
  height: 100%;
  display: block;
}

.esirl-card-thumb-img {
  object-fit: cover;       /* crop */
  object-position: center; /* center crop */
}

.esirl-card-thumb-fallback {
  background: radial-gradient(circle at 0 0, #e5e7eb, #d1d5db);
}

.esirl-card-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.15),
    transparent
  );
  color: #fff;
}

/* TITLE – match FrenchIRL (Poppins 600, white, 28/36) */
.esirl-card-title {
  margin: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 1.75rem;   /* 28px */
  line-height: 2.25rem; /* 36px */
  color: #ffffff;
}

/* Optional meta text inside overlay if needed */
.esirl-card-meta {
  margin: 0.1rem 0 0 0;
  font-size: 0.85rem;
  opacity: 0.95;
}

/* Footer row under the card: "xx clips" left, "Show all" right */

.esirl-card-footer-row {
  margin-top: 0.5rem;
  padding: 0 0.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: nowrap;           /* added */
}

.esirl-card-footer-main,
.esirl-card-footer-showall {
  display: inline-flex;        /* added */
  flex: 0 0 auto;              /* added */
  width: auto;                 /* added */
}

.esirl-card-footer-main {
  text-decoration: none;
  color: #111827; /* near-black */
  font-weight: 500;
}

.esirl-card-footer-main:hover {
  text-decoration: underline;
}

.esirl-card-footer-showall {
  text-decoration: none;
  color: #4f46e5; /* indigo-ish */
  font-weight: 500;
}

.esirl-card-footer-showall:hover {
  text-decoration: underline;
}
/* ===== Series archive (taxonomy-quiz_series.php) ===== */
/* ===== Series archive (taxonomy-quiz_series.php) ===== */

.esirl-series-archive {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* HERO BANNER */

.esirl-series-hero {
  margin-bottom: 2.5rem;
}

.esirl-series-hero-banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  height: 260px;
  background: #111827;
}

@media (max-width: 768px) {
  .esirl-series-hero-banner {
    height: 220px;
  }
}

.esirl-series-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.esirl-series-hero-overlay {
  position: absolute;
  inset: 0;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0.15),
    transparent
  );
  color: #ffffff;
}

.esirl-series-hero-title {
  margin: 0 0 0.15rem;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 2rem;    /* ~32px */
  line-height: 2.4rem;
}

.esirl-series-hero-meta {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.esirl-series-hero-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 40rem;
}

/* Fallback hero (no image) */

.esirl-series-hero-fallback {
  border-radius: 22px;
  padding: 1.75rem 2rem;
  background: radial-gradient(circle at 0 0, #eef2ff, #e0f2fe);
}

.esirl-series-hero-title--dark {
  color: #0f172a;
}

.esirl-series-hero-meta--dark,
.esirl-series-hero-description--dark {
  color: #4b5563;
}

/* CLIP GRID (reusing card styles) */

.esirl-series-list {
  margin-top: 1rem;
}

/* Use the existing .esirl-cards-grid for layout:
   .esirl-cards-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } */

.esirl-series-clips-grid .esirl-card {
  padding: 0;
  border-radius: 18px;
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Overlay tweaks for clip cards */

.esirl-series-clip-overlay {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
}

.esirl-series-clip-index {
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.esirl-card-title--clip {
  font-size: 1.1rem;
  line-height: 1.5rem;
}

/* Empty state */

.esirl-series-empty {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #6b7280;
}
