.contacts__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px 10px;
  @media (min-width: 1280px) {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px 20px;
  }
  @media (min-width: 1900px) {
    grid-template-columns: repeat(4, 1fr);
    gap: 50px 20px;
  }
}

.contacts__item {
  background: white;
  padding: 20px;
  border-radius: var(--b-radius);
  position: relative;
  display: flex;
  flex-direction: column;
}

.contacts__item_wide {
  grid-column: 1 / -1;
  position: relative;
  @media (min-width: 1280px) {
    grid-column: span 2;
  }
  @media (min-width: 1900px) {
    grid-column: span 2;
  }
}

.contacts__item-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  @media (min-width: 1280px) {
    margin-top: 76px;
  }
}

.contacts__el-subtitle {
  color: var(--color-gray-3);
  max-width: 356px;
  margin-top: 8px;
}

.contacts__el-download {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-gray-3);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: all 0.3s ease;
  @media (max-width: 768px) {
    position: absolute;
    bottom: 20px;
    right: var(--page-margin);
  }
}

.contacts__el-download::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 23V28H28V23M20 12V23M16 19L20 23L24 19' stroke='%230A0F16' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-color: var(--color-icon);
  border-radius: var(--b-radius);
  transition: all 0.3s ease;
}

.contacts__el-download:hover {
  color: var(--color-accent);
}

.contacts__el-download:hover::after {
  background-color: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 23V28H28V23M20 12V23M16 19L20 23L24 19' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
}

.contacts__el {
  display: flex;
  flex-direction: column;
}

.contacts__el-caption {
  color: var(--color-gray-4);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.28571;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.contacts__el-caption span {
  display: none;
}

.contacts__el-link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: all 0.3s ease;
}

.contacts__el-link:hover {
  text-decoration-color: rgba(49, 196, 180, 0.5);
}

.contacts__el-link[href^="mailto:"] {
  color: var(--color-gray-3);
  text-decoration-color: rgba(49, 196, 180, 0.5);
}

.contacts__el-link[href^="mailto:"]:hover {
  text-decoration-color: var(--color-accent);
}

.contacts__item-org {
  margin-top: 20px;
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  @media (min-width: 1280px) {
    grid-template-columns: repeat(4, 1fr);
    align-content: space-between;
  }
}

.contacts__item-org .contacts__el {
  grid-column: 1 / -1;
  @media (min-width: 1280px) {
    grid-column: span 1;
  }
}

.contacts__item-org .contacts__el_wide {
  grid-column: 1 / -1;
  order: 2;
  @media (min-width: 1280px) {
    grid-column: span 2;
  }
}

.map-container {
  width: calc(100% + var(--page-margin) * 2);
  margin-left: calc(var(--page-margin) * -1);
  margin-right: calc(var(--page-margin) * -1);
  height: 425px;
  @media (min-width: 1280px) {
    margin: 0;
    width: 100%;
    height: 715px;
  }
}

.map {
  width: 100%;
  height: 100%;
  border-radius: var(--b-radius);
  overflow: hidden;
}

@media (max-width: 1024px) {
  .contacts__item-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
  }
  .contacts__item-title::after {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 16L6 8H18L12 16Z' fill='%230a0f16'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
  .contacts__item-title.active::after {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 8L18 16L6 16L12 8Z' fill='%230a0f16'/%3E%3C/svg%3E%0A");
  }
  .contacts__item-body,
  .contacts__item-org,
  .contacts__el-subtitle {
    display: none;
  }
  .contacts__item:has(.active) .contacts__item-body,
  .contacts__item:has(.active) .contacts__el-subtitle {
    display: flex;
  }
  .contacts__item:has(.active) .contacts__item-org {
    display: grid;
  }
  .contacts__el {
    order: 1 !important;
  }
  .contacts__el-download {
    position: relative;
    top: auto;
    right: auto;
    order: 2;
    margin-top: 10px;
  }
  .contacts__list {
    gap: 10px;
  }
}
