/* Solid opening header colors follow each page's first visual. */
.head:not(.is-stuck) {
  background: var(--header-top-bg, #22372f) !important;
  color: var(--header-top-ink, #fff) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.head:not(.is-stuck) .head__call.btn--ghost.on-photo {
  color: inherit !important;
  --btn-fill: var(--header-top-ink, #fff);
}
.head:not(.is-stuck) .head__call.btn--ghost.on-photo:hover { color: var(--header-top-bg, #22372f) !important; }
.head:not(.is-stuck) .head__logo img { filter: none !important; }
.head:not(.is-stuck) .head__nav a::after { background: currentColor !important; }
/* The header becomes light once the opening block has passed. */
.head.is-stuck, .page--contacts .head.is-stuck, .page--partners .head.is-stuck {
  background: rgba(241,243,237,.98) !important;
  color: var(--ink) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.head.is-stuck .head__logo img { filter: none !important; }
.head.is-stuck .head__call.btn--ghost.on-photo { color: var(--ink) !important; --btn-fill: var(--ink); }
.head.is-stuck .head__call.btn--ghost.on-photo:hover { color: var(--bg) !important; }
/* Match the compact scrolled bar on the home opening screen. */
@media (min-width: 1360px) { .head { --head: 68px; height: 68px; } }
@media (min-width: 1000px) and (max-width: 1359px) { .head { --head: 64px; height: 64px; } }
/* The home slider changes the sky behind the header. */
.home:has(.hero__slide.s2.is-on) { --header-top-bg: #70abe5 !important; --header-top-ink: #22372f !important; }
.home:has(.hero__slide.s3.is-on) { --header-top-bg: #72a9df !important; --header-top-ink: #172c3e !important; }
.home:has(.hero__slide.s4.is-on) { --header-top-bg: #8ba9d5 !important; --header-top-ink: #22372f !important; }
.home:has(.hero__slide:not(.s1).is-on) .head:not(.is-stuck) .head__logo img { filter: none; }
.home:has(.hero__slide:not(.s1).is-on) .head:not(.is-stuck) .head__call.btn--ghost.on-photo { --btn-fill: #22372f; }
/* A quiet divider starts each footer navigation column. */
.foot__nav li { min-width: 0; }
.foot__nav li:first-child, .foot__nav li:nth-child(7) { position: relative; padding-top: 12px; }
.foot__nav li:first-child::before, .foot__nav li:nth-child(7)::before { content: ""; position: absolute; top: 0; left: 0; width: 45%; border-top: .5px solid rgba(241,243,237,.3); }
.foot__col address { opacity: 1; color: #fff; }

/* Keep the desktop navigation compact and give the contact button its own smaller size. */
@media (min-width: 1360px) { .head__nav ul { gap: clamp(8px, .72vw, 18px); } }
body .head__call.btn { min-height: 40px; padding-inline: 16px; gap: 9px; font-size: 14px; }
body .head__call.btn .i { width: 16px; height: 16px; }

body .head__call.btn.btn--sm.btn--compact { min-height: 40px; padding-inline: 16px; gap: 9px; font-size: 14px; }

/* Drops in the header: «Ещё» keeps the light look on every page. */
.head__nav li > details { position: relative; }
.head__nav summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; }
.head__nav summary::-webkit-details-marker { display: none; }
.head__nav summary::marker { content: ""; }
.head__nav summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 260ms var(--ease); }
.head__nav details[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.head__nav li > details > ul { position: absolute; top: calc(100% + 10px); left: -18px; z-index: 5; display: grid; gap: 0; min-width: 228px; padding: 10px 18px; border-radius: 4px; background: var(--soft, #D3DFD2); color: var(--ink, #22372F); border: 1px solid rgba(34,55,47,.12); box-shadow: 0 14px 32px rgba(34,55,47,.18); }
.head__nav li > details > ul a { min-height: 38px; font-size: 14px; }
.head__nav li > details > ul a::after { display: none; }
.head__nav li > details > ul a:hover,
.head__nav li > details > ul a[aria-current="page"] { color: var(--main, #365C4D); text-decoration: underline; text-underline-offset: 3px; }
.head__nav li.nav-more > details > ul { left: auto; right: -6px; }

/* Small laptops and large tablets (1200–1359px): the same full set of tabs, only tighter. */
@media (min-width: 1201px) and (max-width: 1359px) {
  .head__nav { display: block; flex: 1 1 auto; min-width: 0; margin-inline: 0; }
  .head__nav > ul { display: flex; align-items: center; justify-content: space-between; gap: 0; }
  .head__nav a, .head__nav summary { display: flex; align-items: center; min-height: 44px; font-size: clamp(11px, .9vw, 12px); line-height: 1.2; white-space: nowrap; text-decoration: none; }
  .burger, .menu { display: none; }
}

/* Center the two navigation columns as one compact footer group. */
.foot__nav { width: min(100%, 480px); justify-self: center; }
.foot__nav ul { column-gap: clamp(18px, 2vw, 30px); }
@media (min-width: 1100px) {
  .foot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr); }
}
@media (min-width: 640px) and (max-width: 1099px) {
  .foot__nav { grid-column: 1 / -1; grid-row: 2; }
  .foot__top > .foot__col:last-child { grid-column: 2; grid-row: 1; }
}

/* Footer navigation columns stay centered as one compact group. */
