/* Hero — burobaturina.ru (главная: #bb-hero-root; лендинги услуг: #bb-service-hero) */

#bb-hero-root.bb-hero,
#bb-service-hero.bb-hero,
#bb-hero-root.bb-hero *,
#bb-service-hero.bb-hero * {
  box-sizing: border-box;
}

#bb-hero-root.bb-hero,
#bb-service-hero.bb-hero {
  --bb-bg: #fbf8f6;
  --bb-navy: #1a2e40;
  --bb-gray: #445566;
  --bb-accent: #c87a4a;
  --bb-accent-hover: #a05e38;
  --bb-icon-bg: rgba(216, 122, 92, 0.08);
  --bb-icon-border: rgba(216, 122, 92, 0.35);
  --bb-container-wide: 1920px;
  --bb-container-narrow: 1200px;
  --bb-gutter-wide: 120px;
  --bb-gutter-narrow: 20px;
  --bb-visual-gap: 64px;
  --bb-visual-anchor: 607px;
  --bb-visual-container: var(--bb-container-wide);
  --bb-header-offset: 76px;
  --bb-hero-title-top: 200px;

  background: var(--bb-bg);
  color: var(--bb-navy);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  width: 100%;
  min-height: max(818px, 100svh);
  display: flex;
  flex-direction: column;
}

/* Главная: зона контента как на лендинге — экран минус шапка */
#bb-hero-root.bb-hero:not(.bb-hero--service) {
  box-sizing: border-box;
  padding-top: var(--bb-header-h, 96px);
  min-height: max(818px, 100svh);
}

#bb-hero-root.bb-hero:not(.bb-hero--service) .bb-hero__main {
  padding-top: 0;
}

/* Лендинги услуг (/landing, /shop, …): hero и картинка — как на главной */
#bb-service-hero.bb-hero.bb-hero--service {
  box-sizing: border-box;
  padding-top: var(--bb-header-h, 96px);
  min-height: max(818px, 100svh);
}

#bb-hero-root .bb-hero__container,
#bb-service-hero .bb-hero__container {
  width: 100%;
  max-width: var(--bb-container-wide);
  margin: 0 auto;
  padding-left: var(--bb-gutter-wide);
  padding-right: var(--bb-gutter-wide);
}

#bb-hero-root .bb-hero__header {
  position: relative;
  z-index: 20;
  padding-top: 28px;
}

#bb-hero-root .bb-hero__header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 48px;
}

#bb-hero-root .bb-hero__logo {
  justify-self: start;
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

#bb-hero-root .bb-hero__logo-img {
  display: block;
  width: auto;
  height: 48px;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

#bb-hero-root .bb-hero__burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 30;
  justify-self: end;
  grid-column: 3;
}

#bb-hero-root .bb-hero__burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--bb-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#bb-hero-root .bb-hero__nav {
  display: contents;
}

#bb-hero-root .bb-hero__nav-menu {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 40px;
}

#bb-hero-root .bb-hero__nav-link {
  color: var(--bb-gray);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

#bb-hero-root .bb-hero__nav-link:hover,
#bb-hero-root .bb-hero__nav-link.is-active {
  color: var(--bb-navy);
}

#bb-hero-root .bb-hero__nav-inner {
  display: contents;
}

#bb-hero-root .bb-hero__nav-logo {
  display: none;
}

#bb-hero-root .bb-hero__nav-contacts {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

#bb-hero-root .bb-hero__phone {
  color: var(--bb-navy);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

#bb-hero-root .bb-hero__phone:hover {
  color: var(--bb-accent);
}

#bb-hero-root .bb-hero__messengers {
  display: flex;
  align-items: center;
  gap: 10px;
}

#bb-hero-root .bb-hero__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

#bb-hero-root .bb-hero__icon-btn:hover {
  opacity: 0.82;
}

#bb-hero-root .bb-hero__icon-img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#bb-hero-root .bb-hero__main,
#bb-service-hero .bb-hero__main {
  position: relative;
  z-index: 10;
  flex: 1;
  order: 1;
  padding-top: calc(var(--bb-hero-title-top) - var(--bb-header-offset));
  padding-bottom: 48px;
}

#bb-hero-root .bb-hero__grid,
#bb-service-hero .bb-hero__grid {
  position: relative;
  z-index: 2;
  width: 100%;
}

#bb-hero-root .bb-hero__content,
#bb-service-hero .bb-hero__content {
  max-width: 607px;
}

#bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
  margin: 0 0 24px;
  color: var(--bb-navy);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

#bb-hero-root .bb-hero__title-line,
#bb-service-hero .bb-hero__title-line {
  display: inline;
}

#bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
  margin: 0 0 37px;
  max-width: 549px;
  color: var(--bb-gray);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

#bb-hero-root .bb-hero__actions,
#bb-service-hero .bb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

#bb-hero-root .bb-hero__btn,
#bb-service-hero .bb-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#bb-hero-root .bb-hero__btn--primary,
#bb-service-hero .bb-hero__btn--primary {
  min-width: 240px;
  background: var(--bb-accent);
  color: #fff;
}

#bb-hero-root .bb-hero__btn--primary:hover,
#bb-service-hero .bb-hero__btn--primary:hover {
  background: var(--bb-accent-hover);
  color: #fff;
}

#bb-hero-root .bb-hero__btn--secondary,
#bb-service-hero .bb-hero__btn--secondary {
  min-width: 240px;
  background: transparent;
  color: var(--bb-navy);
  gap: 8px;
}

#bb-hero-root .bb-hero__btn--secondary span,
#bb-service-hero .bb-hero__btn--secondary span {
  transition: transform 0.2s ease;
}

#bb-hero-root .bb-hero__btn--secondary:hover,
#bb-service-hero .bb-hero__btn--secondary:hover {
  color: var(--bb-accent);
}

#bb-hero-root .bb-hero__btn--secondary:hover span,
#bb-service-hero .bb-hero__btn--secondary:hover span {
  transform: translateX(3px);
}

#bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
  position: absolute;
  top: 21px;
  right: 0;
  left: calc((100% - min(100%, var(--bb-visual-container))) / 2 + var(--bb-gutter-wide) + var(--bb-visual-anchor) + var(--bb-visual-gap));
  z-index: 1;
  order: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: visible;
  pointer-events: none;
  margin-right: calc(-1 * max(0px, (100% - var(--bb-visual-container)) / 2));
}

#bb-hero-root .bb-hero__image,
#bb-service-hero .bb-hero__image {
  display: block;
  width: 1428px;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: translateX(-7px);
}

/* Десктоп: один экран, без скролла в hero; выпадающее «Услуги» в шапке — не режем */
@media (min-width: 1200px) {
  #bb-hero-root.bb-hero:not(.bb-hero--service),
  #bb-service-hero.bb-hero.bb-hero--service {
    min-height: 100svh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  #bb-hero-root.bb-hero:not(.bb-hero--service) .bb-hero__visual,
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual {
    max-height: calc(100svh - var(--bb-header-h, 96px));
    max-height: calc(100dvh - var(--bb-header-h, 96px));
    overflow: hidden;
  }

  #bb-hero-root .bb-hero__main,
  #bb-service-hero .bb-hero__main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Лендинги услуг: фиксированный верхний ритм, без «плавающего» center (корпоративный и др.) */
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__main {
    justify-content: flex-start;
    padding-top: calc(var(--bb-hero-title-top, 200px) - var(--bb-header-h, 96px));
    padding-bottom: 0;
  }

  #bb-hero-root .bb-hero__grid,
  #bb-service-hero .bb-hero__grid {
    width: 100%;
  }

  #bb-hero-root .bb-hero__title-line,
  #bb-service-hero .bb-hero__title-line {
    display: block;
  }
}

/* 1920: ширина заголовка и текста — перенос только за счёт max-width */
@media (min-width: 1920px) {
  #bb-hero-root.bb-hero,
  #bb-service-hero.bb-hero {
    --bb-visual-gap: 40px;
    --bb-visual-anchor: 720px;
  }

  #bb-hero-root .bb-hero__content,
#bb-service-hero .bb-hero__content {
    max-width: 920px;
  }

  #bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
    max-width: 920px;
    font-size: 56px;
  }

  #bb-hero-root.bb-hero.bb-hero--shop .bb-hero__title,
  #bb-service-hero.bb-hero.bb-hero--shop .bb-hero__title {
    max-width: 720px;
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    max-width: 720px;
  }

  #bb-hero-root .bb-hero__image,
#bb-service-hero .bb-hero__image {
    transform: translateX(-80px);
  }
}

/* 1200px artboard */
@media (min-width: 1200px) and (max-width: 1919px) {
  #bb-hero-root.bb-hero,
  #bb-service-hero.bb-hero {
    --bb-gutter-wide: var(--bb-gutter-narrow);
    --bb-visual-container: var(--bb-container-narrow);
    --bb-title-width: 780px;
    --bb-text-width: 560px;
    --bb-visual-anchor: var(--bb-text-width);
    --bb-visual-gap: 40px;
  }

  #bb-hero-root .bb-hero__container,
#bb-service-hero .bb-hero__container {
    max-width: var(--bb-container-narrow);
  }

  #bb-hero-root .bb-hero__grid,
#bb-service-hero .bb-hero__grid {
    max-width: var(--bb-container-narrow);
  }

  #bb-hero-root .bb-hero__content,
#bb-service-hero .bb-hero__content {
    max-width: var(--bb-title-width);
  }

  #bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
    top: calc(21px + 50px);
  }

  #bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
    max-width: var(--bb-title-width);
  }

  /* Только /shop/: длинный заголовок не наезжает на картинку */
  #bb-hero-root.bb-hero.bb-hero--shop .bb-hero__title,
  #bb-service-hero.bb-hero.bb-hero--shop .bb-hero__title {
    max-width: var(--bb-text-width);
  }

  #bb-hero-root.bb-hero.bb-hero--shop .bb-hero__content,
  #bb-service-hero.bb-hero.bb-hero--shop .bb-hero__content {
    position: relative;
    z-index: 2;
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    max-width: var(--bb-text-width);
  }

  #bb-hero-root .bb-hero__image,
#bb-service-hero .bb-hero__image {
    width: 1073px;
    transform: translateX(-30px);
  }
}

/* Планшет и телефон: бургер-меню */
@media (max-width: 1199px) {
  #bb-hero-root.bb-hero,
  #bb-service-hero.bb-hero {
    --bb-gutter-wide: var(--bb-gutter-narrow);
  }

  #bb-hero-root .bb-hero__container,
#bb-service-hero .bb-hero__container {
    max-width: var(--bb-container-narrow);
  }

  #bb-hero-root .bb-hero__header-inner {
    grid-template-columns: 1fr auto;
  }

  #bb-hero-root .bb-hero__burger {
    display: block;
  }

  #bb-hero-root .bb-hero__nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 300;
    padding: 0;
    background: var(--bb-bg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    min-height: 100vh;
    pointer-events: none;
  }

  #bb-hero-root .bb-hero__nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  #bb-hero-root .bb-hero__nav-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 28px var(--bb-gutter-narrow) 32px;
    box-sizing: border-box;
  }

  #bb-hero-root .bb-hero__nav-logo {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    height: 48px;
    margin: 0 0 24px;
    text-decoration: none;
    line-height: 0;
  }

  #bb-hero-root .bb-hero__nav-logo .bb-hero__logo-img {
    height: 40px;
  }

  #bb-hero-root .bb-hero__nav-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    grid-column: auto;
  }

  #bb-hero-root .bb-hero__nav-link {
    display: block;
    width: 100%;
    padding: 16px 0;
    font-size: 18px;
    text-align: left;
    border-bottom: 1px solid rgba(26, 46, 64, 0.08);
  }

  #bb-hero-root .bb-hero__nav-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
    margin: 24px 0 0;
    padding-top: 8px;
    grid-column: auto;
    justify-self: auto;
  }

  #bb-hero-root .bb-hero__phone {
    font-size: 20px;
    font-weight: 500;
  }

  #bb-hero-root .bb-hero__messengers {
    justify-content: flex-start;
  }

  #bb-hero-root.bb-hero.is-menu-open .bb-hero__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  #bb-hero-root.bb-hero.is-menu-open .bb-hero__burger span:nth-child(2) {
    opacity: 0;
  }

  #bb-hero-root.bb-hero.is-menu-open .bb-hero__burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Планшет/адаптив: единый отступ от шапки до контента (как на главной) */
@media (max-width: 1199px) {
  #bb-hero-root .bb-hero__main,
  #bb-service-hero .bb-hero__main {
    padding-top: calc(var(--bb-hero-title-top, 200px) - var(--bb-header-h, 96px));
    padding-bottom: 64px;
  }

  #bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
    position: static;
    left: auto;
    right: auto;
    order: 2;
    display: flex;
    justify-content: center;
    margin: 0 -20px;
    pointer-events: none;
  }

  #bb-hero-root .bb-hero__content,
#bb-service-hero .bb-hero__content {
    max-width: 837px;
    margin: 0 auto;
    text-align: center;
  }

  #bb-hero-root .bb-hero__title-line + .bb-hero__title-line::before,
  #bb-service-hero .bb-hero__title-line + .bb-hero__title-line::before {
    content: "\00a0";
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    max-width: 719px;
    margin-left: auto;
    margin-right: auto;
  }

  #bb-hero-root .bb-hero__actions,
#bb-service-hero .bb-hero__actions {
    justify-content: center;
  }

  #bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
    min-height: auto;
    justify-content: center;
  }

  #bb-hero-root .bb-hero__image,
#bb-service-hero .bb-hero__image {
    width: min(1020px, 100%);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
    margin-top: -60px;
  }
}

@media (max-width: 959px) {
  #bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
    font-size: 40px;
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    font-size: 18px;
    max-width: 618px;
  }
}

/* Телефон: отступы и верстка контента */
@media (max-width: 767px) {
  #bb-hero-root .bb-hero__main,
#bb-service-hero .bb-hero__main {
    padding-top: 56px;
    padding-bottom: 32px;
  }

  #bb-hero-root .bb-hero__content,
#bb-service-hero .bb-hero__content {
    text-align: center;
  }

  #bb-hero-root .bb-hero__logo-img {
    height: 40px;
  }

  #bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
    font-size: 32px;
    margin-bottom: 24px;
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    margin-bottom: 40px;
  }

  #bb-hero-root .bb-hero__actions,
#bb-service-hero .bb-hero__actions {
    flex-direction: column;
    align-items: center;
  }

  #bb-hero-root .bb-hero__btn,
#bb-service-hero .bb-hero__btn {
    width: min(100%, 320px);
    min-width: 240px;
  }

  #bb-hero-root .bb-hero__btn--secondary,
#bb-service-hero .bb-hero__btn--secondary {
    justify-content: center;
  }

  #bb-hero-root .bb-hero__visual,
#bb-service-hero .bb-hero__visual {
    margin-top: -6px;
    margin-left: -20px;
    margin-right: -20px;
    min-height: 0;
  }

  #bb-hero-root .bb-hero__image,
#bb-service-hero .bb-hero__image {
    width: min(1020px, 100%);
    transform: none;
    margin-left: 0;
  }
}

@media (max-width: 479px) {
  #bb-hero-root .bb-hero__title,
#bb-service-hero .bb-hero__title {
    font-size: 28px;
  }

  #bb-hero-root .bb-hero__text,
#bb-service-hero .bb-hero__text {
    font-size: 16px;
  }

  #bb-hero-root .bb-hero__btn,
#bb-service-hero .bb-hero__btn {
    min-height: 52px;
    font-size: 16px;
  }
}

/* Лендинги услуг: отдельная шапка .bb-header, hero как на главной */
#bb-service-hero.bb-hero.bb-hero--service .bb-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bb-accent);
}

@media (max-width: 1199px) {
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__eyebrow {
    display: block;
    text-align: center;
  }
}

/* Лендинги услуг: без zoom/reveal у картинки (позиция — общие правила .bb-hero__visual выше) */
#bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual.bb-reveal,
#bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual.bb-reveal--visible {
  opacity: 1 !important;
  transition: none !important;
}

#bb-service-hero.bb-hero.bb-hero--service .bb-hero__image,
#bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual.bb-reveal--visible .bb-hero__image {
  transition: none !important;
}

@media (min-width: 1200px) {
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual.bb-reveal,
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual.bb-reveal--visible {
    transform: none !important;
  }
}

/* Лендинги услуг: на планшете/телефоне картинка ближе к кнопкам, без «пустого» flex-зазора */
@media (max-width: 1199px) {
  #bb-service-hero.bb-hero.bb-hero--service {
    min-height: auto;
  }

  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__main {
    flex: 0 0 auto;
    padding-bottom: 20px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual {
    margin-top: 16px;
  }
}

@media (max-width: 767px) {
  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__main {
    padding-bottom: 12px;
  }

  #bb-service-hero.bb-hero.bb-hero--service .bb-hero__visual {
    margin-top: 64px;
  }
}

