/* ROGACHEV — главная (этап 6). Макеты: design/home-product/project/Main.dc.html (1440) и HomeMobile.dc.html (390).
   Телефон — до 760 px, планшет — 761–1023, компьютер — от 1024. Подключается только на главной (theme/inc/home.php). */

.rg-home{display:flex;flex-direction:column}
.rg-home .rg-band{flex:none}

/* Ссылки-подчёркивания: видимая строка как в макете, нажимаемая область — 44 px */
.rg-home .rg-link{position:relative}
.rg-home .rg-link::before{content:"";position:absolute;left:0;right:0;top:50%;height:var(--tap);transform:translateY(-50%)}

/* Кнопка «Все …» под секцией на телефоне (HomeMobile: 52 px, 15 px) */
.rg-home__more.rg-btn{min-height:52px;font-size:15px}

/* ---------- 1. Первый экран */
.rg-hero{border-bottom:1px solid var(--line)}
.rg-hero__inner{max-width:1440px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);min-height:760px}
.rg-hero__media{position:relative;overflow:hidden;background:radial-gradient(ellipse at 32% 22%,#FBFBF8 0%,#E9ECE6 45%,#D8DED5 100%)}
.rg-hero__picture,.rg-hero__img{position:absolute;inset:0;width:100%;height:100%}
.rg-hero__img{object-fit:cover}
.rg-hero__body{display:flex;flex-direction:column;justify-content:space-between;gap:48px;padding:72px 64px 48px;min-width:0}
.rg-hero__top{display:flex;flex-direction:column;align-items:flex-start;gap:26px}
.rg-hero__title{font-family:var(--font-display);font-weight:400;font-size:66px;line-height:1.04;overflow-wrap:break-word;max-width:100%}
.rg-hero__text{font-size:18px;line-height:1.6;color:var(--text-2);max-width:420px}
.rg-hero__acts{display:flex;flex-wrap:wrap;gap:16px 22px;align-items:center;margin-top:8px}
.rg-hero__btn.rg-btn{font-size:15px;padding:8px 28px}
.rg-hero__product{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;border-top:1px solid var(--line);padding-top:22px}
.rg-hero__product-info{display:flex;flex-direction:column;gap:6px;min-width:0}
.rg-hero__product-name{font-family:var(--font-display);font-size:20px;line-height:1.3}
.rg-hero__product-sizes{font-family:var(--font-mono);font-size:13px;line-height:1.4;color:var(--text-3)}
.rg-hero__product-price{font-family:var(--font-display);font-size:22px;line-height:1.3;white-space:nowrap}
.rg-hero__product:hover .rg-hero__product-sizes{color:var(--text-3)}

/* ---------- Общее для секций */
.rg-home-sec__inner{display:flex;flex-direction:column;gap:40px}
.rg-home-sec--lined{border-top:1px solid var(--line)}
/* Секция сразу после полосы новинок: у полосы уже есть своя черта снизу */
.rg-band + .rg-home-sec--lined{border-top:0}

/* ---------- 2. Выбрать по форме */
.rg-home-forms{padding:96px 0 88px}
.rg-home-forms__list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.rg-home-forms__item{min-width:0}
.rg-home-form{display:flex;flex-direction:column;gap:14px}
.rg-home-form__tile{position:relative;display:block;aspect-ratio:4/5;background:linear-gradient(160deg,#F1F3EE 0%,var(--tile) 100%);overflow:hidden}
.rg-home-form__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rg-home-form__name{font-family:var(--font-display);font-size:20px;line-height:1.25;overflow-wrap:break-word}
.rg-home-rooms{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.rg-home-rooms__label{margin-right:12px}
.rg-home-rooms__list{display:flex;flex-wrap:wrap;gap:10px}
.rg-home-rooms__link{display:flex;align-items:center;min-height:var(--tap);padding:0 20px;border:1px solid var(--line);font-size:14px;line-height:1.3}
.rg-home-rooms__link:hover{border-color:var(--ink);color:var(--text)}

/* ---------- 3. Новинки */
.rg-home-novelties__grid.rg-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:40px 24px}

/* ---------- 4. Интерьеры: мозаика [1] [2 над 3] [4], высоты как в макете (520, 300, 180, 420 при столбце 427) */
.rg-home-interiors{padding:96px 0}
.rg-home-int{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:start}
.rg-home-int__col{display:flex;flex-direction:column;gap:28px;min-width:0}
.rg-home-int__item{display:flex;flex-direction:column;gap:8px;min-width:0}
.rg-home-int__media{position:relative;display:block;overflow:hidden;background:linear-gradient(170deg,#F1F3EE 0%,var(--tile) 100%)}
.rg-home-int__item--1 .rg-home-int__media{aspect-ratio:427/520}
.rg-home-int__item--2 .rg-home-int__media{aspect-ratio:427/300}
.rg-home-int__item--3 .rg-home-int__media{aspect-ratio:427/180}
.rg-home-int__item--4 .rg-home-int__media{aspect-ratio:427/420}
.rg-home-int__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rg-home-int__title{font-size:15px;line-height:1.4;overflow-wrap:break-word}
.rg-home-int__meta{font-family:var(--font-mono);font-size:11px;line-height:1.4;color:var(--text-3)}

/* ---------- 5. Журнал */
.rg-home-journal{padding:88px 0}
.rg-home-journal__list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.rg-home-journal__list > li{min-width:0}
.rg-home-post{display:flex;flex-direction:column;gap:12px}
.rg-home-post__media{position:relative;display:block;aspect-ratio:3/2;overflow:hidden;background:linear-gradient(170deg,#F1F3EE 0%,var(--tile) 100%)}
.rg-home-post__img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rg-home-post__rubric{font-family:var(--font-mono);font-size:11px;line-height:1.4;letter-spacing:.1em;text-transform:uppercase;color:var(--patina)}
.rg-home-post__title{font-family:var(--font-display);font-weight:400;font-size:22px;line-height:1.25;overflow-wrap:break-word}
.rg-home-post__meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-family:var(--font-mono);font-size:11px;line-height:1.4;color:var(--text-3)}
.rg-home-post__fact{display:inline-flex;align-items:center;gap:6px}
.rg-home-post__icon{flex:none}

/* ---------- 6. Материал */
.rg-home-material{padding:88px 0}
.rg-home-material__inner{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:80px}
.rg-home-material__about{display:flex;flex-direction:column;align-items:flex-start;gap:18px}
.rg-home-material__text{font-size:17px;line-height:1.6;color:var(--text-2);max-width:440px}
.rg-home-material__features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);align-self:start}
.rg-home-material__feature{background:var(--surface);padding:30px 26px;display:flex;flex-direction:column;gap:12px;min-width:0}
.rg-home-material__feature-title{font-family:var(--font-display);font-weight:400;font-size:22px;line-height:1.25}
.rg-home-material__feature-text{font-size:14px;line-height:1.55;color:var(--text-2)}

/* ---------- 7. Дизайнерам и студиям */
.rg-home-designers{padding-bottom:96px}
.rg-home-designers__box{background:var(--brass-fill);display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:center}
.rg-home-designers__head{padding:56px;display:flex;flex-direction:column;gap:18px;min-width:0}
.rg-home-designers__eyebrow{font-family:var(--font-mono);font-size:12px;line-height:1.4;letter-spacing:.14em;text-transform:uppercase;color:var(--brass-label)}
.rg-home-designers__title{font-family:var(--font-display);font-weight:400;font-size:40px;line-height:1.1;overflow-wrap:break-word}
.rg-home-designers__side{padding:56px;display:flex;flex-direction:column;align-items:flex-start;gap:16px;min-width:0}
.rg-home-designers__text{font-size:16px;line-height:1.6;color:var(--text-2)}
.rg-home-designers__btn.rg-btn{font-size:15px}

/* ---------- Компьютер поменьше: 1024–1279 */
@media (max-width:1279px){
  .rg-hero__inner{min-height:680px}
  .rg-hero__body{padding:56px 48px 40px}
  .rg-hero__title{font-size:52px}
  /* Плашки материала рядом с текстом не помещаются (слова рвутся) — блок в одну колонку, плашки во всю ширину. */
  .rg-home-material__inner{grid-template-columns:minmax(0,1fr);gap:40px}
  .rg-home-material__features{align-self:stretch}
  .rg-home-material__feature{padding:26px 20px}
}

/* ---------- Планшет: 761–1023 */
@media (max-width:1023px){
  .rg-hero__inner{grid-template-columns:minmax(0,1fr);min-height:0}
  .rg-hero__media{height:560px}
  .rg-hero__body{padding:48px var(--page-x) 56px}

  .rg-home-forms__list{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 16px}
  .rg-home-novelties__grid.rg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* Интерьеры — два столбца, как на телефоне */
  .rg-home-int{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 24px}
  .rg-home-int__col{display:contents}
  .rg-home-int__item--1 .rg-home-int__media,.rg-home-int__item--4 .rg-home-int__media{aspect-ratio:169/260}
  .rg-home-int__item--2 .rg-home-int__media,.rg-home-int__item--3 .rg-home-int__media{aspect-ratio:169/200}

  .rg-home-journal__list{gap:16px}
  .rg-home-post__title{font-size:19px}

  .rg-home-material__inner{grid-template-columns:minmax(0,1fr);gap:40px}
  .rg-home-material__features{align-self:stretch}

  .rg-home-designers__box{grid-template-columns:minmax(0,1fr);align-items:stretch}
  .rg-home-designers__head{padding:48px 48px 0}
  .rg-home-designers__side{padding:24px 48px 48px}
}

/* ---------- Телефон: до 760 (HomeMobile) */
@media (max-width:760px){
  .rg-hero__media{height:460px}
  .rg-hero__body{padding:32px var(--page-x) 44px;gap:18px}
  .rg-hero__top{gap:18px;align-items:stretch}
  .rg-hero__eyebrow{font-size:11px}
  .rg-hero__title{font-size:38px;line-height:1.08}
  .rg-hero__text{font-size:16px}
  .rg-hero__acts{margin-top:0}
  .rg-hero__btn.rg-btn{width:100%;font-size:16px}
  /* В HomeMobile на первом экране только кнопка: ссылки «Все вазы» и товара под чертой нет */
  .rg-hero__link,.rg-hero__product{display:none}

  .rg-home-sec__inner{gap:22px}

  .rg-home-forms{padding:44px 0 36px}
  .rg-home-forms .rg-home-sec__inner{gap:20px}
  .rg-home-forms .rg-home-forms__list{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;margin:0 calc(-1 * var(--page-x));padding:0 var(--page-x);scroll-snap-type:x mandatory;scroll-padding:0 var(--page-x);scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  .rg-home-forms__list::-webkit-scrollbar{display:none}
  .rg-home-forms__item{flex:0 0 132px;scroll-snap-align:start}
  .rg-home-form{gap:10px}
  .rg-home-form__tile{width:132px;height:165px;aspect-ratio:auto}
  .rg-home-form__name{font-size:16px}
  .rg-home-rooms{gap:8px}
  .rg-home-rooms__label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .rg-home-rooms__list{gap:8px}
  .rg-home-rooms__link{padding:0 16px}

  .rg-home-novelties__grid.rg-grid{gap:24px 12px}

  .rg-home-interiors{padding:44px 0}
  .rg-home-int{gap:18px 12px}
  .rg-home-int__title{font-size:13px}
  /* В HomeMobile — два интерьера; остальные — по кнопке «Все интерьеры» */
  .rg-home-int__item--3,.rg-home-int__item--4{display:none}

  .rg-home-journal{padding:44px 0}
  .rg-home-journal .rg-home-sec__inner{gap:24px}
  .rg-home-journal__list{grid-template-columns:minmax(0,1fr);gap:24px}
  .rg-home-post__title{font-size:20px}
  /* В HomeMobile — две статьи; остальные — по кнопке «Все статьи» */
  .rg-home-journal__list > li:nth-child(n+3){display:none}

  .rg-home-material{padding:44px 0}
  .rg-home-material__about{gap:14px}
  .rg-home-material__about .rg-eyebrow{font-size:11px}
  .rg-home-material .rg-h2{line-height:1.15}
  .rg-home-material__text{font-size:15px}
  /* В HomeMobile плашек материала нет */
  .rg-home-material__features{display:none}

  .rg-home-designers{padding:8px 0 40px}
  .rg-home-designers__box{padding:32px 24px;gap:16px;display:flex;flex-direction:column}
  .rg-home-designers__head{padding:0;gap:16px}
  .rg-home-designers__eyebrow{font-size:11px}
  .rg-home-designers__title{font-size:28px;line-height:1.12}
  .rg-home-designers__side{padding:0;align-items:stretch}
  /* В HomeMobile текста в плашке нет — только заголовок и кнопка */
  .rg-home-designers__text{display:none}
  .rg-home-designers__btn.rg-btn{width:100%;min-height:52px}
}

@media (prefers-reduced-motion:reduce){ .rg-home-forms__list{scroll-behavior:auto} }
