:root {
  --znayka-surface: #fff;
  --znayka-ink: #35383c;
  --znayka-muted: #686b70;
  --znayka-line: #e7e7e5;
  --znayka-soft: #f5f5f3;
  --znayka-accent: #ffcb00;
  --mobile-actions-height: calc(64px + env(safe-area-inset-bottom, 0px));
}
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0;
  background: var(--znayka-surface);
  color: var(--znayka-ink);
  font-family: "Znayka Hero Text", sans-serif;
  box-shadow: 0 1px 0 #0000000a;
}
/* Keep the same address and hours groups beside the logo at every width. */
.header .header-inner { display: grid; grid-template-columns: 102px max-content minmax(0,1fr); gap: 0 24px; align-items: center; }
.header .logo { grid-column: 1; grid-row: 1 / 3; display: block; width: 102px; }
.header .logo img { display: block; }
.header-details { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(2,max-content); align-items: center; justify-content: start; justify-self: start; gap: 16px; width: max-content; max-width: 100%; min-width: 0; }
.header-addresses, .header-hours { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 8px; font-size: 14px; line-height: 22px; }
.header-addresses > svg, .header-hours > svg { display: block; width: 20px; height: 20px; color: var(--znayka-muted); }
.header-address-links, .header-hours-lines { display: grid; }
.header-addresses a { display: block; color: inherit; text-decoration: none; white-space: nowrap; }
.header-addresses a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-hours { color: #50545a; font-variant-numeric: tabular-nums; }
.header-hours span { white-space: nowrap; }
.header .header-top { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; }
.header-contact-actions { display: flex; align-items: center; }
.header .phone { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 500; line-height: 1.4; white-space: nowrap; color: var(--znayka-ink); text-decoration: none; }
.header .phone > svg { width: 20px; height: 20px; flex: none; color: var(--znayka-muted); }
.header .phone:hover { color: #59616b; }
.navbar { grid-column: 3; grid-row: 2; min-width: 0; padding: 0; background: transparent; font-family: "Znayka Hero Text", sans-serif; }
.navbar > .nav-shell { display: flex; align-items: center; width: 100%; min-width: 0; }
.navbar .navbar-collapse { justify-content: flex-end; }
.navbar .navbar-nav { width: auto; justify-content: flex-end; gap: 28px; }
.navbar .nav-link { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; padding: 10px 0 !important; color: #565a5e; font-size: 15px; font-weight: 400; line-height: 24px; white-space: nowrap; text-decoration: none; border-radius: 4px; }
.navbar .nav-link:hover, .navbar .nav-link.show, .navbar .nav-link[aria-current="page"] { color: var(--znayka-ink); text-decoration: none; }
.navbar .nav-link[aria-current="page"] { font-weight: 500; }
.navbar .nav-link.dropdown-toggle::after { width: 6px; height: 6px; border: 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; margin: -3px 2px 0 0; transform: rotate(45deg); transition: transform 160ms ease; }
.navbar .nav-link.dropdown-toggle.show::after { transform: translateY(3px) rotate(225deg); }
.navbar .dropdown-menu { min-width: 280px; max-width: 350px; padding: 8px; margin: 0; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px #20242a1c; }
.navbar .dropdown-item { display: flex; align-items: center; min-height: 46px; padding: 11px 14px; border-radius: 5px; color: #50545a; font-size: 15px; font-weight: 400; line-height: 1.5; white-space: normal; text-decoration: none; }
.navbar .dropdown-item:hover, .navbar .dropdown-item:focus { color: var(--znayka-ink); background: var(--znayka-soft); }
.navbar .dropdown-item[aria-current="page"] { font-weight: 500; }
.mobile-menu-heading, .mobile-menu-contact, .mobile-actions, .header-spacer, .header-menu-toggle { display: none; }
.header a:active, .header button:active, .mobile-actions a:active, .mobile-actions button:active { transform: none; }
.header :is(a,button):focus:not(:focus-visible), .mobile-actions :is(a,button):focus:not(:focus-visible) { outline: none !important; box-shadow: none; }
.header :is(a,button):focus-visible, .mobile-actions :is(a,button):focus-visible { outline: 2px solid #3776b4 !important; outline-offset: 4px; }
html[data-input="pointer"] .header :is(a,button):focus, html[data-input="pointer"] .mobile-actions :is(a,button):focus { outline: none !important; }
.header ::selection, .mobile-actions ::selection { background: #ffeb96; color: var(--znayka-ink); }
#contacts, #reviews { scroll-margin-top: 150px; }
.mobile-messengers { position: fixed; z-index: 19; right: 16px; bottom: 24px; display: grid; gap: 8px; }
.messenger-icon { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: #fff; box-shadow: 0 3px 12px #20242a26; }
.messenger-icon:disabled { opacity: 1; cursor: default; }
.messenger-icon svg { display: block; width: 28px; height: 28px; }
.messenger-icon img { display: block; width: 44px; height: 44px; }
.messenger-whatsapp { background: #25d366; }
.messenger-telegram { background: #28a8ea; }
.messenger-max { background: transparent; box-shadow: none; }
body.mobile-nav-open .mobile-messengers, body.modal-open .mobile-messengers { visibility: hidden; }
@media (min-width: 992px) {
  .header.has-compact-mode { position: fixed; inset: 0 0 auto; }
  .header-spacer { display: block; height: 128px; }
  .header-details { grid-row: 1 / 3; align-self: center; align-items: center; }
  .header.is-compact { padding: 8px 0; box-shadow: 0 3px 16px #20242a0d; }
  .header.is-compact .header-inner { grid-template-columns: minmax(0,1fr) max-content minmax(0,1fr); column-gap: 24px; min-height: 66px; }
  .header.is-compact .logo { grid-row: 1; width: 64px; }
  .header.is-compact .logo img { width: 64px !important; height: auto !important; }
  .header.is-compact .header-details { display: none; }
  .header.is-compact .navbar { grid-column: 2; grid-row: 1; justify-self: center; }
  .header.is-compact .header-top { grid-column: 3; grid-row: 1; justify-self: end; }
  .header.is-compact .phone { font-size: 16px; }

  .navbar .dropdown-menu { top: calc(100% + 12px); left: -14px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .header.is-compact .header-inner { max-width: calc(100% - 48px); }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .header .header-inner { column-gap: 24px; }
  .header-details { gap: 16px; }
  .header .phone { font-size: 17px; }
  .navbar .navbar-nav { gap: 22px; }
}
@media (max-width: 991px) {
  body { padding-bottom: var(--mobile-actions-height); }
  body.mobile-nav-open { overflow: hidden; }
  .header { position: relative; padding: 8px 0; }
  .header .header-inner { position: relative; grid-template-columns: 102px minmax(0,1fr); column-gap: 24px; }
  .header .logo { grid-row: 1; }
  .header-details { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .header-addresses, .header-hours { font-size: 13px; line-height: 22px; }
  .header .header-top { display: none; }
  .navbar { position: static; grid-column: 1 / -1; grid-row: 3; height: 0; }
  .navbar > .nav-shell { display: block; }
  .navbar .navbar-collapse { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--mobile-menu-space, calc(100dvh - var(--mobile-actions-height))); max-height: calc(100dvh - var(--mobile-actions-height)); padding-top: env(safe-area-inset-top,0px); background: #fff; overflow-y: auto; overscroll-behavior: contain; }
  .navbar .navbar-collapse.collapsing { transition: none; }
  .mobile-menu-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; color: var(--znayka-ink); font-size: 22px; font-weight: 500; }
  .menu-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--znayka-soft); color: inherit; }
  .menu-close svg { width: 24px; height: 24px; }
  .navbar .navbar-nav { width: 100%; gap: 0; padding: 8px 24px 0; }
  .navbar .nav-item + .nav-item { border-top: 1px solid var(--znayka-line); }
  .navbar .nav-link { min-height: 54px; padding: 14px 0 !important; font-size: 17px; }
  .navbar .dropdown-menu { min-width: 0; max-width: none; padding: 0 0 12px 8px; margin: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .navbar .dropdown-item { padding: 10px 12px; font-size: 15px; }
  .mobile-menu-contact { display: grid; gap: 4px; margin: 0 24px 20px; padding-top: 16px; border-top: 1px solid var(--znayka-line); }
  .mobile-menu-contact a { color: var(--znayka-ink); text-decoration: none; }
  .menu-contact-item { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 12px; min-height: 44px; font-size: 14px; line-height: 22px; }
  .menu-contact-item > svg { width: 20px; height: 20px; justify-self: center; color: var(--znayka-muted); }
  .menu-phone { font-size: 18px; font-weight: 500; }
  .menu-hours { margin: 4px 0; font-size: 13px; line-height: 21px; }
  .menu-hours > svg { align-self: center; }
  .mobile-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; gap: 8px; height: var(--mobile-actions-height); padding: 6px max(16px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px)); background: #fff; box-shadow: 0 -1px 0 #20242a0a, 0 -5px 20px #20242a18; font-family: "Znayka Hero Text", sans-serif; }
  .mobile-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 52px; min-width: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #50545a; font-size: 12px; line-height: 16px; text-decoration: none; }
  .mobile-action svg, .mobile-action img { width: 22px; height: 22px; }
  .mobile-action:hover, .mobile-action[aria-expanded="true"] { color: #35383c; background: var(--znayka-soft); }
  .mobile-messengers { right: max(16px,env(safe-area-inset-right,0px)); bottom: calc(var(--mobile-actions-height) + 16px); }
  body.modal-open .mobile-actions { visibility: hidden; }

  #contacts, #reviews { scroll-margin-top: 24px; }
}
@media (min-width: 600px) and (max-width: 991px) {
  :root { --mobile-actions-height: 0px; }
  html { scroll-padding-top: var(--tablet-header-height,104px); }
  .header { position: sticky; }
  .header .header-inner { grid-template-columns: 88px max-content minmax(0,1fr); column-gap: 20px; }
  .header .logo { grid-row: 1 / 3; width: 88px; }
  .header .logo img { width: 88px !important; height: auto !important; }
  .header-details { grid-column: 2; grid-row: 1 / 3; grid-template-columns: repeat(2,max-content); gap: 16px; }
  .header-addresses { min-width: 0; }
  .header-address-links { grid-template-columns: minmax(0,1fr); }
  .header .header-top { grid-column: 3; grid-row: 1; display: flex; justify-content: flex-end; min-height: 0; }
  .header .phone { font-size: 16px; }
  .header-menu-toggle { grid-column: 3; grid-row: 2; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--znayka-soft); color: var(--znayka-ink); font: 500 15px/24px "Znayka Hero Text", sans-serif; }
  .header-menu-toggle svg { width: 22px; height: 22px; }
  .header-menu-toggle:hover { background: #ececea; }
  .mobile-actions { display: none; }
  .navbar .navbar-collapse { padding-bottom: env(safe-area-inset-bottom,0px); }
}
@media (min-width: 600px) and (max-width: 699px) {
  .header .header-inner { width: 100%; max-width: none; padding-inline: 12px; grid-template-columns: 72px max-content minmax(0,1fr); column-gap: 12px; }
  .header .logo, .header .logo img { width: 72px !important; }
  .header-details { gap: 12px; }
  .header-addresses, .header-hours { grid-template-columns: 18px minmax(0,1fr); gap: 6px; }
  .header-addresses > svg, .header-hours > svg { width: 18px; height: 18px; }
  .header .phone { gap: 8px; font-size: 15px; }
  .header .phone > svg { width: 18px; height: 18px; }
}
@media (max-width: 599px) {
  .header .header-inner { width: 100%; padding-inline: 12px; grid-template-columns: clamp(56px,calc(20vw - 8px),88px) minmax(0,1fr); gap: 0 8px; }
  .header .logo { width: 100%; grid-column: 1; grid-row: 1; }
  .header .logo img { width: 100% !important; height: auto !important; }
  .header-details { grid-column: 2; grid-row: 1; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 8px; width: 100%; max-width: 272px; }
  .header-addresses, .header-hours { grid-template-columns: 16px minmax(0,1fr); gap: 4px; font-size: 12px; line-height: 18px; }
  .header-addresses > svg, .header-hours > svg { width: 16px; height: 16px; }
  .header-hours span, .header-addresses a { white-space: normal; }
  .header-hours .header-hours-range { white-space: nowrap; }
  .header-address-links { grid-template-columns: minmax(0,1fr); }
}
@media (min-width: 480px) and (max-width: 599px) {
  .header .header-inner { column-gap: 16px; }
  .header-details { gap: 16px; max-width: 304px; }
  .header-addresses, .header-hours { grid-template-columns: 18px minmax(0,1fr); gap: 6px; font-size: 13px; line-height: 22px; }
  .header-addresses > svg, .header-hours > svg { width: 18px; height: 18px; }
}
@media (max-width: 359px) {
  .mobile-actions { gap: 8px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .header *, .mobile-actions * { transition: none !important; }
}

@media (min-width: 992px) and (max-width: 1283px) {
  body > section > .container, body > .img-before-section { max-width: min(1140px,calc(100% - 128px)); }
}

/* Shared contact controls: the same icons in the header, menu and floating rail. */
.header-contact-actions { gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.header-socials { display: flex; align-items: center; gap: 6px; }
.social-contact { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 9px; border: 0; border-radius: 8px; background: var(--znayka-soft); color: var(--znayka-ink); font: 500 12px/20px "Znayka Hero Text", sans-serif; text-decoration: none; white-space: nowrap; }
.social-contact:disabled { opacity: 1; cursor: default; }
.social-contact > svg, .social-contact > img { display: block; flex: none; width: 20px; height: 20px; }
.social-whatsapp > svg { color: #168b49; }
.social-telegram > svg { color: #1682b6; }
.social-contact:not(:disabled):hover { background: #eaeae7; color: var(--znayka-ink); }
.menu-socials { display: none; }
.messenger-toggle, .messenger-label { display: none; }
.mobile-messengers .messenger-icon { background: #fff; box-shadow: 0 4px 16px #20242a24; }
.mobile-messengers .messenger-whatsapp { color: #168b49; }
.mobile-messengers .messenger-telegram { color: #1682b6; }
.mobile-messengers .messenger-max img { width: 26px; height: 26px; }
.messenger-toggle:focus-visible { outline: 2px solid #3776b4 !important; outline-offset: 4px; }
@media (min-width: 992px) {
  .header.is-compact .header-socials { display: none; }
  .mobile-messengers { gap: 10px; }
  .mobile-messengers .messenger-icon { width: 52px; height: 52px; }
  .mobile-messengers .messenger-icon svg { width: 32px; height: 32px; }
  .mobile-messengers .messenger-max img { width: 30px; height: 30px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .header-contact-actions { gap: 4px 12px; }
  .header-socials { gap: 4px; }
  .header-socials .social-contact { padding-inline: 7px; gap: 4px; }
  .header-socials .social-contact > svg, .header-socials .social-contact > img { width: 18px; height: 18px; }
}
@media (max-width: 991px) {
  .header-socials { display: none; }
  .menu-socials { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-bottom: 12px; }
  .menu-socials .social-contact { justify-content: flex-start; gap: 10px; min-height: 46px; padding: 10px 14px; font-size: 14px; }
  .menu-socials .social-contact > svg, .menu-socials .social-contact > img { width: 24px; height: 24px; }
  .has-messenger-toggle .messenger-toggle:not([hidden]) { position: fixed; z-index: 19; right: max(12px,env(safe-area-inset-right,0px)); bottom: calc(var(--mobile-actions-height) + 12px); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--znayka-ink); box-shadow: 0 4px 16px #20242a24; }
  .messenger-toggle > svg { width: 22px; height: 22px; }
  .messenger-toggle > span, .messenger-toggle .messenger-toggle-close { display: none; }
  .messengers-open .messenger-toggle .messenger-toggle-chat { display: none; }
  .messengers-open .messenger-toggle .messenger-toggle-close { display: block; }
  .has-messenger-toggle .mobile-messengers { right: max(12px,env(safe-area-inset-right,0px)); bottom: calc(var(--mobile-actions-height) + 64px); visibility: hidden; pointer-events: none; }
  .has-messenger-toggle.messengers-open .mobile-messengers { visibility: visible; pointer-events: auto; }
  body:is(.mobile-nav-open,.modal-open) .messenger-toggle,
  body:is(.mobile-nav-open,.modal-open).has-messenger-toggle .mobile-messengers { visibility: hidden; pointer-events: none; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .header:not(.is-compact) .header-inner, .home-page .header:not(.is-compact) .header-inner { max-width: calc(100% - 48px); grid-template-columns: 88px max-content minmax(0,1fr); column-gap: 16px; }
  .header:not(.is-compact) .logo, .header:not(.is-compact) .logo img { width: 88px !important; height: auto !important; }
  .header-details { gap: 12px; }
  .header-addresses, .header-hours { font-size: 13px; }
  .navbar .navbar-nav { gap: 12px; }
  .navbar .nav-link { font-size: 14px; }
}

@media (max-width: 991px) {
  .menu-socials .social-contact:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
