/* Страница «Авторские программы омоложения» — стили в духе GMTClinic */

/* На страницах элемента (карточка программы) — один видимый h1: скрыть дубликат в hero */
.ap-element-page .ap-section-hero__title {
  display: none !important;
}
/* Подстраховка: если есть .bx-catalog-element — показывать только его h1 */
.page .page-inner-wrap:has(.bx-catalog-element) h1 {
  display: none !important;
}
.page .page-inner-wrap:has(.bx-catalog-element) .bx-catalog-element h1 {
  display: block !important;
}

/* Hero-блок */
.ap-hero {
  background: #efefef;
  border-bottom: 0;
  padding: 36px 0 14px;
  margin-bottom: 0;
}

.ap-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.ap-hero__title {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: #1f2430;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ap-hero__subtitle {
  margin: 0 auto 14px;
  max-width: 1020px;
  color: #2f3440;
  font-size: 19px;
  line-height: 1.35;
  font-style: normal;
  font-weight: 400;
}

.ap-hero__subtitle-line {
  display: block;
  font-style: italic;
}

.ap-hero__subtitle-line--muted {
  margin-top: 4px;
  color: #3f4554;
  font-weight: 500;
}

.ap-hero__desc {
  margin: 0 auto 40px;
  max-width: 1020px;
  font-size: 18px;
  line-height: 1.54;
  color: #2f3440;
  text-align: left;
}

@media (min-width: 768px) {
  .ap-hero {
    padding: 36px 0 14px;
  }
  .ap-hero__title {
    font-size: 38px;
  }
}

/* Блок карточек программ под hero */
.ap-program-links {
  padding: 10px 0 18px;
}

.ap-program-links__inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.ap-program-card {
  display: block;
  text-decoration: none;
}

.ap-program-card__title {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #1e9da9;
}

.ap-program-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dfe7ea;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ap-program-card:hover img {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* Подзаголовок / декоративная линия */
.ap-hero__sub {
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1e9da9;
  margin-top: 8px;
}

/* Intro-блок */
.ap-intro {
  padding: 0 0 14px;
  background: #fff;
}

.ap-intro__inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.ap-intro__lead {
  font-size: 18px;
  line-height: 1.56;
  color: #2f3440;
  margin: 0;
  padding: 0;
}

.ap-hero__desc {
  margin: 1em 0 0;
}

.ap-intro__lead strong {
  color: #1f2430;
  font-weight: 700;
}

@media (min-width: 768px) {
  .ap-hero__subtitle {
    font-size: 20px;
  }
  .ap-hero__desc,
  .ap-intro__lead {
    font-size: 19px;
  }
}

.ap-text-block,
.ap-benefits,
.ap-faq,
.ap-cta {
  padding: 12px 0;
}

.ap-text-block__inner,
.ap-benefits__inner,
.ap-cta__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.ap-section-title {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #444956;
  margin: 0 0 8px;
}

.ap-text-block p,
.ap-benefits p,
.ap-cta p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.65;
  color: #4a4f5b;
}

.ap-text-block--protocol {
  background: #fff;
  padding: 16px 0 18px;
}

.ap-text-block--protocol .ap-section-title {
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: #1f2430;
}

.ap-text-block--protocol p {
  max-width: 1120px;
  color: #2f3440;
  font-size: 17px;
  line-height: 1.55;
}

.ap-text-block--protocol p strong {
  font-weight: 700;
}

.ap-doc-link {
  color: #0563c1;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.ap-doc-link:hover {
  color: #0a4d93;
}

.ap-steps {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.ap-steps__item {
  border: 1px solid #e4ebeb;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.ap-steps__item h3,
.ap-benefits__item h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #2f3440;
}

.ap-text-block--steps .ap-section-title {
  text-transform: uppercase;
  font-weight: 700;
}

.ap-steps-flow {
  margin: 8px 0;
}

.ap-step {
  margin-bottom: 10px;
}

.ap-step__title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.35;
  color: #1f2430;
  font-weight: 700;
}

.ap-step__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  gap: 14px;
  align-items: start;
}

.ap-step__text p {
  margin: 0;
}

.ap-step__media {
  margin: 0;
}

.ap-step__media img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d9dde0;
}

.ap-benefits__lead {
  margin-bottom: 8px;
}

.ap-benefits__inner > p:not(.ap-benefits__lead) {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.65;
  color: #4a4f5b;
}

.ap-benefits__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.ap-benefits__photos img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e4ebeb;
}

.ap-benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.ap-benefits__item {
  border: 1px solid #e4ebeb;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.ap-benefits--editorial .ap-section-title {
  text-transform: uppercase;
  font-weight: 700;
  color: #1f2430;
  margin-bottom: 10px;
  text-align: left;
  letter-spacing: -0.01em;
}

.ap-benefits--editorial .ap-benefits__lead {
  margin-bottom: 12px;
  max-width: 980px;
  font-size: 17px;
  line-height: 1.55;
  color: #2f3440;
  text-align: left;
}

.ap-benefits-list {
  display: grid;
  gap: 28px;
}

.ap-benefit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8ecef;
}

.ap-benefit-row__content h3 {
  display: flex;
  align-items: baseline;
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.3;
  color: #1f2430;
  font-weight: 700;
  text-align: left;
}

.ap-benefit-row__num {
  display: inline-block;
  min-width: 32px;
  margin-right: 12px;
  text-align: right;
}

.ap-benefit-row__content p {
  margin: 0;
  font-size: 17px;
  line-height: 1.62;
  color: #2f3440;
  text-align: left;
  max-width: 700px;
}

.ap-benefit-row__media {
  margin: 0;
  width: 100%;
  justify-self: end;
}

.ap-benefit-row__media img {
  width: 100%;
  height: 240px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #e1e5e8;
}

.ap-benefit-row__media--portrait img {
  height: 300px;
  max-width: 300px;
  margin-left: auto;
  object-position: center top;
}

.ap-benefit-row--full {
  grid-template-columns: 1fr;
  border-bottom: 0;
  padding-bottom: 0;
}

.ap-signs {
  margin: 0 0 10px;
  padding: 0 0 0 20px;
  color: #4a4f5b;
  line-height: 1.6;
}

.ap-signs li {
  margin-bottom: 6px;
}

.ap-cta {
  padding-bottom: 8px;
}

.ap-cta__inner {
  background: linear-gradient(135deg, #f5fbfb 0%, #ecf7f8 100%);
  border: 1px solid #daecee;
  border-radius: 14px;
  padding: 14px;
}

.ap-cta__inner h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
  color: #2f3440;
}

/* Контейнер каталога — компактный отступ после intro (переход по картинкам) */
.ap-catalog {
  padding-top: 12px;
  padding-bottom: 24px;
}

.ap-catalog .row {
  margin-left: -15px;
  margin-right: -15px;
}

/* Ссылки разделов и программ — в стиле GMTClinic (внешний CSS, чтобы работало при кэше) */
.ap-catalog .sections-list__item-title a,
.ap-catalog .gmt-programs__name {
  color: #1e9da9;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.ap-catalog .sections-list__item-title a:hover,
.ap-catalog .gmt-programs__name:hover {
  color: #17808a;
  border-bottom-color: #1e9da9;
  opacity: 0.9;
}

/* Хлебные крошки — выравнивание внутри страницы */
.ap-page .breadcrumbs-box {
  padding-left: 0;
  padding-right: 0;
}

.ap-page .page {
  padding-top: 0;
}

/* ---------- Подстраницы (разделы: Программы для лица, для волос и т.д.) ---------- */

.ap-section {
  margin-bottom: 24px;
}

/* Hero подстраницы */
.ap-section-hero {
  background: linear-gradient(135deg, #f5f5f5 0%, #eef4f4 50%, #f0f0f0 100%);
  border-bottom: 1px solid rgba(30, 157, 169, 0.12);
  padding: 20px 0 22px;
  margin-bottom: 14px;
}

.ap-section-hero__inner {
  max-width: 900px;
  margin: 0 auto;
}

.ap-section-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #1e9da9;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s, opacity 0.2s;
}

.ap-section-hero__back:hover {
  color: #17808a;
  opacity: 0.9;
}

.ap-section-hero__back::before {
  content: "‹ ";
  font-size: 18px;
  line-height: 1;
}

.ap-section-hero__title {
  font-size: 28px;
  line-height: 1.3;
  font-weight: 600;
  color: #444956;
  margin: 0;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .ap-section-hero {
    padding: 22px 0 24px;
  }
  .ap-section-hero__title {
    font-size: 32px;
  }
}

/* Кнопка «Назад» в стиле раздела (переопределение для каталога) */
.ap-catalog .back-button-container {
  margin-bottom: 10px;
}

.ap-catalog .back-button,
.ap-catalog .ap-section-hero__back {
  font-weight: 500;
}

/* Блок подарков и заголовки каталога */
.ap-catalog .catalog-block-header {
  font-size: 18px;
  font-weight: 600;
  color: #444956;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9e9e9;
}

.ap-catalog .row {
  margin-bottom: 12px;
}

/* ---------- Мобильная адаптация (в общей концепции сайта) ---------- */

/* Базовые отступы контента на узких экранах — как в .page (16px) */
@media (max-width: 767px) {
  .ap-hero__inner,
  .ap-intro__inner,
  .ap-section-hero__inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ap-hero {
    padding: 20px 0 10px;
  }
  .ap-hero__title {
    font-size: 24px;
    line-height: 1.24;
  }
  .ap-hero__subtitle {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .ap-hero__desc {
    font-size: 18px;
    line-height: 1.56;
    margin: 1em 0 0;
  }
  .ap-intro {
    padding: 0 0 12px;
  }
  .ap-intro__lead {
    font-size: 18px;
    line-height: 1.56;
    margin: 0;
  }
  .ap-catalog {
    padding-top: 10px;
    padding-bottom: 18px;
  }
  .ap-section-hero {
    padding: 16px 0 18px;
    margin-bottom: 12px;
  }
  .ap-section-hero__title {
    font-size: 24px;
  }
  .ap-section-hero__back {
    margin-bottom: 8px;
  }
  .ap-catalog .catalog-block-header {
    font-size: 16px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
}

/* Очень узкие экраны */
@media (max-width: 480px) {
  .ap-hero__inner,
  .ap-intro__inner,
  .ap-section-hero__inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ap-hero__title {
    font-size: 22px;
  }
  .ap-hero__subtitle {
    font-size: 16px;
  }
  .ap-hero__desc,
  .ap-intro__lead {
    font-size: 16px;
  }
  .ap-section-hero__title {
    font-size: 22px;
  }
}

/* Запрет горизонтального скролла из-за отрицательных отступов .row */
@media (max-width: 639px) {
  .ap-catalog {
    overflow-x: hidden;
  }
}

/* Карточка программы (элемент каталога): на мобильных картинка сверху (принудительно) */
@media (max-width: 991px) {
  .bx-catalog-element .product-container {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }
  .bx-catalog-element .product-image {
    flex: 0 0 auto !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    order: -1 !important;
  }
}

/* ---------- Слайдеры фото ---------- */

.ap-gallery {
  padding: 10px 0 8px;
}

.ap-gallery__inner,
.ap-faq__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.ap-gallery__title {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #1f2430;
  font-weight: 700;
  text-transform: uppercase;
  text-align: left;
}

.ap-faq__title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  color: #444956;
  letter-spacing: -0.02em;
}

.ap-slider {
  position: relative;
  border-radius: 14px;
  border: 1px solid #e7ecec;
  background: #fff;
  padding: 16px 56px 44px;
}

.ap-slider__viewport {
  overflow: hidden;
  border-radius: 12px;
}

.ap-slider__track {
  display: flex;
  transition: transform 0.35s ease;
}

.ap-slider__slide {
  width: 100%;
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
}

.ap-slider__slide img {
  width: 100%;
  max-width: 760px;
  height: 460px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #edf0f2;
}

.ap-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cfd9da;
  background: #fff;
  color: #1e9da9;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ap-slider__arrow:hover {
  background: #f4fbfb;
}

.ap-slider__arrow--prev {
  left: 12px;
}

.ap-slider__arrow--next {
  right: 12px;
}

.ap-slider__counter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  color: #555b68;
  font-size: 14px;
}

/* ---------- FAQ dropdown ---------- */

.ap-faq__list {
  display: grid;
  gap: 8px;
}

.ap-faq__item {
  border: 1px solid #e4ebeb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.ap-faq__question {
  list-style: none;
  cursor: pointer;
  padding: 16px 48px 16px 16px;
  position: relative;
  font-size: 17px;
  color: #2f3440;
  font-weight: 500;
}

.ap-faq__question::-webkit-details-marker {
  display: none;
}

.ap-faq__question::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #cfd9da;
  color: #1e9da9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  line-height: 1;
}

.ap-faq__item[open] .ap-faq__question::after {
  content: "\2212";
}

.ap-faq__answer {
  padding: 0 16px 16px;
  color: #555b68;
  line-height: 1.6;
}

.ap-faq__answer p {
  margin: 0;
}

@media (max-width: 767px) {
  .ap-program-links {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ap-program-links__inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ap-program-card__title {
    font-size: 18px;
  }

  .ap-program-card img {
    height: 220px;
  }

  .ap-text-block,
  .ap-benefits,
  .ap-faq,
  .ap-cta,
  .ap-gallery,
  .ap-faq {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ap-section-title,
  .ap-faq__title {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .ap-gallery__title {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .ap-benefits__grid {
    grid-template-columns: 1fr;
  }

  .ap-benefits__photos {
    grid-template-columns: 1fr;
  }

  .ap-benefits__photos img {
    height: 250px;
  }

  .ap-text-block p,
  .ap-benefits p,
  .ap-cta p {
    font-size: 16px;
  }

  .ap-steps__item h3,
  .ap-benefits__item h3 {
    font-size: 18px;
  }

  .ap-benefit-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 14px;
  }

  .ap-benefit-row__content h3 {
    font-size: 21px;
  }

  .ap-benefit-row__num {
    min-width: 26px;
    margin-right: 8px;
  }

  .ap-benefit-row__media--portrait img {
    max-width: 320px;
    margin-left: 0;
    height: auto;
  }

  .ap-benefit-row__media img {
    height: auto;
  }

  .ap-step__title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .ap-step__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ap-text-block--protocol {
    padding: 14px 0 16px;
  }

  .ap-text-block--protocol .ap-section-title {
    margin-bottom: 8px;
  }

  .ap-text-block--protocol p {
    font-size: 18px;
  }

  .ap-slider {
    padding: 10px 44px 38px;
  }

  .ap-slider__slide img {
    height: 320px;
  }

  .ap-slider__arrow {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .ap-slider__arrow--prev {
    left: 8px;
  }

  .ap-slider__arrow--next {
    right: 8px;
  }

  .ap-faq__question {
    font-size: 16px;
    padding: 14px 44px 14px 14px;
  }

  .ap-cta__inner h2 {
    font-size: 22px;
  }
}
faq__question {
    font-size: 16px;
    padding: 14px 44px 14px 14px;
  }

  .ap-cta__inner h2 {
    font-size: 22px;
  }
}
