/* ============================================================
   PUBLICATIONS LISTING PAGE
   ============================================================ */

/* ── Featured publications slider ───────────────────────────── */
.pub-slider-section {
  background: var(--who-white);
  padding: 40px 0;
  border-bottom: 1px solid var(--who-gray-200);
}
.pub-slider {
  position: relative;
}
/* Slides — JS handles opacity transitions sequentially */
.pub-slide {
  display: none;
}
.pub-slide--active {
  display: block;
}
.pub-slide-inner {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 0;
  align-items: stretch;
  min-height: 320px;
}
@media (max-width: 768px) {
  .pub-slide-inner {
    grid-template-columns: 1fr;
  }
}
/* Text col */
.pub-slide-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 0 0 36px;
}
.pub-slide-text-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.pub-slide-meta { margin-bottom: 0; }
.pub-slide-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--who-navy);
  line-height: 1.3;
  margin: 0;
}
.pub-slide-title a { color: inherit; text-decoration: none; }
.pub-slide-title a:hover { color: var(--who-blue); }
.pub-slide-excerpt {
  font-size: .9375rem;
  color: var(--who-gray-700);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub-slide-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* Cover col */
.pub-slide-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--who-radius-sm);
}
.pub-slide-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--who-blue);
  color: var(--who-white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: var(--who-radius-sm);
}
.pub-slide-cover a {
  display: block;
  height: 100%;
}
.pub-slide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--who-radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.pub-slide-cover .pub-card-cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: var(--who-radius-md);
  background: var(--who-gray-100);
}
/* Controls — outside slides, aligned to the right of the 3/4 text column.
   The grid is 1fr 3fr, so the 1/4 image col = 25% + gap (40px).
   We offset the controls with a matching left padding. */
.pub-slider-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-left: calc(25% + 40px);
}
.pub-slider-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--who-gray-300);
  border-radius: var(--who-radius-sm);
  background: var(--who-white);
  color: var(--who-navy);
  cursor: pointer;
  transition: background var(--who-transition), border-color var(--who-transition), color var(--who-transition);
}
.pub-slider-btn:hover { background: var(--who-navy); border-color: var(--who-navy); color: var(--who-white); }
.pub-slider-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pub-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--who-gray-300);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--who-transition), transform var(--who-transition);
}
.pub-slider-dot--active {
  background: var(--who-navy);
  transform: scale(1.3);
}

/* ── Two-column main layout (sidebar + content) ───────────── */
.pub-main-section { padding-top: 40px; padding-bottom: 56px; }
.pub-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .pub-sidebar-layout { grid-template-columns: 1fr; }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.pub-sidebar {
  position: sticky;
  top: 80px;
  background: var(--who-navy);
  border-radius: var(--who-radius-md);
  padding: 24px;
}
.pub-sidebar-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--who-white);
  margin: 0 0 20px;
  line-height: 1.3;
}
.pub-sidebar-form { display: flex; flex-direction: column; gap: 0; }
.pub-sidebar-block { margin-bottom: 18px; }
.pub-sidebar-label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--who-white-70);
  margin-bottom: 7px;
}
/* Search */
.pub-sidebar-search {
  position: relative;
}
.pub-sidebar-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--who-gray-400);
  pointer-events: none;
}
.pub-sidebar-search input {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 32px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--who-radius-sm);
  font-size: .875rem;
  color: var(--who-white);
  background: rgba(255,255,255,.1);
  outline: none;
  box-sizing: border-box;
}
.pub-sidebar-search input::placeholder { color: rgba(255,255,255,.45); }
.pub-sidebar-search input:focus {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.15);
}
/* Selects */
.pub-sidebar-select {
  width: 100%;
  height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--who-radius-sm);
  font-size: .875rem;
  color: var(--who-white);
  background: rgba(255,255,255,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 9px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
}
.pub-sidebar-select option { background: var(--who-navy); color: var(--who-white); }
.pub-sidebar-select:focus {
  border-color: rgba(255,255,255,.6);
  background-color: rgba(255,255,255,.15);
}
/* Actions */
.pub-sidebar-actions {
  margin-top: 4px;
}
.pub-sidebar-btn-group {
  display: flex;
  width: 100%;
  border-radius: var(--who-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
}
.pub-sidebar-btn {
  flex: 1;
  height: 38px;
  background: var(--who-blue);
  color: var(--who-white);
  border: none;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--who-transition), color var(--who-transition);
}
.pub-sidebar-btn:hover { background: var(--who-white); color: var(--who-navy); }
.pub-sidebar-btn--clear {
  background: rgba(255,255,255,.1);
  border-left: 1px solid rgba(255,255,255,.2);
}
.pub-sidebar-btn--clear:hover { background: rgba(255,255,255,.25); color: var(--who-white); }
.pub-sidebar-btn--disabled {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.3);
  cursor: not-allowed;
  pointer-events: none;
}
/* Divider */
.pub-sidebar-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.15);
  margin: 24px 0 20px;
}
/* Sidebar resource cards */
.pub-sidebar-resource {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--who-white);
  border: 1px solid var(--who-white);
  border-radius: var(--who-radius-md);
  text-decoration: none;
  color: var(--who-navy);
  margin-bottom: 10px;
  transition: box-shadow var(--who-transition);
}
.pub-sidebar-resource:last-child { margin-bottom: 0; }
.pub-sidebar-resource:hover { box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.pub-sidebar-resource-img {
  flex-shrink: 0;
  width: 48px;
  height: 36px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--who-gray-100);
}
.pub-sidebar-resource-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pub-sidebar-resource-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pub-sidebar-resource-title {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--who-navy);
  line-height: 1.3;
}
.pub-sidebar-resource:hover .pub-sidebar-resource-title { color: var(--who-blue); }
.pub-sidebar-resource-desc {
  font-size: .75rem;
  color: var(--who-gray-600);
  line-height: 1.4;
}
.pub-sidebar-resource svg {
  flex-shrink: 0;
  color: var(--who-gray-400);
}

/* ── Publication list grid (2 cols inside 3/4) ───────────── */
.pub-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .pub-list-grid { grid-template-columns: 1fr; }
}
.pub-list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0;
}
.pub-split-list .pub-list-item + .pub-list-item {
  padding-top: 14px;
}
/* In pub-list-grid (publications listing page): keep card style with border */
.pub-list-grid .pub-list-item {
  background: var(--who-white);
  border-radius: var(--who-radius-md);
  padding: 14px;
  border: 1px solid var(--who-gray-200);
}
/* In pub-split (section rows): separator between items, not on first */
.pub-split-list .pub-list-item + .pub-list-item {
  border-top: 1px solid var(--who-gray-200);
}
.pub-list-cover {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 64px;
}
.pub-list-cover img {
  width: 64px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--who-radius-sm);
  display: block;
}
.pub-list-cover-placeholder {
  width: 64px;
  height: 90px;
  background: var(--who-gray-100);
  border-radius: var(--who-radius-sm);
}
.pub-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pub-list-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--who-navy);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub-list-title a { color: inherit; text-decoration: none; }
.pub-list-title a:hover { color: var(--who-blue); }

/* No results message */
/* ── Publication split layout — featured left 1/2 + list right 1/2 ── */
.pub-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .pub-split { grid-template-columns: 1fr; }
}

/* Featured card (left 1/2) — horizontal card, larger cover, grey bg */
.pub-split-featured {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--who-gray-100);
  border-radius: var(--who-radius-md);
  padding: 20px;
}
.pub-split-featured .pub-list-cover {
  position: relative;
  width: 200px;
}
.pub-split-featured .pub-list-cover img {
  width: 200px;
  height: 280px;
}
.pub-split-featured .pub-list-cover-placeholder {
  width: 200px;
  height: 280px;
}
.pub-split-excerpt {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--who-gray-600);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* List column (right 1/2) — stacked cards with separators */
.pub-split-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-no-results {
  color: var(--who-gray-600);
  font-size: .9375rem;
  padding: 32px 0;
}

/* Pager */
.pub-pager {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 0;
}
.pub-pager-btn,
.pub-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid var(--who-gray-300);
  border-radius: var(--who-radius-sm);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--who-navy);
  text-decoration: none;
  background: var(--who-white);
}
.pub-pager-btn:hover,
.pub-pager-num:hover { background: var(--who-blue); color: var(--who-white); border-color: var(--who-blue); }
.pub-pager-num--active {
  background: var(--who-navy);
  color: var(--who-white);
  border-color: var(--who-navy);
  cursor: default;
}
.pub-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: var(--who-gray-500);
  font-size: .875rem;
}

/* ============================================================
   PUBLICATION PAGE
   ============================================================ */

/* Two-column layout: narrow cover col (left) + body col (right) */
.pub-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 32px;
}
@media (max-width: 800px) {
  .pub-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Left column — sticky alongside body */
.pub-cover-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--who-nav-height) + 32px);
}

/* Cover image — portrait ratio, shadow */
.pub-cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--who-radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}

/* Placeholder when no cover image exists */
.pub-cover-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--who-navy);
  border-radius: var(--who-radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Download CTA button */
.btn-pub-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--who-blue);
  color: var(--who-white);
  border-radius: var(--who-radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--who-transition), color var(--who-transition);
  text-align: center;
  line-height: 1.3;
}
.btn-pub-download:hover {
  background: var(--who-navy);
  color: var(--who-white);
}
.btn-pub-download svg { flex-shrink: 0; }

/* Body column */
.pub-body-col { min-width: 0; }


/* ── Publication cards (pub-card model used in pub-split, country, topic, person, emergencies, media-centre, newsroom) ── */
.pub-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--who-gray-100);
  border-radius: var(--who-radius-md);
  overflow: hidden;
}

.pub-card-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: var(--who-gray-100);
  height: 258px;
}

.pub-featured-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--who-gold);
  color: var(--who-white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: var(--who-radius-sm);
  line-height: 1.4;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}
.pub-featured-inline {
  background: var(--who-gold);
  color: var(--who-white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: var(--who-radius-sm);
  line-height: 1.4;
  white-space: nowrap;
  margin-left: 4px;
}
.pub-card-cover img {
  display: block;
  width: 148px;
  height: 210px;
  object-fit: contain;
  border-radius: 1px;
}
.pub-card-cover-placeholder {
  width: 148px;
  height: 210px;
  background: var(--who-gray-200);
  border-radius: 1px;
}

.pub-card-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.pub-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pub-card-meta .meta-sep { color: var(--who-gray-300); font-size: 12px; }
.pub-card-date {
  font-size: 12px;
  color: var(--who-gray-600);
}
.pub-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--who-navy);
  margin: 0;
  line-height: 1.4;
}
.pub-card-title a {
  color: inherit;
  text-decoration: none;
}
.pub-card-title a:hover {
  color: var(--who-blue);
}

.pub-card-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 10px;
}
.pub-btn {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pub-btn-download { color: var(--who-navy); }
.pub-btn-download:hover { color: var(--who-blue); }
.pub-btn-read { color: var(--who-gray-600); font-weight: 400; }
.pub-btn-read:hover { color: var(--who-navy); }
