/* layout.css — header, footer, контейнеры, секции */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.main {
  min-height: 60vh;
}

.section {
  padding: var(--space-7) 0;
}

.section--soft {
  background: var(--color-bg-soft);
}

.section--dark {
  background: var(--color-bg);
  color: var(--color-text-on-dark);
}
.section--dark a { color: #fff; }

.section__title {
  margin-bottom: var(--space-5);
}

.page__title {
  margin-bottom: var(--space-3);
}

.page__tagline {
  color: var(--color-text-muted);
  font-size: 18px;
  margin-bottom: var(--space-5);
}

.breadcrumbs {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-text); }

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  width: 100%;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
  flex-shrink: 0;
}
.header__logo:hover { color: var(--color-text); }

.header__logo-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.header__logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Якоря не должны прятаться под sticky-шапкой */
[id^="service-"],
#contacts,
.service-block {
  scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

/* Мобильная навигация: оверлей до 1200px */
.header__nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: #fff;
  padding: var(--space-4);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  overflow-y: auto;
  z-index: 90;
}

.header__nav--open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.header__menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}
.header__menu li {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
}
.header__menu a {
  display: block;
  color: var(--color-text);
  font-weight: 500;
  font-size: 18px;
  padding: var(--space-1) 0;
}
.header__menu a:hover { color: var(--color-cosmic); }
.header__menu a[aria-current] {
  color: var(--color-cosmic);
}

/* Анимация бургера при открытии */
.header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.header__burger span {
  transition: transform 0.2s ease, opacity 0.15s ease;
}

/* Когда меню открыто — блокируем прокрутку body */
body.is-nav-open {
  overflow: hidden;
}

/* Sticky action-bar на мобайле */
.action-bar {
  display: none;
}

@media (max-width: 1199px) {
  .action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: flex;
    gap: 8px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 14px rgba(25, 38, 90, 0.06);
  }

  .action-bar__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: filter 0.18s, transform 0.1s;
  }
  .action-bar__btn:active { transform: scale(0.97); }
  .action-bar__btn:hover  { color: #fff; filter: brightness(1.05); }

  .action-bar__btn svg {
    width: 18px;
    height: 18px;
  }

  .action-bar__btn--phone { background: var(--color-cosmic); }
  .action-bar__btn--tg    { background: #229ED9; }

  /* Контент не должен прятаться под баром */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Когда мобильное меню открыто — бар не нужен */
  body.is-nav-open .action-bar { display: none; }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.header__phone {
  display: none;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
@media (min-width: 1200px) {
  .header__phone { display: inline-block; }
}

/* Бадж «сейчас работаем / закрыто» */
.working-status {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
}
.working-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.working-status--open {
  background: #E5F7EE;
  color: #1F7B4F;
}
.working-status--open .working-status__dot {
  background: #2DBA77;
  box-shadow: 0 0 0 4px rgba(45, 186, 119, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}
.working-status--closed .working-status__dot {
  background: #B0B5C2;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(45, 186, 119, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(45, 186, 119, 0.05); }
}

/* Показываем только на десктопе — на мобайле есть action bar */
@media (min-width: 1200px) {
  .working-status { display: inline-flex; }
}

.header__burger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 0;
  padding: var(--space-2);
}
.header__burger span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

@media (min-width: 1200px) {
  .header__nav {
    position: static;
    inset: auto;
    background: transparent;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    overflow: visible;
  }
  .header__menu {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--space-3);
  }
  .header__menu li {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .header__menu a {
    font-size: 14px;
    white-space: nowrap;
  }
  .header__burger { display: none; }
}

/* Footer */
.footer {
  background: var(--color-bg);
  color: var(--color-text-on-dark);
  padding: var(--space-7) 0 var(--space-4);
  margin-top: var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.footer__tagline {
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.footer__title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-3);
}

.footer__list,
.footer__social {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__list li,
.footer__social li {
  margin-bottom: var(--space-2);
}
.footer__list a,
.footer__social a {
  color: #fff;
}
.footer__list a:hover,
.footer__social a:hover {
  color: var(--color-cosmic);
}

.footer__social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.footer__social li { margin: 0; }

.footer__bottom {
  padding-top: var(--space-4);
  margin-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}
