/* Блок «Наши адреса»: страны, офисы, фильтр. Данные — assets/js/offices.js */
.offices__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px 40px;
}

.offices__lead {
  max-width: 560px;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--c-muted);
}

.offices__stats {
  display: flex;
  gap: 10px;
}

.stat {
  min-width: 120px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--c-surface);
}

.stat__num {
  display: block;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--c-primary);
}

.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--c-muted);
}

/* --- Фильтр по странам --- */
.offices__filter {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.offices__filter::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.filter-btn:hover {
  border-color: var(--c-primary);
}

.filter-btn[aria-pressed="true"] {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: var(--c-white);
}


/* --- Карточки стран (раскладка «кирпичиками») --- */
.offices__grid {
  columns: 3 340px;
  column-gap: 24px;
}

.country {
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 26px 26px 22px;
  border-radius: var(--radius-card);
  background: var(--c-white);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--c-line);
}

.country[hidden] {
  display: none;
}

.country--featured {
  background: var(--grad-promo);
  border-color: transparent;
  color: var(--c-white);
}

.country__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--c-surface);
  font-size: 26px;
  line-height: 1;
}

.country--featured .country__flag {
  background: rgba(255, 255, 255, 0.14);
}

.country__name {
  font-size: 22px;
  font-weight: 500;
}

.country__meta {
  margin-top: 2px;
  font-size: 14px;
  color: var(--c-muted);
}

.country--featured .country__meta {
  color: var(--c-on-accent-muted);
}

.country__list {
  margin-top: 18px;
  margin-bottom: -8px;
}

.office {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 14px 0;
  border-top: 1px solid var(--c-line);
}

.country--featured .office {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.office__pin {
  grid-row: span 2;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--c-primary);
}

.country--featured .office__pin {
  color: #7cc4f2;
}

.office__city {
  font-size: 17px;
  font-weight: 600;
}

.office__addr {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-muted);
}

.country--featured .office__addr {
  color: var(--c-on-accent-muted);
}

.office__courier {
  grid-row: 1 / span 2;
  grid-column: 3;
  align-self: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(20, 156, 122, 0.1);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-up);
  white-space: nowrap;
}

@media (max-width: 959px) {
  .offices__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stat {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 639px) {
  .stat {
    padding: 14px;
  }

  .stat__num {
    font-size: 26px;
  }

  .country {
    padding: 22px 20px 18px;
  }

}
