/**
 * SexPro61 — базовая адаптивность для всех страниц (телефон, планшет, десктоп).
 * Подключается вместе с chrome.css и на теме WordPress.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

body img,
body video,
body iframe,
body embed,
body object,
body svg:not(.sx-vk__play svg) {
  max-width: 100%;
  height: auto;
}

body table {
  max-width: 100%;
}

.sx-land,
.spc-wrap,
.lk-wrap,
.sx-school,
.sx-stub,
main {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sx-land,
.sx-descr,
.spc-lead,
.lk-lead {
  overflow-wrap: anywhere;
  word-break: break-word;
}

input,
textarea,
select,
button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Лендинги курсов */
.sx-hero {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
  align-items: center;
}

.sx-pays--duo,
.sx-price-compare {
  display: grid;
  gap: 12px;
}

.sx-price-compare {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sx-pays--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 800px) {
  .sx-hero,
  .lk-hero {
    grid-template-columns: 1fr !important;
  }

  .sx-hero > img,
  .sx-hero img,
  .lk-hero img,
  .club-hero-art {
    width: 100%;
    max-width: min(400px, 100%);
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    order: -1;
    object-fit: contain;
  }

  .sx-nav .webinar-header-btn {
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .sx-pays--duo,
  .sx-price-compare {
    grid-template-columns: 1fr !important;
  }

  .sx-pay {
    grid-template-columns: 1fr !important;
  }

  .sx-pay__price {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .lk-offer-grid {
    grid-template-columns: 1fr;
  }

  .lk-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lk-actions .lk-btn,
  .lk-section-actions .lk-btn {
    width: 100%;
  }

  .spc-catalog-card:not(.spc-catalog-card--edit) {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .spc-catalog-card__actions {
    width: 100%;
  }

  .spc-catalog-card__actions .spc-btn {
    width: 100%;
    justify-content: center;
  }

  .sx-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Безопасные зоны (iPhone и др.) */
@supports (padding: max(0px)) {
  .lk-wrap,
  .spc-wrap,
  .sx-land,
  .sx-stub {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .sx-chrome {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
