.contacts {
  margin-block: 3rem 6rem;
}

.contacts__title {
  margin: 0 0 2.5rem;
  font-size: 4rem;
  font-weight: 500;
  line-height: 0.95;
  color: var(--text);
  text-transform: lowercase;
}

.contacts__departments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contacts__department {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
  padding: 2rem;
  background: var(--gray-100);
}

.contacts__department-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
}

.contacts__department-desc {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--gray-wheat);
}

.contacts__rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-block: 0.25rem 0.5rem;
  background: var(--text);
}

.contacts__department-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  margin-top: auto;
  padding: 0;
  list-style: none;
}

.contacts__department-item {
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--text);
}

.contacts__department-item a {
  color: inherit;
  transition: opacity 300ms;
}

.contacts__people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 3rem;
}

.contacts__map {
  margin-top: 4rem;
}

.contacts__map-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 16 / 9;
}

.contacts__map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contacts__person {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.contacts__person-role {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--gray-wheat);
  text-transform: lowercase;
}

.contacts__person .contacts__rule {
  margin-block: 0.15rem 0.35rem;
}

.contacts__person-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}

.contacts__person-phone-label {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--gray-wheat);
}

.contacts__person-phone {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--text);
}

.contacts__person-phone a,
.contacts__person-email a {
  color: inherit;
  transition: opacity 300ms;
}

.contacts__person-email,
.contacts__person-note {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--gray-wheat);
}

@media (hover: hover) {
  .contacts__department-item a:hover,
  .contacts__person-phone a:hover,
  .contacts__person-email a:hover {
    opacity: 0.65;
  }
}

@media (max-width: 1200px) {
  .contacts__people {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .contacts__title {
    font-size: 3rem;
  }

  .contacts__departments {
    grid-template-columns: 1fr;
  }

  .contacts__people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .contacts {
    margin-block: 2rem 4rem;
  }

  .contacts__title {
    font-size: 2.25rem;
    margin-bottom: 1.75rem;
  }

  .contacts__map {
    margin-top: 2.5rem;
  }

  .contacts__map-frame {
    aspect-ratio: 4 / 3;
  }

  .contacts__department {
    padding: 1.5rem;
  }

  .contacts__department-title {
    font-size: 1.5rem;
  }

  .contacts__people {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }

  .contacts__person-name {
    font-size: 1.35rem;
  }
}
