/* ============ Страница процедуры ============ */

/* Оговорка медрекламы (под ценами, до/после) */
.note {
  display: flex; gap: 10px;
  font-size: 13px; line-height: 20px; color: var(--ink-mute);
}
.note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }

/* Секция-обёртка с общим ритмом */
.psec { padding-block: clamp(56px, 7vw, 96px); scroll-margin-top: 70px; }
.psec--cream { background: var(--cream); }
.psec__head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.psec__eyebrow { font-weight: 700; font-size: 13px; letter-spacing: 1.82px; text-transform: uppercase; color: var(--accent); }
.psec__title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.06; letter-spacing: -0.01em; color: var(--ink); margin-top: 10px; }
.psec__lead { margin-top: 14px; font-size: 18px; line-height: 28.8px; color: var(--ink-soft); }

/* Описание — текст + медиа */
.pintro__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.pintro__body p { font-size: 17px; line-height: 28px; color: var(--ink-soft); }
.pintro__body p + p { margin-top: 16px; }
.pintro__slot { aspect-ratio: 4 / 5; width: 100%; }
/* Лучший результат процедуры вместо заглушки: вертикальная склейка, клик → лайтбокс */
.pintro__ba.gcase__media {
  aspect-ratio: 4 / 5; border: 0; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 18px 50px -22px rgba(27, 23, 20, 0.28);
}
.pintro__ba.gcase__media img { object-fit: cover; }

/* Показания / противопоказания */
.pcond__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pcond__card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px 34px; }
.pcond__card--no { background: var(--cream); }
.pcond__t { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-weight: 600; font-size: 23px; color: var(--ink); margin-bottom: 18px; }
.pcond__badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.pcond__badge svg { width: 16px; height: 16px; }
.pcond__badge--yes { background: var(--accent); color: #fff; }
.pcond__badge--no { background: var(--cream-2); color: var(--ink-mute); }
.psec__title em { font-style: italic; color: var(--accent); }
.phero__mini { margin-top: 28px; }

/* Цены — 2 колонки (интро+карточка | строки) по макету разводящей */
.prices__grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 64px; align-items: start; }
.prices__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.prices__title { font-family: var(--font-serif); font-weight: 600; font-size: clamp(40px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.6px; color: var(--ink); }
.prices__title em { font-style: italic; color: var(--accent); }
.prices__lead { max-width: 593px; font-size: 18px; line-height: 28.8px; color: var(--ink-soft); }
.prices__card { width: 100%; margin-top: 6px; background: var(--accent-soft); border-radius: 18px; padding: 44px 28px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.prices__cardTitle { font-family: var(--font-serif); font-weight: 600; font-size: 23px; line-height: 36.8px; color: var(--ink); }
.prices__cardText { font-size: 15px; line-height: 24px; color: var(--ink-soft); }
.prices__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.prices__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px; border-bottom: 1px solid var(--line); }
.prices__name { display: flex; flex-direction: column; gap: 3px; }
.prices__name b { font-weight: 600; font-size: 18px; line-height: 28.8px; color: var(--ink); }
.prices__name span { font-size: 14px; line-height: 22.4px; color: var(--ink-mute); }
.prices__val { font-family: var(--font-serif); font-weight: 600; font-size: 26px; line-height: 1; color: var(--ink); white-space: nowrap; }

@media (max-width: 820px) {
  .prices__grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Виды — карточки направлений с иконками (макет разводящей) */
.ntypes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ntype { display: flex; flex-direction: column; align-items: flex-start; background: #fff; border: 1px solid rgba(27, 23, 20, 0.06); border-radius: 20px; padding: 33px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.ntype:hover { border-color: var(--accent); box-shadow: 0 16px 32px -20px rgba(27, 23, 20, .28); transform: translateY(-2px); }
.ntype__ic { color: var(--accent); margin-bottom: 20px; }
.ntype__ic svg { width: 46px; height: 46px; }
.ntype__title { font-family: var(--font-serif); font-weight: 600; font-size: 24px; line-height: 27.6px; color: var(--ink); }
.ntype__text { margin-top: 9px; font-size: 14.5px; line-height: 22.48px; color: var(--ink-soft); }
.ntype__more { margin-top: auto; padding-top: 20px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 14px; line-height: 22.4px; transition: gap .2s; }
.ntype:hover .ntype__more { gap: 12px; }

@media (max-width: 900px) { .ntypes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ntypes { grid-template-columns: 1fr; } }

/* Методы — открытая/закрытая (тёмная + светлая карточки) */
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.method { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; border-radius: 24px; padding: 43px; }
.method--dark { background: var(--ink); }
.method--light { background: #fff; border: 1px solid var(--line); }
.method__tag { font-weight: 700; font-size: 12px; letter-spacing: 1.68px; text-transform: uppercase; color: var(--accent); }
.method__title { font-family: var(--font-serif); font-weight: 600; font-size: 30px; line-height: 1.3; }
.method--dark .method__title { color: #fff; }
.method--light .method__title { color: var(--ink); }
.method__text { font-size: 15px; line-height: 24.75px; }
.method--dark .method__text { color: rgba(255, 255, 255, 0.72); }
.method--light .method__text { color: var(--ink-soft); }
.method__list { display: flex; flex-direction: column; gap: 11px; margin-top: 10px; width: 100%; }
.method__list li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; line-height: 21px; }
.method--dark .method__list li { color: rgba(255, 255, 255, 0.85); }
.method--light .method__list li { color: var(--ink); }
.method__ic { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); }

@media (max-width: 820px) { .methods { grid-template-columns: 1fr; } }
.pcond__list { display: flex; flex-direction: column; gap: 12px; }
.pcond__list li { display: flex; gap: 11px; font-size: 15.5px; line-height: 23px; color: var(--ink-soft); }
.pcond__list li svg { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; }
.pcond__card .ic-yes { color: var(--accent); }
.pcond__card .ic-no { color: var(--ink-mute); }

/* Этапы преображения */
.psteps__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pstep { display: flex; flex-direction: column; gap: 12px; }
.pstep__n { font-family: var(--font-serif); font-weight: 700; font-size: 22px; color: var(--accent); }
.pstep__line { height: 1px; background: var(--line); }
.pstep__t { font-weight: 700; font-size: 16.5px; line-height: 24px; color: var(--ink); }
.pstep__d { font-size: 14.5px; line-height: 22px; color: var(--ink-soft); }

/* Цены */
.ptable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ptable th, .ptable td { text-align: left; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.ptable thead th { font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; background: var(--cream); }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable td:last-child, .ptable th:last-child { text-align: right; white-space: nowrap; }
.ptable .price { font-family: var(--font-serif); font-weight: 600; font-size: 19px; color: var(--accent); }
.ptable td:first-child { font-weight: 600; color: var(--ink); }
.ptable__note { margin-top: 16px; }

/* Реабилитация — горизонтальный таймлайн */
.preha__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.preha__card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px 30px; }
.preha__when { display: inline-flex; align-items: center; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 13.5px; border-radius: var(--r-pill); padding: 6px 14px; margin-bottom: 14px; }
.preha__t { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.preha__d { font-size: 15px; line-height: 23px; color: var(--ink-soft); }

/* До / после */
.pba__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pba__slot { aspect-ratio: 4 / 5; width: 100%; }
.pba__more { display: flex; justify-content: center; margin-top: 26px; }

/* FAQ */
.pfaq { max-width: 860px; margin-inline: auto; }
.pfaq__item { border-bottom: 1px solid var(--line); }
.pfaq__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px;
  font-weight: 600; font-size: 18px; line-height: 26px; color: var(--ink);
}
.pfaq__item summary::-webkit-details-marker { display: none; }
.pfaq__item summary::after { content: "+"; font-size: 26px; color: var(--accent); transition: transform .2s; }
.pfaq__item[open] summary::after { transform: rotate(45deg); }
.pfaq__item p { padding: 0 4px 24px; font-size: 16px; line-height: 26px; color: var(--ink-soft); }

@media (max-width: 900px) {
  .psteps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preha__grid, .pba__grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .pintro__grid { grid-template-columns: 1fr; gap: 32px; }
  .pintro__media { order: -1; }
  .pcond__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .psteps__grid { grid-template-columns: 1fr; }
  .ptable th, .ptable td { padding: 14px 16px; }
}

/* SEO-текст — образец блока для наполнения контентом (SEO-специалисты) */
.seotext .seotext__inner { max-width: 880px; }
.seotext__inner > h2 { margin-bottom: 20px; }
.seotext__inner h3 { font-size: 21px; line-height: 28px; color: var(--ink); margin: 30px 0 12px; }
.seotext__inner p { font-size: 16px; line-height: 28px; color: var(--ink-soft); margin: 0 0 16px; }
.seotext__inner p:last-child { margin-bottom: 0; }
.seotext__inner a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ====== SEO-блок (сворачиваемый текст + «Смотрите также») — Figma 66-6979 ====== */
.seo__inner { max-width: 1080px; margin-inline: auto; }
.seo__title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06; letter-spacing: -0.01em;
  color: var(--ink); margin-top: 14px; max-width: 20ch;
}
.seo__body { position: relative; margin-top: 24px; max-height: 360px; overflow: hidden; transition: max-height .45s ease; }
.seo__body.is-open { max-height: 4000px; }
.seo__body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  background: linear-gradient(to top, var(--cream), rgba(250, 245, 243, 0));
  pointer-events: none; transition: opacity .3s;
}
.seo__body.is-open::after { opacity: 0; }
.seo__body p { font-size: 17px; line-height: 1.78; color: var(--ink-soft); }
.seo__body p + p { margin-top: 16px; }
.seo__body strong { color: var(--ink); font-weight: 700; }
.seo__body h3 {
  font-family: var(--font-serif); font-weight: 600; font-size: 28px; line-height: 1.18;
  letter-spacing: -0.005em; color: var(--ink); margin-top: 30px;
}
.seolist { margin-top: 16px; }
.seolist li {
  display: flex; flex-wrap: wrap; gap: 4px 13px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.seolist li:first-child { border-top: 0; }
.seolist li::before {
  content: ""; flex-shrink: 0; align-self: flex-start;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(9px);
}
.seolist b { color: var(--ink); font-weight: 700; font-size: 16px; }
.seolist span { color: var(--ink-soft); font-size: 16px; line-height: 1.55; min-width: 0; }
.seo__toggle {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  color: var(--accent); font-weight: 600; font-size: 15px; transition: gap .2s;
}
.seo__toggle:hover { gap: 13px; }
.seo__toggle svg { width: 16px; height: 16px; transition: transform .3s; }
.seo__toggle.is-open svg { transform: rotate(180deg); }
.seolinks { margin-top: 39px; padding-top: 39px; border-top: 1px solid var(--line); }
.seolinks__label { font-weight: 700; font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-mute); }
.seolinks__grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.seolinks__grid a {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid rgba(27, 23, 20, 0.06); border-radius: var(--r-pill);
  padding: 12px 19px; font-size: 15px; color: var(--ink);
  transition: border-color .2s, color .2s;
}
.seolinks__grid a:hover { border-color: var(--accent); color: var(--accent); }
.seolinks__grid a svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

/* ── Декор «трещина/осколки» — посттравматическая ринопластика (scoped) ──
   Всё крепится к ТОЧКЕ ОБРЫВА «с|кая» и меряется в em заголовка: трещина, осколки и отколотые буквы
   едут вместе с текстом на любой ширине. До 25-09-2026 трещина висела на крае баннера, а «кая» —
   на крае заголовка, и при смене ширины «к» наезжала на «с», а линии резали буквы. */
.phero--cracked .phero__hang {        /* точка обрыва: нулевой бокс на базовой линии после «с» */
  position: relative; display: inline-block; width: 0; height: 0; vertical-align: baseline;
}
.phero--cracked .hl {                 /* отколотые буквы: «к» надломлена, «а» и «я» осыпались вниз */
  position: absolute; left: 0; line-height: 1; color: var(--ink); white-space: nowrap;
  transform-origin: 20% 90%;
}
.phero--cracked .hl1 { top: -0.84em; left: 0.02em;  transform: rotate(9deg); }
.phero--cracked .hl2 { top: 0.12em;  left: -0.18em; transform: rotate(-14deg); opacity: .92; }
.phero--cracked .hl3 { top: 0.98em;  left: -0.52em; transform: rotate(18deg);  opacity: .85; }
.phero--cracked .phero__crack {       /* главный разлом SVG (x=508 из 553) стоит ровно в точке обрыва */
  position: absolute; width: 4.2em; height: 1.16em; top: -0.98em;
  left: calc(-4.2em * 508 / 553); pointer-events: none; z-index: -1;
}
.phero--cracked .phero__crack img { width: 100%; height: 100%; display: block; }
.phero--cracked .phero__title {     /* кегль чуть меньше общего: справа от «с» нужно ~0.8em под отколотую «к», иначе она уходит под фото */
  position: relative; z-index: 0; font-size: clamp(40px, 4.9vw, 66px);
}
.phero--cracked .phero__frags {       /* осколки у точки удара */
  position: absolute; left: 0.28em; top: -0.62em; width: 0.9em; height: 0.95em; pointer-events: none;
}
.phero--cracked .frag {
  position: absolute; display: block;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
.phero--cracked .frag1 { left: 4%;  top: 46%; width: 12px; height: 9px; transform: rotate(-22deg);
  background: var(--ink); opacity: .92;
  -webkit-mask-image: url(../assets/img/frag1.svg); mask-image: url(../assets/img/frag1.svg); }
.phero--cracked .frag2 { left: 34%; top: 20%; width: 9px; height: 7px; transform: rotate(38deg);
  background: var(--ink-soft); opacity: .92;
  -webkit-mask-image: url(../assets/img/frag2.svg); mask-image: url(../assets/img/frag2.svg); }
.phero--cracked .frag3 { left: 58%; top: 64%; width: 8px; height: 6px; transform: rotate(-12deg);
  background: var(--accent); opacity: .92;
  -webkit-mask-image: url(../assets/img/frag3.svg); mask-image: url(../assets/img/frag3.svg); }
.phero--cracked .frag4 { left: 82%; top: 34%; width: 6px; height: 5px; transform: rotate(16deg);
  background: #2a2420; opacity: .7;
  -webkit-mask-image: url(../assets/img/frag4.svg); mask-image: url(../assets/img/frag4.svg); }
@media (max-width: 900px) {           /* колонки стопкой: слово читается целиком, декор прячем */
  .phero--cracked .phero__hang { display: inline; width: auto; height: auto; }
  .phero--cracked .hl { position: static; transform: none; opacity: 1; }
  .phero--cracked .phero__crack, .phero--cracked .phero__frags { display: none; }
}

/* Обложка страницы процедуры: квадратная склейка до/после вместо заглушки, клик → лайтбокс */
.phero__ba.gcase__media {
  aspect-ratio: 1 / 1; border: 0; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 18px 50px -22px rgba(27, 23, 20, 0.28);
}
.phero__ba.gcase__media img { object-fit: cover; }
