/* =========================================================
   СТРАНИЦА КОНТАКТОВ
   ========================================================= */

.coi-contacts {
  --coi-contact-blue: #173768;
  --coi-contact-green: #2f8a69;
  --coi-contact-orange: #ff7418;
  --coi-contact-border: #dfe8ee;
  --coi-contact-muted: #687d97;

  padding: 8px 0 50px;
  color: var(--coi-contact-blue);
}

.coi-contacts *,
.coi-contacts *::before,
.coi-contacts *::after {
  box-sizing: border-box;
}


/* =========================================================
   HERO
   ========================================================= */

.coi-contacts__hero {
  position: relative;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 30px;

  min-height: 164px;
  margin-bottom: 22px;
  padding: 28px 34px;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 75% 30%,
      rgba(247, 232, 213, 0.7),
      transparent 34%
    ),
    linear-gradient(110deg, #effaf5 0%, #f8fbfa 52%, #fff7f0 100%);

  border: 1px solid #e4ece8;
  border-radius: 18px;
}

.coi-contacts__hero-content {
  position: relative;
  z-index: 2;
}

.coi-contacts__hero-title {
  margin: 0 0 12px;

  color: var(--coi-contact-blue);

  font-size: clamp(23px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.2;
}

.coi-contacts__hero-text {
  max-width: 600px;
  margin: 0;

  color: #3f5876;

  font-size: 15px;
  line-height: 1.6;
}

.coi-contacts__hero-illustration {
  position: relative;

  min-height: 120px;
}

.coi-contacts__hero-envelope {
  position: absolute;
  top: 10px;
  right: 46px;

  display: grid;
  place-items: center;

  width: 145px;
  height: 100px;

  color: #fff;
  background: linear-gradient(145deg, #68ba94, #278663);

  border-radius: 14px 14px 30px 30px;

  box-shadow: 0 12px 25px rgba(47, 138, 105, 0.18);

  transform: rotate(4deg);
}

.coi-contacts__hero-envelope::before {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      32deg,
      transparent 49%,
      rgba(255, 255, 255, 0.18) 50%,
      transparent 52%
    );

  border-radius: inherit;

  content: "";
}

.coi-contacts__hero-envelope span {
  position: relative;
  z-index: 1;

  display: grid;
  place-items: center;

  width: 65px;
  height: 65px;

  color: var(--coi-contact-green);
  background: #fff;

  border-radius: 7px;

  font-size: 40px;
  font-weight: 800;
}

.coi-contacts__hero-phone {
  position: absolute;
  right: 4px;
  bottom: 0;

  color: var(--coi-contact-orange);

  font-size: 76px;
  line-height: 1;

  transform: rotate(-22deg);
}


/* =========================================================
   КАРТОЧКИ КОНТАКТОВ
   ========================================================= */

.coi-contacts__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;

  margin-bottom: 26px;
}

.coi-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;

  min-width: 0;
  min-height: 168px;
  padding: 20px 18px;

  background: #fff;

  border: 1px solid var(--coi-contact-border);
  border-radius: 15px;

  box-shadow: 0 6px 18px rgba(30, 57, 89, 0.07);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.coi-contact-card:hover {
  border-color: #cbdcd4;
  box-shadow: 0 10px 24px rgba(30, 57, 89, 0.11);
  transform: translateY(-2px);
}

.coi-contact-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;

  width: 50px;
  height: 50px;

  color: var(--coi-contact-green);
  background: #eaf6f0;

  border-radius: 13px;
}

.coi-contact-card__icon svg {
  width: 27px;
  height: 27px;

  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.coi-contact-card--orange .coi-contact-card__icon {
  color: #f37922;
  background: #fff1e6;
}

.coi-contact-card--blue .coi-contact-card__icon {
  color: #256ec0;
  background: #eaf3ff;
}

.coi-contact-card--telegram .coi-contact-card__icon {
  color: #279bd7;
  background: #e8f6fd;
}

.coi-contact-card--telegram .coi-contact-card__icon svg {
  fill: currentColor;
  stroke: none;
}

.coi-contact-card__content {
  min-width: 0;
}

.coi-contact-card__title {
  margin: 2px 0 8px;

  color: var(--coi-contact-blue);

  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.coi-contact-card__value {
  display: block;
  margin: 0;

  color: #0e7053;

  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;

  overflow-wrap: anywhere;
}

.coi-contact-card a.coi-contact-card__value:hover {
  color: #ff7418;
}

.coi-contact-card__description {
  margin: 11px 0 0;

  color: var(--coi-contact-muted);

  font-size: 12px;
  line-height: 1.55;
}

.coi-contact-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  margin-top: 9px;

  color: #256ec0;

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}


/* =========================================================
   ФОРМА И ОФИС
   ========================================================= */

.coi-contacts__main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  align-items: stretch;
  gap: 22px;

  margin-bottom: 26px;
}

.coi-contacts-form-card,
.coi-contacts-office {
  padding: 25px;

  background: #fff;

  border: 1px solid var(--coi-contact-border);
  border-radius: 17px;

  box-shadow: 0 7px 22px rgba(30, 57, 89, 0.07);
}

.coi-contacts-form-card {
  background:
    radial-gradient(
      circle at 0 0,
      rgba(225, 243, 235, 0.7),
      transparent 40%
    ),
    #fff;
}

.coi-contacts-section-heading {
  margin-bottom: 20px;
}

.coi-contacts-section-heading__title,
.coi-contacts-office__title {
  margin: 0;

  color: var(--coi-contact-blue);

  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.coi-contacts-section-heading__text {
  margin: 7px 0 0;

  color: var(--coi-contact-muted);

  font-size: 13px;
  line-height: 1.5;
}

.coi-contacts-form-placeholder {
  display: grid;
  place-items: center;

  min-height: 320px;
  padding: 30px;

  color: #718398;
  background: rgba(255, 255, 255, 0.65);

  border: 1px dashed #bdcec5;
  border-radius: 12px;

  text-align: center;
}


/* =========================================================
   WEBFORM
   ========================================================= */

.coi-contacts-form-card .webform-submission-form,
.coi-contact-webform .webform-submission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 15px;
}

.coi-contacts-form-card .form-item,
.coi-contact-webform .form-item {
  min-width: 0;
  margin: 0;
}

.coi-contacts-form-card .form-item-subject,
.coi-contacts-form-card .form-item-message,
.coi-contacts-form-card .form-item-agreement,
.coi-contact-webform .form-item-subject,
.coi-contact-webform .form-item-message,
.coi-contact-webform .form-item-agreement,
.coi-contacts-form-card .form-actions,
.coi-contact-webform .form-actions {
  grid-column: 1 / -1;
}

.coi-contacts-form-card label,
.coi-contact-webform label {
  display: block;
  margin: 0 0 7px;

  color: #29496e;

  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.coi-contacts-form-card input[type="text"],
.coi-contacts-form-card input[type="email"],
.coi-contacts-form-card select,
.coi-contacts-form-card textarea,
.coi-contact-webform input[type="text"],
.coi-contact-webform input[type="email"],
.coi-contact-webform select,
.coi-contact-webform textarea {
  display: block;

  width: 100%;
  max-width: 100%;

  color: #354c67;
  background: #fff;

  border: 1px solid #d6e0e8;
  border-radius: 8px;

  font-family: inherit;
  font-size: 14px;

  box-sizing: border-box;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.coi-contacts-form-card input[type="text"],
.coi-contacts-form-card input[type="email"],
.coi-contacts-form-card select,
.coi-contact-webform input[type="text"],
.coi-contact-webform input[type="email"],
.coi-contact-webform select {
  height: 44px;
  padding: 0 13px;
}

.coi-contacts-form-card textarea,
.coi-contact-webform textarea {
  min-height: 125px;
  padding: 12px 13px;

  resize: vertical;
}

.coi-contacts-form-card input:focus,
.coi-contacts-form-card select:focus,
.coi-contacts-form-card textarea:focus,
.coi-contact-webform input:focus,
.coi-contact-webform select:focus,
.coi-contact-webform textarea:focus {
  border-color: var(--coi-contact-green);
  outline: none;

  box-shadow: 0 0 0 3px rgba(47, 138, 105, 0.14);
}

.coi-contacts-form-card .form-type-checkbox,
.coi-contact-webform .form-type-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.coi-contacts-form-card .form-type-checkbox input,
.coi-contact-webform .form-type-checkbox input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.coi-contacts-form-card .form-type-checkbox label,
.coi-contact-webform .form-type-checkbox label {
  margin: 0;

  color: #61748c;

  font-weight: 400;
}

.coi-contacts-form-card .form-submit,
.coi-contact-webform .form-submit {
  min-height: 45px;
  padding: 10px 23px;

  color: #fff;
  background: var(--coi-contact-green);

  border: 2px solid var(--coi-contact-green);
  border-radius: 8px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.coi-contacts-form-card .form-submit:hover,
.coi-contact-webform .form-submit:hover {
  background: #267458;
  border-color: #267458;

  box-shadow: 0 5px 14px rgba(47, 138, 105, 0.22);
  transform: translateY(-1px);
}


/* =========================================================
   ОФИС
   ========================================================= */

.coi-contacts-office__image {
  margin-top: 18px;
  overflow: hidden;

  border-radius: 12px;
}

.coi-contacts-office__image img {
  display: block;

  width: 100%;
  height: 155px;

  object-fit: cover;
}

.coi-contacts-office__info {
  display: grid;
  gap: 15px;

  padding: 19px 5px;
}

.coi-office-info {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;

  color: #314d70;

  font-size: 12px;
  line-height: 1.5;
}

.coi-office-info__icon {
  display: grid;
  place-items: center;

  width: 22px;
  height: 22px;

  color: #126bbd;

  font-size: 11px;
  font-weight: 800;
}

.coi-contacts-office__schedule {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;

  padding: 18px;

  background: #edf5ff;

  border-radius: 12px;
}

.coi-contacts-office__schedule-icon {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  color: #2784d5;
  background: #dceeff;

  border-radius: 50%;
}

.coi-contacts-office__schedule-icon svg {
  width: 25px;
  height: 25px;

  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.coi-contacts-office__schedule h3 {
  margin: 3px 0 12px;

  color: var(--coi-contact-blue);

  font-size: 15px;
  font-weight: 800;
}

.coi-contacts-office__schedule dl {
  display: grid;
  gap: 7px;

  margin: 0;
}

.coi-contacts-office__schedule dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.coi-contacts-office__schedule dt,
.coi-contacts-office__schedule dd {
  margin: 0;

  color: #536d8c;

  font-size: 11px;
  line-height: 1.4;
}

.coi-contacts-office__schedule dd {
  color: #314d70;
  text-align: right;
}


/* =========================================================
   КАРТА
   ========================================================= */

.coi-contacts-map {
  position: relative;

  min-height: 280px;
  margin-bottom: 24px;
  overflow: hidden;

  background: #eff5ee;

  border: 1px solid var(--coi-contact-border);
  border-radius: 17px;

  box-shadow: 0 7px 22px rgba(30, 57, 89, 0.07);
}

.coi-contacts-map__frame,
.coi-contacts-map__frame iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;

  border: 0;
}

.coi-contacts-map__panel {
  position: absolute;
  top: 50%;
  right: 28px;

  width: min(310px, calc(100% - 40px));
  padding: 22px;

  background: rgba(255, 255, 255, 0.96);

  border: 1px solid #dae4eb;
  border-radius: 13px;

  box-shadow: 0 9px 25px rgba(30, 57, 89, 0.14);

  transform: translateY(-50%);
}

.coi-contacts-map__panel h2 {
  margin: 0 0 10px;

  color: var(--coi-contact-blue);

  font-size: 17px;
  font-weight: 800;
}

.coi-contacts-map__panel p {
  margin: 0 0 16px;

  color: #45617f;

  font-size: 13px;
  line-height: 1.55;
}

.coi-contacts-map__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 40px;
  padding: 8px 14px;

  color: var(--coi-contact-blue);
  background: #fff;

  border: 1px solid #bfd0de;
  border-radius: 7px;

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}


/* =========================================================
   СПРАВКА
   ========================================================= */

.coi-contacts-help {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;

  margin-bottom: 18px;
  padding: 19px 22px;

  background: linear-gradient(100deg, #fff9e9, #fffdf7);

  border: 1px solid #f0e5c5;
  border-radius: 14px;
}

.coi-contacts-help__icon {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  color: #e39917;
  background: #fff0c5;

  border-radius: 50%;

  font-size: 25px;
  font-weight: 800;
}

.coi-contacts-help__content h2 {
  margin: 0 0 5px;

  color: var(--coi-contact-blue);

  font-size: 17px;
  font-weight: 800;
}

.coi-contacts-help__content p {
  margin: 0;

  color: #61748c;

  font-size: 12px;
  line-height: 1.5;
}

.coi-contacts-help__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 40px;
  padding: 8px 15px;

  color: var(--coi-contact-blue);
  background: #fff;

  border: 1px solid #ccd9e3;
  border-radius: 8px;

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}


/* =========================================================
   CTA
   ========================================================= */

.coi-contacts-cta {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;

  padding: 20px 25px;

  color: #fff;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, 0.16),
      transparent 25%
    ),
    linear-gradient(110deg, #238663, #2a966d);

  border-radius: 15px;

  box-shadow: 0 8px 22px rgba(35, 134, 99, 0.2);
}

.coi-contacts-cta__icon {
  display: grid;
  place-items: center;

  width: 54px;
  height: 54px;

  color: #fff;
  background: rgba(255, 255, 255, 0.15);

  border-radius: 50%;

  font-size: 25px;
}

.coi-contacts-cta__content h2 {
  margin: 0 0 5px;

  color: #fff;

  font-size: 19px;
  font-weight: 800;
}

.coi-contacts-cta__content p {
  margin: 0;

  color: rgba(255, 255, 255, 0.85);

  font-size: 13px;
}

.coi-contacts-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 43px;
  padding: 9px 20px;

  color: #fff;
  background: var(--coi-contact-orange);

  border-radius: 8px;

  font-size: 13px;
  font-weight: 800;
  text-decoration: none;

  box-shadow: 0 5px 13px rgba(184, 76, 0, 0.22);
}


/* =========================================================
   ОБЩИЕ СОСТОЯНИЯ
   ========================================================= */

.coi-contacts a {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.coi-contacts a:focus-visible,
.coi-contacts button:focus-visible,
.coi-contacts input:focus-visible,
.coi-contacts select:focus-visible,
.coi-contacts textarea:focus-visible {
  outline: 3px solid rgba(47, 138, 105, 0.22);
  outline-offset: 3px;
}


/* =========================================================
   АДАПТИВ
   ========================================================= */

@media (max-width: 1080px) {
  .coi-contacts__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coi-contacts__main {
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.8fr);
  }
}

@media (max-width: 820px) {
  .coi-contacts__hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .coi-contacts__hero-illustration {
    display: none;
  }

  .coi-contacts__main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .coi-contacts {
    padding-bottom: 32px;
  }

  .coi-contacts__hero {
    min-height: 0;
    padding: 23px 20px;

    border-radius: 14px;
  }

  .coi-contacts__hero-title {
    font-size: 23px;
  }

  .coi-contacts__hero-text {
    font-size: 14px;
  }

  .coi-contacts__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .coi-contact-card {
    min-height: 0;
  }

  .coi-contacts-form-card,
  .coi-contacts-office {
    padding: 20px 16px;
  }

  .coi-contacts-form-card .webform-submission-form,
  .coi-contact-webform .webform-submission-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .coi-contacts-form-card .form-item-subject,
  .coi-contacts-form-card .form-item-message,
  .coi-contacts-form-card .form-item-agreement,
  .coi-contact-webform .form-item-subject,
  .coi-contact-webform .form-item-message,
  .coi-contact-webform .form-item-agreement,
  .coi-contacts-form-card .form-actions,
  .coi-contact-webform .form-actions {
    grid-column: auto;
  }

  .coi-contacts-map {
    display: flex;
    flex-direction: column;

    min-height: 0;
  }

  .coi-contacts-map__frame,
  .coi-contacts-map__frame iframe {
    min-height: 260px;
  }

  .coi-contacts-map__panel {
    position: static;

    width: auto;
    margin: 14px;

    transform: none;
  }

  .coi-contacts-help,
  .coi-contacts-cta {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .coi-contacts-help__button,
  .coi-contacts-cta__button {
    grid-column: 1 / -1;
    justify-content: center;

    width: 100%;
  }
}

@media (max-width: 420px) {
  .coi-contact-card {
    padding: 17px 15px;
  }

  .coi-contact-card__icon {
    width: 44px;
    height: 44px;
  }

  .coi-contacts-help,
  .coi-contacts-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .coi-contacts-help__icon,
  .coi-contacts-cta__icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coi-contacts *,
  .coi-contacts *::before,
  .coi-contacts *::after {
    scroll-behavior: auto;
    transition: none !important;
  }
}