/* rd-vnutr-mob.css — правки Анны 06.10.2026 (третья порция) для ВНУТРЕННИХ страниц на телефоне.
   Главная (index.html), шапка/меню, блок связи, подвал, rd-mob.css — здесь не трогаются.
   Стиль: строгие углы, Tenor Sans + Jost, золота нет, оранжевый — амбре #E8A768→#D9803F→#C06A30. */

/* п.45 «Акции от застройщиков»: большой отступ от шапки до заголовка.
   Причина (замер 390×844): у section#goryashchee inline-padding-top clamp(40px,7vh,80px) = 59 px,
   поверх шапки 56 px — между шапкой и заголовком 59 px пустоты. На телефоне — 12 px. */
@media(max-width:767px){
  html body section#goryashchee{padding-top:12px!important}
}

/* п.43 «Инвестиции»: видео обрезано снизу на 1/3 — окно по высоте 2/3 исходного кадра (720×1176 → окно 720×784),
   верх кадра на месте. Файл видео не менялся. */
@media(max-width:767px){
  html body #hero .inv-video{aspect-ratio:720/784;overflow:hidden}
  html body #hero .inv-video video{width:100%!important;height:100%!important;max-height:none!important;aspect-ratio:720/784;object-fit:cover!important;object-position:50% 0!important}
}

/* п.44 «Инвестиции», инфографика «8 проверок»: раскрывающийся список. Квадратик с номером и заголовком;
   текст проверки (.inv-check-desc, не удалён) выпадает под квадратиком: наведение (ПК) / касание (телефон, rd-vnutr-mob.js). */
.inv-checks-grid{gap:10px!important;background:transparent!important;grid-template-columns:repeat(4,minmax(0,220px))!important;justify-content:start}
.inv-check{position:relative;aspect-ratio:1/1;padding:18px 16px!important;border:1px solid rgba(17,17,17,.14);cursor:pointer;outline-offset:2px;
  transition:border-color .25s ease,background-color .25s ease}
.inv-check::after{content:'+';position:absolute;top:10px;right:12px;font:400 20px/1 'Jost',sans-serif;color:#141311;transition:transform .3s ease}
.inv-check .inv-check-desc{position:absolute;left:-1px;right:-1px;top:calc(100% - 1px);z-index:6;margin:0!important;padding:12px 16px 14px;
  background:#fff;border:1px solid #141311;border-top-color:#D9803F;
  opacity:0;visibility:hidden;transform:translateY(-6px);pointer-events:none;
  transition:opacity .25s ease,transform .3s ease,visibility 0s linear .3s}
.inv-check.rd-open{border-color:#141311;z-index:7}
.inv-check.rd-open::after{transform:rotate(45deg)}
.inv-check.rd-open .inv-check-desc{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .25s ease,transform .3s ease,visibility 0s}
@media(hover:hover){
  .inv-check:hover{border-color:#141311;z-index:7}
  .inv-check:hover::after{transform:rotate(45deg)}
  .inv-check:hover .inv-check-desc{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .25s ease,transform .3s ease,visibility 0s}
}
@media(max-width:767px){
  .inv-checks-grid{gap:8px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .inv-check{padding:14px 12px!important}
  .inv-check-num{width:36px!important;height:36px!important;font-size:15px!important;margin-bottom:10px!important}
  .inv-check-title{font-size:16px!important;margin-bottom:0!important}
}
@media(prefers-reduced-motion:reduce){.inv-check,.inv-check::after,.inv-check .inv-check-desc{transition:none!important}}

/* п.39 «Об эксперте», блок Instagram — тот же блок, что на главной (index.html, style#rd-ig-wide-css), без #site-content.
   Ширина: боковой отступ clamp(6px,.8vw,12px) — минимальный, как на главной. Выезд значка и заголовка — rd-mob.css + rd-vnutr-mob.js. */
section#rd-ig-wide{background:rgb(228,228,226);color:#141311;padding:clamp(36px,5vw,64px) clamp(6px,.8vw,12px) clamp(24px,3vw,40px)!important;border-top:1px solid #CFCFCC;overflow:hidden}
section#rd-ig-wide .rd-ig-h{font-family:'Tenor Sans','Playfair Display',Georgia,serif;font-weight:400;font-size:clamp(28px,4vw,44px);line-height:1.15;color:#141311;text-align:center;margin:0 0 clamp(20px,2.5vw,32px);padding:0 10px}
section#rd-ig-wide #ig-lenta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(4px,.6vw,8px);max-width:none;margin:0;padding:0;width:100%}
section#rd-ig-wide #ig-lenta a{position:relative;display:block;aspect-ratio:1/1;overflow:hidden;background:#cfcfcc;border:0;border-radius:0;margin:0;padding:0;line-height:0;translate:0 var(--py,0px);animation:rdIgBob 8s ease-in-out infinite;will-change:translate,transform}
section#rd-ig-wide #ig-lenta a:nth-child(1){animation-delay:0s}
section#rd-ig-wide #ig-lenta a:nth-child(2){animation-delay:-1.4s}
section#rd-ig-wide #ig-lenta a:nth-child(3){animation-delay:-2.8s}
section#rd-ig-wide #ig-lenta a:nth-child(4){animation-delay:-4.2s}
section#rd-ig-wide #ig-lenta a:nth-child(5){animation-delay:-5.6s}
section#rd-ig-wide #ig-lenta a:nth-child(6){animation-delay:-7s}
section#rd-ig-wide #ig-lenta img{position:relative;width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.5) contrast(1.02);animation:rdIgBreath 7s ease-in-out infinite;transition:scale .6s ease,filter .6s ease}
section#rd-ig-wide #ig-lenta a:nth-child(2) img{animation-delay:-1.2s}
section#rd-ig-wide #ig-lenta a:nth-child(3) img{animation-delay:-2.4s}
section#rd-ig-wide #ig-lenta a:nth-child(4) img{animation-delay:-3.6s}
section#rd-ig-wide #ig-lenta a:nth-child(5) img{animation-delay:-4.8s}
section#rd-ig-wide #ig-lenta a:nth-child(6) img{animation-delay:-6s}
section#rd-ig-wide #ig-lenta a::after{content:"";position:absolute;inset:0;background:rgba(13,13,13,.16);transition:opacity .5s ease;pointer-events:none}
section#rd-ig-wide #ig-lenta a:hover img,section#rd-ig-wide #ig-lenta a:focus-visible img{scale:1.06;filter:saturate(.75) contrast(1.04)}
section#rd-ig-wide #ig-lenta a:hover::after,section#rd-ig-wide #ig-lenta a:focus-visible::after{opacity:0}
section#rd-ig-wide #ig-lenta a:focus-visible{outline:2px solid #141311;outline-offset:-4px}
section#rd-ig-wide .rd-ig-note{font-family:'Jost','DM Sans',sans-serif;font-size:14px;line-height:1.5;color:#3a3a38;text-align:center;max-width:860px;margin:clamp(16px,2vw,26px) auto 0;padding:0 14px}
@keyframes rdIgBob{0%,100%{transform:translateY(-2px)}50%{transform:translateY(2px)}}
@keyframes rdIgBreath{0%,100%{transform:scale(1)}50%{transform:scale(1.02)}}
@media(prefers-reduced-motion:reduce){section#rd-ig-wide #ig-lenta a,section#rd-ig-wide #ig-lenta img{animation:none!important;translate:none!important;transition:none}}
html body section#rd-ig-wide .rd-ig-h{margin:0!important}

/* п.38 «Об эксперте»: «Обсудить задачу» и «Подбор недвижимости» выходили за кнопки (nowrap + padding 36/24 px в одну строку).
   Решение: на телефоне кнопки друг под другом во всю ширину, как на «Инвестициях» и в первом экране главной; надпись по центру. */
@media(max-width:767px){
  html body .hero-btns.hero-btns-row{flex-direction:column;flex-wrap:wrap;align-items:stretch;gap:10px!important}
  html body .hero-btns-row .btn-g,html body .hero-btns-row .btn-o{width:100%;box-sizing:border-box;text-align:center;white-space:normal;padding:15px 12px}
}

/* п.46 «Об эксперте»: фото Анны — кадр вокруг фигуры у бетонной арки (снимок 6.png): окно 4:3, приближение 1,28×.
   Исходный файл не менялся: object-fit/object-position/aspect-ratio + масштаб внутри окна с overflow:hidden. */
@media(max-width:767px){
  html body .page-hero .ob-photo-slot{aspect-ratio:4/3;overflow:hidden}
  html body .page-hero .ob-photo-slot img{object-fit:cover;object-position:55% 0;transform:scale(1.28);transform-origin:61% 27%}
}

/* п.40 + п.42: рубрика с каруселью на телефоне — ровно один экран (высота окна минус шапка 66 px).
   Не меньше: min-height = 100svh − 66 px, содержимое по центру. Не больше: отступы секции и шапки рубрики ужаты,
   закрытые карточки подгоняются по высоте так, чтобы вместе с открытой (она одна, высота --o) дать ровно экран.
   Анимация раскрытия (rd-motion.css: transition min-height, раскрытие по касанию) не менялась — меняются только числа высот.
   Переменные на ленте: --n число карточек, --o высота открытой, --ch высота «шапки» рубрики (отступы + заголовок), --g зазор. */
@media(max-width:767px){
  html body section:has(#hcar-cat),html body section:has(#hcar-fmt),html body section:has(#hcar-fin),html body section#process{
    box-sizing:border-box;min-height:calc(100svh - 56px);display:flex;flex-direction:column;justify-content:center;
    padding-top:10px!important;padding-bottom:10px!important}
  html body section:has(#hcar-cat) .hcar-wrap,html body section:has(#hcar-fmt) .hcar-wrap,html body section:has(#hcar-fin) .hcar-wrap{margin-top:0!important}
  html body section:has(#hcar-cat) .hcar-head,html body section:has(#hcar-fmt) .hcar-head,html body section:has(#hcar-fin) .hcar-head{margin-bottom:8px!important}
  html body #hcar-cat.rd-acc,html body #hcar-fmt.rd-acc,html body #hcar-fin.rd-acc{--g:8px;gap:var(--g)!important}
  html body #hcar-cat.rd-acc{--n:3;--o:300px;--ch:133px}
  html body #hcar-fmt.rd-acc{--n:3;--o:328px;--ch:134px}
  html body #hcar-fin.rd-acc{--n:5;--o:292px;--ch:128px}
  html body #hcar-cat.rd-acc .hcar-item:not(.rd-open),html body #hcar-fmt.rd-acc .hcar-item:not(.rd-open),html body #hcar-fin.rd-acc .hcar-item:not(.rd-open){
    min-height:calc((100svh - 56px - var(--ch) - var(--o) - (var(--n) - 1) * var(--g)) / (var(--n) - 1))!important}
  html body #hcar-cat.rd-acc .hcar-item.rd-open,html body #hcar-fmt.rd-acc .hcar-item.rd-open,html body #hcar-fin.rd-acc .hcar-item.rd-open{min-height:var(--o)!important}
  html body #hcar-cat.rd-acc .hcar-item .hcar-caption,html body #hcar-fmt.rd-acc .hcar-item .hcar-caption,html body #hcar-fin.rd-acc .hcar-item .hcar-caption{padding:14px 16px!important}
  html body #hcar-cat.rd-acc,html body #hcar-fmt.rd-acc,html body #hcar-fin.rd-acc{padding-bottom:0!important}
  /* «Финансовые инструменты»: пять карточек — закрытые в одну строку заголовка, иначе пять на экран не встают */
  html body #hcar-fin.rd-acc .hcar-item .hcar-caption{padding:10px 16px!important}
  html body #hcar-fin.rd-acc .hcar-item .hcar-title{font-size:18px!important;line-height:1.2!important}
  html body #hcar-fin.rd-acc .hcar-item .hcar-title br{display:none}
  html body #hcar-fin.rd-acc .hcar-item .hcar-title em::after{content:" "}
  html body #hcar-fin.rd-acc .hcar-item .hcar-num{margin-bottom:4px!important}
  html body:not(#rdm1):not(#rdm2) #fin-karusel .section-label{white-space:nowrap}
}
@media(max-width:380px){
  /* надстрочник «Ваши финансовые инструменты» на 360 px переносился на вторую строку (+15 px к рубрике) */
  html body:not(#rdm1):not(#rdm2) #fin-karusel .section-label{letter-spacing:.12em!important;gap:8px}
}

/* «Как работаем» (горизонтальная лента, 5 шагов): карточка занимает остаток экрана — картинка тянется по высоте
   (при высоте окна 780 она короче, при 844 длиннее), текст карточки целиком, анимация прокрутки не менялась.
   187 px = всё остальное в рубрике — отступы, шапка с кнопками, подсказка (замер 390×844 и 360×780: рубрика 792 и 728 при карточке 605 и 541). */
@media(max-width:767px){
  html body #hcar-proc .hcar-item{height:calc(100svh - 56px - 187px)!important}
  html body #hcar-proc .hcar-item .hcar-img{flex:1 1 auto;height:auto!important;min-height:120px}
  html body #hcar-proc .hcar-item .hcar-caption{flex:none}
}

/* «Об эксперте», первый экран (Анна 06.10, поздний вечер): подзаголовок «6 лет в недвижимости…» — чёрным (#111) на светло-сером; телефон и ПК. Других белых подзаголовков на светлом фоне на странице нет (проверено замером по всем текстам страницы) */
html body p.hero-desc[data-i18n-html="h_desc"],html body section:nth-of-type(1) > div:nth-of-type(1) > p:nth-of-type(1).hero-desc[data-i18n-html="h_desc"]{color:#111!important}

/* ═══ п.32 (ревизор, 07.10): рубрики внутренних страниц на телефоне = один экран = высота окна − шапка 56 px (390×844 → 788, 360×780 → 724).
   Размеры подгоняются от высоты окна: (100svh − 56 − «остальное в рубрике») / число рядов; «остальное» замерено на 390 и 360. Текст не убран, пустого фона нет. ═══ */
@media(max-width:767px){
  /* remont: «Полный цикл — пять этапов» (было 1099): номер слева, название и описание справа; пять равных рядов */
  html body section.section-block:has(.process-steps){padding-top:20px!important;padding-bottom:20px!important}
  html body .process-steps{gap:6px!important}
  html body .process-steps .p-step{box-sizing:border-box;height:calc((100svh - 56px - 40px - 14px - 12px - 59px - 29px - 24px) / 5);display:grid;grid-template-columns:44px 1fr;column-gap:12px;align-content:center;padding:10px 16px!important}
  html body .process-steps .p-step-n{grid-row:1/3;font-size:30px!important;margin:0!important;align-self:center}
  html body .process-steps .p-step-title{margin:0 0 3px!important}
  html body .process-steps .p-step-desc{font-size:13px!important;line-height:1.35!important}
  /* remont: «Объект меняет функцию» (было 1134) — плотнее текст и пять пунктов */
  html body section.section-block.dark:has(.redev-grid){padding-top:20px!important;padding-bottom:20px!important}
  html body .redev-grid{gap:14px!important}
  html body .redev-grid .redev-desc{font-size:13.5px!important;line-height:1.4!important;margin-bottom:8px!important}
  html body .redev-grid .section-label{margin-bottom:8px!important}
  html body .redev-grid .section-h{margin-bottom:10px!important}
  html body .redev-grid .redev-list{display:flex!important;flex-direction:column;height:calc(100svh - 56px - 40px - 14px - 294px)}
  html body .redev-grid .redev-item{padding:6px 0!important;flex:1 1 0;min-height:0;align-items:center}
  html body .redev-grid .redev-text{font-size:14px!important;line-height:1.3!important}
  html body .redev-grid .redev-arrow{font-size:18px!important}
}

@media(max-width:767px){
  /* investicii: первый экран (было 810): окно видео подгоняется по высоте окна, остальное 429 px */
  html body #hero .inv-video{aspect-ratio:auto;height:calc(100svh - 56px - 429px)}
  html body #hero .inv-video video{aspect-ratio:auto}
  /* investicii: «8 проверок» (было 881): четыре ряда равной высоты, остальное 173 px; 2 колонки */
  html body .inv-check{aspect-ratio:auto;box-sizing:border-box;height:calc((100svh - 56px - 173px - 3 * 8px) / 4)}
  /* ob-anne: первый экран (было 702): фото крупнее — окно по высоте, остальное считается замером */
  html body .page-hero .ob-photo-slot{aspect-ratio:auto;height:calc(100svh - 56px - var(--ob-rest,440px))}
}

@media(max-width:374px){
  :root{--ob-rest:432px}
  html body #hero .inv-video{height:calc(100svh - 56px - 443px)}
}
@media(max-width:767px){
  /* ob-anne и podbor: Instagram (было 415) — как на главной две колонки × три ряда, плитки подгоняются под экран; остальное 164 px (390) / 205 px (360) */
  html body section#rd-ig-wide{--ig-rest:164px}
  html body section#rd-ig-wide #ig-lenta{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important}
  html body section#rd-ig-wide #ig-lenta a{aspect-ratio:auto!important;height:max(110px,calc((100svh - 56px - var(--ig-rest) - 8px) / 3))!important}
}
@media(max-width:374px){html body section#rd-ig-wide{--ig-rest:205px}}

@media(max-width:560px){
  /* витрина «Полезное по теме» на страницах-разделах: карточки и обложки крупнее (50,6 → 80 vw), как на главной; до экрана одной шириной не дотянуть (обложки одной пропорции 540:466) */
  html body section.rd-vitrina .vt-grid .vt-card,html body section.rd-vitrina--compact .vt-grid .vt-card{flex:0 0 80vw!important;width:80vw!important;max-width:none!important}
}
@media(min-width:768px){
  /* investicii, ПК: сетка «8 проверок» по центру (была прижата влево, правая треть пустая) */
  .inv-checks-grid{justify-content:center!important}
}

@media(max-width:767px){
  /* finansovye: калькулятор (было 943 / 930) — те же уплотнения, что на главной (rd-mob.css, там они привязаны к #site-content), и не ниже экрана */
  html body section#calculator.rd-calc-vid{padding:8px 12px!important;min-height:calc(100svh - 56px);box-sizing:border-box}
}

@media(max-width:767px){
  /* калькулятор страниц-разделов: размеры как на главной (там их задавал index.html) — поле, подпись, чипы «Программа» в один ряд, меньше отступы */
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-calc{font-size:14px}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-tool{padding:9px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-field{margin-bottom:6px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-flab{margin:0!important;font-size:14px!important;line-height:14px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-cprice-in,html body:not(#rdm1):not(#rdm2) section#calculator .rdf-flab input{font-size:15px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-pchip{font-size:11px!important;padding:5px 6px!important;min-height:30px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-progchips{gap:6px!important}
}

@media(max-width:374px){
  /* finansovye, 360: калькулятор 753 → 724 — те же уплотнения, что на главной */
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-bbtn{height:44px!important;min-height:0!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-csum{padding-bottom:4px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-field:not(:last-child){margin-bottom:3px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-cresults{margin-top:2px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-bridge{padding-top:4px!important;padding-bottom:4px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-h2{font-size:21px!important;line-height:1.15!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-tag{margin-bottom:6px!important}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-brow{padding:5px 10px!important;min-height:0!important;gap:8px}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-brank{width:24px!important;height:24px!important;font-size:13px}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-brate,html body:not(#rdm1):not(#rdm2) section#calculator .rdf-bq{margin-bottom:2px!important;font-size:15px}
  html body:not(#rdm1):not(#rdm2) section#calculator .rdf-bname{font-size:13px;line-height:1.2}
}
