/* Mobile & language header styles */

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f0f6f8;
  border-radius: 20px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #388da8;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-switcher a.active {
  background: #388da8;
  color: #fff;
}

.lang-switcher a:not(.active):hover {
  background: rgba(56, 141, 168, 0.12);
}

.header-actions {
  gap: 8px;
  flex-shrink: 0;
}

/* Desktop */
@media (min-width: 1200px) {
  .header-inner {
    gap: 0;
  }

  .header-inner .logo {
    order: 1;
    margin-inline-end: auto;
  }

  .header-inner .navmenu {
    order: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }

  .header-inner .header-actions {
    order: 3;
    margin-inline-start: 12px;
  }

  .sitename-short {
    display: none !important;
  }
}

/* Mobile */
@media (max-width: 1199px) {
  .header {
    padding: 12px 0;
    background-color: #fff !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  }

  .index-page .header {
    background-color: #fff !important;
  }

  .header-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
  }

  [dir="rtl"] .header-inner {
    flex-direction: row-reverse;
  }

  .header-inner .navmenu {
    flex-shrink: 0;
    padding: 0;
    order: unset !important;
  }

  .header .logo,
  .header .navmenu {
    order: unset !important;
  }

  .header-inner .mobile-nav-toggle {
    font-size: 30px;
    margin: 0 !important;
    color: #313336;
    line-height: 1;
  }

  .header-inner .logo {
    flex: 1;
    margin: 0 !important;
    justify-content: center;
    min-width: 0;
    order: unset !important;
  }

  .header-inner .logo h1 {
    font-size: 20px !important;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #313336;
  }

  .header-actions {
    gap: 6px;
    order: unset !important;
  }

  .lang-switcher {
    padding: 3px;
  }

  .lang-switcher a {
    font-size: 14px;
    min-width: 30px;
    padding: 5px 9px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 0 10px;
    gap: 6px;
  }

  .header-inner .logo h1 {
    font-size: 18px !important;
  }

  .lang-switcher a {
    font-size: 13px;
    min-width: 28px;
    padding: 4px 8px;
  }
}
