/* T15: apply adopted M02 tokens to the existing home markup and Bitrix components. */
body.mama-home-site {
  background: var(--mama-color-page);
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
}
body.mama-home-site .b-layout,
body.mama-home-site .b-layout__content {
  background: var(--mama-color-page);
}
body.mama-home-site:has(.mama-site-header) .b-layout__content {
  padding-top: 0;
}
body.mama-home-site .b-content-main {
  box-sizing: border-box;
  position: relative;
  max-width: var(--mama-container-max);
  margin: 0 auto;
  padding-inline: var(--mama-page-gutter);
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
}
body.mama-home-site .mama-home-hero-site {
  position: relative;
  min-height: 640px;
  isolation: isolate;
}
body.mama-home-site .mama-home-hero-site::before {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: 60%;
  background:
    linear-gradient(to top, var(--mama-color-page), transparent 26%),
    url("/local/mama/ui2/assets/hero-hands.png") center / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 32%);
  pointer-events: none;
  content: "";
}
body.mama-home-site .b-content-main-first-bg {
  display: none;
}
body.mama-home-site .mama-home-hero-site > h1 {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-width: 620px;
  margin: 0;
  padding: clamp(30px, 4vw, 56px) 0 0;
  color: var(--mama-color-heading);
  font: 600 clamp(32px, 4vw, 52px)/1.1 var(--mama-font-sans);
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: none;
}
body.mama-home-site .home-page__title {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  margin: 0 0 clamp(40px, 5vw, 70px);
  padding: var(--mama-space-5) 0 0;
  color: var(--mama-color-text);
}
body.mama-home-site .home-page__tiser {
  max-width: 620px;
  color: var(--mama-color-text);
  font: 400 clamp(16px, 1.5vw, 18px)/1.58 var(--mama-font-sans);
}
body.mama-home-site .home-page__tiser :where(p, li) {
  color: var(--mama-color-text);
  line-height: 1.58;
}
body.mama-home-site .home-page__tiser ul {
  padding-left: 0;
}
body.mama-home-site .home-page__tiser ul li {
  margin-bottom: var(--mama-space-2);
}
body.mama-home-site .home-page__tiser a {
  color: var(--mama-color-link);
  text-underline-offset: 3px;
}
body.mama-home-site .b-content-main > .b-content__wide {
  position: relative;
  z-index: 1;
}

body.mama-home-site .b-history {
  margin: 0 0 clamp(40px, 5vw, 72px);
  padding: clamp(24px, 3vw, 48px);
  border: 1px solid var(--mama-color-border);
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface);
  color: var(--mama-color-text);
}
body.mama-home-site .b-history__wrapper h2 {
  color: var(--mama-color-text);
  font: 600 clamp(26px, 3vw, 40px)/1.15 var(--mama-font-sans);
  text-shadow: none;
}
body.mama-home-site .b-history__item {
  box-sizing: border-box;
  border: 1px solid var(--mama-color-border);
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface);
  color: var(--mama-color-text);
  box-shadow: none;
}
body.mama-home-site .b-history__item .i-link__decoration {
  display: block;
  width: 100%;
  height: 100%;
}
body.mama-home-site .b-history__item-content {
  position: static;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: var(--mama-space-5);
}
body.mama-home-site .b-history__item-wrapper {
  box-sizing: border-box;
  max-height: 205px;
  padding: 0;
}
body.mama-home-site .b-history__item-wrapper::after {
  display: none;
}
body.mama-home-site .b-history__item-title {
  color: var(--mama-color-heading);
  font: 600 18px/1.3 var(--mama-font-sans);
}
body.mama-home-site .b-history__item-title .cwb {
  display: block;
  width: 100%;
  margin-left: 0;
}
body.mama-home-site .b-history__item-title .cwb__back {
  display: inline-block;
  margin-right: 0;
  padding: 0;
  border: 0 !important;
}
body.mama-home-site .b-history__item-summary {
  display: block;
  max-height: 110px;
  overflow: hidden;
  font: 400 15px/1.45 var(--mama-font-sans);
}
body.mama-home-site .b-history__item-author {
  right: var(--mama-space-5);
  bottom: var(--mama-space-4);
  left: var(--mama-space-5);
}
body.mama-home-site .b-history__item.hover {
  padding-right: 0;
  background: var(--mama-color-surface);
  overflow: hidden;
}
body.mama-home-site .b-history__item.hover .b-history__item-content {
  box-shadow: none;
}
body.mama-home-site
  .b-history__item
  :where(
    .b-history__item-content,
    .b-history__item-wrapper,
    .b-history__item-title,
    .b-history__item-summary,
    .b-history__item-author
  ) {
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
  text-shadow: none;
}
body.mama-home-site .b-history__item .cwb__back {
  background: none !important;
  color: var(--mama-color-text) !important;
  text-shadow: none !important;
}
body.mama-home-site .b-history__extra {
  box-sizing: border-box;
  padding: var(--mama-space-5);
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface-subtle);
  color: var(--mama-color-text);
  box-shadow: none;
}
body.mama-home-site .b-history__extra :where(h2, p, a) {
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
}
body.mama-home-site .b-history__gallery {
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface-subtle);
}
body.mama-home-site .b-history__gallery-panel {
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface);
  color: var(--mama-color-text);
}
body.mama-home-site .b-history__gallery-item:has(> img.lazydbx) {
  width: 170px;
  height: 130px;
  overflow: hidden;
  border: 4px solid var(--mama-color-surface);
  border-radius: var(--mama-radius-md);
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 20px #51382d24;
}
body.mama-home-site .b-history__gallery-item:has(> img.lazydbx) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.mama-home-site
  .b-history__gallery-layer_1
  .b-history__gallery-item:nth-of-type(2) {
  background-image: url("/r/home/1.jpg");
}
body.mama-home-site
  .b-history__gallery-layer_1
  .b-history__gallery-item:nth-of-type(3) {
  background-image: url("/r/home/2.jpg");
}
body.mama-home-site
  .b-history__gallery-layer_2
  .b-history__gallery-item:nth-of-type(1) {
  background-image: url("/r/home/21.png");
}
body.mama-home-site
  .b-history__gallery-layer_2
  .b-history__gallery-item:nth-of-type(2) {
  background-image: url("/r/home/22.png");
}
body.mama-home-site
  .b-history__gallery-layer_3
  .b-history__gallery-item:nth-of-type(1) {
  background-image: url("/r/home/31.png");
}
body.mama-home-site
  .b-history__gallery-layer_3
  .b-history__gallery-item:nth-of-type(2) {
  background-image: url("/r/home/32.png");
}
body.mama-home-site
  .b-history__gallery-layer_4
  .b-history__gallery-item:nth-of-type(1) {
  background-image: url("/r/home/41.png");
}
body.mama-home-site
  .b-history__gallery-layer_4
  .b-history__gallery-item:nth-of-type(2) {
  background-image: url("/r/home/44.png");
}

/* M02R: keep reviews and the floating gallery in normal document flow. */
body.mama-home-site .b-history.mama-home-lower {
  width: auto;
  max-width: var(--mama-container-max);
  margin: clamp(32px, 5vw, 72px) auto clamp(40px, 5vw, 72px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
body.mama-home-site .b-history__wrapper.mama-home-lower__stories {
  padding: clamp(24px, 4vw, 48px);
  background: var(--mama-color-selected-surface);
}
body.mama-home-site .b-history__wrapper > .row-fluid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
}
body.mama-home-site .b-history__wrapper > .row-fluid::before,
body.mama-home-site .b-history__wrapper > .row-fluid::after,
body.mama-home-site .b-history__item-cover::before,
body.mama-home-site .b-history__item-cover::after {
  display: none;
}
body.mama-home-site .b-history__wrapper > .row-fluid > .span8,
body.mama-home-site .b-history__wrapper > .row-fluid > .span3 {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}
body.mama-home-site .b-history__wrapper > .row-fluid > .span3 {
  padding: 0;
  overflow: visible;
  background: none;
}
body.mama-home-site .b-history__wrapper > .row-fluid > .span3::before {
  display: none;
}
body.mama-home-site .b-history__wrapper .span8 > h2 {
  margin: 0 0 24px;
}
body.mama-home-site .b-history__item-cover {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}
body.mama-home-site .b-history__item-cover .b-history__item,
body.mama-home-site .b-history__item-cover .b-history__item:hover,
body.mama-home-site .b-history__item-cover .b-history__item.hover {
  position: relative;
  top: auto;
  left: auto;
  float: none;
  display: block;
  width: auto;
  height: auto;
  min-height: 250px;
  margin: 0;
  padding: 28px;
  overflow: visible;
  border: 0;
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface);
  color: var(--mama-color-text) !important;
  text-decoration: none;
}
body.mama-home-site .b-history__item-cover .b-history__item::before {
  content: "“";
  display: block;
  height: 36px;
  color: var(--mama-color-action);
  font: 700 52px/0.8 var(--mama-font-sans);
}
body.mama-home-site .b-history__item .b-history__item-content {
  position: static;
  display: flex;
  flex-direction: column;
  padding: 0;
}
body.mama-home-site .b-history__item-wrapper {
  max-height: none;
  overflow: visible;
}
body.mama-home-site .b-history__item-summary {
  max-height: none;
  overflow: visible;
  margin-top: 14px;
}
body.mama-home-site .b-history__item-author {
  position: static;
  display: block;
  margin-top: 18px;
  color: var(--mama-color-text-muted);
}
body.mama-home-site .b-history__item .cwb__back,
body.mama-home-site .b-history__item:hover .cwb__back {
  border: 0 !important;
  color: var(--mama-color-heading) !important;
}
body.mama-home-site .b-history__wrapper .span3 .b-history__extra {
  width: 100%;
  height: 100%;
  min-height: 250px;
  margin: 0;
  padding: 28px;
  background: var(--mama-color-surface);
}
body.mama-home-site .b-history__extra.mama-home-lower__story--feature::before {
  content: "";
  display: block;
  width: calc(100% + 56px);
  height: 150px;
  margin: -28px -28px 24px;
  background: url("/f/resources/mama-tech.jpg") center / cover no-repeat;
}
body.mama-home-site .b-history__extra h2 {
  font: 600 20px/1.35 var(--mama-font-sans);
}
body.mama-home-site .b-history__extra :where(h2, p, a) {
  color: var(--mama-color-text);
}
body.mama-home-site .b-history__wrapper .comment .b-icon {
  top: auto;
  color: var(--mama-color-link);
}
body.mama-home-site .b-history__gallery.mama-home-lower__gallery {
  position: relative;
  top: 0;
  width: 100%;
  height: auto;
  min-height: 560px;
  margin: 0;
}
body.mama-home-site .b-history__gallery-wrapper.mama-home-lower__gallery-grid {
  position: relative;
  width: 100%;
  height: 500px;
}
body.mama-home-site .b-history__gallery-layer {
  display: block;
  position: absolute;
  top: 0 !important;
  left: 0;
  width: 100%;
  height: 100%;
}
body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-panel {
  position: absolute;
  top: 7%;
  left: 4%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(37%, 350px);
  min-height: 200px;
  padding: clamp(18px, 3vw, 36px);
  box-shadow: none;
}
body.mama-home-site .b-history__gallery-panel-decor {
  display: none;
}
body.mama-home-site .b-history__gallery-panel :where(a, a:visited, a:hover) {
  color: var(--mama-color-link) !important;
  border: 0 !important;
}
body.mama-home-site .b-history__gallery-panel h2 {
  font: 600 24px/1.25 var(--mama-font-sans);
}
body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-item {
  position: absolute;
  display: block;
  width: clamp(125px, 15vw, 195px);
  height: auto;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 4px solid var(--mama-color-surface);
  border-radius: var(--mama-radius-md);
  box-shadow: 0 8px 20px #51382d24;
  background-color: var(--mama-color-surface);
  background-size: cover;
  background-position: center;
}
body.mama-home-site
  .mama-home-lower__gallery-grid
  .b-history__gallery-item
  img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.mama-home-site .home-page__contact-us {
  box-sizing: border-box;
  min-height: 400px;
  margin: 0 0 clamp(40px, 5vw, 72px);
  padding: clamp(24px, 4vw, 52px) clamp(24px, 4vw, 52px) clamp(24px, 4vw, 52px)
    min(42%, 500px);
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface-subtle);
  color: var(--mama-color-text);
  text-align: left;
}
body.mama-home-site .home-page__contact-us-picture {
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 100%;
  border-radius: var(--mama-radius-lg) 0 0 var(--mama-radius-lg);
  background: url("/local/mama/ui2/assets/contact-us.webp") center bottom /
    contain no-repeat;
}
body.mama-home-site .home-page__contact-us :where(h2, h3, p) {
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
  text-shadow: none;
}
body.mama-home-site .home-page__contact-us a {
  color: var(--mama-color-link);
}
body.mama-home-site .home-page__contact-us .b-button,
body.mama-home-site .home-page__contact-us .b-button__content {
  box-sizing: border-box;
  border: 0;
  border-radius: var(--mama-radius-pill);
  background: var(--mama-color-action) !important;
  color: var(--mama-color-action-text) !important;
  box-shadow: none;
  text-shadow: none;
  font: 600 16px/1.3 var(--mama-font-sans);
}
body.mama-home-site .home-page__contact-us .b-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--mama-space-5);
}
body.mama-home-site .home-page__contact-us .b-button__content {
  padding: 0;
}
body.mama-home-site .home-page__contact-us .b-button::before,
body.mama-home-site .home-page__contact-us .b-button::after,
body.mama-home-site .home-page__contact-us .b-button__content::before,
body.mama-home-site .home-page__contact-us .b-button__content::after {
  display: none !important;
}
body.mama-home-site .home-page__contact-us.mama-home-lower__contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
  grid-template-rows: repeat(4, auto);
  align-content: center;
  gap: 16px 30px;
  top: 0;
  width: min(100%, var(--mama-container-max));
  min-height: 380px;
  margin: 0 auto clamp(40px, 5vw, 72px);
  padding: clamp(24px, 4vw, 56px);
  text-align: left;
}
body.mama-home-site .home-page__contact-us.mama-home-lower__contact::before {
  display: none;
}
body.mama-home-site
  .home-page__contact-us
  > :not(.home-page__contact-us-picture) {
  grid-column: 1;
  margin: 0;
}
body.mama-home-site .home-page__contact-us-picture {
  position: static;
  grid-column: 2;
  grid-row: 1 / 5;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border-radius: var(--mama-radius-md);
  background-position: center;
}
body.mama-home-site .home-page__contact-us :where(h2, p) {
  max-width: 580px;
}
body.mama-home-site .home-page__contact-us h2 {
  font: 600 clamp(26px, 3vw, 36px)/1.2 var(--mama-font-sans);
}
body.mama-home-site .home-page__contact-us p {
  font: 400 17px/1.55 var(--mama-font-sans);
}
body.mama-home-site .home-page__contact-us-button {
  padding: 0;
  text-align: left;
}
body.mama-home-site .home-page__contact-us-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  text-align: left;
}
body.mama-home-site .home-page__contact-us-links a {
  margin: 0;
}
body.mama-home-site .home-page__contact-us > br {
  display: none;
}

body.mama-home-site .b-encyclopedia {
  box-sizing: border-box;
  margin: 0 0 clamp(40px, 5vw, 72px);
  padding: clamp(24px, 4vw, 48px);
  border: 0;
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-selected-surface);
}
body.mama-home-site .b-encyclopedia h2 {
  margin: 0 0 24px;
  color: var(--mama-color-heading);
  font: 600 clamp(26px, 3vw, 40px)/1.15 var(--mama-font-sans);
  text-shadow: none;
}
body.mama-home-site .b-encyclopedia__item {
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-radius: var(--mama-radius-lg);
  background: var(--mama-color-surface);
  color: var(--mama-color-text);
  box-shadow: none;
  text-decoration: none;
}
body.mama-home-site
  .b-encyclopedia__item
  :where(
    .b-encyclopedia__item-content,
    .b-encyclopedia__item-title,
    .b-encyclopedia__item-box,
    p
  ) {
  color: var(--mama-color-text);
  font-family: var(--mama-font-sans);
  text-shadow: none;
}
body.mama-home-site .b-encyclopedia__item .cwb__back {
  background: none !important;
  color: var(--mama-color-text) !important;
  text-shadow: none !important;
}
body.mama-home-site
  .b-encyclopedia__item
  :where(.b-encyclopedia__item-title, .cwb, .cwb__back) {
  color: var(--mama-color-heading) !important;
  font: 600 20px/1.35 var(--mama-font-sans);
  text-decoration: none !important;
}
body.mama-home-site
  .b-encyclopedia__item
  :where(
    .b-encyclopedia__item-content,
    .b-encyclopedia__item-box,
    .mama-publication-excerpt
  ) {
  text-decoration: none !important;
}
body.mama-home-site .b-encyclopedia__item img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
/* M04 cards on the home page keep the complete announcement and natural image height. */
body.mama-home-site .b-encyclopedia__items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
body.mama-home-site .b-encyclopedia__items::before,
body.mama-home-site .b-encyclopedia__items::after {
  display: none;
}
body.mama-home-site .b-encyclopedia__item,
body.mama-home-site .b-encyclopedia__item:hover,
body.mama-home-site .b-encyclopedia__item.hover {
  position: static;
  width: auto;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: var(--mama-color-surface);
}
/* Each publication fills its grid cell at tablet width. */
body.mama-home-site
  .b-encyclopedia
  .b-encyclopedia__items
  .b-encyclopedia__item {
  width: 100% !important;
  min-width: 0;
  float: none !important;
}
body.mama-home-site .b-encyclopedia__item-content,
body.mama-home-site .b-encyclopedia__item.hover .b-encyclopedia__item-content {
  position: static;
  display: block;
  max-height: none;
  margin: 0;
  padding: 20px;
  background: transparent;
  box-shadow: none;
}
body.mama-home-site
  .b-encyclopedia
  .b-encyclopedia__items
  .b-encyclopedia__item
  .b-encyclopedia__item-content {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}
body.mama-home-site .b-encyclopedia__item-wrapper {
  display: block;
  max-height: none;
  overflow: visible;
}
body.mama-home-site .b-encyclopedia__item-wrapper::after {
  display: none;
}
body.mama-home-site .b-encyclopedia__item-box,
body.mama-home-site .b-encyclopedia__item_notimg .b-encyclopedia__item-box,
body.mama-home-site .b-encyclopedia__item_inverse .b-encyclopedia__item-box {
  display: block;
  padding: 0;
  overflow: visible;
}
body.mama-home-site
  .b-encyclopedia
  .b-encyclopedia__items
  .b-encyclopedia__item
  .b-encyclopedia__item-box {
  box-sizing: border-box;
  width: 100%;
  padding: 0;
}
body.mama-home-site .b-encyclopedia__item-cover,
body.mama-home-site .b-encyclopedia__item_inverse .b-encyclopedia__item-cover {
  position: static;
  display: block;
  margin: 0 0 16px;
}
body.mama-home-site .b-encyclopedia__item-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
}
body.mama-home-site .b-encyclopedia__item .cwb__back {
  border: 0 !important;
}
body.mama-home-site .b-encyclopedia__item.hover .h5 .cwb__back,
body.mama-home-site .b-encyclopedia__item:hover .h5 .cwb__back {
  border: 0 !important;
  background: transparent !important;
  color: var(--mama-color-text) !important;
  -webkit-text-fill-color: var(--mama-color-text);
  opacity: 1;
}
body.mama-home-site .b-encyclopedia__item-box .mama-publication-excerpt {
  display: block;
  margin-top: 12px;
  color: var(--mama-color-text);
  font: 400 15px/1.55 var(--mama-font-sans);
  white-space: normal;
  text-decoration: none !important;
}
body.mama-home-site .b-encyclopedia__item-box .mama-publication-excerpt p {
  margin: 0;
}
body.mama-home-site .b-encyclopedia__item-box .mama-publication-excerpt p + p {
  margin-top: 12px;
}
body.mama-home-site .mama-publication-excerpt br + br {
  display: block;
  content: "";
  margin-bottom: 12px;
}
body.mama-home-site .b-encyclopedia__advert:empty {
  display: none;
}
body.mama-home-site .b-encyclopedia__link a {
  color: var(--mama-color-link);
}
body.mama-home-site .home-page__partners {
  margin-bottom: var(--mama-space-6);
}
body.mama-home-site .b-content-main :where(a, button, input):focus-visible {
  outline: 3px solid var(--mama-color-focus);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  body.mama-home-site .mama-home-hero-site::before {
    width: 54%;
  }
  body.mama-home-site .b-history {
    padding: var(--mama-space-5);
  }
}
@media (max-width: 599px) {
  body.mama-home-site .mama-home-hero-site {
    min-height: 0;
  }
  body.mama-home-site .mama-home-hero-site::before {
    display: none;
  }
  body.mama-home-site.mama-ui2-shell .b-content-main-first-bg {
    position: relative;
    display: block !important;
    height: 220px;
    overflow: hidden;
    border-radius: var(--mama-radius-lg);
    background: url("/upload/iblock/663/6636d566a596427f4c196cce8a8f0d79.png")
      center / cover no-repeat;
  }
  body.mama-home-site .b-content-main-first-bg img.lazydbx {
    opacity: 0;
  }
  body.mama-home-site .b-content-main-first-bg img:not(.lazydbx) {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  body.mama-home-site .mama-home-hero-site > h1 {
    padding-top: var(--mama-space-5);
  }
  body.mama-home-site .home-page__title {
    padding-top: var(--mama-space-4);
  }
  body.mama-home-site .b-history {
    padding: var(--mama-space-4);
  }
  body.mama-home-site
    .b-history
    .b-history__wrapper
    .span6
    .b-history__item-content {
    position: static;
    box-sizing: border-box;
    width: 100%;
    padding: 0;
  }
  body.mama-home-site .b-history__item {
    height: auto;
    min-height: 0;
    margin-bottom: var(--mama-space-4);
  }
  body.mama-home-site .b-history__item .i-link__decoration,
  body.mama-home-site
    .b-history
    .b-history__wrapper
    .span6
    .b-history__item-content {
    height: auto;
  }
  body.mama-home-site .b-history__item-wrapper {
    max-height: none;
  }
  body.mama-home-site .b-history__item-summary {
    max-height: none;
  }
  body.mama-home-site .b-history__item-author {
    position: static;
    display: block;
    margin-top: var(--mama-space-4);
  }
  body.mama-home-site .b-history__gallery.mama-home-lower__gallery {
    height: auto;
    margin: 0;
  }
  body.mama-home-site .home-page__contact-us {
    padding: var(--mama-space-5);
  }
  body.mama-home-site .home-page__contact-us-picture {
    position: relative;
    width: 100%;
    height: 220px;
    margin-bottom: var(--mama-space-4);
    border-radius: var(--mama-radius-md);
  }
}
@media (max-width: 1023px) {
  body.mama-home-site .b-encyclopedia__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.mama-home-site .b-encyclopedia__items {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* M02R: flatten the legacy Bitrix wrappers into the three-card kit grid. */
body.mama-home-site .b-history__wrapper > .row-fluid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.mama-home-site .b-history__wrapper > .row-fluid > .span8,
body.mama-home-site .b-history__wrapper > .row-fluid > .span3,
body.mama-home-site .b-history__item-cover {
  display: contents;
}
body.mama-home-site .b-history__wrapper .span8 > h2 {
  grid-column: 1 / -1;
  margin: 0 0 6px;
}
body.mama-home-site .b-history__extra.mama-home-lower__story--feature {
  order: 1;
  min-width: 0;
}
body.mama-home-site .b-history__wrapper .span8 > .comment {
  grid-column: 1 / -1;
  order: 2;
}
body.mama-home-site .b-history__item-title,
body.mama-home-site .b-history__item-title .cwb__back {
  color: var(--mama-color-text) !important;
  font: 600 20px/1.35 var(--mama-font-sans);
}
body.mama-home-site .b-history__extra h2 a {
  color: var(--mama-color-text);
  text-decoration: none;
}
body.mama-home-site .b-history__extra h2 a:hover {
  color: var(--mama-color-link);
}
@media (max-width: 991px) {
  body.mama-home-site .b-history__wrapper > .row-fluid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  body.mama-home-site .b-history__wrapper > .row-fluid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  body.mama-home-site .home-page__contact-us.mama-home-lower__contact {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  body.mama-home-site
    .home-page__contact-us
    > :not(.home-page__contact-us-picture) {
    grid-column: 1;
  }
  body.mama-home-site .home-page__contact-us-picture {
    grid-column: 1;
    grid-row: 5;
    min-height: 220px;
    margin: 0;
  }
  body.mama-home-site .b-history__gallery.mama-home-lower__gallery {
    min-height: 680px;
  }
  body.mama-home-site
    .b-history__gallery-wrapper.mama-home-lower__gallery-grid {
    height: 640px;
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-panel {
    top: 0;
    left: 0;
    width: 100%;
    min-height: 170px;
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-item {
    width: 40%;
  }
}

/* Первый экран отделён от подробного списка направлений. */
body.mama-home-site .mama-home-hero-site {
  min-height: 480px;
  display: grid;
  align-items: center;
  margin-bottom: var(--mama-space-8);
}
body.mama-home-site .mama-home-welcome {
  width: min(100%, 620px);
  padding: var(--mama-space-8) 0;
}
body.mama-home-site .mama-home-welcome .mama-home-experience {
  margin: 0 0 var(--mama-space-5);
  color: var(--mama-color-text);
  font: 500 clamp(21px, 2.2vw, 28px)/1.3 var(--mama-font-sans);
}
body.mama-home-site .mama-home-welcome h1 {
  margin: 0 0 var(--mama-space-4);
  color: var(--mama-color-heading);
  font: 600 clamp(36px, 4.4vw, 60px)/1.08 var(--mama-font-sans);
  letter-spacing: -0.02em;
}
body.mama-home-site .mama-home-welcome .mama-home-hero__actions {
  margin-top: var(--mama-space-6);
}
body.mama-home-site .home-page__title {
  width: 100%;
  padding-top: 0;
}
body.mama-home-site .home-page__tiser {
  max-width: 900px;
}
@media (max-width: 599px) {
  body.mama-home-site .mama-home-hero-site {
    min-height: 0;
    gap: var(--mama-space-4);
  }
  body.mama-home-site .mama-home-welcome {
    order: -1;
    padding: var(--mama-space-6) 0 0;
  }
  body.mama-home-site.mama-ui2-shell
    .mama-home-hero-site
    .b-content-main-first-bg {
    height: 180px;
  }
  body.mama-home-site .mama-home-hero-site .b-content-main-first-bg::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 64px;
    background: linear-gradient(to bottom, transparent, var(--mama-color-page));
    pointer-events: none;
  }
  body.mama-home-site .mama-home-welcome .mama-button {
    flex: 1 1 auto;
    padding-inline: 18px;
  }
}

/* HOME-002: белёсый фон вверху мобильного первого экрана. */
@media (max-width: 599px) {
  body.mama-home-site .mama-home-hero-site {
    position: relative;
    isolation: isolate;
  }
  body.mama-home-site.mama-ui2-shell
    .mama-home-hero-site
    .b-content-main-first-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    z-index: -1;
    opacity: 0.22;
    pointer-events: none;
  }
  body.mama-home-site .mama-home-welcome {
    position: relative;
  }
  body.mama-home-site .mama-home-hero-site .b-content-main-first-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  body.mama-home-site .mama-home-lower__gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mama-space-4);
    height: auto !important;
    padding: var(--mama-space-4);
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-layer {
    display: contents;
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-panel {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    min-height: 0;
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-item {
    position: static;
    width: 100%;
    height: auto;
    margin: 0;
    transform: none;
  }
  body.mama-home-site
    .mama-home-lower__gallery-grid
    .b-history__gallery-item
    img {
    width: 100%;
    height: auto;
  }
  body.mama-home-site .b-history__gallery.mama-home-lower__gallery {
    min-height: 0;
  }
}

@media (max-width: 599px) {
  body.mama-home-site.mama-ui2-shell
    .mama-home-hero-site
    .b-content-main-first-bg {
    display: none !important;
  }
  body.mama-home-site .mama-home-hero-site::before {
    display: block;
    inset: 0;
    width: 100%;
    opacity: 0.22;
    mask-image: none;
  }
  body.mama-home-site .mama-home-lower__gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.mama-home-site .mama-home-lower__gallery-grid .b-history__gallery-item {
    min-width: 0;
    transform: translateY(var(--mama-gallery-parallax, 0px));
  }
}
