@import url("./styles.css");

/* Полная ширина: hero и секции макета с .container внутри */
body.home-hero-header main.page {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
  margin: 20px 0 0 0;
  padding: 0;
}

body.home-hero-header.bx-admin-mode main.page {
  padding-top: 0;
}

/*
 * Секции редизайна — на всю ширину экрана.
 * Узкий контент только внутри .container (до ~1560px).
 * ВАЖНО: без этого квиз/клиники/отзывы получают max-width:1200px от старого правила new_tpl.
 */
body.home-hero-header main.page section.ld-home-section,
body.home-hero-header main.page > section.ld-home-section,
body.home-hero-header main.page > section#heroSection,
body.home-hero-header main.page > section.about,
body.home-hero-header main.page > section.services,
body.home-hero-header main.page > section.deals,
body.home-hero-header main.page > section.doctors,
body.home-hero-header main.page > section.quiz,
body.home-hero-header main.page > section.clinics,
body.home-hero-header main.page > section.beauty-program,
body.home-hero-header main.page > section.before-after,
body.home-hero-header main.page > section.contact,
body.home-hero-header main.page > section.reviews,
body.home-hero-header main.page > section.articles,
body.home-hero-header main.page > section.newsletter,
body.home-hero-header main.page section.quiz,
body.home-hero-header main.page section.clinics,
body.home-hero-header main.page section.beauty-program,
body.home-hero-header main.page section.before-after,
body.home-hero-header main.page section.contact,
body.home-hero-header main.page section.reviews,
body.home-hero-header main.page section.articles,
body.home-hero-header main.page section.newsletter {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Режим правки: иконка квиза — виджет CFileInput (см. bx-edit.css) */
body.ld-edit-mode .quiz-option--edit {
  cursor: default;
}

/* Режим правки: URL иконок услуг (.txt) */
.service-icon .ld-icon-url-edit {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
  max-width: 100%;
}
.service-icon .ld-icon-url-edit [id^="bx_incl_"] {
  min-width: 140px;
  max-width: 100%;
}
.quiz-option .ld-icon-img,
.service-icon .ld-icon-img {
  display: block;
  margin: 0 auto;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.ld-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md, 12px);
}
.ld-article-body h2,
.ld-article-body h3 {
  margin: 1.2em 0 0.5em;
}
.ld-cms-image-edit--inline {
  max-width: 420px;
}

.offers-grid--page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.about-visual {
  position: relative;
}

.service-hero-media--articles,
.service-hero-media--cms-edit {
  position: relative;
}

/* Редактирование фото hero — отдельная полоса над карточкой, не внутри картинки */
.ld-hero-cms-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(155, 38, 168, 0.08);
  border: 1px dashed rgba(155, 38, 168, 0.35);
  font-size: 13px;
  line-height: 1.4;
}
.ld-hero-cms-bar__label {
  font-weight: 700;
  color: var(--primary, #9b26a8);
  white-space: nowrap;
}
.ld-hero-cms-bar__field {
  flex: 1 1 200px;
  min-width: 0;
}
.ld-hero-cms-bar__field table,
.ld-hero-cms-bar__field .bx-area-dialog {
  width: 100% !important;
  max-width: 100% !important;
}
.ld-hero-cms-bar__hint {
  flex: 1 1 100%;
  color: var(--gray-600, #666);
  font-size: 12px;
}
.ld-hero-cms-bar__hint a {
  color: var(--primary, #9b26a8);
  font-weight: 600;
}
.ld-hero-cms-bar__hint code {
  font-size: 11px;
  background: rgba(0,0,0,.06);
  padding: 1px 4px;
  border-radius: 4px;
}

.service-hero-media-edit {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.42) 100%);
  padding: 0;
  pointer-events: none;
}

.service-hero-media-edit .ld-hero-image-hint {
  pointer-events: none;
}

.service-hero-media-edit .ld-cms-image-edit,
.service-hero-media-edit .ld-cms-image-edit-frame,
.service-hero-media-edit .ld-hero-bg-edit,
.service-hero-media-edit .ld-hero-bg-edit-frame,
.service-hero-media-edit .ld-cms-img-upload {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  pointer-events: auto;
}

.service-hero-media-edit .ld-hero-bg-edit-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.service-hero-media-edit .ld-hero-bg-edit--has-image .ld-hero-bg-edit-preview {
  display: none !important;
}

.service-hero-media-edit .ld-hero-bg-edit-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

.service-hero-media-edit:has(.ld-hero-bg-edit--has-image) .ld-hero-image-hint {
  opacity: 0;
}

.service-hero-media-edit .ld-cms-image-edit-frame img {
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

.service-hero-media .ld-cms-image-edit--has-image .ld-cms-image-preview {
  display: none !important;
}

.ld-hero-image-hint{
  position:absolute;
  top:12px;
  left:12px;
  right:12px;
  z-index:4;
  background:rgba(0,0,0,.65);
  color:#fff;
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  border-radius:999px;
  text-align:center;
  pointer-events:none;
  box-shadow:0 2px 8px rgba(0,0,0,.3);
}
.service-hero-media-edit:hover .ld-hero-image-hint{
  background:rgba(155,38,168,.9);
}

.service-hero-media-edit:has(.ld-cms-image-edit--has-image) .ld-hero-image-hint {
  opacity: 0;
}

body.ld-redesign-ui #modal-1,
body.ld-redesign-ui #modal-2,
body.ld-redesign-ui #modal-3 {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ld-modal-form--bitrix .form-block,
.ld-modal-form--bitrix form {
  width: 100%;
  display: grid;
  gap: 12px;
  margin: 0;
}
.ld-modal-form--bitrix .form_block_title {
  display: none !important;
}
.ld-modal-form--bitrix input.text,
.ld-modal-form--bitrix select,
.ld-modal-form--bitrix textarea.inputtextarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--gray-200, #e8e6ed);
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}
.ld-modal-form--bitrix .submit.cta-link,
.ld-modal-form--bitrix input[type="submit"].submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--primary, #9b26a8);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ld-cms-image-edit,
.ld-service-icon-edit {
  position: relative;
  display: block;
  width: 100%;
}
.ld-service-icon-edit-frame,
.ld-cms-image-edit-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.ld-service-icon-edit-frame:hover,
.ld-cms-image-edit-frame:hover {
  background: rgba(255, 255, 255, 0.9);
}
.ld-service-icon-preview,
.ld-cms-image-preview {
  pointer-events: none;
}
.ld-service-icon-edit--has-image .ld-service-icon-preview,
.ld-cms-image-edit--has-image .ld-cms-image-preview {
  display: none !important;
}
.service-icon .ld-service-icon-edit-frame,
.ld-cms-image-edit-frame {
  display: block;
  width: 100%;
  text-align: center;
}
.service-icon .ld-service-icon-edit-frame img,
.ld-cms-image-edit-frame img {
  display: block;
  margin: 0 auto 10px;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* Обёртки IncludeFile в режиме правки — не сужать блоки (только верхний уровень main) */
body.home-hero-header main.page > div[id^="bx_incl_"],
body.home-hero-header main.page > div[class*="include_area"] {
  max-width: none !important;
  width: 100% !important;
}

/* Hero: include-рамки не ломают сетку; фото только background */
.service-hero .service-hero-media .bx-area,
.service-hero .service-hero-body .bx-area {
  max-width: 100%;
}
.service-hero .service-hero-body [id^="bx_incl_"] {
  display: inline;
  max-width: 100%;
}
.service-hero .ld-page-hero-extra {
  margin-top: 12px;
}

/* Крошки в hero: небольшой отступ от sticky header */
.service-hero--articles .container {
  padding-top: 8px !important;
}
.service-hero--articles nav.breadcrumbs,
.service-hero--articles .breadcrumbs {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}
.service-hero--articles .container > [id^="bx_incl_"]:first-child {
  margin-top: 0;
}

.section-cta-row {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ba-main-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ba-active-title {
  font-size: clamp(22px, 3.4vw, 34px);
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .service-hero--articles nav.breadcrumbs,
  .service-hero--articles .breadcrumbs {
    margin-top: 0 !important;
  }
}
.ld-hero-cms-bar--off {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #991b1b;
}

/* Legacy-секции старого index.php (если попали на страницу) */
body.home-hero-header main.page > section.experts,
body.home-hero-header main.page > section.choice,
body.home-hero-header main.page > section.consult,
body.home-hero-header main.page > section.approach,
body.home-hero-header main.page > section.photo-slider {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1rem;
  box-sizing: border-box;
}

.ld-redesign-hide {
  display: none !important;
}

.trust-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 720px;
}
.trust-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-700, #444);
}
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--purple-100, #f3e8f8);
  box-shadow: inset 0 0 0 2px var(--purple-500, #9b26a8);
}

/* Город: нативный select поверх подписи */
.city-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.city-select__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: inherit;
}

/* Старые блоки Bitrix на внутренних страницах */
body.home-hero-header main.page .title,
body.home-hero-header main.page section.experts > .title {
  font-family: var(--font, "Manrope", sans-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--black, #1a1a1a);
  margin-bottom: 1.5rem;
}

body.home-hero-header main.page section.experts .cta-link,
body.home-hero-header main.page section.clinics .cta-link {
  display: inline-flex;
  margin-top: 1rem;
}

/* Подписка из subscribe.inc.php */
body.home-hero-header section.newsletter.ld-subscribe-wrap {
  max-width: none;
  padding: 3rem 0;
  background: var(--gray-50, #f8f7fa);
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .container {
  max-width: var(--container, clamp(320px, 92vw, 1560px));
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap form,
body.home-hero-header section.newsletter.ld-subscribe-wrap .subscribe-block {
  font-family: var(--font, "Manrope", sans-serif);
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed article.subscribe,
body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_block {
  background: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed article.subscribe > .in-wrap > div:first-child {
  display: none;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed .in-wrap {
  display: block;
  max-width: none;
  padding: 0;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_form input[type="email"],
body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_form input.date-birthday {
  flex: 1 1 180px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--gray-200, #e8e6ed);
  border-radius: 12px;
  font-size: 15px;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_form .cta-link {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 12px;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed .chb_label {
  font-size: 12px !important;
  line-height: 1.4;
  color: var(--gray-600, #6b6578);
  margin-top: 12px;
  display: block;
}

/* Подписка: карточка на всю ширину .container (главная и внутренние) */
body.home-hero-header section.newsletter.ld-subscribe-wrap .newsletter-card {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed .subscribe,
body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed #subscribe_block,
body.home-hero-header section.newsletter.ld-subscribe-wrap .ld-subscribe-embed .in-wrap {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Пагинация отзывов */
.ld-reviews-pager {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.ld-reviews-pager .bx-pagination,
.ld-reviews-pager .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

body.home-hero-header main.page > section.ld-redesign-section .title {
  font-family: var(--font, "Manrope", sans-serif);
}

/* Модалки new_tpl поверх редизайна */
body.home-hero-header .fade-block {
  z-index: 10050;
}
body.home-hero-header .header-callback {
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}

/* Hero: баннер с текстом на картинке — без дублирующего overlay */
.hero-slide--banner-only .hero-copy {
  display: none !important;
}
.hero-slide-banner-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Акции: картинка в карточке */
.deals .offers-card--media .offers-media {
  flex: 0 0 42%;
  min-height: 180px;
  background-size: cover;
  background-position: center;
}

/* Подвал: убрать «красные» ссылки из старого include */
.footer-contact-meta a,
.footer-brand .bx-area a,
.footer-legal .bx-area a {
  color: inherit !important;
  text-decoration: none;
}
.footer-legal .bx-area a:hover {
  color: var(--primary, #9b26a8) !important;
  text-decoration: underline;
}

.footer .footer-legal,
.footer .footer-legal .footer-legal-text,
.footer .footer-legal [id^="bx_incl_area"],
.footer .footer-legal .bx-area {
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: var(--gray-500, #6b7280) !important;
}
.footer .footer-legal .footer-legal-text p,
.footer .footer-legal-text p,
.footer .footer-legal [id^="bx_incl_area"] p,
.footer .footer-legal .bx-area p {
  font-size: 12px !important;
  margin: 10px 0 !important;
  padding: 0 !important;
  line-height: 1.6 !important;
  max-width: none !important;
  color: var(--gray-500, #6b7280) !important;
}
.footer .footer-legal .footer-legal-text a,
.footer .footer-legal [id^="bx_incl_area"] a,
.footer .footer-legal .bx-area a {
  color: var(--gray-600, #6b7280) !important;
  text-decoration: underline !important;
}
.footer .footer-legal .footer-legal-text a:hover,
.footer .footer-legal [id^="bx_incl_area"] a:hover,
.footer .footer-legal .bx-area a:hover {
  color: var(--primary, #9b26a8) !important;
}
.footer-contact-meta a:hover {
  color: var(--primary, #9b26a8) !important;
}

body.home-hero-header.bx-admin-mode .ld-edit-php-area {
  position: relative;
  z-index: 2;
  min-height: 4px;
}

/* LD_EDIT:v5 — перебить stale z-index:10060 на ui */
body.home-hero-header.ld-edit-mode.bx-admin-mode .bx-component-overlay,
body.home-hero-header.ld-edit-mode.bx-admin-mode .bx-context-toolbar,
body.home-hero-header.ld-edit-mode.bx-admin-mode .bx-editarea,
body.home-hero-header.ld-edit-mode.bx-admin-mode [id^="bx_incl_area"] {
  z-index: 100 !important;
}

/* redesign-home-fullwidth-v2 — home sections full width; inner ld-page-section uses .container */
body.home-hero-header main.page > section.ld-page-section {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
}
body.home-hero-header main.page > section:not(#heroSection):not(.about):not(.services):not(.deals):not(.doctors):not(.ld-redesign-hide):not(.ld-page-section):not(.ld-home-section) {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
}

/* footer-legal-v1 — юридический текст подвала (дубль в footer_main.inc.php на случай старого shared.css) */
.footer .footer-legal{margin-top:4px;padding:20px 0 24px;border-bottom:1px solid var(--gray-100,#e4e2e4);color:var(--gray-500,#6b7280)}
.footer .footer-legal-text,.footer .footer-legal-text p{font-size:11px;line-height:1.65;color:var(--gray-500,#6b7280)}
.footer .footer-legal-text p{margin:0 0 10px;padding:0;max-width:none}
.footer .footer-legal-text p:last-child{margin-bottom:0}
.footer .footer-legal-text a{color:var(--gray-500,#6b7280);text-decoration:underline;text-underline-offset:2px}
.footer .footer-legal-text a:hover{color:var(--gray-600,#4b5563)}

