/* rfu research GmbH – Header & Navigation */

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  /* box-shadow: 0 2px 6px rgba(0, 0, 90, 0.1); */
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.1);
    /* box-shadow: 0 6px 20px rgba(0,0,90,0.13); */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: 1410px;
  margin: 0 auto;
  padding: 0 50px;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo svg { height: 90px; width: auto; }
.site-logo img { height: 90px; width: auto; }
.site-logo-text {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* ===== MAIN NAV ===== */
.nav-group {
  display: flex;
  align-items: center;
}
.main-nav {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-item { position: relative; margin: 0; }

.nav-item > a,
.nav-item > button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  /* text-transform: uppercase; */
  /* letter-spacing: 0.04em; */
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-item > a:hover,
.nav-item > button:hover,
.nav-item.is-active > a { color: var(--primary); text-decoration: none; }
.nav-item.is-active > button { color: var(--primary); text-decoration: none; }

.nav-arrow {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
}

/* Consulting button */
.nav-item--button > a {
  border: 1px solid var(--text);
  margin-left: 8px;
  padding: 5px 8px;
  transition: background 0.2s, color 0.2s;
}
.nav-item--button > a:hover {
  /* background: var(--primary); */
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  width: max-content;
  /* max-width: 260px; */
  box-shadow: 0 6px 20px rgba(0,0,90,0.13);
  list-style: none;
  padding-left: 0;
  border-top: 3px solid var(--primary);
  z-index: 200;
  /* expand-from-top animation */
  transform: scaleY(0);
  transform-origin: top;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.28s ease;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  transform: scaleY(1);
  opacity: 1;
  pointer-events: auto;
}

.nav-dropdown li {
  margin: 0;
}

.nav-dropdown li a {
  display: block;
  padding: 9px 16px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown li:last-child a { border-bottom: none; }
.nav-dropdown li a:hover,
.nav-dropdown li a[aria-current="page"] { 
  /* background: var(--gray-light);  */
  color: var(--primary); text-decoration: none; 
}

/* Language switcher */
.lang-switcher {
  margin-left: 18px !important;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  flex-shrink: 0;
}
.lang-flag {
  display: flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity 0.2s;
  text-decoration: none;
}
.lang-flag svg {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  display: block;
}
.lang-flag:hover { opacity: 0.8; text-decoration: none; }
.lang-flag--active { opacity: 1; }

/* Mobile burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  margin-left: 12px;
}
.burger span {
  display: block;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1224px) {
  :root { --header-height: 80px; }

  .burger { display: flex; order: 3; }
  .site-logo { order: 1; }
  .nav-group { order: 2; margin-left: auto; }
  .header-inner { justify-content: flex-start; padding: 0 30px; }

  .lang-switcher { margin-left: 0; }
  .lang-flag svg { width: 32px; height: 100%; }

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    overflow-y: auto;
    padding: 16px 0;
    gap: 0;
    border-top: 1px solid var(--border);
  }
  .main-nav.is-open { display: flex; }

  .nav-item { width: 100%; }
  .nav-item > a,
  .nav-item > button {
    padding: 13px 24px;
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    width: 100%;
  }
  .nav-item--button { padding: 16px 24px; }
  .nav-item--button > a { border: 2px solid var(--primary); margin: 0; padding: 10px 16px; justify-content: center; }

  .nav-dropdown {
    display: block;
    position: static;
    border-top: none;
    box-shadow: none;
    min-width: unset;
    background: var(--gray-light);
    clip-path: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
    width: 100%;
  }
  .nav-dropdown li a { padding: 11px 36px; }
}
