/* =========================================================
   MLI Publications — list + filter + pagination
   Palette aligned with the BIOMIC page tokens.
   Scoped under .mli-pubs so it doesn't collide with Eduma.
   ========================================================= */

.mli-pubs {
  --pub-navy:       #10406D;
  --pub-navy-deep:  #083F88;
  --pub-red:        #c02529;
  --pub-blue-pale:  #DCF4FF;
  --pub-grey-line:  #E2E5EA;
  --pub-grey-bg:    #F6F8FB;
  --pub-text:       #1F2A3A;
  --pub-text-soft:  #4E5A6E;
  --pub-radius:     10px;
  --pub-radius-sm:  6px;

  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--pub-text);
  padding: 40px 0 80px;
  background: linear-gradient(180deg, #fff 0%, #f3f6fa 100%);
}
.mli-pubs__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Hero banner ----- */
.mli-pubs__hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 24px;
}
.mli-pubs__hero-inner {
  position: relative;
  border-radius: 14px;
  padding: 48px 32px 56px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(135deg, #c02529 0%, #7a1518 100%);
  box-shadow: 0 12px 40px rgba(192, 37, 41, 0.18);
  overflow: hidden;
}
/* Subtle radial highlight in the top-left for depth */
.mli-pubs__hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
  pointer-events: none;
}
/* MLI brand stripe (cyan → navy → red) along the bottom edge */
.mli-pubs__hero-inner::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, #2EB0E6 0%, #28537A 56%, #c02529 100%);
}
.mli-pubs__hero-title {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.mli-pubs__hero-meta {
  position: relative;
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}
.mli-pubs__hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mli-pubs__hero-stat strong { font-weight: 700; color: #fff; }
.mli-pubs__hero-stat svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}
.mli-pubs__hero-sep {
  opacity: 0.5;
  font-weight: 300;
}

@media (max-width: 767px) {
  .mli-pubs__hero { padding: 0 16px; margin-bottom: 18px; }
  .mli-pubs__hero-inner { padding: 32px 20px 40px; border-radius: 10px; }
  .mli-pubs__hero-title { letter-spacing: 0.6px; }
  .mli-pubs__hero-meta { font-size: 13px; }
  .mli-pubs__hero-stat svg { width: 16px; height: 16px; }
}

/* ----- Filter panel ----- */
.mli-pubs__filter-panel {
  background: #fff;
  border: 3px solid var(--pub-red);
  border-radius: var(--pub-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 6px 22px rgba(16, 64, 109, 0.06);
}
.mli-pubs__filter-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--pub-navy);
  margin: 0 0 18px;
  border-bottom: 2px solid #1daee4;
  padding-bottom: 5px;
}
.mli-pubs__filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.mli-pubs__filter-group { display: flex; flex-direction: column; gap: 6px; }
.mli-pubs__filter-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pub-text-soft);
  letter-spacing: 0.15px;
}
.mli-pubs__filter-input,
.mli-pubs__filter-select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--pub-text);
  background-color: #fff;
  border: 2px solid var(--pub-grey-line);
  border-radius: var(--pub-radius-sm);
  font-family: inherit;
  line-height: 1.2;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  box-shadow: 0 1px 2px rgba(16, 64, 109, 0.04);
}
.mli-pubs__filter-input:hover,
.mli-pubs__filter-select:hover {
  border-color: #cdd6e0;
}
.mli-pubs__filter-input:focus,
.mli-pubs__filter-select:focus {
  outline: 0;
  border-color: var(--pub-navy);
  box-shadow: 0 0 0 4px rgba(16, 64, 109, 0.14);
}

/* ----- Custom select chevron + reset native appearance ----- */
.mli-pubs__filter-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
  /* Navy chevron, generated inline so no extra request */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2310406D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.mli-pubs__filter-select:focus {
  /* Same chevron, swap to a brighter colour while focused */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23c02529' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
}
.mli-pubs__filter-select::-ms-expand { display: none; }

/* The smaller inline select used next to "Sort by:" */
.mli-pubs__filter-select--inline {
  height: 36px;
  padding: 0 34px 0 10px !important;
  font-size: 14px;
}

/* Search input — leading icon (subtle magnifier) */
.mli-pubs__filter-input {
  padding-left: 42px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234E5A6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px 16px;
}
.mli-pubs__filter-input::placeholder {
  color: #9aa3b2;
}

/* Native option list — limited styling possible, but we can fix font-family at least */
.mli-pubs__filter-select option {
  font-family: inherit;
  background: #fff;
  color: var(--pub-text);
  padding: 8px;
}
.mli-pubs__filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.mli-pubs button.mli-pubs__btn-reset,
.mli-pubs .mli-pubs__btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #10406d;
  background-image: none;
  border: 1px solid #10406D;
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--pub-radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.mli-pubs button.mli-pubs__btn-reset:hover,
.mli-pubs .mli-pubs__btn-reset:hover {
  background-color: var(--pub-red);
  color: #fff;
  border-color: var(--pub-red);
}

/* ----- Meta bar (showing X of Y + sort) ----- */
.mli-pubs__meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 11px 20px;
  background-color: #eff4fb;
  margin-bottom: 20px;
  border-radius: 10px;
}
.mli-pubs__count { font-size: 14px; color: var(--pub-text-soft); }
.mli-pubs__count strong { color: var(--pub-navy); font-weight: 700; }
.mli-pubs__sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--pub-text-soft); }
.mli-pubs__sort label { white-space: nowrap; }
.mli-pubs__filter-select--inline { height: 36px; padding: 0 10px; font-size: 14px; }

/* ----- Publication list ----- */
.mli-pubs__list { list-style: none; padding: 0; margin: 0; }
.mli-pub {
  background: #fff;
  border: 1px solid var(--pub-grey-line);
  border-radius: var(--pub-radius);
  padding: 18px 24px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.mli-pub:hover {
  border-color: var(--pub-navy);
  box-shadow: 0 8px 24px rgba(16, 64, 109, 0.08);
  transform: translateY(-1px);
}
.mli-pub__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pub-navy);
}
.mli-pub__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
  font-size: 1.3rem;
  font-weight: 600;
}
.mli-pub__title a:hover { color: var(--pub-red); border-bottom-color: currentColor; }

.mli-pub__authors {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.35;
  color: #7B7D82;
  font-style: italic;
}
.mli-pub__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.mli-pub__badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.2px;
  line-height: 1;
}
.mli-pub__badge--journal {
  background: #1daee4;
  color: #fff;
}
.mli-pub__badge--year {
  background: #10406d;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}
.mli-pub__badge--topic   { background: var(--pub-blue-pale); color: var(--pub-navy); }

.mli-pub__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mli-pub__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--pub-radius-sm);
  transition: opacity 150ms ease, transform 150ms ease, background-color 150ms ease, color 150ms ease;
  letter-spacing: 0.3px;
  line-height: 1;
}
.mli-pub__btn--view {
  background: #c02529;
  color: #fff;
}
.mli-pub__btn--view:hover { background: #a01e22; color: #fff; transform: translateY(-1px); }
.mli-pub__btn--doi {
  background: #fff;
  color: var(--pub-red);
  border: 1.5px solid var(--pub-red);
  padding: 7px 18px;
}
.mli-pub__btn--doi:hover { background: var(--pub-red); color: #fff; }

/* ----- No-results / empty ----- */
.mli-pubs__no-results,
.mli-pubs__empty {
  background: #fff;
  border: 1px dashed var(--pub-grey-line);
  border-radius: var(--pub-radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--pub-text-soft);
  font-size: 15px;
}
.mli-pubs__inline-link {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--pub-red);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ----- Pagination ----- */
.mli-pubs__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.mli-pubs .mli-pubs__pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--pub-grey-line);
  background-color: #fff;
  background-image: none;
  color: var(--pub-text);
  border-radius: var(--pub-radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.mli-pubs .mli-pubs__pagination button:hover:not(:disabled) {
  background-color: var(--pub-blue-pale);
  border-color: var(--pub-navy);
  color: var(--pub-navy);
}
.mli-pubs .mli-pubs__pagination button.is-active {
  background-color: var(--pub-navy);
  border-color: var(--pub-navy);
  color: #fff;
}
.mli-pubs .mli-pubs__pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.mli-pubs__pagination .mli-pubs__pag-gap {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--pub-text-soft);
  user-select: none;
}

/* ----- Responsive ----- */
@media (max-width: 767px) {
  .mli-pubs { padding: 24px 0 56px; }
  .mli-pubs__container { padding: 0 16px; }
  .mli-pubs__filter-panel { padding: 18px 18px; }
  .mli-pubs__filter-title { font-size: 1.35rem; }
  .mli-pubs__filter-grid { grid-template-columns: 1fr; gap: 12px; }
  .mli-pub { padding: 16px 16px; }
  .mli-pub__title { font-size: 16px; }
  .mli-pub__authors { font-size: 0.98rem; }
  .mli-pub__btn { padding: 7px 14px; font-size: 12px; }
  .mli-pubs__meta-bar { padding: 4px 0 12px; }
}
