.coverage-bucharest {
  --coverage-accent: var(--gold, #ffcb39);
  --coverage-stroke: #c7c4b7;
  background: var(--paper, #f5f3eb);
  border-bottom: 1px solid var(--coverage-stroke);
}

.coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: start;
  gap: clamp(25px, 4.2vw, 64px);
  padding-block: clamp(28px, 4vw, 58px) clamp(42px, 6vw, 85px);
}

.coverage-intro { min-width: 0; }
.coverage-intro .district-hub-shortcut { display:inline-flex; align-items:center; min-height:44px; margin-top:8px; }
.coverage-intro h1 {
  max-width: 16ch;
  font-size: clamp(46px, 5.6vw, 79px);
  line-height: 1.01;
  letter-spacing: -.04em;
}

.coverage-main-copy p {
  max-width: 44ch;
  margin-top: 16px;
  color: #45473d;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.44;
}

.coverage-main-copy > a[href^='tel:'], .coverage-main-copy .actions { margin-top: 22px; }
.sector-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.sector-list > li { min-width: 0; }
.sector-link {
  display: flex;
  position: relative;
  min-width: 0;
  min-height: 78px;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--coverage-stroke, #c7c4b7);
  border-radius: 6px;
  padding: 9px 29px 9px 12px;
  background: #fffdf7;
  color: var(--ink, #1c1d1b);
  text-decoration: none;
}

.sector-link strong { font-size: 18px; line-height: 1.12; }
.sector-link small { color: #4f5046; font-size: 13px; line-height: 1.3; }
.sector-link > span:last-child:not(:has(strong, small)) { position: absolute; inset: 7px 10px auto auto; color: #6c550d; font-weight: 700; }
.sector-link:is(:hover, :focus-visible, .is-active) { border-color: #9b7516; background: #fbe696; }

.sector-map {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #424137;
  border-radius: 10px;
  background:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px),
    #252520;
  background-size: 28px 28px;
  color: #f6f3e8;
}

.sector-map svg { display: block; width: 100%; height: auto; max-height: 515px; }
.sector-map svg a path {
  fill: #b3944c;
  stroke: #282820;
  stroke-linejoin: round;
  stroke-width: 1.6px;
  vector-effect: non-scaling-stroke;
}

.sector-map svg a[data-sector-code='1'] path { fill: #dab65d; }
.sector-map svg a[data-sector-code='2'] path { fill: #a78947; }
.sector-map svg a[data-sector-code='3'] path { fill: #c4a052; }
.sector-map svg a[data-sector-code='4'] path { fill: #a78d52; }
.sector-map svg a[data-sector-code='5'] path { fill: #d6b572; }
.sector-map svg a[data-sector-code='6'] path { fill: #bc9d61; }
.sector-map svg a circle { fill: #292820; stroke: #f9dfa5; stroke-width: 1.5px; }
.sector-map svg a text { fill: #fcf8ec; font-family: var(--display, sans-serif); font-size: 17px; font-weight: 750; }
.sector-map svg a:is(:hover, .is-active, :focus-visible) path { fill: var(--coverage-accent, #ffcb39); stroke: #fff6d2; }
.sector-map svg a:is(:hover, .is-active, :focus-visible) circle { fill: #171713; stroke: #fff6d2; stroke-width: 2px; }
.sector-map svg a:focus-visible { outline: none; box-shadow: none; }
.sector-map svg a:focus-visible path { stroke: #fff; stroke-width: 3px; }
.sector-map figcaption {
  position: relative;
  border-top: 1px solid #575347;
  padding: 11px clamp(13px, 2vw, 23px);
  background: #252520;
  color: #efecdf;
  font-size: 14px;
  line-height: 1.32;
}

.sector-map figcaption a { text-underline-offset: 3px; }
.ilfov-directory {
  padding-block: clamp(42px, 6vw, 85px);
  border-bottom: 1px solid #d3d0c3;
  background: #f9f8f4;
}

.ilfov-heading p { max-width: 56ch; margin-top: 13px; color: #474940; }
.zone-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: end;
  gap: 12px 21px;
  margin-top: 27px;
  border: 1px solid #cdc9bb;
  border-radius: 7px;
  padding: clamp(12px, 2vw, 21px);
  background: #eeebe0;
}

.zone-controls label { display: grid; gap: 6px; min-width: 0; font-weight: 680; }
.zone-controls input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #8c8a7d;
  border-radius: 5px;
  padding: 8px 12px;
  background: white;
  color: #22231e;
  font: inherit;
  font-weight: 470;
}

.zone-controls input::placeholder { color: #656559; }
.zone-controls input:focus-visible { outline: 3px solid #0064bd; outline-offset: 2px; }
.zone-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.zone-filters button, #zone-empty [data-reset] {
  min-height: 46px;
  border: 1px solid #a39e8e;
  border-radius: 5px;
  padding: 7px 13px;
  background: #fffdf7;
  color: #24251f;
  font: inherit;
  font-size: 15px;
  font-weight: 670;
  line-height: 1.2;
  cursor: pointer;
}

.zone-filters button:hover, #zone-empty [data-reset]:hover { border-color: #66500b; background: #f8e7a6; }
.zone-filters button[aria-pressed='true'] { border-color: #1c1d1b; background: #292922; color: #fff; }
#zone-count { margin: 12px 0 0; color: #4c4e42; font-size: 14px; }
.zone-group { margin-top: clamp(24px, 3.8vw, 45px); }
.zone-group h3 { margin: 0 0 12px; font-size: clamp(23px, 2.8vw, 35px); }
.city-grid, .commune-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.city-grid { align-items: stretch; }
.city-link, .commune-card {
  min-width: 0;
  border: 1px solid #d0ccbe;
  border-radius: 6px;
  background: #fff;
  color: #25251f;
}

.city-link {
  position: relative;
  display: flex;
  min-height: 63px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 9px 29px 9px 12px;
  text-decoration: none;
}

.city-link > strong { font-size: clamp(16px, 1.55vw, 20px); line-height: 1.15; overflow-wrap: anywhere; }
.city-link > span { color: #4d4e43; font-size: 13px; line-height: 1.2; }
.city-link::after, a.commune-card::after, .home-sector-grid a::after, .home-city-grid a::after {
  width: 7px;
  height: 7px;
  border: solid #6e5512;
  border-width: 1.8px 1.8px 0 0;
  transform: rotate(45deg);
  content: '';
}

.city-link::after { position: absolute; top: calc(50% - 4px); right: 13px; }
.city-link:hover, a.commune-card:hover, details.commune-card:hover { border-color: #9b7516; background: #fff9e7; }
.commune-card > summary, a.commune-card {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 11px;
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 680;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.commune-card > summary { border-radius: 5px; cursor: pointer; list-style: none; }
.commune-card > summary::-webkit-details-marker { display: none; }
.commune-card > summary::marker { content: ''; }
.commune-card > summary::after {
  width: 12px;
  height: 12px;
  flex: none;
  background: linear-gradient(#6e5512, #6e5512) center / 100% 2px no-repeat, linear-gradient(#6e5512, #6e5512) center / 2px 100% no-repeat;
  content: '';
}

.commune-card[open] > summary::after { background-size: 100% 2px; }
.commune-card[open] { border-color: #9b7516; }
.commune-card > div { border-top: 1px solid #ded8c8; padding: 8px 11px 10px; font-size: 14px; line-height: 1.38; }
.commune-card > div a[href^='tel:'] { display: inline-flex; min-height: 44px; align-items: center; color: #614804; font-weight: 700; text-underline-offset: 3px; }
a.commune-card { text-decoration: none; }
.chiajna-villages { display: block; font-size: .78rem; color: #545344; font-weight: 500; }

/* Optional county map pairs each administrative boundary with its service page. */
.county-atlas { margin: 1rem 0 1.6rem; border: 1px solid #cbc9bc; border-radius: 6px; overflow: clip; background: #fffdf6; }
.county-atlas summary { padding: 1rem 1.15rem; font-weight: 700; cursor: pointer; }
.county-atlas summary::marker { color: #76600c; }
.atlas-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 24px; align-items: center; color: #fffdf3; padding: clamp(18px,3.5vw,50px); background-color: #202520; background-image: linear-gradient(#e8d9900d 1px,transparent 1px),linear-gradient(90deg,#e8d9900d 1px,transparent 1px); background-size: 24px 24px; }
.atlas-overview { max-width: 35ch; }
.atlas-overview p { color: #f4f1de; }
.atlas-overview .atlas-readout { margin: 16px 0; color: #ffd65c; font-size: clamp(24px,3vw,38px); font-weight: 700; line-height: 1.15; }
.atlas-overview > a { font-size: .83rem; color: #e7e4d2; }
.atlas-body svg { width: 100%; max-height: 410px; display: block; }
.atlas-body svg a { outline: none; }
.atlas-body svg path { fill: #bfa96e; stroke: #2a3029; stroke-width: .95; stroke-linejoin: round; }
.atlas-body svg a:is(:hover,:focus) path { fill: #ffcf38; stroke: white; stroke-width: 1.25; }
.atlas-body svg a.atlas-muted { pointer-events: none; }
.atlas-body svg a.atlas-muted path { fill: #50564c; }
.atlas-body svg text { fill: #fffdef; font: bold 7px Arial,sans-serif; pointer-events: none; }
@media(max-width:620px) { .atlas-body { grid-template-columns: 1fr; gap: 12px; } .atlas-body svg { max-height: 320px; } .atlas-overview .atlas-readout { margin: 8px 0; } }
a.commune-card::after { flex: none; margin-right: 3px; }
.ilfov-directory :is(.zone-controls, .zone-group, .city-link, .commune-card, #zone-count, #zone-empty)[hidden] { display: none; }

#zone-empty {
  margin-top: 18px;
  border: 1px solid #d0ccbe;
  border-radius: 6px;
  padding: clamp(14px, 3vw, 26px);
  background: #fff;
}

#zone-empty p { max-width: 53ch; margin-block: 7px 12px; }
#zone-empty a[href^='tel:'] { display: inline-flex; min-height: 46px; align-items: center; margin: 4px 10px 0 0; font-weight: 720; text-underline-offset: 3px; }

.home-coverage {
  padding-block: clamp(42px, 6vw, 84px);
  border-bottom: 1px solid #d2cfc2;
  background: #f7f5ec;
}

.home-coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 5vw, 76px);
}

.home-zone-links h2 { max-width: 17ch; }
.home-zone-links > p { max-width: 47ch; margin-top: 13px; color: #474940; }
.home-zone-links h3 { margin-block: 18px 8px; font-size: clamp(18px, 2vw, 24px); }
.home-zone-links .actions { margin-top: 17px; }
.home-sector-grid, .home-city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-sector-grid a, .home-city-grid a {
  display: flex;
  min-height: 44px;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border: 1px solid #d0ccbe;
  border-radius: 5px;
  padding: 7px 9px;
  color: var(--ink, #1c1d1b);
  background: #fffdf6;
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 690;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.home-sector-grid a:hover, .home-city-grid a:hover { border-color: #9b7516; background: #fbe696; }
.home-sector-grid a::after, .home-city-grid a::after { flex: none; margin-right: 1px; }
.home-coverage-photo {
  position: relative;
  min-width: 0;
  min-height: 250px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #26271f;
}

.home-coverage-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-coverage-photo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 15px 12px;
  background: linear-gradient(transparent, #171713f0);
  color: #fff;
  font-size: 14px;
  font-weight: 620;
}

@media (max-width: 960px) {
  .city-grid, .commune-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .coverage-layout, .home-coverage-layout { grid-template-columns: minmax(0, 1fr); }
  .coverage-intro:has(> .coverage-main-copy) { display: contents; }
  .coverage-main-copy { grid-row: 1; }
  .coverage-intro > .sector-list { grid-row: 3; margin-top: 0; }
  .sector-map { grid-row: 2; width: 100%; max-width: 570px; }
  .sector-map svg { max-height: 420px; }
  .home-coverage-photo { min-height: 0; aspect-ratio: 1.7; }
}

@media (max-width: 600px) {
  .zone-controls { grid-template-columns: minmax(0, 1fr); }
  .city-grid, .commune-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .coverage-intro h1 { font-size: 39px; }
  .sector-list { gap: 6px; }
  .sector-link { padding-right: 23px; padding-left: 8px; }
  .sector-link > span:last-child:not(:has(strong, small)) { right: 7px; }
  .zone-filters button { padding-inline: 8px; }
  .home-sector-grid a { padding-inline: 5px; }
}
