/**
 * Site Header & Navigation
 */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

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

/* Site Branding */
.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #1b2939;
  font-family: var(--font-family-serif);
  font-size: clamp(1.55rem, 2.35vw, 2.05rem);
  letter-spacing: 0;
  line-height: 1;
}

.site-logo-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px dashed rgba(44, 78, 116, 0.28);
  color: #6f8399;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.8);
}

.site-logo-image {
  display: block;
  max-height: 38px;
  width: auto;
  max-width: 220px;
  margin-right: 6px;
  transform: translateY(-1px);
}

.site-brand-main {
  color: #1d2d3e;
  font-weight: 700;
}

.site-brand-accent {
  color: #c8a14a;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Primary Navigation */
.primary-nav {
  margin-left: auto;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav li {
  display: inline-flex;
  align-items: center;
}

.primary-nav a {
  padding: 10px 0;
  border-radius: 0;
  background: transparent;
  color: #2c3f55;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  position: relative;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: #78e3ec;
  transition: width 0.22s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: transparent;
  color: #0e7f9e;
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after {
  width: 100%;
}

.primary-nav .current-menu-item > a::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4b55;
  box-shadow: 0 0 0 3px rgba(255, 75, 85, 0.16);
  transform: translateY(-50%);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: #dce5ef;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Language Switcher */
.lang-switch {
  position: relative;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 60px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #274059;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  background: rgba(14, 127, 158, 0.1);
  transition: color var(--transition-base), background-color var(--transition-base);
  cursor: pointer;
}

.lang-switch-btn:hover {
  color: #0f6f8a;
  background: rgba(14, 127, 158, 0.18);
}

.lang-caret {
  font-size: 0.66rem;
  opacity: 0.9;
  transition: transform var(--transition-base);
}

.lang-switch.open .lang-caret {
  transform: rotate(180deg);
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 86px;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 42, 75, 0.12);
  border: 1px solid rgba(28, 56, 88, 0.16);
  display: none;
  z-index: var(--z-modal);
}

.lang-switch.open .lang-switch-menu {
  display: block;
}

.lang-option {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: lowercase;
  color: #3f566f;
}

.lang-option:hover,
.lang-option.is-active {
  background: rgba(14, 127, 158, 0.12);
  color: #0e7f9e;
}

/* Mobile Navigation */
@media (max-width: 800px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .primary-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(29, 57, 89, 0.14);
    padding: 12px 4vw 16px;
    display: none;
    margin-left: 0;
  }

  .primary-nav.open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav li {
    display: block;
  }

  .primary-nav .current-menu-item > a::before {
    display: none;
  }

  .primary-nav a {
    border-radius: 0;
    padding: 12px 0;
    border-bottom: 1px solid rgba(29, 57, 89, 0.12);
  }

  .primary-nav a::after {
    bottom: 8px;
  }
}
