/* ============================================================
   HOMEPAGE — RESIGN vB-COMPROMISE 2026-08-07
   Ветка: feature/homepage-redesign-vB-compromise
   Все стили под home.twig в одном файле (вместо inline).
   Mobile-first, используем CSS-переменные palette v1.
   ============================================================ */

/* ------------------------------------------------------------
   ОБЩЕЕ: sr-only паттерн (замена position:absolute;left:-9999px)
   Согласно ai_search_optimizer + google_optimizer: не клоакинг.
   ------------------------------------------------------------ */
.rb-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------------------------------------
   ОБЩЕЕ: секции + типографика
   ------------------------------------------------------------ */
.rb-home {
  color: #2E2A24;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
}

.rb-home section {
  padding: 32px 24px;
}

/* Ширина контейнеров синхронизирована с mango .container (1520px). */
/* google_optimizer + creative_director 2026-08-07: снимает разрыв «главная выглядит уже». */
.rb-home .rb-hero__inner,
.rb-home .rb-usp__inner,
.rb-home .rb-scenarios__inner,
.rb-home .rb-showcase__inner,
.rb-home .rb-farm-story__inner,
.rb-home .rb-proof__inner,
.rb-home .rb-how__inner,
.rb-home .rb-preview-2027__inner,
.rb-home .rb-region-nav-home__inner,
.rb-home .rb-faq__inner {
  max-width: 1520px;
  margin: 0 auto;
}

/* Hero — компромисс 1240px чтобы line-length H1 читался (не растягивался на всю ширину) */
.rb-home .rb-hero__inner {
  max-width: 1240px;
}

/* FAQ текст — 820px для читаемости (line-length 65-75ch, WCAG optimal) */
.rb-home .rb-faq__inner {
  max-width: 820px;
}

.rb-section-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 16px;
  line-height: 1.2;
}

.rb-section-title-small {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 12px;
  line-height: 1.25;
}

.rb-accent {
  color: #c85a5a;
}

.rb-inline-link {
  color: #c85a5a;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rb-inline-link:hover,
.rb-inline-link:focus-visible {
  color: #a44848;
}

/* ------------------------------------------------------------
   КНОПКИ (все ≥44px по Правилу №0.2)
   ------------------------------------------------------------ */
.rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.rb-btn--primary {
  background-color: #c85a5a;
  color: #ffffff;
  border-color: #c85a5a;
}
.rb-btn--primary:hover,
.rb-btn--primary:focus-visible {
  background-color: #a44848;
  border-color: #a44848;
  color: #ffffff;
}

.rb-btn--ghost {
  background-color: transparent;
  color: #2E2A24;
  border-color: #2E2A24;
}
.rb-btn--ghost:hover,
.rb-btn--ghost:focus-visible {
  background-color: #2E2A24;
  color: #ffffff;
}

.rb-btn__icon {
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   HERO
   ------------------------------------------------------------ */
.rb-hero {
  background-color: #FAFAF7;
  padding: 40px 16px 32px;
}

.rb-hero__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.rb-hero__title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(26px, 6vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 16px;
  color: #2E2A24;
  letter-spacing: -0.01em;
}

.rb-hero__lede {
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.55;
  color: #4a4238;
  margin: 0 0 24px;
  max-width: 56ch;
}

.rb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.rb-hero__cta-primary,
.rb-hero__cta-secondary {
  min-width: 200px;
}

.rb-hero__meta {
  font-size: 13.5px;
  color: #6b6055;
  margin: 0;
  line-height: 1.6;
}

.rb-hero__image {
  order: -1; /* На mobile фото сверху, потом текст */
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 8px;
  background-color: #eee9e2;
}
.rb-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .rb-hero__inner {
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
  }
  .rb-hero__image {
    order: 0; /* На tablet+ фото справа */
  }
}

@media (min-width: 1024px) {
  .rb-hero {
    padding: 56px 24px 48px;
  }
  .rb-hero__actions {
    gap: 16px;
  }
}

/* ------------------------------------------------------------
   USP-триплет
   ------------------------------------------------------------ */
.rb-usp {
  background-color: #ffffff;
  padding: 40px 16px;
}
.rb-usp__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.rb-usp__item {
  text-align: left;
}
.rb-usp__icon {
  color: #7a9a7a;
  margin-bottom: 12px;
  display: block;
}
.rb-usp__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 8px;
  line-height: 1.3;
}
.rb-usp__text {
  font-size: 14.5px;
  color: #4a4238;
  margin: 0;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .rb-usp__inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .rb-usp__item {
    text-align: center;
  }
  .rb-usp__icon {
    margin: 0 auto 16px;
  }
}

/* ------------------------------------------------------------
   3 сценария (rb-scenarios) — без бордер-слева, чистая типографика
   ------------------------------------------------------------ */
.rb-scenarios {
  background-color: #FAFAF7;
}
.rb-scenarios__intro {
  font-size: 15.5px;
  color: #4a4238;
  margin: 0 0 24px;
  max-width: 70ch;
}
.rb-scenarios__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.rb-scenarios__card {
  background-color: #ffffff;
  padding: 20px 22px;
  border-radius: 6px;
  border: 1px solid #ece6dc;
}
.rb-scenarios__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 10px;
  line-height: 1.3;
}
.rb-scenarios__card-text {
  font-size: 14.5px;
  color: #4a4238;
  line-height: 1.55;
  margin: 0 0 14px;
}
.rb-scenarios__card-link {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: #c85a5a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.rb-scenarios__card-link::after {
  content: ' \2192';
  display: inline-block;
  transition: transform 0.2s ease;
}
.rb-scenarios__card-link:hover,
.rb-scenarios__card-link:focus-visible {
  color: #a44848;
  border-bottom-color: #a44848;
}
.rb-scenarios__card-link:hover::after {
  transform: translateX(3px);
}

@media (min-width: 768px) {
  .rb-scenarios__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ------------------------------------------------------------
   Витрина сортов (rb-showcase) — 6 карточек grid 2×3 → 3×2 → 6×1
   БЕЗ цен, БЕЗ кнопки «В корзину» (не каннибализирует /tulip)
   ------------------------------------------------------------ */
.rb-showcase {
  background-color: #ffffff;
}
.rb-showcase__intro {
  font-size: 15.5px;
  color: #4a4238;
  margin: 0 0 24px;
}
.rb-showcase__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.rb-showcase__card {
  display: block;
  background-color: #FAFAF7;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rb-showcase__card:hover,
.rb-showcase__card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 42, 36, 0.08);
}
.rb-showcase__card-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #eee9e2;
}
.rb-showcase__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.rb-showcase__card:hover .rb-showcase__card-image img {
  transform: scale(1.03);
}
.rb-showcase__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 15.5px;
  font-weight: 600;
  color: #2E2A24;
  margin: 12px 14px 6px;
  line-height: 1.3;
}
.rb-showcase__card-text {
  font-size: 13px;
  color: #6b6055;
  margin: 0 14px 14px;
  line-height: 1.5;
}

.rb-showcase__more {
  text-align: center;
  margin-top: 28px;
}

@media (min-width: 640px) {
  .rb-showcase__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .rb-showcase__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  .rb-showcase__card-title {
    font-size: 15px;
  }
  .rb-showcase__card-text {
    font-size: 12.5px;
  }
}

/* ------------------------------------------------------------
   История фермы (rb-farm-story)
   ------------------------------------------------------------ */
/* Cream-warm акцент 2026-08-07 (creative_director): единственная секция с тёплым персиковым фоном — визуальный «остров», к которому возвращается взгляд. Ритм: белый / #FAFAF7 / #FDF5EE (акцент). */
.rb-farm-story {
  background-color: #FDF5EE;
}
.rb-farm-story__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
.rb-farm-story__body {
  font-size: 15.5px;
  color: #4a4238;
  line-height: 1.65;
  margin: 0 0 20px;
  max-width: 62ch;
}
.rb-farm-story__media {
  margin: 0;
}
.rb-farm-story__video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background-color: #eee9e2;
}
.rb-farm-story__video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rb-farm-story__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  color: #2E2A24;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}
.rb-farm-story__video-thumb:hover .rb-farm-story__play-icon,
.rb-farm-story__video-thumb:focus-visible .rb-farm-story__play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}
@media (min-width: 768px) {
  .rb-farm-story__inner {
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
  }
}

/* ------------------------------------------------------------
   Соц.доказательство (rb-proof)
   ------------------------------------------------------------ */
.rb-proof {
  background-color: #ffffff;
}
.rb-proof__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
}
.rb-proof__stat {
  padding: 16px 8px;
}
.rb-proof__number {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  color: #c85a5a;
  line-height: 1;
  margin-bottom: 6px;
}
.rb-proof__label {
  font-size: 13.5px;
  color: #6b6055;
}
@media (min-width: 640px) {
  .rb-proof__inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------
   Как забронировать (rb-how)
   ------------------------------------------------------------ */
.rb-how {
  background-color: #FAFAF7;
}
.rb-how__steps {
  list-style: none;
  counter-reset: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.rb-how__step {
  background-color: #ffffff;
  padding: 24px 22px;
  border-radius: 6px;
  position: relative;
}
.rb-how__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: #c85a5a;
  color: #ffffff;
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50%;
  margin-bottom: 12px;
}
.rb-how__step-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 8px;
  line-height: 1.3;
}
.rb-how__step-text {
  font-size: 14.5px;
  color: #4a4238;
  line-height: 1.55;
  margin: 0;
}
@media (min-width: 768px) {
  .rb-how__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* ------------------------------------------------------------
   Превью 2027 (rb-preview-2027)
   ------------------------------------------------------------ */
.rb-preview-2027 {
  background-color: #ffffff;
}
.rb-preview-2027__intro {
  font-size: 15.5px;
  color: #4a4238;
  margin: 0 0 24px;
  max-width: 68ch;
}
.rb-preview-2027__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.rb-preview-2027__card {
  background-color: #FAFAF7;
  padding: 20px 22px;
  border-radius: 6px;
  border-top: 3px solid #7a9a7a;
}
.rb-preview-2027__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #2E2A24;
  margin: 0 0 8px;
  line-height: 1.3;
}
.rb-preview-2027__card-text {
  font-size: 14.5px;
  color: #4a4238;
  line-height: 1.55;
  margin: 0;
}
@media (min-width: 768px) {
  .rb-preview-2027__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* ------------------------------------------------------------
   «Куда возим» — 5 региональных ссылок над FAQ
   ------------------------------------------------------------ */
.rb-region-nav-home {
  background-color: #FAFAF7;
}
.rb-region-nav-home__intro {
  font-size: 14.5px;
  color: #4a4238;
  margin: 0 0 16px;
  max-width: 68ch;
}
.rb-region-nav-home__list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.rb-region-nav-home__list li {
  padding: 12px 0;
  border-bottom: 1px solid #ece6dc;
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.rb-region-nav-home__list li:last-child {
  border-bottom: 0;
}
/* Fix 2026-08-07: 33px → 48px через chip-стиль (google_optimizer + ux_marketer + devil_advocate) */
.rb-region-nav-home__link {
  font-size: 16px;
  font-weight: 600;
  color: #c85a5a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.rb-region-nav-home__link:hover,
.rb-region-nav-home__link:focus-visible {
  border-color: #c85a5a;
  background-color: #FAFAF7;
  text-decoration: none;
}
.rb-region-nav-home__meta {
  font-size: 13px;
  color: #6b6055;
}
.rb-region-nav-home__more {
  font-size: 14px;
  color: #4a4238;
  margin: 12px 0 0;
}
@media (min-width: 768px) {
  .rb-region-nav-home__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
  }
}
@media (min-width: 1024px) {
  .rb-region-nav-home__list {
    grid-template-columns: repeat(6, 1fr); /* 5 регионов + Тюменская область */
  }
  .rb-region-nav-home__list li {
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 0;
    padding: 12px 0;
  }
  .rb-region-nav-home__meta {
    margin-top: 4px;
  }
}

/* ------------------------------------------------------------
   FAQ
   ------------------------------------------------------------ */
.rb-faq {
  background-color: #ffffff;
}
.rb-faq__inner {
  max-width: 800px;
}
.rb-faq__item {
  margin-bottom: 12px;
  padding: 0;
  border: 1px solid #ece6dc;
  border-radius: 6px;
  overflow: hidden;
  background-color: #FAFAF7;
}
.rb-faq__summary {
  min-height: 48px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: #2E2A24;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 44px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.rb-faq__summary::-webkit-details-marker {
  display: none;
}
.rb-faq__summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #7a9a7a;
  transition: transform 0.2s ease;
  line-height: 1;
}
.rb-faq__item[open] .rb-faq__summary::after {
  content: '\2212'; /* минус */
  color: #c85a5a;
}
.rb-faq__answer {
  padding: 0 20px 16px;
}
.rb-faq__answer-text {
  font-size: 14.5px;
  color: #4a4238;
  line-height: 1.65;
}

/* ------------------------------------------------------------
   OpenCart-технические слоты (mango_slideshow, mango_advantages,
   mango_banner, mango_category, featured, bestseller и т.д.) —
   ПОЛНОСТЬЮ скрываем на главной: они дублируют новую 10-блочную
   структуру редизайна и создают визуальный «мусор» между новыми
   секциями. Оставляем в HTML для возможного возврата в будущем
   (владелец может вернуть одной CSS-правкой или удалить modules
   в admin → Layouts → Home).
   Задеплоено 2026-08-07 (google_optimizer + ux_marketer + creative)
   ------------------------------------------------------------ */
.rb-home .rb-oc-slots,
.rb-home .rb-oc-slots:empty,
.rb-home .rb-oc-slots .row:empty {
  display: none !important;
}

/* ------------------------------------------------------------
   Sticky footer CTA (только на mobile)
   ------------------------------------------------------------ */
.rb-sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px) + 8px);
  display: none;
  z-index: 100;
  gap: 8px;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 10px;
  box-shadow: 0 -2px 16px rgba(46, 42, 36, 0.15);
  transform: translateY(120%);
  transition: transform 0.28s ease;
}
.rb-sticky-cta--visible {
  transform: translateY(0);
}
.rb-sticky-cta__btn {
  flex: 1;
  min-width: 0;
  min-height: 48px;
}

/* Sticky виден только на mobile до 767px */
@media (max-width: 767px) {
  .rb-sticky-cta {
    display: flex;
  }
  /* Оставляем место снизу под sticky-бар */
  .rb-faq {
    padding-bottom: 100px;
  }
}

/* ------------------------------------------------------------
   Reduced motion — отключаем все переходы для accessibility
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
