/* ==========================================================================
   Blok „Mapa oddziałów” (.omap): wspólna mapa Polski (assets/css/mapa.css – ta sama co na
   Dlaczego DTS i w Serwisie, bez ramki), lista oddziałów jako akordeon.
   Układ 5/7: tytuł i lista (albo tekst) po lewej, mapa po prawej.
   ========================================================================== */

.omap__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "intro stage" "list stage"; grid-template-rows: auto 1fr;
  gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start;
}
.omap__intro { grid-area: intro; }
.omap__intro .eyebrow.eyebrow { margin-bottom: 1.1rem; }
.omap__intro h2 { margin: 0; max-width: 16ch; }
.omap__lead { margin: 1rem 0 0; color: var(--muted); font-size: 1.0625rem; max-width: 44ch; }
.omap__text { margin: 1rem 0 0; font-size: 1.0625rem; max-width: 52ch; }
.omap__text + .omap__text { margin-top: .9rem; }
.omap__more { margin: 1.5rem 0 0; }
.omap--tekst .omap__grid { grid-template-areas: "intro stage"; grid-template-rows: auto; align-items: center; }

/* ---- Mapa (wspólna) z legendą i podpisem – bez ramki i tła ---- */
.omap__stage { grid-area: stage; position: sticky; top: calc(var(--nav-h) + 2.5rem); }
.omap--tekst .omap__stage { position: static; }
.omap__stage .pmap__stage { width: 100%; max-width: 600px; margin-inline: auto; }
.omap__stage .pmap-legend { justify-content: center; margin-top: 1.25rem; }

/* ---- Kropki rodzajów na liście oddziałów ---- */
.omap__sw { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-2); opacity: 1; }

.omap__sw { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--navy-900); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-strong); }
.omap__sw--centrala { background: var(--orange); }
.omap__sw--produkcja { background: #fff; box-shadow: inset 0 0 0 3px var(--navy-900), 0 0 0 2px #fff, 0 0 0 3px var(--line-strong); }

.omap__caption { margin: 1rem auto 0; max-width: 54ch; text-align: center; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.omap__tel { font-family: var(--font-ui); font-weight: 600; color: var(--navy-900); white-space: nowrap; text-decoration: none; font-variant-numeric: tabular-nums; }
.omap__tel:hover { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .22em; }

.omap__partners { margin: 1rem 0 0; padding-top: .85rem; border-top: 1px solid var(--line); }
.omap__partners summary {
  display: flex; align-items: center; justify-content: center; gap: .4rem; cursor: pointer; list-style: none;
  font-family: var(--font-ui); font-weight: 500; font-size: .8125rem; color: var(--navy);
}
.omap__partners summary::-webkit-details-marker { display: none; }
.omap__partners summary .icon { width: 1rem; height: 1rem; transition: transform .3s var(--ease); }
.omap__partners[open] summary .icon { transform: rotate(180deg); }
.omap__partners summary:hover { color: var(--navy-900); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .22em; }
.omap__partners p { margin: .75rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.6; text-align: center; }

/* ---- Lista oddziałów (akordeon) ---- */
.omap__list { grid-area: list; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.omap__item { border-bottom: 1px solid var(--line); transition: background-color .25s; }
.omap__item.is-hot:not(.is-open) { background: var(--paper-2); }
.omap__head { margin: 0; font: inherit; }
.omap__toggle {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) 32px; align-items: center; gap: .1rem .95rem;
  width: 100%; margin: 0; padding: .95rem .35rem .95rem .5rem; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.omap__toggle .omap__sw { grid-row: 1 / 3; }
.omap__name { font-weight: 500; font-size: 1.0625rem; line-height: 1.3; color: var(--navy-900); }
.omap__role { grid-column: 2; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.omap__chev {
  grid-column: 3; grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--navy);
  transition: background-color .25s, box-shadow .25s, color .25s, transform .35s var(--ease);
}
.omap__chev .icon { width: 1rem; height: 1rem; }
.omap__toggle:hover .omap__chev { box-shadow: inset 0 0 0 1.5px var(--navy); }
.omap__toggle:focus-visible { outline: 2px solid var(--navy-900); outline-offset: -2px; border-radius: 6px; }
.omap__item.is-open .omap__name { font-weight: 600; }
.omap__item.is-open .omap__chev { background: var(--navy-900); color: #fff; box-shadow: none; transform: rotate(180deg); }

.omap__detail-in { min-height: 0; padding-left: calc(12px + .95rem + .5rem); }
.omap__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.5rem; margin: .1rem 0 1.1rem; }
.omap__facts dt {
  display: flex; align-items: center; gap: .35rem; margin: 0 0 .2rem;
  font-family: var(--font-ui); font-weight: 500; font-size: .6875rem; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
}
.omap__facts dt .icon { width: .95rem; height: .95rem; color: var(--navy); }
.omap__facts dd { margin: 0; font-size: .9375rem; line-height: 1.45; color: var(--navy-900); }
.omap__facts a { color: var(--navy-900); text-decoration: none; }
.omap__facts a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .22em; }
.omap__num { font-family: var(--font-ui); font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.omap__route { margin: 0 0 1.25rem; }
.omap__route .icon { width: 1em; height: 1em; }

/* z JS: zwinięte oddziały (bez JS wszystkie adresy są widoczne) */
.omap.is-armed .omap__detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.omap.is-armed .omap__detail-in { overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.omap.is-armed .omap__item.is-open .omap__detail { grid-template-rows: 1fr; }
.omap.is-armed .omap__item.is-open .omap__detail-in { visibility: visible; transition-delay: 0s; }

/* ostatni blok strony: miejsce na stopkę, która nachodzi 44px */
.site-main > .omap:last-child { padding-bottom: calc(var(--section-y) + 44px); }

@media (max-width: 900px) {
  .omap__grid, .omap--tekst .omap__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "stage" "list"; grid-template-rows: auto; }
  .omap__stage { position: static; }
  .omap__stage .pmap__stage { max-width: 520px; }
}
@media (max-width: 560px) {
  .omap__stage .pmap-legend { justify-content: flex-start; }
  .omap__caption, .omap__partners p { text-align: left; }
  .omap__partners summary { justify-content: flex-start; }
  .omap__facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .omap *, .omap *::before, .omap *::after { transition: none !important; }
}
