/* Layout shell — header, footer, grids, sticky CTA. */

.fm-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 16px;
  background: var(--fm-signal);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.fm-skip-link:focus {
  left: var(--fm-pad-x);
  top: 8px;
}

.fm-main {
  min-height: 50vh;
}

.fm-announce {
  background: var(--fm-ink);
  color: var(--fm-white);
  font-size: 14px;
  line-height: 1.4;
}

.fm-announce__inner {
  padding-block: 8px;
  text-align: center;
}

.fm-announce__text {
  margin: 0;
}

.fm-header {
  background: var(--fm-white);
  border-bottom: 1px solid rgba(38, 34, 29, 0.08);
  z-index: 200;
}

.fm-header--sticky {
  position: sticky;
  top: 0;
}

.fm-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(38, 34, 29, 0.08);
}

.fm-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding-block: 12px;
}

.fm-header__logo {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--fm-ink);
}

.fm-header__logo img {
  max-height: 40px;
  width: auto;
}

.fm-header__logo-text {
  font-family: var(--fm-font-display);
  font-weight: 700;
  font-size: 18px;
}

.fm-nav {
  flex: 1 1 auto;
  display: none;
}

.fm-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fm-nav__list > li {
  position: relative;
}

.fm-nav__list a {
  color: var(--fm-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

.fm-nav__list a:hover,
.fm-nav__list a:focus-visible {
  color: rgba(255,255,255,.7);
}

.fm-nav__list .sub-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--fm-white);
  border: 1px solid rgba(38, 34, 29, 0.1);
  border-radius: var(--fm-radius-sm);
  box-shadow: 0 12px 32px rgba(38, 34, 29, 0.12);
  z-index: 30;
}

.fm-nav__list > li:hover > .sub-menu,
.fm-nav__list > li:focus-within > .sub-menu {
  display: block;
}

.fm-nav__list .sub-menu a {
  display: block;
  padding: 10px 16px;
}

.fm-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.fm-header__socials {
  display: none;
  align-items: center;
  gap: 8px;
}

.fm-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--fm-ink);
  text-decoration: none;
  border-radius: var(--fm-radius-sm);
}

.fm-header__icon:hover {
  color: rgba(255,255,255,.7);
  background: var(--fm-surface-alt);
}

.fm-header__cta {
  display: none;
}

.fm-burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--fm-ink);
}

.fm-burger__lines,
.fm-burger__lines::before,
.fm-burger__lines::after {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fm-burger__lines {
  position: relative;
}

.fm-burger__lines::before,
.fm-burger__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.fm-burger__lines::before {
  top: -7px;
}

.fm-burger__lines::after {
  top: 7px;
}

.fm-burger[aria-expanded="true"] .fm-burger__lines {
  background: transparent;
}

.fm-burger[aria-expanded="true"] .fm-burger__lines::before {
  top: 0;
  transform: rotate(45deg);
}

.fm-burger[aria-expanded="true"] .fm-burger__lines::after {
  top: 0;
  transform: rotate(-45deg);
}

.fm-mobile-nav {
  border-top: 1px solid rgba(38, 34, 29, 0.08);
  background: var(--fm-white);
  padding-block: 16px 24px;
}

.fm-mobile-nav[hidden] {
  display: none !important;
}

.fm-mobile-nav__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.fm-mobile-nav__list a {
  display: block;
  padding: 12px 0;
  color: var(--fm-ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(38, 34, 29, 0.06);
}

.fm-mobile-nav__list .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
}

.fm-mobile-nav__cta {
  width: 100%;
  text-align: center;
}

.fm-footer {
  background: var(--fm-dark);
  color: var(--fm-white);
  margin-top: var(--fm-section-gap);
}

.fm-footer__grid {
  display: grid;
  gap: 32px;
  padding-block: 48px;
}

.fm-footer__about,
.fm-footer__requisites {
  margin: 12px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
}

.fm-footer__requisites {
  list-style: none;
  padding: 0;
}

.fm-footer__col-title {
  margin: 0 0 12px;
  font-family: var(--fm-font-display);
  font-size: 16px;
  font-weight: 700;
}

.fm-footer__links,
.fm-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fm-footer__links a,
.fm-footer__legal a {
  color: var(--fm-ink);
  text-decoration: none;
  font-size: 15px;
}

.fm-footer__links li + li,
.fm-footer__legal li + li {
  margin-top: 8px;
}

.fm-footer__links a:hover,
.fm-footer__legal a:hover {
  color: rgba(255,255,255,.7);
}

.fm-footer__bottom {
  border-top: 1px solid rgba(38, 34, 29, 0.1);
}

.fm-footer__bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 20px;
}

.fm-footer__copy {
  margin: 0;
  font-size: 14px;
}

.fm-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.fm-footer__legal li {
  margin: 0;
}

.fm-sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(246, 241, 233, 0.96);
  border-top: 1px solid rgba(38, 34, 29, 0.08);
}

.fm-sticky-cta__btn {
  width: 100%;
  text-align: center;
}

body.has-sticky-cta {
  padding-bottom: 84px;
}

.fm-breadcrumbs {
  margin-bottom: 24px;
  font-size: 14px;
}

.fm-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: rgba(38, 34, 29, 0.7);
}

.fm-breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.5;
}

.fm-breadcrumbs a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
}

.fm-section-pad {
  padding: var(--fm-space-6);
}

.fm-archive-head {
  margin-bottom: 32px;
}

.fm-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.fm-empty {
  max-width: var(--fm-measure, 42rem);
}

.fm-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fm-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .fm-nav {
    display: block;
  }

  .fm-header__socials {
    display: inline-flex;
  }

  .fm-burger,
  .fm-mobile-nav,
  .fm-sticky-cta {
    display: none !important;
  }

  body.has-sticky-cta {
    padding-bottom: 0;
  }

  .fm-footer__grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    padding-block: 64px;
  }

  .fm-footer__bottom-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .fm-header__cta {
    display: inline-flex;
  }

  .fm-header__bar {
    min-height: 80px;
  }
}

@media (max-width: 767px) {
  .fm-sticky-cta {
    display: block;
  }
}
