/* ==========================================================================
   E tū Recommended Employers — Front‑end styles
   ========================================================================== */

/* --- Filters bar --------------------------------------------------------- */
.etu-re-filters {
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.etu-re-filters select,
.etu-re-filters input[type="search"],
.etu-re-filters button {
  padding: 6px 8px;
  font: inherit;
}

/* --- Grid ---------------------------------------------------------------- */
.etu-re-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .etu-re-grid {
    grid-template-columns: 1fr;
  }
}

/* If there are no results, the message spans full width in the grid */
.etu-re-empty {
  grid-column: 1 / -1;
  text-align: center;
}

/* --- Loading state & scroll target -------------------------------------- */
#etu-re-grid-wrap {
  scroll-margin-top: 16px; /* smooth scroll focus */
}
#etu-re-grid-wrap.etu-re-loading {
  opacity: .6;
  pointer-events: none;
  position: relative;
}
#etu-re-grid-wrap.etu-re-loading::after {
  content: "Loading…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  background: rgba(255,255,255,.6);
}

/* --- Cards --------------------------------------------------------------- */
.etu-re-card { 
  position: relative; /* for potential overlays */
}
.etu-re-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Uniform logo frame (matches our 320×160 cropped image size) */
.etu-re-card-logo {
  width: 100%;
  max-width: 100%;
  height: 160px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 10px;
  position: relative; /* allow LW badge inside the frame */
}
.etu-re-card-logo img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}

.etu-re-card-title {
  text-align: center;
  font-size: 16px;
  margin: 8px 0 0;
  font-weight: 600;
}

/* --- Living Wage badge (uses your PNG) ---------------------------------- */
.etu-re-badge-lw {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.95);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  padding: 2px;
  z-index: 3;
  pointer-events: none; /* keep the logo/link clickable */
}
.etu-re-badge-lw img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- Pagination ---------------------------------------------------------- */
.etu-re-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.etu-re-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #222;
  background: #fff;
  font: inherit;
}
.etu-re-pagination a:hover {
  background: #f5f5f5;
}
.etu-re-pagination a.current {
  background: #111827;
  color: #fff;
  border-color: #111827;
  cursor: default;
}
.etu-re-pagination a.disabled,
.etu-re-pagination a[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.etu-re-pagination a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ==========================================================================
   (Legacy note)
   Older .etu-re-item styles removed to avoid conflicts; the shortcode now
   renders .etu-re-card markup. If you still use .etu-re-item elsewhere,
   let me know and I’ll add a compatibility block.
   ========================================================================== */
