/* Health-care city & country page polish.
   Scoped under .healthcare-page so it cannot leak onto the other
   extended-indicator pages (crime, pollution) that share the same helper
   markup: table_indices, the gauge, the jQuery-UI progress-bar table
   (.table_builder_with_value_explanation) and the *_standard value labels. */

.healthcare-page {
  --numbeo-blue: #1B3B6F;
  --numbeo-blue-light: #2E5090;
  --numbeo-blue-dark: #0F2444;
  --hc-text: #2a3340;
  --hc-muted: #6c7689;
  --hc-divider: #e7ecf3;
  --hc-row-hover: #f5f8fc;
  --hc-track: #eceff4;
  max-width: 800px;
  margin: 10px 0 6px;
}

/* ---------- Hero: gauge + Health Care System Index ---------- */
.healthcare-hero {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin: 6px 0 2px;
  padding: 20px 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  border: 1px solid var(--hc-divider);
  box-shadow: 0 1px 2px rgba(15, 36, 68, 0.04),
              0 14px 34px -16px rgba(15, 36, 68, 0.20);
  overflow: hidden;
}

/*
.healthcare-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--numbeo-blue) 0%, var(--numbeo-blue-light) 100%);
}*/

.healthcare-hero #gauge_div {
  order: -1;
  float: none !important;
  margin: 0 !important;
  flex: none;
}

.healthcare-hero aside {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 240px;
}

/* The shared index table becomes a clean headline stat */
.healthcare-hero .table_indices {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  background: none;
}

/* hide the "Index | (i)" header row */
.healthcare-hero .table_indices tr:first-child {
  display: none;
}

.healthcare-hero .table_indices td {
  border: 0 !important;
  background: none !important;
  padding: 0 !important;
  vertical-align: baseline;
}

.healthcare-hero .table_indices td:first-child {
  display: block;
  text-align: left !important;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hc-muted);
  margin-bottom: 2px;
}

.healthcare-hero .table_indices td:last-child {
  display: block;
  text-align: left !important;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--numbeo-blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- Section headings ---------- */
.healthcare-page h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  letter-spacing: -0.01em;
}

.healthcare-page h2::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--numbeo-blue-light), var(--numbeo-blue));
}

/* ---------- Breakdown scorecard (bars) ---------- */
.healthcare-page .table_builder_with_value_explanation {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
  background: #ffffff;
  border: 1px solid var(--hc-divider);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 36, 68, 0.04),
              0 12px 30px -16px rgba(15, 36, 68, 0.18);
}

/* column header row */
.healthcare-page .table_builder_with_value_explanation th {
  padding: 11px 16px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hc-muted);
  background: var(--hc-row-hover);
  border-bottom: 1px solid var(--hc-divider);
}

.healthcare-page .table_builder_with_value_explanation td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hc-divider);
  vertical-align: middle;
}

.healthcare-page .table_builder_with_value_explanation tr:last-child td {
  border-bottom: none;
}

.healthcare-page .table_builder_with_value_explanation tr:hover td {
  background: var(--hc-row-hover);
}

/* component name */
.healthcare-page .table_builder_with_value_explanation td.columnWithName {
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-text);
  line-height: 1.35;
}

/* the cell holding the bar takes the slack */
.healthcare-page .table_builder_with_value_explanation td:nth-child(2) {
  width: 38%;
}

/* numeric value */
.healthcare-page .table_builder_with_value_explanation td.indexValueTd {
  text-align: right !important;
  width: 1%;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  font-variant-numeric: tabular-nums;
}

/* category label cell */
.healthcare-page .table_builder_with_value_explanation td.hidden_on_small_mobile {
  text-align: right !important;
  width: 1%;
  white-space: nowrap;
}

/* ---------- jQuery-UI progress bars ---------- */
.healthcare-page .jquery_bar,
.healthcare-page .jquery_bar.ui-progressbar {
  width: 100%;
  height: 9px;
  border: none;
  background: var(--hc-track);
  border-radius: 999px;
  overflow: hidden;
}

.healthcare-page .jquery_bar .ui-progressbar-value {
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: var(--numbeo-blue);
}

/* severity-tinted bars, driven by the existing category label in the row
   (health-care metrics are "good to be high", so high satisfaction = green) */
.healthcare-page tr:has(.green_standard) .ui-progressbar-value          { background: linear-gradient(90deg, #34b36b, #2e9e5b); }
.healthcare-page tr:has(.green_light_standard) .ui-progressbar-value    { background: linear-gradient(90deg, #74c98f, #5cbf85); }
.healthcare-page tr:has(.yellow_neutral_standard) .ui-progressbar-value { background: linear-gradient(90deg, #f0c64b, #e6b400); }
.healthcare-page tr:has(.red_light_standard) .ui-progressbar-value      { background: linear-gradient(90deg, #ef9a55, #e8833f); }
.healthcare-page tr:has(.red_standard) .ui-progressbar-value            { background: linear-gradient(90deg, #e25c54, #d6453d); }

/* ---------- Category labels rendered as pills ---------- */
.healthcare-page .green_standard,
.healthcare-page .green_light_standard,
.healthcare-page .yellow_neutral_standard,
.healthcare-page .red_light_standard,
.healthcare-page .red_standard {
  display: inline-block;
  min-width: 70px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.healthcare-page .green_standard        { background: #e3f6ea; color: #1c7a42; border-color: #c4e9d0; }
.healthcare-page .green_light_standard  { background: #eef8f1; color: #2f8a4e; border-color: #d6ecdb; }
.healthcare-page .yellow_neutral_standard { background: #fdf3da; color: #946800; border-color: #f3e2ad; }
.healthcare-page .red_light_standard    { background: #fdeedd; color: #c15a25; border-color: #f6dcc2; }
.healthcare-page .red_standard          { background: #fce9e7; color: #c0392b; border-color: #f5cec9; }

/* ---------- Data freshness meta ---------- */
.healthcare-page > p {
  margin: 4px 0;
}

.healthcare-page .reportees {
  font-size: 15px;
  color: var(--hc-muted);
}

/* ---------- Orchestrated entrance ---------- */
/*@media (prefers-reduced-motion: no-preference) {
  .healthcare-hero,
  .healthcare-page .table_builder_with_value_explanation {
    opacity: 0;
    transform: translateY(10px);
    animation: healthcareRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .healthcare-hero { animation-delay: 0.04s; }
  .healthcare-page .table_builder_with_value_explanation { animation-delay: 0.12s; }
}

@keyframes healthcareRise {
  to { opacity: 1; transform: translateY(0); }
}*/

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .healthcare-hero {
    padding: 18px 18px;
    gap: 8px 20px;
    justify-content: center;
    text-align: center;
  }
  .healthcare-hero aside { flex-basis: 100%; }
  .healthcare-hero .table_indices td:first-child,
  .healthcare-hero .table_indices td:last-child { text-align: center !important; }
  .healthcare-page .table_builder_with_value_explanation td,
  .healthcare-page .table_builder_with_value_explanation th { padding: 10px 10px; }
  .healthcare-page .table_builder_with_value_explanation td.columnWithName { font-size: 13.5px; }
  .healthcare-page .green_standard,
  .healthcare-page .green_light_standard,
  .healthcare-page .yellow_neutral_standard,
  .healthcare-page .red_light_standard,
  .healthcare-page .red_standard {
    min-width: 0;
    padding: 3px 9px;
    font-size: 11.5px;
  }
}


.healthcare-hero, .healthcare-page .table_builder_with_value_explanation, .healthcare-page .table_builder_with_value_explanation,
.green_box, .comments_box, .seeding-call, .co2_consumption_info, .askToAddCommunity, .about_numbeo, .information_about_numbeo_data, .no-much-data, .light_box, .who_pollution_data_widget, .fancy_explanation, .nearby_city_info, .nearby_city_info_compare, .table_indices, .table_indices_diff, .openid_large_btn, a.region_link, .select_region, .div_indices_info, a.indices_info, a:visited.indices_info, a.seeThePricesButton, a.seeThePricesButton:visited, a.enterData2Button, a.enterData2Button:visited, .second_column_right_box
{
  border-radius: 5px;
}

/* ===========================================================
   Health-care comparison page (compare_cities / compare_countries)
   Scoped under .healthcare-compare. Same common.JqueryComparisonTableBuilder
   markup as crime/pollution: <table class="visualizeComparison"> with 5 cells
   per row (name, city1 bar, city1 value, city2 bar, city2 value),
   jquery_bar_small bars and *_small labels. Health-care metrics are
   good-to-be-high, so high satisfaction = green. Desktop shows severity bars;
   mobile hides the bars and colours the value number by severity.
   All fonts >= 15px.
   =========================================================== */
.healthcare-compare {
  --numbeo-blue: #1B3B6F;
  --numbeo-blue-light: #2E5090;
  --numbeo-blue-dark: #0F2444;
  --hc-text: #2a3340;
  --hc-muted: #6c7689;
  --hc-divider: #e7ecf3;
  --hc-row-hover: #f5f8fc;
  --hc-track: #eceff4;
  max-width: 820px;
  margin: 10px 0 6px;
}

/* section heading (if any) */
.healthcare-compare h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  letter-spacing: -0.01em;
}

.healthcare-compare h2::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--numbeo-blue-light), var(--numbeo-blue));
}

/* ---------- Headline scoreboard (index header) ---------- */
.healthcare-compare .table_indices {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  background: #ffffff;
  border: 1px solid var(--hc-divider);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 36, 68, 0.04),
              0 12px 30px -16px rgba(15, 36, 68, 0.18);
}

.healthcare-compare .table_indices th {
  padding: 10px 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  background: var(--hc-row-hover);
  border-bottom: 1px solid var(--hc-divider);
}

.healthcare-compare .table_indices th:first-child {
  text-align: left;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hc-muted);
  background: #ffffff;
}

.healthcare-compare .table_indices td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hc-divider);
}

.healthcare-compare .table_indices tr:last-child td {
  border-bottom: none;
}

.healthcare-compare .table_indices td:first-child {
  text-align: left !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-text);
}

.healthcare-compare .table_indices td:nth-child(n+2) {
  text-align: center !important;
  font-size: 24px;
  font-weight: 800;
  color: var(--numbeo-blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.healthcare-compare .table_indices th:nth-child(3),
.healthcare-compare .table_indices td:nth-child(3) {
  border-left: 1px solid var(--hc-divider);
}

/* ---------- Comparison scorecard ---------- */
.healthcare-compare .visualizeComparison {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
  background: #ffffff;
  border: 1px solid var(--hc-divider);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 36, 68, 0.04),
              0 12px 30px -16px rgba(15, 36, 68, 0.18);
}

/* city-name header row */
.healthcare-compare .visualizeComparison th {
  padding: 11px 12px;
  text-align: center !important;
  font-size: 16px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  background: var(--hc-row-hover);
  border-bottom: 1px solid var(--hc-divider);
}

.healthcare-compare .visualizeComparison th:first-child {
  background: #ffffff;
}

.healthcare-compare .visualizeComparison td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--hc-divider);
  vertical-align: middle;
}

.healthcare-compare .visualizeComparison tr:last-child td {
  border-bottom: none;
}

.healthcare-compare .visualizeComparison tr:hover td {
  background: var(--hc-row-hover);
}

/* component name */
.healthcare-compare .visualizeComparison td:first-child {
  text-align: left !important;
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-text);
  line-height: 1.35;
}

/* bar cells (city1 = 2nd, city2 = 4th) */
.healthcare-compare .visualizeComparison td:nth-child(2),
.healthcare-compare .visualizeComparison td:nth-child(4) {
  width: 24%;
}

/* value cells (city1 = 3rd, city2 = 5th) */
.healthcare-compare .visualizeComparison td:nth-child(3),
.healthcare-compare .visualizeComparison td:nth-child(5) {
  text-align: right;
  white-space: nowrap;
  width: 1%;
  font-size: 15px;
  font-weight: 700;
  color: var(--numbeo-blue-dark);
  font-variant-numeric: tabular-nums;
}

.healthcare-compare .visualizeComparison td:nth-child(3) .small_font,
.healthcare-compare .visualizeComparison td:nth-child(5) .small_font {
  font-size: 15px;
}

/* desktop: hide the text label (kept in the DOM for per-city bar colouring) */
.healthcare-compare .visualizeComparison td:nth-child(3) .hidden_on_small_mobile,
.healthcare-compare .visualizeComparison td:nth-child(5) .hidden_on_small_mobile {
  display: none;
}

/* divider before the city2 group */
.healthcare-compare .visualizeComparison th:nth-child(3),
.healthcare-compare .visualizeComparison td:nth-child(4) {
  border-left: 1px solid var(--hc-divider);
}

/* "Improve Data" links + contributor / last-update meta rows — de-emphasized */
.healthcare-compare .visualizeComparison tr:nth-child(2) td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.healthcare-compare .visualizeComparison tr:nth-child(2) .small_font a {
  font-size: 15px;
/*  color: var(--hc-muted); */
font-weight: 500;
}

.healthcare-compare .visualizeComparison tr:has(i) td {
  border-bottom: none;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 15px;
  color: var(--hc-muted);
  text-align: center !important;
}

.healthcare-compare .visualizeComparison tr:has(i) td:first-child {
  text-align: left !important;
}

.healthcare-compare .visualizeComparison tr:has(i) .small_font {
  font-size: 15px !important;
  font-weight: 400 !important;
  color: var(--hc-muted) !important;
}

.healthcare-compare .visualizeComparison tr:has(i) i {
  font-style: normal;
}

/* ---------- jQuery-UI progress bars ---------- */
.healthcare-compare .jquery_bar_small,
.healthcare-compare .jquery_bar_small.ui-progressbar {
  width: 100%;
  height: 8px;
  border: none;
  background: var(--hc-track);
  border-radius: 999px;
  overflow: hidden;
}

.healthcare-compare .jquery_bar_small .ui-progressbar-value {
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: var(--numbeo-blue);
}

/* severity-tinted bars, coloured per city from that city's own label
   (city1 bar = col2 keyed off col3's label; city2 bar = col4 keyed off col5) */
.healthcare-compare tr:has(td:nth-child(3) .green_small) td:nth-child(2) .ui-progressbar-value,
.healthcare-compare tr:has(td:nth-child(5) .green_small) td:nth-child(4) .ui-progressbar-value          { background: linear-gradient(90deg, #34b36b, #2e9e5b); }
.healthcare-compare tr:has(td:nth-child(3) .green_light_small) td:nth-child(2) .ui-progressbar-value,
.healthcare-compare tr:has(td:nth-child(5) .green_light_small) td:nth-child(4) .ui-progressbar-value    { background: linear-gradient(90deg, #74c98f, #5cbf85); }
.healthcare-compare tr:has(td:nth-child(3) .yellow_neutral_small) td:nth-child(2) .ui-progressbar-value,
.healthcare-compare tr:has(td:nth-child(5) .yellow_neutral_small) td:nth-child(4) .ui-progressbar-value { background: linear-gradient(90deg, #f0c64b, #e6b400); }
.healthcare-compare tr:has(td:nth-child(3) .red_light_small) td:nth-child(2) .ui-progressbar-value,
.healthcare-compare tr:has(td:nth-child(5) .red_light_small) td:nth-child(4) .ui-progressbar-value      { background: linear-gradient(90deg, #ef9a55, #e8833f); }
.healthcare-compare tr:has(td:nth-child(3) .red_small) td:nth-child(2) .ui-progressbar-value,
.healthcare-compare tr:has(td:nth-child(5) .red_small) td:nth-child(4) .ui-progressbar-value            { background: linear-gradient(90deg, #e25c54, #d6453d); }

/* category pills (shown if the global un-hides .hidden_on_small_mobile at a breakpoint) */
.healthcare-compare .green_small,
.healthcare-compare .green_light_small,
.healthcare-compare .yellow_neutral_small,
.healthcare-compare .red_light_small,
.healthcare-compare .red_small {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.healthcare-compare .green_small        { background: #e3f6ea; color: #1c7a42; border-color: #c4e9d0; }
.healthcare-compare .green_light_small  { background: #eef8f1; color: #2f8a4e; border-color: #d6ecdb; }
.healthcare-compare .yellow_neutral_small { background: #fdf3da; color: #946800; border-color: #f3e2ad; }
.healthcare-compare .red_light_small    { background: #fdeedd; color: #c15a25; border-color: #f6dcc2; }
.healthcare-compare .red_small          { background: #fce9e7; color: #c0392b; border-color: #f5cec9; }

/* ---------- Mobile: keep the small severity bars (like the crime comparison),
   just tighten spacing. The 5-column model is preserved so the colspan-2
   header / Improve / Contributors / Last-Update rows stay aligned. ---------- */
@media (max-width: 768px) {
  .healthcare-compare { max-width: 100%; }

  .healthcare-compare .visualizeComparison td,
  .healthcare-compare .visualizeComparison th { padding: 9px 6px; }
  .healthcare-compare .visualizeComparison td:first-child { font-size: 15px; }

  /* trim the bar columns a little to leave room for the (>=15px) name */
  .healthcare-compare .visualizeComparison td:nth-child(2),
  .healthcare-compare .visualizeComparison td:nth-child(4) { width: 20%; }

  /* tighten the index table */
  .healthcare-compare .table_indices th,
  .healthcare-compare .table_indices td { padding: 8px 10px; }
  .healthcare-compare .table_indices td:nth-child(n+2) { font-size: 20px; }
}