/* ============================================================
   МОДАЛКА «Связаться» — универсальная, подключается во всех страницах
   ============================================================ */
.cm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.cm-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #0f1820;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  padding: 32px 32px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
.cm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s;
}
.cm-close:hover {
  color: #1ec8c8;
  border-color: rgba(255, 255, 255, 0.14);
}
.cm-modal h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #f4f6f7;
  margin-bottom: 8px;
  padding-right: 32px;
}
.cm-modal .cm-sub {
  color: #b8c4ca;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.cm-modal .cm-field {
  margin-bottom: 14px;
}
.cm-modal .cm-field label {
  display: block;
  color: #b8c4ca;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cm-modal .cm-field input,
.cm-modal .cm-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #16222b;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: #f4f6f7;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s;
}
.cm-modal .cm-field input:focus,
.cm-modal .cm-field textarea:focus {
  border-color: #1ec8c8;
}
.cm-modal .cm-field textarea {
  min-height: 90px;
  resize: vertical;
}
.cm-modal .cm-hp {
  position: absolute;
  left: -9999px;
}
.cm-modal .cm-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: #1ec8c8;
  color: #0a1216;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.cm-modal .cm-submit:hover {
  background: #2dd9d9;
  box-shadow: 0 10px 24px rgba(30, 200, 200, 0.30);
}
.cm-modal .cm-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.cm-modal .cm-success,
.cm-modal .cm-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.cm-modal .cm-success {
  background: rgba(30, 200, 200, 0.10);
  border: 1px solid rgba(30, 200, 200, 0.30);
  color: #1ec8c8;
}
.cm-modal .cm-error {
  background: rgba(255, 90, 90, 0.10);
  border: 1px solid rgba(255, 90, 90, 0.30);
  color: #ff8a8a;
}
.cm-policy {
  margin-top: 12px;
  color: rgba(184, 196, 202, 0.6);
  font-size: 11px;
  line-height: 1.5;
}
.cm-policy a {
  color: rgba(184, 196, 202, 0.85);
}
