.site-header {
  position: fixed;
  top: var(--topbar-height); left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  overflow: visible;
  background: #ffffff;
  border-bottom: 1px solid rgba(220, 231, 245, 0.7);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}
.site-header.scrolled {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(4, 27, 71, 0.12);
  height: 82px;
  top: 0;
}

.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: flex-start; 
  gap: 10px; 
  width: 100%;
  max-width: 1360px !important;
  overflow: visible;
  padding-left: 0 !important;
}

.logo { margin-right: 64px !important; margin-left: -6px; }

.brand-logo-img {
  max-height: 124px;
  object-fit: contain;
  transition: max-height 0.3s ease;
}

.site-header.scrolled .brand-logo-img {
  max-height: 72px;
}

.main-nav { 
  display: flex; 
  align-items: center; 
  gap: 4px;
  margin-left: 0;
  flex-wrap: nowrap;
  min-width: 0;
}

/* Desktop header spacing refinement: logo slightly left, comfortable
   gap before the nav, nav nudged right, actions anchored to the far right.
   Scoped to desktop so mobile/tablet layout is untouched. */
@media (min-width: 993px) {
  .header-inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .logo {
    margin-right: 16px;
    flex-shrink: 0;
  }

  .main-nav {
    margin-left: 0;
    flex: 0 1 auto;
    justify-content: flex-start;
    gap: 2px;
  }

  .header-actions {
    margin-left: 24px;
    gap: 10px;
    flex-shrink: 0;
  }
}

@media (min-width: 993px) and (max-width: 1480px) {
  .main-nav { gap: 0px; }
  .nav-link-btn { padding: 6px 9px; font-size: 15px; }
  .header-actions { gap: 6px; }
  .header-store-badges { display: none; }
  .lang-btn { padding: 8px 12px; }
}

@media (min-width: 993px) and (max-width: 1180px) {
  .nav-link-btn { padding: 6px 6px; font-size: 13.5px; }
  .logo { margin-right: 10px !important; }
  .main-nav { gap: 0px; }
  .lang-btn { padding: 6px 10px; font-size: 12.5px; }
}

.nav-link-btn {
  position: relative;
  padding: 8px 14px;
  font-size: 16.5px;
  color: var(--color-primary);
  font-weight: 600;
  border-radius: 4px;
  transition: color 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-link-btn::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link-btn:hover, 
.nav-link-btn.active { 
  color: var(--color-primary); 
  background: transparent; 
}

.nav-link-btn:hover::after,
.nav-link-btn.active::after {
  transform: scaleX(1);
}

.dropdown-trigger {
  position: relative;
}

.chevron-icon {
  transition: transform 0.2s ease;
}

.mega-menu-wrapper {
  position: relative;
  min-width: 0;
}

.mega-menu-wrapper:hover .chevron-icon {
  transform: rotate(180deg);
}

.mega-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(4, 27, 71, 0.15);
  padding: 32px;
  display: grid;
  gap: 32px;
  min-width: max-content;
  border: 1.5px solid var(--color-border);
  animation: megaFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}

.mega-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: var(--color-white);
  border-left: 1.5px solid var(--color-border);
  border-top: 1.5px solid var(--color-border);
}

.mega-dropdown.double-col {
  grid-template-columns: 240px 240px;
}

.mega-dropdown.triple-col {
  grid-template-columns: 240px 240px 240px;
}

.mega-dropdown.single-col {
  grid-template-columns: 240px;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mega-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  border-bottom: 1.5px solid var(--color-border);
  padding-bottom: 8px;
}

.mega-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.mega-items li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mega-items li svg {
  color: var(--color-primary);
  font-size: 16px;
  transition: color 0.2s ease;
}

.mega-items li:hover {
  background: var(--color-bg);
  color: var(--color-secondary);
  transform: translateX(4px);
}

.mega-items li:hover svg {
  color: var(--color-secondary);
}

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: 20px; }

.header-store-badges { display: flex; align-items: center; gap: 8px; margin-right: 4px; flex-shrink: 0; }
.header-store-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0D1B3D;
  color: #fff;
  border-radius: 9px;
  padding: 8px 14px 8px 12px;
  text-decoration: none;
  line-height: 1.15;
  transition: background 0.2s ease, transform 0.2s ease;
}
.header-store-badge:hover { background: #C41230; transform: translateY(-1px); }
.header-store-badge.app-store-unavailable { border: 0; cursor: not-allowed; opacity: 0.65; }
.header-store-badge.app-store-unavailable:hover { background: #0D1B3D; transform: none; }
.header-store-badge span { display: flex; flex-direction: column; }
.header-store-badge span em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.3px;
  opacity: 0.85;
  text-transform: uppercase;
}
.header-store-badge span { font-size: 14.5px; font-weight: 600; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 13.5px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-bg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  width: max-content;
  min-width: 180px;
  max-width: calc(100vw - 32px);
  border: 1.5px solid var(--color-border);
  padding: 0;
  margin: 0;
  z-index: 9999;
}

@media (max-width: 480px) {
  .lang-dropdown { right: -8px; min-width: 170px; }
}

.lang-dropdown li {
  list-style: none;
}

.lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-text);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-dropdown .lang-flag-wrap { display: inline-flex; align-items: center; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); flex-shrink: 0; }
.lang-dropdown button:hover { background: rgba(4,27,71,0.08); color: var(--color-primary); }
.lang-dropdown button.active { color: var(--color-primary); font-weight: 600; background: rgba(4,27,71,0.06); }

.menu-toggle { display: none; color: var(--color-primary); cursor: pointer; }
.mobile-only { display: none; }

@media (max-width: 992px) {
  .desktop-only { display: none; }
  .menu-toggle { display: block; }
  
  .main-nav {
    position: fixed;
    top: calc(var(--topbar-height) + var(--header-height));
    left: 0; right: 0;
    bottom: 0;
    height: calc(100vh - var(--topbar-height) - var(--header-height));
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 24px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    z-index: 998;
    overflow-y: auto;
  }
  
  .main-nav.open { 
    transform: translateX(0); 
  }
  
  .nav-link-btn { 
    width: 100%;
    justify-content: center;
    padding: 16px; 
    font-size: 18px;
  }
  
  .site-header.scrolled .main-nav {
    top: var(--header-height);
    height: calc(100vh - 96px);
  }

  .mega-menu-wrapper {
    width: 100%;
  }
  
  .mega-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    animation: none;
  }
  
  .mega-dropdown::before {
    display: none;
  }
  
  .mega-col-title {
    font-size: 12px;
    text-align: center;
  }
  
  .mega-items li {
    justify-content: center;
  }

  .mobile-only { 
    display: block; 
    margin-top: 16px; 
    width: 100%;
  }
  .mobile-only .btn { 
    width: 100%; 
  }

  .header-mobile-store-badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .header-mobile-store-badges .header-store-badge {
    width: 100%;
    max-width: 240px;
    justify-content: center;
    padding: 10px 14px;
  }
}