/* === СТРАНИЦА «КОНТАКТЫ» === */

/* Токены макета скоупим под .contacts-page, чтобы не переопределять тему. */
.contacts-page {
  --c-bg: #f9f9f9;
  --c-dark: #34495e;
  --c-accent: #e67e22;
  --c-text: #404271;
  --c-light-text: #7f8c8d;
  --c-border: #d8dbe0;

  padding: 80px 0 0;
  background-color: var(--c-bg);
  color: var(--c-text);
}

/* Блок макета рассчитан на полную ширину окна, но находится внутри
   ограниченного по ширине .page-content__body/.main__wrapper — breakout. */
.contacts-page {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.contacts-page__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Ссылки в карточках: без подчёркивания (перебиваем .page-content__body a). */
.contacts-page .location-card a,
.contacts-page .department-card a {
  text-decoration: none;
}

/* === ЗАГОЛОВОК (внутри блока; H1 страницы выводится темой выше) === */
.contacts-page__header {
  margin-bottom: 56px;
  border-left: 4px solid var(--c-accent);
  padding-left: 24px;
}

.contacts-page__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--c-dark);
  margin: 0 0 12px;
  line-height: 1.1;
}

.contacts-page__subtitle {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--c-light-text);
  margin: 0;
}

/* === БЛОК ЛОКАЦИЙ === */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.location-card {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.location-card:hover,
.location-card--active {
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px rgba(230, 126, 34, 0.15);
  transform: translateY(-4px);
}

.location-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.location-card__icon {
  width: 40px;
  height: 40px;
  background: rgba(230, 126, 34, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
}

.location-card__icon svg {
  width: 20px;
  height: 20px;
}

.location-card__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-dark);
  margin: 0;
}

.location-card__address {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text);
  margin: 0 0 20px;
  font-style: normal;
}

/* Ключевое свойство для выравнивания линии по вертикали */
.location-card__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  min-height: 80px;
}

.location-card__phone {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.location-card__phone:hover {
  color: var(--c-accent);
}

.location-card__email {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 14px;
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.location-card__email:hover {
  color: #d35400;
}

/* Прижимаем часы и пометку к низу карточки */
.location-card__hours,
.location-card__note {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

.location-card__hours {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-card__hours-label {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-light-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.location-card__hours span:last-child {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 14px;
  color: var(--c-text);
}

.location-card__note {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 13px;
  color: var(--c-light-text);
  font-style: italic;
}

/* === БЛОК КАРТЫ === */
.contacts-page__map-section {
  width: 100%;
  margin-bottom: 64px;
}

.yandex-map-container {
  width: 100%;
  height: 500px;
  border-top: 4px solid var(--c-accent);
  border-bottom: 4px solid var(--c-accent);
  filter: grayscale(15%);
  transition: filter 0.3s ease;
}

.yandex-map-container:hover {
  filter: grayscale(0%);
}

/* Кастомные метки на карте */
.custom-placemark {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.custom-placemark__pin {
  width: 44px;
  height: 56px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
}

.custom-placemark:hover .custom-placemark__pin {
  transform: scale(1.15) translateY(-4px);
}

.custom-placemark__label {
  margin-top: 6px;
  padding: 4px 10px;
  background: #ffffff;
  border-radius: 4px;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

/* === БЛОК ПОДРАЗДЕЛЕНИЙ === */
.departments-section {
  margin-bottom: 64px;
}

.departments-section__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--c-dark);
  margin: 0 0 12px;
}

.departments-section__subtitle {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 16px;
  color: var(--c-light-text);
  margin: 0 0 40px;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.department-card {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  transition: all 0.3s ease;
}

.department-card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 8px 24px rgba(230, 126, 34, 0.1);
}

.department-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(230, 126, 34, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-accent);
  margin-bottom: 20px;
}

.department-card__icon svg {
  width: 24px;
  height: 24px;
}

.department-card__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--c-dark);
  margin: 0 0 12px;
}

.department-card__desc {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-light-text);
  margin: 0 0 20px;
}

.department-card__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.department-card__phone {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.department-card__phone:hover {
  color: var(--c-accent);
}

.department-card__email {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 14px;
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.department-card__email:hover {
  color: #d35400;
}

/* === ФОРМА === */
.contacts-form-section {
  margin-bottom: 80px;
}

.contacts-form-wrapper {
  background: #ffffff;
  padding: 48px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(52, 73, 94, 0.08);
  border: 1px solid rgba(52, 73, 94, 0.06);
  max-width: 700px;
  margin: 0 auto;
}

.contacts-form-wrapper__title {
  font-family: 'Exo 2', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--c-dark);
  margin: 0 0 8px;
  text-align: center;
}

.contacts-form-wrapper__subtitle {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 15px;
  color: var(--c-light-text);
  margin: 0 0 32px;
  text-align: center;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 15px;
  color: var(--c-dark);
  background: #f8f9fa;
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #95a5a6;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Чекбокс 152-ФЗ */
.form-group--checkbox {
  margin-bottom: 28px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-border);
  border-radius: 4px;
  background: #ffffff;
  position: relative;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-family: 'Inter 18pt', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--c-light-text);
}

.checkbox-text a {
  color: var(--c-accent);
  text-decoration: underline;
}

/* Кнопка */
.form-button {
  width: 100%;
  padding: 16px 24px;
  background: var(--c-accent);
  color: #ffffff;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-button:hover:not(:disabled) {
  background: #d35400;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(230, 126, 34, 0.3);
}

.form-button:disabled {
  background: #bdc3c7;
  color: #ffffff;
  cursor: not-allowed;
  transform: none;
  opacity: 0.7;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 992px) {
  .locations-grid {
    grid-template-columns: 1fr;
  }

  .departments-grid {
    grid-template-columns: 1fr;
  }

  .contacts-page__title {
    font-size: 36px;
  }

  .yandex-map-container {
    height: 400px;
  }
}

@media (max-width: 600px) {
  .contacts-page {
    padding: 48px 0 0;
  }

  .contacts-page__header {
    padding-left: 16px;
    margin-bottom: 40px;
  }

  .contacts-page__title {
    font-size: 28px;
  }

  .location-card,
  .department-card {
    padding: 24px;
  }

  .contacts-form-wrapper {
    padding: 24px;
  }

  .yandex-map-container {
    height: 300px;
  }
}

/* === TOAST-УВЕДОМЛЕНИЕ === */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: #2c3e50;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 10000;
  border-left: 4px solid #e67e22;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast__icon {
  width: 18px;
  height: 18px;
  color: #e67e22;
  flex-shrink: 0;
}

/* === КНОПКА В БАЛУНЕ ЯНДЕКС.КАРТ === */
.ymaps-balloon__content {
  font-family: 'Inter 18pt', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #404271 !important;
}

.ymaps-balloon__content strong {
  font-family: 'Exo 2', sans-serif !important;
  font-size: 16px !important;
  color: #34495e !important;
}

.copy-coords-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 14px;
  background: #f8f9fa;
  border: 1px solid #d8dbe0;
  border-radius: 6px;
  font-family: 'Inter 18pt', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #34495e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-coords-btn:hover {
  background: #e67e22;
  border-color: #e67e22;
  color: #ffffff;
}

.copy-coords-btn svg {
  width: 14px;
  height: 14px;
}

/* Адаптив toast для мобильных */
@media (max-width: 600px) {
  .toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    font-size: 13px;
  }
}
