.site-header {
  position: sticky;
  top: 0;
  z-index: 130;
  isolation: isolate;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 246, 0.9));
  border-bottom: 1px solid rgba(20, 33, 38, 0.09);
  box-shadow: 0 16px 38px rgba(20, 33, 38, 0.08);
  backdrop-filter: blur(18px);
}

.site-header::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(8, 123, 112, 0.5), rgba(56, 170, 184, 0.42), rgba(216, 166, 58, 0.42), transparent);
  opacity: 0.68;
  pointer-events: none;
}

body.ui-theme-dark .site-header {
  background: linear-gradient(180deg, rgba(12, 18, 20, 0.96), rgba(16, 31, 35, 0.9));
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
}

.brand {
  position: relative;
  z-index: 82;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 38, 0.12);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(20, 33, 38, 0.06);
  font-weight: 800;
}

body.ui-theme-dark .brand {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(19, 32, 40, 0.9);
}

.brand img {
  width: 58px;
  height: 58px;
  padding: 4px;
  border-radius: 18px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 38, 0.12);
}

body.ui-theme-dark .brand img {
  background: rgba(255, 255, 255, 0.95);
}

.brand span {
  position: relative;
  white-space: nowrap;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.brand-title {
  display: inline-block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand span::after {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -4px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--amber));
  opacity: 0.78;
}

.brand-no-logo {
  padding: 13px 18px;
}

.brand-no-logo .brand-title {
  max-width: none;
}

.nav-panel {
  display: flex;
  justify-content: center;
  min-width: 0;
}

/* Desktop header layout - proper centered navigation */
@media (min-width: 1241px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
  }

  .brand {
    grid-column: 1;
  }

  /* Navigation is centered in the middle column */
  .nav-panel {
    grid-column: 2;
    display: flex;
    justify-content: center;
  }

  .nav-panel .desktop-nav-list {
    margin: 0;
  }

  .header-actions {
    grid-column: 3;
  }

  /* Hide the horizontal desktop navigation on desktop - it will live inside the hamburger dropdown */
  .desktop-nav-list {
    display: none !important;
  }

  /* On desktop: show ONLY the flag in the language toggle, remove "AM / EN / RU" text */
  .header-language-switcher .language-toggle-code {
    display: none;
  }

  .header-language-switcher .language-toggle {
    min-width: 42px;
    padding: 0 6px;
    gap: 0;
  }

  .header-language-switcher .language-toggle-flag {
    width: 20px;
    height: 15px;
  }

  /* Remove caret from language button on desktop - user wants only the flag */
  .header-language-switcher .language-toggle-caret {
    display: none !important;
  }

  /* Make dropdown nav items a bit more comfortable on desktop */
  .nav-panel .mobile-nav-list.mobile-nav-grid .nav-link {
    padding: 11px 16px;
    font-size: 0.96rem;
  }

  /* Search trigger on desktop - make it consistent with other right controls */
  .search-trigger {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(20, 33, 38, 0.14);
    box-shadow: 0 10px 24px rgba(20, 33, 38, 0.07);
    color: var(--ink-soft);
  }

  body.ui-theme-dark .search-trigger {
    background: rgba(19, 32, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
  }

  .search-trigger:hover,
  .search-trigger:focus-visible {
    background: rgba(10, 168, 150, 0.1);
    color: var(--teal-dark);
    border-color: rgba(10, 168, 150, 0.3);
  }

  /* Uniform topbar action buttons on desktop (search, theme, nav, language, pwa) */
  .theme-toggle,
  .nav-toggle {
    width: 38px;
    height: 38px;
  }
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  .header-language-switcher .language-toggle {
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 6px;
    gap: 0;
  }

  .header-language-switcher {
    height: 38px;
  }
  .header-language-switcher .language-switcher {
    height: 100%;
    padding: 2px;
    align-items: center;
  }

  .pwa-install-btn-header {
    width: 38px;
    height: 38px;
  }
}

/* Search trigger button in topbar */
.search-trigger {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 33, 38, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  box-shadow: 0 8px 20px rgba(20, 33, 38, 0.06);
  transition: all 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  flex: 0 0 auto;
}

.search-trigger:hover,
.search-trigger:focus-visible {
  background: rgba(10, 168, 150, 0.1);
  color: var(--teal-dark);
  border-color: rgba(10, 168, 150, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(10, 168, 150, 0.12);
}

.search-trigger:active {
  transform: translateY(0) scale(0.96);
}

body.ui-theme-dark .search-trigger {
  background: rgba(19, 32, 40, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}

body.ui-theme-dark .search-trigger:hover,
body.ui-theme-dark .search-trigger:focus-visible {
  background: rgba(10, 168, 150, 0.15);
  border-color: rgba(10, 168, 150, 0.4);
  color: #4de0cb;
}

.search-trigger svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

/* Site Search Panel - clean and harmonious */
.site-search {
  position: fixed;
  top: var(--smarttech-header-bottom, 82px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  z-index: 300;
  width: min(620px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 30px 80px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
              visibility 160ms ease;
}

.site-search.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

body.ui-theme-dark .site-search {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border-color: rgba(255,255,255,0.1);
}

/* Input area - seamless with the panel */
.site-search-input-wrap {
  padding: 14px 18px 12px;
  background: transparent;
}

.site-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.04rem;
  padding: 6px 0;
  outline: none;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.4;
}

.site-search-input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.site-search-input:focus {
  outline: none;
}

/* Subtle top divider instead of hard border */
.site-search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 6px 0 12px;
  border-top: 1px solid var(--line);
}

body.ui-theme-dark .site-search-results {
  border-top-color: rgba(255,255,255,0.08);
}

.site-search-result-group {
  padding: 2px 0;
}

.site-search-result-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 8px 18px 6px;
  opacity: 0.75;
}

.site-search-result-item {
  display: block;
  padding: 10px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background 120ms ease, transform 120ms ease;
  border-radius: 10px;
  margin: 0 6px;
}

.site-search-result-item:hover,
.site-search-result-item:focus-visible {
  background: rgba(10, 168, 150, 0.08);
  color: var(--teal-dark);
  transform: translateX(1px);
}

.site-search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.site-search-result-desc {
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-search-empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-search-results::-webkit-scrollbar {
  width: 6px;
}
.site-search-results::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 3px;
}
body.ui-theme-dark .site-search-results::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
}

.mobile-nav-list {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.desktop-nav-list {
  display: inline-flex;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(20, 33, 38, 0.12);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(20, 33, 38, 0.07);
}

.nav-link {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  padding: 10px 14px;
  color: #31454b;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 260ms ease, background 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.nav-link::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(135deg, rgba(10, 168, 150, 0.16), rgba(52, 95, 116, 0.13));
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 260ms ease, transform 260ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--teal-dark);
  transform: translateY(-2px);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--panel-teal), var(--panel-steel));
  box-shadow: 0 10px 24px rgba(8, 123, 112, 0.22);
}

.nav-link.is-active::before {
  display: none;
}

.language-switcher {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(20, 33, 38, 0.14);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(20, 33, 38, 0.07);
  z-index: 180;
}

.header-language-switcher {
  flex: 0 0 auto;
  z-index: 180;
  height: 38px;
}
.header-language-switcher .language-switcher {
  height: 100%;
  padding: 2px;
  align-items: center;
}

body.ui-theme-dark .language-switcher {
  background: rgba(19, 32, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.16);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  transition: background 240ms ease, color 240ms ease, transform 240ms ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  background: rgba(10, 168, 150, 0.1);
  color: var(--teal-dark);
}

.language-toggle-flag,
.language-flag {
  display: block;
  width: 22px;
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 33, 38, 0.16);
}

.language-toggle-flag svg,
.language-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.language-toggle-code,
.language-code {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.language-toggle-caret {
  width: 9px;
  height: 9px;
  margin-left: 1px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 220ms ease;
}

.language-switcher.is-open .language-toggle-caret {
  transform: rotate(-135deg) translateY(1px);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(20, 33, 38, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(20, 33, 38, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

body.ui-theme-dark .language-menu {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(19, 32, 40, 0.98);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.language-switcher.is-open .language-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.language-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.language-button:hover,
.language-button:focus-visible {
  background: rgba(10, 168, 150, 0.1);
  color: var(--teal-dark);
}

.language-button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--panel-teal), var(--panel-steel));
}

body.ui-theme-dark .language-toggle,
body.ui-theme-dark .language-button {
  color: rgba(255, 255, 255, 0.84);
}

.nav-backdrop,
.mobile-menu-head,
.mobile-menu-section {
  display: none;
}

/* On desktop, show the mobile menu content inside the dropdown when nav-panel is open */
@media (min-width: 1241px) {
  .nav-panel.is-open .mobile-menu-head,
  .nav-panel.is-open .mobile-menu-section {
    display: block;
  }

  /* Desktop dropdown style for the hamburger (3 lines) menu */
  .nav-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: 260px;
    max-width: calc(100vw - 40px);
    max-height: 65vh;
    overflow-y: auto;
    z-index: 250;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  body.ui-theme-dark .nav-panel {
    background: #142025;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  }

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

  /* Clean desktop-style list inside the hamburger dropdown */
  .nav-panel .mobile-nav-list.mobile-nav-grid {
    display: block;
    padding: 4px 6px;
  }

  .nav-panel .mobile-nav-list.mobile-nav-grid .nav-link {
    display: block;
    padding: 8px 14px;
    margin: 1px 4px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
    background: transparent;
    border: none;
    text-align: left;
    transition: background 120ms ease, color 120ms ease;
  }

  .nav-panel .mobile-nav-list.mobile-nav-grid .nav-link:hover {
    background: rgba(10, 168, 150, 0.08);
    color: var(--teal-dark);
  }

  .nav-panel .mobile-nav-list.mobile-nav-grid .nav-link.is-active {
    background: var(--teal);
    color: #fff;
    font-weight: 600;
  }

  /* Hide mobile header/logo inside the compact desktop dropdown */
  .nav-panel .mobile-menu-head {
    display: none !important;
  }

  /* Style the contact action button nicer in dropdown */
  .nav-panel .mobile-action-btn {
    margin: 8px 10px 4px;
    padding: 9px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
  }
}

@media (max-width: 1240px) {
  /* Hide the desktop nav version inside mobile menu */
  .nav-panel .desktop-nav-list {
    display: none !important;
  }
}

.nav-toggle {
  display: block;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(20, 33, 38, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel-dark), var(--panel-teal));
  box-shadow: 0 14px 28px rgba(20, 33, 38, 0.16);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

/* Desktop: make hamburger lighter + smaller icon to match other right controls */
@media (min-width: 1241px) {
  .nav-toggle {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(20, 33, 38, 0.14);
    box-shadow: 0 10px 24px rgba(20, 33, 38, 0.07);
    padding: 0;
  }

  body.ui-theme-dark .nav-toggle {
    background: rgba(19, 32, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.16);
  }

  .nav-toggle span {
    width: 15px;
    height: 1.5px;
    margin: 2.5px auto;
    background: #31454b;
  }

  body.ui-theme-dark .nav-toggle span {
    background: rgba(255, 255, 255, 0.85);
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: rgba(10, 168, 150, 0.1);
    border-color: rgba(10, 168, 150, 0.3);
    box-shadow: 0 10px 24px rgba(20, 33, 38, 0.07);
    transform: translateY(-1px);
  }
}

body.ui-theme-dark .nav-toggle {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #163238, #2d6273);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 260ms ease, opacity 260ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0a8f80, #245970);
}

@media (min-width: 1241px) {
  .header-inner {
    gap: 18px;
    min-height: 78px;
  }

  .brand {
    padding: 6px 11px 6px 6px;
  }
}

@media (max-width: 1240px) {
  body.is-menu-open {
    overflow: hidden;
  }

  /* Reset desktop dropdown styles when on mobile */
  .nav-panel {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 16px !important;
    left: auto !important;
    width: min(320px, calc(100vw - 32px)) !important;
    transform: none !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  }

  body.is-menu-open .site-header {
    z-index: 260;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 74px;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .brand img {
    width: 50px;
    height: 50px;
    padding: 4px;
    border-radius: 16px;
  }

  .nav-toggle {
    position: relative;
    z-index: 130;
    display: block;
    flex: 0 0 auto;
    order: 3;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: block;
    border: 0;
    background: rgba(8, 12, 14, 0.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(8px);
    transition: opacity 320ms ease, visibility 320ms ease;
  }

  body.is-menu-open .nav-backdrop {
    top: var(--smarttech-header-bottom, 74px);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-panel {
    position: fixed;
    top: calc(var(--smarttech-header-bottom, 74px) + 10px);
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 170;
    width: min(326px, calc(100vw - 48px));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    align-content: start;
    row-gap: 14px;
    padding: 18px;
    color: #ffffff;
    background:
      linear-gradient(155deg, rgba(17, 30, 34, 0.99), rgba(8, 88, 82, 0.96)),
      var(--panel-dark);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 30px 95px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, 8px, 0) scale(0.99);
    transform-origin: top center;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, visibility 320ms ease;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    scrollbar-width: thin;
  }

  .nav-panel::-webkit-scrollbar {
    width: 7px;
  }

  .nav-panel::-webkit-scrollbar-track {
    background: transparent;
  }

  .nav-panel::-webkit-scrollbar-thumb {
    min-height: 42px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    background-clip: padding-box;
  }

  .nav-panel::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }

  .nav-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
      linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    border-radius: inherit;
    opacity: 0.32;
    pointer-events: none;
  }

  .nav-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0) scale(1);
  }

  .mobile-menu-head,
  .mobile-menu-section,
  .mobile-nav-list {
    position: relative;
    z-index: 1;
  }

  .desktop-nav-list {
    display: none;
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 2px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 900;
  }

  .mobile-menu-head-no-logo {
    padding-top: 2px;
  }

  .mobile-menu-head img {
    width: 46px;
    height: 46px;
    padding: 4px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    background: #ffffff;
  }

  .mobile-brand-title {
    display: inline-block;
    white-space: nowrap;
    font-size: 1.06rem;
    font-weight: 900;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .mobile-menu-section {
    display: grid;
    gap: 9px;
  }

  .mobile-section-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
  }

  .mobile-nav-list.mobile-nav-grid {
    display: grid;
    gap: 7px;
    width: 100%;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    font-size: 0.94rem;
    white-space: normal;
    line-height: 1.24;
  }

  .nav-link::after {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-left: 12px;
    content: "";
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.58;
    transform: rotate(-45deg);
  }

  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
  }

  .nav-link::before {
    display: none;
  }

  .nav-link.is-active {
    background: linear-gradient(135deg, var(--panel-teal), var(--panel-steel));
  }

  .mobile-action-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mobile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
    font-weight: 800;
    transition: background 260ms ease, border-color 260ms ease, transform 260ms ease;
  }

  .mobile-action-btn:hover,
  .mobile-action-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
  }

  .header-language-switcher {
    display: inline-flex;
  }
}

@media (min-width: 1241px) and (max-width: 1360px) {
  .header-inner {
    gap: 10px;
  }

  .brand {
    gap: 8px;
    padding: 6px 10px 6px 6px;
  }

  .brand img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .brand-title {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .desktop-nav-list {
    gap: 2px;
    padding: 5px;
  }

  .nav-link {
    padding: 9px 10px;
    font-size: 0.86rem;
  }

  .language-toggle {
    min-width: 42px;
    padding: 0 6px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    gap: 8px;
  }

  /* Make mobile menu more full and usable on phones */
  .nav-panel {
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 20px !important;
    max-height: calc(100vh - 80px) !important;
  }

  .brand {
    min-width: 0;
    max-width: min(54vw, 196px);
    gap: 8px;
    padding-right: 9px;
  }

  .brand-no-logo {
    padding: 12px 15px;
  }

  .brand-title {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-language-switcher .language-toggle {
    min-width: 48px;
    padding: 0 8px;
  }

  .header-language-switcher .language-toggle-code {
    display: none;
  }

  .nav-toggle {
    flex: 0 0 44px;
  }
}

@media (max-width: 420px) {
  .header-inner {
    min-height: 68px;
  }

  .brand {
    gap: 8px;
    padding-right: 9px;
  }

  .brand img {
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: 16px;
  }

  .brand-title {
    max-width: 128px;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-language-switcher .language-toggle {
    min-width: 48px;
    padding: 0 8px;
  }

  .header-language-switcher .language-toggle-code {
    display: none;
  }

  .mobile-brand-title {
    font-size: 0.94rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-panel {
    top: calc(100% + 8px);
    left: auto;
    right: 14px;
    bottom: auto;
    width: min(312px, calc(100vw - 44px));
    max-height: calc(100vh - 88px);
    padding: 16px;
  }

  .mobile-action-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .brand-title {
    max-width: 118px;
  }

}

@media (max-width: 700px) {
  .site-header {
    top: 0;
    padding-top: max(4px, env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, rgba(248, 252, 251, 0.99), rgba(238, 247, 245, 0.98));
  }

  body.is-menu-open .site-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(180deg, rgba(248, 252, 251, 1), rgba(237, 246, 244, 0.99));
    box-shadow: 0 12px 32px rgba(20, 33, 38, 0.14);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.ui-theme-dark.is-menu-open .site-header {
    background: linear-gradient(180deg, rgba(12, 18, 20, 1), rgba(14, 30, 34, 0.99));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 58px;
    padding-top: 0;
    padding-bottom: 5px;
  }

  .brand {
    width: fit-content;
    max-width: min(42vw, 168px);
    min-height: 48px;
    justify-content: flex-start;
    padding: 0 14px !important;
    margin-right: auto;
  }

  .brand-title {
    display: block;
    max-width: 100% !important;
    overflow: hidden;
    color: var(--ink) !important;
    font-size: 0.94rem;
    line-height: 1.1;
    text-overflow: ellipsis;
  }

  .nav-panel {
    position: fixed !important;
    top: auto !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    z-index: 180 !important;
    width: auto !important;
    max-width: none;
    height: auto;
    max-height: min(
      74svh,
      calc(100vh - var(--smarttech-header-bottom, 70px) - 16px)
    );
    min-height: 0;
    gap: 10px;
    justify-content: stretch;
    justify-items: stretch;
    padding: 14px;
    border-radius: 28px !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(82, 205, 191, 0.22), transparent 38%),
      linear-gradient(155deg, rgb(12, 41, 42), rgb(3, 85, 77)),
      #062d2d;
    border: 1px solid rgba(236, 246, 244, 0.16);
    box-shadow: 0 -22px 70px rgba(0, 0, 0, 0.38);
    overflow-y: auto;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
    transform: translate3d(0, calc(100% + 28px), 0) scale(0.98);
    transform-origin: bottom center;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  }

  .nav-panel .desktop-nav-list {
    display: none !important;
  }

  .nav-panel .mobile-menu-head {
    display: none !important;
  }

  .nav-panel .mobile-menu-section {
    display: grid !important;
    width: 100%;
  }

  .nav-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .nav-panel.is-open {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .mobile-nav-list.mobile-nav-grid,
  .mobile-action-list {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mobile-nav-list.mobile-nav-grid {
    gap: 6px;
  }

  .nav-panel .nav-link {
    opacity: 0;
    transform: translateY(18px);
  }

  .nav-panel.is-open .nav-link {
    animation: mobile-menu-item-rise 420ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
  }

  .nav-panel.is-open .nav-link:nth-child(2) {
    animation-delay: 35ms;
  }

  .nav-panel.is-open .nav-link:nth-child(3) {
    animation-delay: 70ms;
  }

  .nav-panel.is-open .nav-link:nth-child(4) {
    animation-delay: 105ms;
  }

  .nav-panel.is-open .nav-link:nth-child(5) {
    animation-delay: 140ms;
  }

  .nav-panel.is-open .nav-link:nth-child(6) {
    animation-delay: 175ms;
  }

  .mobile-menu-section {
    gap: 6px;
  }

  .mobile-section-title {
    font-size: 0.68rem;
  }

  .nav-link {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.18;
    background: rgba(255, 255, 255, 0.09);
  }

  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link.is-active {
    transform: none;
  }

  .mobile-action-btn {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 16px;
  }

  .language-menu {
    right: 0;
    max-width: min(220px, calc(100vw - 24px));
  }
}

@media (max-width: 390px) {
  .brand {
    max-width: min(38vw, 140px);
    min-height: 46px;
    padding: 0 12px !important;
  }

  .brand-title {
    max-width: 100% !important;
    font-size: 0.82rem;
  }

  .header-language-switcher .language-toggle {
    min-width: 44px;
    padding: 0 6px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }

  .nav-panel {
    top: auto !important;
    right: 10px !important;
    left: 10px !important;
    bottom: max(9px, env(safe-area-inset-bottom, 0px)) !important;
    gap: 8px;
    padding: 12px;
    border-radius: 24px !important;
    max-height: min(
      74svh,
      calc(100vh - var(--smarttech-header-bottom, 70px) - 14px)
    );
  }

  .mobile-nav-list.mobile-nav-grid {
    gap: 5px;
  }

  .nav-link,
  .mobile-action-btn {
    min-height: 44px;
    padding: 7px 10px;
  }
}

@keyframes mobile-menu-item-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .header-actions .nav-toggle {
    display: none !important;
  }
}

/* Topbar actions: one rhythm for menu, search, language, theme and install. */
.header-actions {
  --header-action-size: 44px;
  --header-action-radius: 13px;
  --header-action-icon: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: 12px;
}

.header-install-slot,
.header-language-switcher {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-action-size);
  height: var(--header-action-size);
  padding: 0;
  border: 0;
  border-radius: var(--header-action-radius);
  background: transparent;
  box-shadow: none;
  flex: 0 0 var(--header-action-size);
}

.header-install-slot[hidden] {
  display: none;
}

.header-actions .search-trigger,
.header-actions .theme-toggle,
.header-actions .nav-toggle,
.header-actions .pwa-install-btn-header,
.header-actions .header-language-switcher .language-toggle {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--header-action-size);
  height: var(--header-action-size);
  min-width: var(--header-action-size);
  min-height: var(--header-action-size);
  margin: 0;
  padding: 0;
  border: 1px solid rgba(20, 33, 38, 0.16);
  border-radius: var(--header-action-radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  box-shadow: 0 10px 22px rgba(20, 33, 38, 0.08);
  line-height: 0;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.ui-theme-dark .header-actions .search-trigger,
body.ui-theme-dark .header-actions .theme-toggle,
body.ui-theme-dark .header-actions .pwa-install-btn-header,
body.ui-theme-dark .header-actions .header-language-switcher .language-toggle {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.header-actions .search-trigger:hover,
.header-actions .theme-toggle:hover,
.header-actions .pwa-install-btn-header:hover,
.header-actions .header-language-switcher .language-toggle:hover,
.header-actions .search-trigger:focus-visible,
.header-actions .theme-toggle:focus-visible,
.header-actions .pwa-install-btn-header:focus-visible,
.header-actions .header-language-switcher .language-toggle:focus-visible {
  border-color: rgba(10, 168, 150, 0.38);
  background: rgba(10, 168, 150, 0.12);
  color: var(--teal-dark);
  box-shadow: 0 12px 26px rgba(10, 168, 150, 0.14);
  transform: translateY(-1px);
}

body.ui-theme-dark .header-actions .search-trigger:hover,
body.ui-theme-dark .header-actions .theme-toggle:hover,
body.ui-theme-dark .header-actions .pwa-install-btn-header:hover,
body.ui-theme-dark .header-actions .header-language-switcher .language-toggle:hover,
body.ui-theme-dark .header-actions .search-trigger:focus-visible,
body.ui-theme-dark .header-actions .theme-toggle:focus-visible,
body.ui-theme-dark .header-actions .pwa-install-btn-header:focus-visible,
body.ui-theme-dark .header-actions .header-language-switcher .language-toggle:focus-visible {
  background: rgba(10, 168, 150, 0.18);
  color: #4de0cb;
}

.header-actions .search-trigger svg,
.header-actions .theme-toggle svg,
.header-actions .pwa-install-btn-header svg {
  display: block;
  width: var(--header-action-icon);
  height: var(--header-action-icon);
  pointer-events: none;
}

.header-actions .nav-toggle {
  order: 0;
  flex: 0 0 var(--header-action-size);
  flex-direction: column;
  gap: 4px;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, #1c5661, #087d73);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(8, 123, 112, 0.24);
}

.header-actions .nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: currentColor;
}

.header-actions .nav-toggle:hover,
.header-actions .nav-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.32);
  background: linear-gradient(145deg, #0a8f80, #245970);
  box-shadow: 0 15px 28px rgba(8, 123, 112, 0.28);
  transform: translateY(-1px);
}

.header-actions .header-language-switcher .language-toggle {
  gap: 0;
}

.header-actions .header-language-switcher .language-toggle-code,
.header-actions .header-language-switcher .language-toggle-caret {
  display: none;
}

.header-actions .header-language-switcher .language-toggle-flag {
  width: 24px;
  height: 16px;
  border-radius: 4px;
}

@media (max-width: 700px) {
  .header-actions {
    --header-action-size: 44px;
    --header-action-radius: 13px;
    --header-action-icon: 20px;
    gap: 7px;
    margin-left: 0;
  }

  .header-actions .nav-toggle span {
    width: 20px;
  }

  .header-actions .header-language-switcher .language-toggle-flag {
    width: 22px;
    height: 15px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    min-height: 58px;
    gap: 6px;
  }

  .brand {
    max-width: min(52vw, 170px);
    padding: 4px 8px 4px 4px;
    gap: 6px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 0.86rem;
    max-width: 100px;
  }
}

@media (max-width: 380px) {
  .header-actions {
    --header-action-size: 44px;
    --header-action-radius: 13px;
    --header-action-icon: 20px;
    gap: 5px;
  }

  .header-actions .header-install-slot {
    display: none;
  }

  .header-actions .nav-toggle span {
    width: 19px;
  }

  .header-actions .header-language-switcher .language-toggle-flag {
    width: 20px;
    height: 14px;
  }

  .brand-title {
    font-size: 0.78rem;
    max-width: 78px;
  }
}
