/**
 * Промо-модалка (.avpm-overlay) — стили для всех страниц, включая главную.
 */

.avpm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.72);
  overflow-y: auto;
}

.avpm-overlay.avpm-open {
  display: flex;
}

.avpm-overlay *,
.avpm-overlay *::before,
.avpm-overlay *::after {
  box-sizing: border-box;
}

.avpm-modal {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.avpm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #d10000;
  color: #fff;
}

.avpm-header-title {
  font-family: 'Roboto Condensed', 'Roboto', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.avpm-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease;
}

.avpm-close:hover {
  opacity: 0.85;
}

.avpm-body {
  padding: 22px 26px 18px;
}

.avpm-modal .row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -12px;
  margin-right: -12px;
}

.avpm-modal .row .col-sm-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding-left: 12px;
  padding-right: 12px;
}

.avpm-modal .row .col-sm-6:first-child > img:first-of-type {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-bottom: 12px;
  border-radius: 0;
}

.avpm-modal .row .col-sm-6 div,
.avpm-modal .row .col-sm-6 p {
  font-size: 14px;
  line-height: 1.45;
  color: #333;
  margin-bottom: 10px;
}

.avpm-modal .strong-form {
  margin-top: 8px;
  margin-bottom: 6px;
}

.avpm-modal .strong-form strong {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.avpm-modal ul {
  list-style-type: disc;
  list-style-position: inside;
  margin: 0 0 12px 20px;
  padding: 0;
}

.avpm-modal ul li {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.avpm-modal .row .col-sm-6:last-child {
  display: flex;
  align-items: stretch;
}

.avpm-modal .row .col-sm-6:last-child img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  margin-left: 0;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
}

.avpm-modal .wpforms-container {
  margin-top: 4px;
}

.avpm-modal .wpforms-field-container {
  margin-top: 0;
}

.avpm-modal .wpforms-field.wpforms-field-text {
  margin-top: 10px;
  padding: 0;
}

.avpm-modal .wpforms-field-medium {
  width: 100%;
  max-width: 100%;
  height: 42px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.3;
  color: #333;
  background: #fff;
  border: 1px solid #c8c8c9;
  border-radius: 5px;
}

.avpm-modal .wpforms-field-medium:focus {
  outline: none;
  border-color: #d10000;
}

.avpm-modal .wpforms-submit-container {
  margin-top: 12px;
  padding: 0;
}

.avpm-modal .wpforms-submit,
.avpm-modal button.wpforms-submit {
  width: 100%;
  min-height: 44px;
  padding: 12px 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff !important;
  background: #d10000 !important;
  border: none !important;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.avpm-modal .wpforms-submit:hover,
.avpm-modal button.wpforms-submit:hover {
  background: #e81010 !important;
}

.avpm-modal .wpforms-confirmation-container.wpforms-confirmation-scroll p {
  color: #d10000;
}

.avpm-modal .col-sm-6 > *:last-child {
  font-size: 12px;
  font-style: italic;
  color: #777;
  margin-top: 8px;
}

@media (max-width: 767px) {
  .avpm-overlay {
    padding: 12px 10px;
    align-items: flex-start;
  }

  .avpm-modal {
    max-width: 100%;
    margin-top: 8px;
  }

  .avpm-header-title {
    font-size: 18px;
  }

  .avpm-body {
    padding: 16px 14px 14px;
  }

  .avpm-modal .row .col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .avpm-modal .row .col-sm-6 img {
    width: 70%;
  }

  .avpm-modal .row .col-sm-6 div,
  .avpm-modal .row .col-sm-6 ul li {
    font-size: 13px;
  }

  .avpm-modal .row .col-sm-6:last-child {
    display: none;
  }
}
