/* ============================================================
   ADVDA — advda.ru landing (static)
   Дизайн-токены повторяют Figma-переменные (--advda-*)
   ============================================================ */

:root {
  --advda-color-yellow: #ffcf00;
  --advda-color-text: #090909;
  --advda-color-topbar: #111111;
  --advda-color-footer: #101010;
  --advda-color-divider: #454545;
  --advda-color-background: #fff9ed;
  --advda-color-action: #f00020;
  --advda-color-blue: #0050ee;
  --advda-color-white: #ffffff;

  --advda-border: #e6dccb;
  --advda-border-strong: #b4a58c;
  --advda-shadow-neutral: #a89779;
  --advda-muted: #3f3a33;

  --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Mulish', 'Helvetica Neue', Arial, sans-serif;

  --container: 1920px;
  --gutter: clamp(20px, 4.3vw, 82px);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--advda-color-background);
  color: var(--advda-color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

html,
body {
  overflow-x: clip;
}

:focus-visible {
  outline: 3px solid var(--advda-color-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--advda-color-yellow);
  color: var(--advda-color-text);
  font: 700 16px/1.2 var(--font-body);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* Тень (Shadow / Soft) появляется только при прокрутке */
.site-header.is-stuck {
  box-shadow: 0 3px 2px rgba(102, 74, 31, 0.15);
}

.topbar {
  display: flex;
  align-items: center;
  height: 47.5px;
  background: var(--advda-color-topbar);
  color: var(--advda-color-white);
}

.topbar__text {
  margin: 0;
  padding: 10px 42.5px;
  font: 400 20px/22.4px var(--font-body);
  letter-spacing: 0.01em;
}

.topbar__sep {
  margin-inline: clamp(6px, 0.5vw, 10px);
  opacity: 0.5;
}

.topbar a {
  color: var(--advda-color-white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.topbar a:hover {
  border-bottom-color: var(--advda-color-yellow);
}

/* Мобильный вариант топбара виден только <=700px */
.topbar__brand,
.topbar__sep--mobile {
  display: none;
}

.site-header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7.5px;
  position: relative;
  height: 92.5px;
  padding: 10px var(--advda-space-25, 25px) 10px var(--advda-space-40, 40px);
  background: var(--advda-color-yellow);
}

.logo {
  font: 900 clamp(34px, 2.86vw, 55px)/1 var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--advda-color-text);
  text-decoration: none;
}

.site-header__main__aside {
  display: flex;
  align-items: center;
  gap: 7.5px;
  min-width: 0;
}

.phone-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline: clamp(10px, 0.9vw, 16px);
  border-left: 1.5px solid #7c6000;
  border-right: 1.5px solid #7c6000;
}

.phone-block__number {
  font: 800 clamp(16px, 0.96vw, 18px)/1.2 var(--font-heading);
  text-decoration: none;
  white-space: nowrap;
}

.phone-block__hours {
  font: 400 clamp(13px, 0.85vw, 16px)/1.15 var(--font-body);
  white-space: nowrap;
}

.socials {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials img {
  width: clamp(38px, 2.6vw, 50px);
  height: auto;
  transition: transform 0.15s ease;
}

.socials a:hover img {
  transform: translateY(-2px);
}

/* Бургер виден только на мобильных (<=700px) */
.nav-burger {
  display: none;
}

/* ---------- Меню в шапке (site-header__main) ---------- */

.site-header__main__nav {
  display: block;
}

.site-header__main__nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7.5px;
  min-height: 57.5px;
  margin: 0;
  padding: 0 0 0 7.5px;
  list-style: none;
}

/* Элементы меню не сжимаются — без скачка вёрстки при открытии */
.site-header__main__nav-list .nav-item {
  flex: 0 0 auto;
}

.nav-item__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  font: 900 16.25px/18.2px var(--font-heading);
  color: var(--advda-color-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-item__link:focus-visible {
  outline: 3px solid var(--advda-color-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.nav-item__chevron {
  display: inline-flex;
  align-items: center;
  flex: none;
  width: 10px;
  height: 6px;
  transition: transform 0.2s ease;
}

.nav-item__chevron img {
  display: block;
  width: 10px;
  height: 6px;
}

.nav-item--open > .nav-item__link .nav-item__chevron,
.nav-item__link[aria-expanded='true'] .nav-item__chevron {
  transform: rotate(180deg);
}

.nav-item__indicator {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  display: none;
  height: 3px;
  border-radius: 2px;
  background: var(--advda-color-text);
}

/* Индикатор — постоянно на активном пункте, иначе при ховере на неактивный и не открытый */
.nav-item--active > .nav-item__link .nav-item__indicator {
  display: block;
}

.nav-item:not(.nav-item--active):not(.nav-item--open):hover
  > .nav-item__link
  .nav-item__indicator {
  display: block;
}

.nav-item--open > .nav-item__link .nav-item__indicator {
  display: none;
}

/* Открытый пункт — плашка мега-меню */
.nav-item--open > .nav-item__link,
.nav-item__link[aria-expanded='true'] {
  background: var(--color-bg-cream-base, #fbf3e6);
  box-shadow: 0 4px 0 var(--color-shadow-gold-deep, #b68b00);
  height: 40px;
  min-height: 40px;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 10px;
}

/* ---------- Мега-меню ---------- */

.nav-menu {
  display: none;
}

.nav-item--open .nav-menu {
  display: block;
}

.nav-menu__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1680px, calc(100vw - (2 * var(--gutter))));
  max-height: calc(100vh - 140px);
  background: var(--color-bg-cream-base, #fbf3e6);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.nav-menu__content {
  display: flex;
  align-items: flex-start;
}

.nav-menu__cards {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(406px, 100%), 1fr));
  column-gap: 12px;
  row-gap: 8px;
  padding: 28px;
  min-width: 0;
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: transparent;
  box-shadow: none;
  border-radius: 14px;
  text-decoration: none;
}

/* Тень и фон — только при ховере или активной карточке */
.nav-card:hover {
  background: var(--color-bg-yellow-panel, #fdc20b);
  box-shadow: 0 5px 0 var(--color-shadow-gold-deep, #b68b00);
}

.nav-card--active {
  background: var(--color-bg-yellow-panel, #fdc20b);
  box-shadow: 0 5px 0 var(--color-shadow-gold-deep, #b68b00);
}

.nav-card__media img {
  width: 84px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.nav-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-card__title {
  font: 700 17px/22px var(--font-heading);
  color: var(--advda-color-text);
}

.nav-card__desc {
  font: 400 14px/18px var(--font-body);
  color: var(--advda-color-text);
}

.nav-menu__subnav {
  align-self: stretch;
  flex: 0 0 auto;
  width: 380px;
  padding: 28px;
  background: var(--color-bg-cream-warm, #f9f0df);
}

.nav-menu__subnav-title {
  margin: 0 0 8px;
  font: 700 15px/20px var(--font-heading);
  color: var(--advda-color-muted, #68635e);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.nav-menu__subnav-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Сепараторы между пунктами — постоянные, без layout-сдвига */
.nav-menu__subnav-list li + li {
  border-top: 1px solid var(--advda-color-border, #d6c6ac);
}

.nav-menu__subnav-list a {
  display: block;
  padding: 12px 0;
  font: 600 16px/22px var(--font-body);
  color: var(--advda-color-text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu__subnav-list li:last-child a {
  color: var(--advda-color-blue);
  font: 700 16px/22px var(--font-heading);
}

.nav-menu__subnav-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.nav-menu__low {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 38px;
  border-top: 1px solid var(--advda-color-border, #d6c6ac);
}

.nav-menu__low a {
  font: 700 17px/22px var(--font-heading);
  color: var(--advda-color-blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav-menu__low a:first-child {
  white-space: nowrap;
}

/* ---------- Inner pages (направления) ---------- */

.section--page {
  background: var(--advda-color-white);
  padding-block: clamp(24px, 2.6vw, 44px);
}

.section--page .section__title {
  max-width: 920px;
  margin-bottom: clamp(18px, 1.6vw, 28px);
}

.page-intro {
  max-width: 920px;
  margin: 0 0 clamp(24px, 2.6vw, 48px);
  font: 400 clamp(16px, 1.3vw, 24px)/1.55 var(--font-body);
  color: var(--advda-muted);
}

.page-terms {
  display: grid;
  gap: clamp(20px, 2vw, 32px);
  max-width: 920px;
}

.page-terms h3 {
  margin: 0 0 8px;
  font: 700 clamp(18px, 1.5vw, 26px)/1.3 var(--font-heading);
  color: var(--advda-color-text);
}

.page-terms p {
  margin: 0;
  font: 400 clamp(15px, 1.15vw, 20px)/1.55 var(--font-body);
  color: var(--advda-muted);
}

.page-faq {
  max-width: 920px;
}

.page-faq h3 {
  margin: clamp(12px, 1.6vw, 22px) 0 6px;
  font: 700 clamp(18px, 1.5vw, 26px)/1.3 var(--font-heading);
  color: var(--advda-color-text);
}

.page-faq p {
  margin: 0;
  font: 400 clamp(15px, 1.15vw, 20px)/1.55 var(--font-body);
  color: var(--advda-muted);
}

.page-text {
  max-width: 1000px;
  font: 400 clamp(17px, 1.15vw, 22px)/1.55 var(--font-body);
  color: var(--advda-muted);
}

.directions__list a {
  color: inherit;
  text-decoration: none;
}

.directions__list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 44% 56%;
  background: var(--advda-color-yellow);
  overflow: hidden;
}

.hero__edge {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(36px, 4.17vw, 80px);
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.hero__studs {
  position: absolute;
  left: calc(var(--gutter) + 2px);
  top: clamp(18px, 2.1vw, 40px);
  width: clamp(280px, 37vw, 710px);
  height: auto;
  z-index: 3;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(30px, 3.1vw, 60px) clamp(20px, 2.1vw, 40px)
    clamp(30px, 2.6vw, 50px) var(--gutter);
}

.hero__badge {
  margin: 0;
  width: min(710px, 100%);
  padding: clamp(8px, 0.52vw, 10px) clamp(9px, 0.65vw, 12.5px);
  background: var(--advda-color-text);
  color: var(--advda-color-yellow);
  font: 900 clamp(16px, 1.3vw, 25px)/1.12 var(--font-heading);
  letter-spacing: -0.01em;
}

.hero__title {
  margin: clamp(14px, 1vw, 20px) 0 0;
  max-width: 780px;
  font: 900 clamp(32px, 3.35vw, 64px)/1.06 var(--font-heading);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__lead {
  margin: clamp(12px, 0.9vw, 17px) 0 0;
  max-width: 770px;
  font: 400 clamp(16px, 1.34vw, 26px)/1.25 var(--font-body);
}

.hero__media {
  position: relative;
  min-height: clamp(380px, 35.7vw, 685px);
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__brick {
  position: absolute;
  left: 39.06%;
  bottom: 0;
  width: clamp(48px, 4.95vw, 95px);
  height: auto;
  z-index: 2;
  pointer-events: none;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(48px, 5.2vw, 100px);
}

.section.section--page {
  padding-block: clamp(24px, 2.6vw, 44px);
}

.section__title {
  margin: 0 0 clamp(24px, 2.6vw, 48px);
  font: 900 clamp(30px, 2.9vw, 56px)/1.04 var(--font-heading);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* ---------- Directions ---------- */

.directions {
  background: var(--advda-color-white);
}

.directions .section__title {
  max-width: 920px;
  margin-bottom: clamp(18px, 1.6vw, 28px);
}

.directions__list {
  display: grid;
  gap: clamp(8px, 0.62vw, 12px);
  max-width: min(100%, clamp(680px, 56vw, 1080px));
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--advda-muted);
  font: 400 clamp(16px, 1.3vw, 24px)/1.55 var(--font-body);
}

.directions__list li {
  position: relative;
  padding-left: clamp(24px, 1.75vw, 34px);
}

/* Красный квадратный буллит, как в макете */
.directions__list li::before {
  content: '';
  position: absolute;
  top: 0.5em;
  left: 0;
  width: clamp(8px, 0.68vw, 13px);
  aspect-ratio: 1;
  background: var(--advda-color-action);
}

.directions__list strong {
  color: var(--advda-color-text);
  font-weight: 700;
}

/* ---------- Process ---------- */

.process {
  background: var(--advda-color-topbar);
  color: var(--advda-color-background);
}

.process .section__title {
  color: var(--advda-color-yellow);
}

.process__text {
  max-width: 1000px;
  margin: 0;
  font: 400 clamp(17px, 1.15vw, 22px)/1.55 var(--font-body);
  color: #f4efe6;
}

.process__text strong {
  color: var(--advda-color-yellow);
  font-weight: 700;
}

/* ---------- CTA ---------- */

.cta {
  padding-block: clamp(44px, 4.6vw, 88px);
  background: var(--advda-color-yellow);
}

.cta__text {
  max-width: 1180px;
  margin: 0;
  font: 900 clamp(21px, 1.9vw, 34px)/1.25 var(--font-heading);
  letter-spacing: -0.02em;
}

.cta__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.6vw, 28px);
  margin: clamp(20px, 2vw, 32px) 0 0;
  font: 800 clamp(18px, 1.2vw, 24px)/1.2 var(--font-heading);
}

.cta__contacts a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--advda-color-footer);
  color: var(--advda-color-white);
}

.footer__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(37px, 3.1vw, 60px) var(--gutter) clamp(26px, 1.93vw, 37px);
}

.footer__grid {
  --footer-gap: clamp(22px, 3.9vw, 74px);

  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr;
  column-gap: var(--footer-gap);
}

.footer__col {
  position: relative;
  min-width: 0;
  padding-top: clamp(2px, 0.2vw, 4px);
}

/* Разделители колонок */
.footer__col--contacts::before,
.footer__col--production::before {
  content: '';
  position: absolute;
  top: clamp(7px, 0.68vw, 13px);
  bottom: 0;
  left: calc(var(--footer-gap) / -2);
  width: 1px;
  background: var(--advda-color-divider);
}

.footer__brand {
  margin: 0 0 clamp(7px, 0.56vw, 11px);
  color: var(--advda-color-yellow);
  font: 900 clamp(32px, 3vw, 58px)/1 var(--font-heading);
  letter-spacing: -0.02em;
}

.footer__requisites {
  font: 600 clamp(14px, 1.35vw, 25.9px)/1.58 var(--font-body);
}

.footer__requisites p {
  margin: 0;
}

.footer__requisites address {
  font-style: normal;
}

.footer__title {
  margin: 0;
  color: var(--advda-color-yellow);
  font: 900 clamp(22px, 1.93vw, 37px)/1.1 var(--font-heading);
  letter-spacing: -0.02em;
}

.footer__col--contacts .footer__title {
  margin-bottom: clamp(11px, 0.93vw, 17.7px);
}

.footer__col--production .footer__title {
  margin-bottom: clamp(7px, 0.59vw, 11px);
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  font: 600 clamp(14px, 1.38vw, 26.4px)/1.6 var(--font-body);
  font-style: normal;
}

.footer__contacts a {
  width: fit-content;
  text-decoration: none;
}

.footer__contacts a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer__messengers {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.29vw, 5.6px);
  margin: clamp(13px, 1.12vw, 21.4px) 0 0;
  padding: 0;
  list-style: none;
}

.footer__messengers a {
  display: inline-flex;
  align-items: center;
  gap: clamp(9px, 0.77vw, 15px);
  width: fit-content;
  color: var(--advda-color-white);
  font: 600 clamp(16px, 1.55vw, 29.8px)/1.12 var(--font-body);
  text-decoration: none;
}

.footer__messengers a:hover {
  color: var(--advda-color-yellow);
}

.footer__messenger-icon {
  flex: none;
  width: clamp(28px, 2.33vw, 44.6px);
  height: auto;
  transition: transform 0.15s ease;
}

.footer__messengers a:hover .footer__messenger-icon {
  transform: translateY(-2px);
}

.footer__hours {
  margin: clamp(13px, 1.16vw, 22.3px) 0 0;
  font: 600 clamp(14px, 1.4vw, 27px)/1.12 var(--font-body);
}

.footer__address {
  font: 600 clamp(14px, 1.38vw, 26.4px)/1.3 var(--font-body);
  font-style: normal;
}

.footer__map {
  display: block;
  overflow: hidden;
  width: min(100%, clamp(186px, 15.4vw, 296px));
  margin-top: clamp(7px, 0.6vw, 9px);
  border-radius: clamp(11px, 0.87vw, 17px);
}

.footer__map img {
  width: 100%;
  height: auto;
  aspect-ratio: 402 / 240;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.footer__map:hover img {
  transform: scale(1.03);
}

.footer__route {
  display: inline-block;
  margin-top: clamp(11px, 0.87vw, 17px);
  color: var(--advda-color-yellow);
  font: 800 clamp(16px, 1.43vw, 27.4px)/1.25 var(--font-heading);
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.footer__route:hover {
  color: var(--advda-color-white);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(9px, 0.84vw, 16px) clamp(17px, 2.05vw, 39px);
  margin-top: clamp(41px, 3.29vw, 63px);
  padding-top: clamp(22px, 1.69vw, 33px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font: 400 clamp(12px, 1.32vw, 25.3px)/1.3 var(--font-body);
}

.footer__copyright {
  margin: 0;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(7px, 0.56vw, 11px) clamp(17px, 2.05vw, 39px);
  margin: 0;
  padding: 0 0 0 clamp(17px, 2.05vw, 39px);
  border-left: 1px solid var(--advda-color-white);
  list-style: none;
}

.footer__legal li + li {
  padding-left: clamp(17px, 2.05vw, 39px);
  border-left: 1px solid var(--advda-color-white);
}

.footer__legal a {
  text-decoration: none;
}

.footer__legal a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.left-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 8px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__studs,
  .hero__brick {
    display: none;
  }

  /*.hero__edge {*/
  /*  width: 20px;*/
  /*}*/

  .hero__edge {
    display: none;
  }

  .hero__content {
    padding: clamp(30px, 3.1vw, 60px) clamp(20px, 2.1vw, 40px)
      clamp(30px, 2.6vw, 50px) clamp(20px, 2.1vw, 40px);
    /*padding-left: max(var(--gutter), 28px);*/
    /*padding-left: 0;*/
  }

  .hero__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 860px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: clamp(30px, 4.65vw, 52px);
  }

  .footer__map {
    width: 100%;
    max-width: 296px;
  }

  .footer__col--contacts::before,
  .footer__col--production::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
    row-gap: clamp(28px, 7vw, 40px);
  }
}

@media (max-width: 1100px) {
  /* Ниже десктопа шапка не прилипает: topbar и основная панель
     прокручиваются вместе со страницей. position: relative сохраняет
     z-index/стэкинг-контекст, чтобы мега-меню не уезжало под контент. */
  .site-header {
    position: relative;
  }

  .site-header.is-stuck {
    box-shadow: none;
  }

  .phone-block {
    border-left: none;
  }

  /* Панель с телефоном и соцсетями фиксируется в правом верхнем углу,
     по ширине — по содержимому, но не шире экрана */
  .site-header__main__aside {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    z-index: 70;
    width: max-content;
    max-width: calc(
      100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)
    );
    gap: 12px;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 10px 20px;
    background: var(--advda-color-yellow);
    box-shadow: 0 4px 16px rgba(102, 74, 31, 0.22);
  }

  .topbar {
    height: auto;
    min-height: 47.5px;
  }

  .topbar__text {
    padding: 8px 20px;
    font: 400 16px/20px var(--font-body);
  }

  .site-header__main {
    height: auto;
    min-height: 92.5px;
    padding: 10px 20px;
  }

  .site-header__main__nav-list {
    height: auto;
    gap: 6px;
    padding-left: 6px;
    flex-wrap: wrap;
  }

  .nav-item__link {
    font-size: 14px;
    line-height: 16px;
    gap: 2px;
    padding: 4px 4px;
    border-radius: 5px;
  }

  .site-header__main__aside {
    gap: 12px;
  }
}

@media (max-width: 700px) {
  .site-header__main {
    flex-direction: column;
    height: auto;
    min-height: 0;
    gap: 10px;
    padding: 10px 16px;
  }

  .site-header__main__nav {
    width: 100%;
  }

  .site-header__main__nav-list {
    height: auto;
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 0;
  }

  .nav-item__link {
    font-size: 14px;
    line-height: 16px;
    gap: 2px;
    padding: 4px 4px;
    border-radius: 5px;
  }
}

@media (max-width: 500px) {
  /* На узких экранах фиксированная панель занимает всю ширину,
     а иконки и текст ужимаются, чтобы всё влезло в один ряд */
  .site-header__main__aside {
    left: env(safe-area-inset-left, 0px);
    right: env(safe-area-inset-right, 0px);
    width: auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .phone-block {
    gap: 2px;
    padding-inline: 8px;
  }

  .phone-block__number {
    font-size: 15px;
  }

  .phone-block__hours {
    font-size: 12px;
  }

  .socials {
    gap: 8px;
    /* Иконки могут переноситься внутри своего контейнера,
       но сама панель остаётся в один ряд */
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .socials img {
    width: 34px;
  }
}

@media (max-width: 400px) {
  /* Совсем узкий экран: иконки в два ряда становятся ещё меньше (~20%) */
  .site-header__main__aside {
    gap: 6px;
    padding: 8px 10px;
  }

  .socials {
    gap: 6px;
  }

  .socials img {
    width: 27px;
  }

  .phone-block__number {
    font-size: 14px;
  }

  .phone-block__hours {
    font-size: 11px;
  }
}

@media (max-width: 1024px) {
  .nav-menu__panel {
    left: 0;
    right: 0;
    width: auto;
    transform: none;
  }

  .nav-menu__content {
    flex-direction: column;
  }

  .nav-menu__cards {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .nav-menu__subnav {
    width: 100%;
  }
}

@media (max-width: 700px) {
  /* На мобильных жёлтая панель снова прилипает к верху:
     перекрывает правило position: relative из @media 1100px */
  .site-header {
    position: sticky;
    top: 0;
  }

  .site-header.is-stuck {
    box-shadow: 0 3px 2px rgba(102, 74, 31, 0.15);
  }

  /* Мобильный топбар: одна строка заглавными — ADVDA.RU · email,
     без адреса и часов работы */
  .topbar__desktop {
    display: none;
  }

  .topbar__brand,
  .topbar__sep--mobile {
    display: inline;
  }

  .topbar__text {
    white-space: nowrap;
    text-transform: uppercase;
  }

  /* Мобильная шапка: меню сворачивается в бургер, панель с телефоном,
     соцсетями и бургером растягивается на всю ширину строки */
  .site-header__main__aside {
    position: static;
    width: 100%;
    max-width: none;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 8px 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header__main__nav {
    display: none;
  }

  /* Выпадающее меню — оверлей под .site-header__main,
     не раздвигает шапку и не прячет aside с бургером */
  .site-header__main.nav-open .site-header__main__nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 8px 16px 16px;
    background: var(--advda-color-yellow);
    box-shadow: 0 18px 40px rgba(102, 74, 31, 0.28);
  }

  .site-header__main.nav-open .site-header__main__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-height: 0;
    padding: 8px 0 4px;
  }

  .site-header__main.nav-open .site-header__main__nav-list .nav-item {
    width: 100%;
  }

  /* В мобильном меню остаются только «Главная» и «Работы и услуги» */
  .site-header__main.nav-open
    .nav-item--desktop-only {
    display: none;
  }

  /*.site-header__main.nav-open*/
  /*  .site-header__main__nav-list*/
  /*  .nav-item--desktop-only {*/
  /*  display: none;*/
  /*}*/

  /* «Работы и услуги» в бургер-меню всегда раскрыты */
  .site-header__main.nav-open .nav-item--has-menu .nav-menu {
    display: block;
  }

  .site-header__main.nav-open
    .nav-item--has-menu
    .nav-item__chevron {
    transform: rotate(180deg);
  }

  /* Компактные карточки мега-меню: две в ряд, где помещаются */
  .nav-menu__panel {
    border-radius: 0;
  }

  .nav-menu__cards {
    grid-template-columns: repeat(
      auto-fill,
      minmax(min(160px, 100%), 1fr)
    );
    gap: 8px;
    padding: 16px;
  }

  .nav-card {
    gap: 8px;
    padding: 6px;
  }

  .nav-card__media img {
    width: 56px;
    height: 48px;
  }

  .nav-card__title {
    font-size: 14px;
    line-height: 18px;
  }

  .nav-card__desc {
    font-size: 12px;
    line-height: 16px;
  }

  .nav-menu__subnav {
    padding: 16px;
  }

  .nav-menu__low {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
  }

  .site-header__main.nav-open .nav-item__link {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 8px;
  }

  /* Активная страница в бургер-меню — заметная плашка,
     как у открытого пункта мега-меню */
  .site-header__main.nav-open
    .nav-item--active
    > .nav-item__link {
    background: var(--color-bg-cream-base, #fbf3e6);
    box-shadow: 0 4px 0 var(--color-shadow-gold-deep, #b68b00);
  }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
  }

  .nav-burger:focus-visible {
    outline: 3px solid var(--advda-color-blue);
    outline-offset: 2px;
  }

  .nav-burger__bar {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--advda-color-text);
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .site-header__main.nav-open .nav-burger__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header__main.nav-open .nav-burger__bar:nth-child(2) {
    opacity: 0;
  }

  .site-header__main.nav-open .nav-burger__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }



  .site-header__main .logo {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
