/* ---------- CONTACTS ---------- */
.contacts-page {
  background: #191919;
  color: #fff;
}

.contacts-wrap {
  max-width: 1198px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.contacts-info {
  width: 720px;
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 0px;
  background: #191919;
  box-shadow: 0px 30px 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.contacts-info__time {
  color: #fff;
  margin: 0;
}

.contacts-info__phone,
.contacts-info__email {
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}

.contacts-info__phone:hover,
.contacts-info__phone:focus-visible,
.contacts-info__email:hover,
.contacts-info__email:focus-visible {
  color: var(--theme-text-soft);
  outline: none;
}

.contacts-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.contacts-socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--theme-text-main);
  transition: opacity .2s ease;
}

.contacts-socials__link:hover,
.contacts-socials__link:focus-visible {
  outline: none;
}

.contacts-socials__icon {
  width: 100%;
  height: 100%;
  opacity: 0.4;
  transition: opacity .2s ease;
  display: block;
}

.contacts-socials__link:hover .contacts-socials__icon,
.contacts-socials__link:focus-visible .contacts-socials__icon {
  opacity: 1;
}

.contacts-info__address {
  color: var(--theme-text-muted);
}

/* ---------- COOPERATION ---------- */
.cooperation {
  max-width: 1198px;
  margin: 80px auto 0;
  padding: 0 20px 100px;
  text-align: center;
}

@media (min-width: 768px) {
  .cooperation {
    padding-bottom: 140px;
  }
}

@media (min-width: 1025px) {
  .cooperation {
    padding-bottom: 180px;
  }
}

@media (min-width: 1400px) {
  .cooperation {
    padding-bottom: 220px;
  }
}

.cooperation__header {
  margin-bottom: 32px;
}

.cooperation__title {
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.cooperation__subtitle {
  color: rgba(255,255,255,0.4);
   font-family: 'Roboto', sans-serif;
  margin: 12px 0 0;
}

.cooperation__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 34px;
  margin-top: 40px;
}

.cooperation__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s;
}

.cooperation__item:hover {
  transform: translateY(-4px);
}

.cooperation__icon-wrap {
  width: 128px;
  height: 128px;
  background: #E13122;
  border-radius: 4px;
  box-shadow: 0px 30px 30px rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cooperation__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.cooperation__label {
  text-align: center;
  color: #fff;
}

.cooperation__button-wrap {
  margin-top: 40px;
}

.cooperation__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid #E13122;
  color: #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- MODAL ---------- */
.contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.contact-modal.is-open {
  display: flex;
}

.contact-modal__outer {
  width: auto;
  max-width: 1205px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0E0C0C;
  border: 1px solid #191919;
  padding: 20px;
  position: relative;
  transition: max-width .3s ease;
}

.contact-modal__outer.is-success {
  max-width: 347px;
}

.contact-modal__inner {
  position: relative;
  background: #191919;
  padding: 40px;
}

.contact-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-interactive);
  z-index: 2;
}

.contact-modal__close:hover,
.contact-modal__close:focus-visible {
  background-color: var(--theme-border-subtle);
  outline: none;
}

.contact-modal__form {
  display: block;
}

.contact-modal__title {
  color: #fff;
  margin: 0 0 8px;
}

.contact-modal__topic {
  color: #E13122;
  margin: 0 0 40px;
}

.contact-form__row {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.contact-form__group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form__group--full {
  width: 100%;
  flex: none;
}

.contact-form__label {
  color: rgba(255,255,255,0.4);
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0 0 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  border-radius: 0;
  color: #fff;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-bottom-color: rgba(255,255,255,0.8);
}

.contact-form__group.is-error .contact-form__input,
.contact-form__group.is-error .contact-form__textarea {
  border-bottom-color: #E13122;
}

.contact-form__error {
  display: none;
  color: #E13122;
}

.contact-form__group.is-error .contact-form__error {
  display: block;
}

.contact-form__textarea {
  min-height: 80px;
  resize: vertical;
}

.contact-form__status {
  margin-top: 16px;
  text-align: center;
  min-height: 20px;
}

.contact-form__status--ok  { color: #4caf50; }
.contact-form__status--err { color: #E13122; }

.contact-modal__success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  text-align: center;
  padding: 40px;
}

.contact-modal__success.is-active {
  display: flex;
}

.contact-modal__success-title {
  color: #fff;
  margin: 0;
}

/* ---------- TABLET ---------- */
@media (max-width: 1024px) {
  .cooperation__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* ---------- MOBILE ---------- */
.cooperation__button {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .contacts-info {
    width: 100%;
    max-width: 335px;
    padding: 32px 0;
    box-shadow: none;
    gap: 16px;
  }
  .contacts-socials {
    gap: 16px;
    margin-top: 0;
  }
  .contacts-socials__link {
    width: 48px;
    height: 48px;
  }
  .contacts-info__address {
    margin-top: 0;
  }

  .cooperation__grid {
    grid-template-columns: 1fr;
    gap: 34px;
    max-width: 335px;
    margin-left: auto;
    margin-right: auto;
  }
  .cooperation__item {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .cooperation__icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 2px;
    box-shadow: 0px 15px 15px rgba(0,0,0,0.35);
  }
  .cooperation__icon {
    width: 32px;
    height: 32px;
  }
  .cooperation__label {
    text-align: left;
  }

  .contact-modal__outer {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }
  .contact-modal__outer.is-success {
    max-width: 100%;
  }
  .contact-modal__inner {
    padding: 32px;
  }

  .contact-form__row {
    flex-direction: column;
    gap: 32px;
    margin-bottom: 32px;
  }
  .contact-form__group {
    gap: 8px;
  }

  .contact-form__input,
  .contact-form__textarea {
    padding: 0 0 6px;
  }

  .contact-modal__success {
    padding: 32px;
    gap: 32px;
  }
}
