/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pine) 55%, var(--gold) 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Raleway';
  font-weight: 800;
  font-size: 15px;
}

.logo-text {
  font-family: 'Raleway';
  font-weight: 600;
  font-size: 14px;
  line-height: 1.18;
  /* Keep the full title but cap the width so a long name wraps to a second
     row instead of stretching the header and squeezing the menu. */
  max-width: 140px;
  white-space: normal;
}

.logo-text small {
  display: block;
  font-family: 'Noto Sans';
  font-weight: 600;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--pine);
}

.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-cta {
  background: var(--apricot);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: #D27424;
}

/* ===== LANGUAGE SWITCHER (fixed, right side) ===== */
#langSwitch {
  position: fixed;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 250;
}

.lang-current {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--card);
  box-shadow: 0 6px 20px rgba(10, 51, 44, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lang-current:hover,
.lang-current:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 8px 26px rgba(10, 51, 44, 0.32);
  outline: none;
}

.lang-flag {
  display: block;
  width: 30px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-menu {
  position: absolute;
  top: 135%;
  right: calc(100% + 12px);
  transform: translateY(-50%) scale(0.95);
  transform-origin: right center;
  min-width: 178px;
  background: var(--card);
  border: 1px solid var(--mist);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(10, 51, 44, 0.2);
  padding: 8px;
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

#langSwitch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s;
}

.lang-toggle .lang-flag {
  width: 26px;
  height: 17px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lang-toggle:hover {
  background: var(--paper);
}

.lang-toggle.active {
  background: var(--pine);
  color: #fff;
}

/* Hide the menu's caret on the active row but keep the flag readable. */
.lang-toggle.active .lang-flag {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

@media (max-width: 920px) {
  /* Mobile: hamburger sits at the right edge, language switcher to its left. */
  #langSwitch {
    right: 74px; /* burger right (14) + burger width (50) + gap (10) */
  }

  #burger-menu {
    position: fixed;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    z-index: 250;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid #fff;
    box-shadow: 0 6px 20px rgba(10, 51, 44, 0.22);
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
    transition: transform 0.2s, box-shadow 0.2s;
  }

  #burger-menu:hover,
  #burger-menu:focus-visible {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 8px 26px rgba(10, 51, 44, 0.32);
    outline: none;
  }

  /* Open the language menu downward so it never overlaps the hamburger. */
  .lang-menu {
    top: calc(100% + 10px);
    right: 0;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
  }

  #langSwitch.open .lang-menu {
    transform: translateY(0) scale(1);
  }
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--ink);
  cursor: pointer;
}

@media(max-width: 920px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--mist);
    padding: 8px 0;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links li {
    padding: 12px 24px;
  }
  
  .burger {
    display: block;
  }
  
  .nav-cta {
    display: none;
  }
}
