/* ============================================================
   COUNTRIES LISTING PAGE  —  /countries
   ============================================================ */

/* Alpha filter bar (.alpha-bar / .alpha-btn / .alpha-btn.active) lives
   in components/alpha-bar.css and is attached automatically through the
   who26/alpha-bar library dependency declared on who26/countries. */

/* Country grid — 4 col matching reference, responsive */
.country-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .country-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .country-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .country-grid { grid-template-columns: 1fr; } }

/* Country card — CSS grid: circular flag spans both rows, name + lang stack */
.country-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 1px;
  padding: 12px 16px;
  background: var(--who-white);
  border: 1px solid var(--who-gray-200);
  border-radius: var(--who-radius-sm);
  color: inherit;
  transition: border-color var(--who-transition), box-shadow var(--who-transition), transform var(--who-transition);
}
.country-card:hover {
  border-color: var(--who-blue);
  box-shadow: var(--who-shadow-sm);
  transform: translateY(-2px);
  color: inherit;
}

/* Circular flag — spans both name + lang rows */
.country-flag {
  grid-row: 1 / 3;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--who-gray-100);
}

.country-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--who-navy);
  line-height: 1.3;
  align-self: end;
}
.country-card:hover .country-name { color: var(--who-blue); }

.country-lang {
  font-size: 11px;
  color: var(--who-gray-600);
  align-self: start;
}

/* ============================================================
   COUNTRY DETAIL PAGE  —  /countries/[slug]
   ============================================================ */

/* ---- Flag inline inside the hero h1 ---- */
.country-title-flag {
  width: 52px;
  height: auto;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 14px;
  display: inline-block;
  position: relative;
  top: -3px;
}

/* ---- Rich text body (office contact, additional info) ---- */
.country-body-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--who-gray-800);
}
.country-body-text p { margin-bottom: 12px; }
.country-body-text a { color: var(--who-blue); }
.country-body-text a:hover { color: var(--who-navy); }

/* ---- Country info section heading ---- */
.country-info-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--who-navy);
  margin-bottom: 20px;
}

/* ---- Ministry of Health card — zero-tolerance style ---- */
.country-ministry-card {
  background: var(--who-navy);
  border-radius: var(--who-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.country-ministry-title {
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--who-white);
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.country-ministry-body {
  padding: 14px 16px;
  flex: 1;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,.88);
}
.country-ministry-body p { margin: 0 0 2px; }
.country-ministry-card .btn-outline-sm {
  margin: 0 16px 16px;
  align-self: flex-start;
}
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1.5px solid var(--who-white-70);
  border-radius: 4px;
  color: var(--who-white);
  text-decoration: none;
  transition: background .18s, border-color .18s;
}
.btn-outline-sm:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--who-white);
  color: var(--who-white);
}

/* ---- Related links column ---- */
.country-related-links {
  background: var(--who-white);
  border: 1px solid var(--who-gray-200);
  border-radius: var(--who-radius-md);
  overflow: hidden;
}
.country-related-links-title {
  background: var(--who-navy);
  color: var(--who-white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 12px 18px;
}
.country-related-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--who-navy);
  border-bottom: 1px solid var(--who-gray-100);
  transition: background var(--who-transition), padding-left var(--who-transition);
}
.country-related-link:last-child { border-bottom: none; }
.country-related-link:hover {
  background: var(--who-blue-light);
  padding-left: 22px;
}
.country-related-link svg { flex-shrink: 0; opacity: .6; }

/* ---- Data & Statistics table ---- */
.country-data-stats {
  background: var(--who-white);
  border: 1px solid var(--who-gray-200);
  border-radius: var(--who-radius-md);
  overflow: hidden;
}
.country-data-stats table {
  width: 100%;
  border-collapse: collapse;
}
.country-data-stats table tr {
  border-bottom: 1px solid var(--who-gray-100);
}
.country-data-stats table tr:last-child { border-bottom: none; }
.country-data-stats table td {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--who-gray-700);
  vertical-align: top;
}
.country-data-stats table td:first-child {
  width: 55%;
  font-weight: 500;
  color: var(--who-navy);
}
.country-data-stats table tr:nth-child(even) td {
  background: var(--who-gray-50);
}

/* "View more" link — below table, right-aligned */
.country-data-stats-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ---- Map image (left column in Data & Statistics row) ---- */
.country-map-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--who-radius-md);
}

