@layer sections {
  .offices { background: var(--surface-primary); }

  .offices__layout {
    display: grid;
    grid-template-columns: minmax(0, 917px) minmax(0, 280px);
    gap: var(--sp-24);
    align-items: start;
  }

  /* Карта успадковує розміри й сітку крапок від блоку «Географія»:
     проєкція спільна, тож мітки офісів сідають на ті самі крапки. */
  .offices__map { max-width: 100%; }

  /* Підказка без JS: шість маркерів не варті окремого скрипта, а на
     :focus вона зʼявляється так само, як на наведення — з клавіатури теж. */
  .offices__marker::after {
    content: attr(data-label);
    position: absolute;
    z-index: 3;
    bottom: calc(100% + 10px);
    left: 50%;
    translate: -50% 0;
    padding: var(--sp-8) var(--sp-12);
    border-radius: var(--r-8);
    background: var(--surface-secondary);
    box-shadow: inset 0 0 0 .5px var(--surface-separator);
    color: var(--label-primary);
    font-size: var(--fs-caption);
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
  }

  .offices__marker:hover::after,
  .offices__marker:focus-visible::after { opacity: 1; }

  /* Європейські мітки стоять високо — там підказка не влазить над крапкою. */
  .offices__marker[style*="--y:4"]::after,
  .offices__marker[style*="--y:3"]::after {
    bottom: auto;
    top: calc(100% + 10px);
  }

  .offices__list {
    display: grid;
    gap: var(--sp-24);
    padding: var(--sp-24);
    border-radius: var(--r-16);
    background: var(--surface-glass-1);
    box-shadow: inset 0 0 0 .5px var(--surface-separator);
  }

  .offices__country { display: grid; gap: var(--sp-12); }

  .offices__country-name {
    color: var(--label-tertiary);
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .offices__cities {
    display: grid;
    gap: var(--sp-12);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .offices__city {
    display: grid;
    gap: 2px;
    padding-block-end: var(--sp-12);
    border-block-end: .5px solid var(--surface-separator);
  }

  .offices__country:last-child .offices__city:last-child {
    padding-block-end: 0;
    border-block-end: 0;
  }

  .offices__city-name { color: var(--label-primary); }

  .offices__city-phone {
    color: var(--label-tertiary);
    text-decoration: none;
  }

  .offices__city-phone:hover { color: var(--accent-primary); }

  @media (max-width: 900px) {
    .offices__layout { grid-template-columns: minmax(0, 1fr); }
  }
}

@layer sections {
  /* Без карти список розкладається в кілька колонок, а не тулиться в одну
     вузьку праворуч. */
  .offices__layout--list { grid-template-columns: minmax(0, 1fr); }

  .offices__layout--list .offices__list {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    align-items: start;
  }
}
