/* 1. Убираем все отступы и границы по умолчанию */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 2. Наследуем шрифт для форм */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* 3. Убираем маркеры списков */
ul,
ol {
  list-style: none;
}

/* 4. Обнуляем ссылки */
a {
  text-decoration: none;
  color: inherit;
}

/* 5. Снимаем оформление у заголовков */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* 6. База */
body {
  font-family: 'Roboto Condensed', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #303030;
}

.contacts-container {
  max-width: 1160px; /* desktop baseline */
  width: 100%;
  margin: 0 auto;
}

.contacts-header {
  margin-bottom: 20px;
}

.breadcrumbs {
  font-size: 14px;
  color: #888;
  margin-bottom: 50px;
  padding-top: 18px;
}

.breadcrumbs a:hover {
  color: #C2181F;
}

.contacts-header h1 {
  font-size: 36px;
  margin: 0 0 20px 0;
}

.city-switcher {
  display: flex;
  align-items: center;
  gap: 16px;
}

.city-switcher button {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #555;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .2s ease, background-color .2s ease;
}

.city-switcher button:hover {
  color: #C2181F;
  background: #f7f7f7;
}

.city-switcher button:focus-visible {
  outline: 2px solid #C2181F;
  outline-offset: 2px;
}

.city-switcher button.active {
  color: #C2181F;
  font-weight: 500;
  background: #fff0f1;
}

.contacts-content {
  display: flex;
  gap: 40px;
  min-height: 540px; /* даём блоку высоту, чтобы карта заняла 100% */
}

.branches-block {
  flex: 0 0 340px;
  border: 1px solid #eee;
  padding: 20px;
  overflow-y: auto;
}

.branch {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
  display: flex;
  gap: 8px;
  flex-direction: column;
  transition: background-color .2s ease, border-left-color .2s ease;
  border-left: 3px solid transparent;
}

.branch:hover {
  background-color: #fbfbfb;
  cursor: pointer;
  border-left-color: #C2181F;
}

.branch:last-child {
  border-bottom: none;
}

.branch h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.contacts-map {
  flex: 1 1 auto;
  max-width: calc(100% - 340px - 40px);
}

.map-container {
  width: 100%;
  height: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden; /* чтобы leaflet-слои не вылезали за скругление */
}

/* ——— Leaflet мелкие правки ——— */
.leaflet-container {
  font-family: inherit;
}
.leaflet-control-attribution,
.leaflet-control-scale {
  font-size: 12px;
}
.leaflet-touch .leaflet-bar a {
  border-radius: 8px;
}
.leaflet-bar a {
  width: 30px;
  height: 30px;
  line-height: 30px;
}

.contacts-description {
  margin-top: 60px;
}

.city-description {
  display: none;
}

.city-description.active {
  display: block;
}

.description-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  max-height: 300px; /* ограничение для десктопа */
}

.description-text {
  flex: 1;
}

.description-image {
  flex: 2;
}

.description-text h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.description-text p {
  font-size: 16px;
}

.description-image img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  object-fit: cover;
  max-height: 270px; /* ограничение для десктопа */
}

/* ————————— Адаптив ————————— */

@media (max-width: 1279px) {
  .contacts-container {
    max-width: 944px; /* baseline */
  }
}

@media (max-width: 1023px) {
  .contacts-container {
    max-width: none;
    width: 94%; /* baseline: 96% ширины */
  }

  .contacts-content {
    gap: 24px;
    min-height: 480px;
  }

  .branches-block {
    flex-basis: 32%;
  }

  .branch p {
    font-size: 14px;
  }

  .contacts-map {
    max-width: calc(100% - 32% - 24px);
  }
}

@media (max-width: 768px) {
  .contacts-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  .contacts-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 20px;
  }

  .branches-block {
    width: 100%;
    flex-basis: auto;
    max-width: 100%;
    border: 1px solid #eee;
  }

  .contacts-map {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .map-container {
    width: 100%;
    height: 320px; /* фиксированная разумная высота карты на мобилке */
  }

  /* «шахматка» -> стакан */
  .description-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: none;
  }

  .description-image,
  .description-text {
    flex: none;
    width: 100%;
  }

  .description-image img {
    max-height: none;
    height: auto;
  }

  .description-text h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .description-text p {
    font-size: 15px;
  }
}

@media (max-width: 479px) {
  .contacts-container {
    width: 94%; /* baseline: 96% */
    padding: 16px;
  }
  .breadcrumbs {
    margin-bottom: 28px;
  }
  .contacts-header h1 {
    font-size: 24px;
  }
}


/* гарантируем высоту блока карты */
.contacts-map { height: 540px; }
.map-container { height: 100%; }
@media (max-width: 1023px) { .contacts-map { height: 420px; } }
@media (max-width: 767px)  { .contacts-map { height: 320px; } }


@media (max-width: 1279px) {
    .container {
        max-width: 944px;
        margin: 0 auto;
    }
}

@media (max-width: 1023px) {
    .container {
        max-width: 96%;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .container {
        max-width: 96%;
        margin: 0 auto;
    }
}


.whatsapp-link:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 1px rgba(37, 211, 102, 0.4));
  transition: all 0.2s ease;
}