/* ---------- COMPONENTA 3 · HARTA EDUCAȚIEI URBANE ---------- */
:root{
  --map-rank-top-1: var(--petrol);
  --map-rank-top-2: var(--green);
  --map-rank-top-3: #DB9418;
  --map-rank-top-4: var(--neg);
  --map-rank-no-data: #9FB3BB;
  --map-county-fill: #E6EEF1;
  --map-county-stroke: rgba(14,90,110,.28);
  --map-panel-bg: #F7FBFC;
}

.componenta-3-harta .sec-head {
  max-width: 780px;
}

.education-map-indicator-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  margin-bottom: 14px;
}

.map-indicator-button {
  border: 1px solid rgba(15, 76, 92, 0.18);
  background: var(--card, #ffffff);
  color: var(--ink, #0f172a);
  border-radius: 999px;
  padding: 8px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: all .16s ease;
}

.map-indicator-button:hover {
  border-color: rgba(15, 118, 110, .42);
  background: rgba(15, 118, 110, .06);
}

.map-indicator-button.is-active {
  background: var(--petrol, #0f766e);
  color: #fff;
  border-color: var(--petrol, #0f766e);
  box-shadow: 0 10px 22px rgba(14,90,110,.14);
}

.education-map-active-indicator {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(15, 118, 110, .06);
  border: 1px solid rgba(15, 118, 110, .13);
}

.active-indicator-kicker {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--petrol, #0f766e);
}

.education-map-active-indicator strong {
  display: block;
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  font-weight: 850;
  color: var(--ink, #0f172a);
}

.education-map-active-indicator p {
  margin: 4px 0 0;
  max-width: 760px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft, #475569);
}

.education-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: stretch;
}

.education-map-panel {
  position: relative;
  min-height: 460px;
  background:
    radial-gradient(circle at 18% 12%, rgba(86,177,182,.08), transparent 30%),
    var(--map-panel-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(19,51,60,.06);
}

.romania-education-map {
  width: 100%;
  height: auto;
  min-height: 390px;
  display: block;
}

.map-counties-layer {
  filter: drop-shadow(0 8px 20px rgba(14,90,110,.08));
}

.map-county {
  fill: var(--map-county-fill);
  stroke: var(--map-county-stroke);
  stroke-width: .75;
  vector-effect: non-scaling-stroke;
}

.map-city-halo {
  fill: rgba(19,51,60,.06);
  stroke: rgba(255,255,255,.82);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.map-city-halo.top-1-10 { fill: color-mix(in srgb, var(--map-rank-top-1) 20%, transparent); }
.map-city-halo.top-11-19 { fill: color-mix(in srgb, var(--map-rank-top-2) 20%, transparent); }
.map-city-halo.top-20-29 { fill: color-mix(in srgb, var(--map-rank-top-3) 20%, transparent); }
.map-city-halo.top-30-41 { fill: color-mix(in srgb, var(--map-rank-top-4) 20%, transparent); }
.map-city-halo.no-data { fill: rgba(159,179,187,.16); }

.map-city-point {
  fill: var(--map-rank-no-data);
  stroke: #fff;
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  opacity: .94;
  transition: r .15s ease, fill .15s ease, opacity .15s ease, stroke-width .15s ease;
}

.map-city-point:hover {
  opacity: 1;
  stroke-width: 3;
}

.map-city-point.is-selected {
  stroke: var(--ink);
  stroke-width: 3.4;
  opacity: 1;
}

.map-city-point.top-1-10 { fill: var(--map-rank-top-1); }
.map-city-point.top-11-19 { fill: var(--map-rank-top-2); }
.map-city-point.top-20-29 { fill: var(--map-rank-top-3); }
.map-city-point.top-30-41 { fill: var(--map-rank-top-4); }
.map-city-point.no-data { fill: var(--map-rank-no-data); opacity: .72; }

.map-city-label {
  font-family: var(--mono);
  font-size: 10.3px;
  font-weight: 700;
  letter-spacing: .01em;
  fill: var(--ink-soft);
  paint-order: stroke;
  stroke: rgba(255,255,255,.92);
  stroke-width: 3.4px;
  pointer-events: none;
}

.map-city-label.no-data {
  fill: rgba(63,90,100,.74);
}

.education-map-tooltip {
  position: absolute;
  z-index: 8;
  min-width: 210px;
  max-width: 280px;
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(19,51,60,.96);
  color: #fff;
  box-shadow: 0 18px 38px rgba(19,51,60,.22);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.education-map-tooltip strong {
  display: block;
  margin-bottom: 5px;
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.education-map-tooltip span,
.education-map-tooltip em {
  display: block;
  color: rgba(255,255,255,.86);
  font-style: normal;
}

.education-map-tooltip b {
  color: #fff;
  font-weight: 800;
}

.education-map-legend {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: auto;
  min-width: 150px;
  max-width: 180px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 12px 28px rgba(15,23,42,.10);
  backdrop-filter: blur(8px);
}

.map-legend-title {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-mute, #64748b);
}

.map-legend-list {
  display: grid;
  gap: 6px;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft, #475569);
  font-size: 12px;
  font-weight: 700;
}

.map-legend-item:last-child {
  margin-bottom: 0;
}

.map-legend-dot,
.map-card-cluster-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(19,51,60,.12);
  flex: 0 0 auto;
}

.map-legend-dot.top-1-10,
.map-card-cluster-dot.top-1-10 { background: var(--map-rank-top-1); }
.map-legend-dot.top-11-19,
.map-card-cluster-dot.top-11-19 { background: var(--map-rank-top-2); }
.map-legend-dot.top-20-29,
.map-card-cluster-dot.top-20-29 { background: var(--map-rank-top-3); }
.map-legend-dot.top-30-41,
.map-card-cluster-dot.top-30-41 { background: var(--map-rank-top-4); }
.map-card-cluster-dot.no-data { background: var(--map-rank-no-data); }

.education-map-city-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 18px 40px rgba(19,51,60,.04);
}

.education-map-city-card h3 {
  font-family: 'Archivo', sans-serif;
  font-variation-settings: 'wdth' 110;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}

.education-map-city-card p {
  color: var(--ink-soft);
  font-size: 13px;
}

.map-card-subtitle {
  margin-top: -4px;
  color: var(--ink-mute) !important;
  font-family: var(--mono);
  font-size: 11px !important;
}

.map-card-empty {
  margin-top: 18px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: #F7FBFC;
  border: 1px solid var(--line);
}

.map-card-empty strong {
  font-family: 'Archivo', sans-serif;
  color: var(--ink);
}

.map-card-empty span {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.map-card-metrics {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.map-card-metrics.compact {
  margin: 4px 0 18px;
}

.map-card-metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.map-card-metric:first-child {
  padding-top: 0;
}

.map-card-metric span {
  color: var(--ink-mute);
  font-size: 12px;
}

.map-card-metric strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

.map-card-metric.primary {
  display: grid;
  justify-content: stretch;
  gap: 6px;
  border-bottom: 0;
  padding-bottom: 0;
}

.map-card-metric.primary strong {
  font-family: 'Archivo', sans-serif;
  font-size: 28px;
  line-height: 1;
  color: var(--petrol);
  text-align: left;
}

.map-card-calculation {
  margin-top: 0;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 118, 110, .07);
  border: 1px solid rgba(15, 118, 110, .14);
}

.map-card-calculation span {
  display: block;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--petrol, #0f766e);
}

.map-card-calculation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft, #475569);
}

.map-card-editorial {
  padding: 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink) !important;
  font-weight: 650;
}

.map-card-foot {
  margin-top: 12px;
  color: var(--ink-mute) !important;
  font-family: var(--mono);
  font-size: 10.5px !important;
  line-height: 1.45;
}

@media(max-width:1050px){
  .education-map-legend {
    position: absolute;
    top: 12px;
    right: 12px;
    width: min(210px, calc(100% - 24px));
  }
}

@media(max-width:900px){
  .education-map-shell {
    grid-template-columns: 1fr;
  }
  .education-map-panel {
    min-height: 380px;
    padding: 12px;
  }
  .romania-education-map {
    min-height: 330px;
  }
  .education-map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 145px;
    max-width: 170px;
  }
}
