/* ============================================================
   HEADER-PUBLIC.CSS — NatGeo/Stripe/Linear style
   Baut auf den bw-navbar Tokens aus base.css auf.
   Erweitert: Dropdown, Actions, Language, Login-Button.
   ============================================================ */

/* ---- Objekte-Dropdown (hover-based, desktop) ---- */
.bw-has-dropdown {
  position: relative;
}

/* Unsichtbare Brücke: verhindert Flicker beim Cursor-Übergang */
.bw-has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
}

.bw-caret {
  margin-left: 3px;
  vertical-align: middle;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.bw-has-dropdown:hover .bw-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.bw-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #0d1f3c;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.40);
  padding: 0.375rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1020;
  pointer-events: none;
}

.bw-has-dropdown:hover .bw-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dropdown items: icon + title + desc */
.bw-dd-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.bw-dd-item:hover .bw-dd-icon {
  background: rgba(245,158,11,0.15);
  color: var(--bw-nav-accent);
}

.bw-dd-content {
  display: flex;
  flex-direction: column;
}

.bw-dd-title {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  line-height: 1.2;
}

.bw-dd-desc {
  font-size: 11.5px;
  color: rgba(255,255,255,0.40);
  margin-top: 2px;
  line-height: 1.3;
}

.bw-dd-item:hover .bw-dd-desc {
  color: rgba(255,255,255,0.58);
}

.bw-nav-logo {
    display: block;
    width: auto;
    height: 52px;
    max-width: 280px;
}

/* ---- Right-side action icons (phone, email) — icon-only with CSS tooltip ---- */
.bw-nav-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--bw-nav-link);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.bw-nav-action:hover {
  color: var(--bw-nav-link-on);
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

/* CSS Tooltip */
.bw-nav-action::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d1f3c;
  color: rgba(255,255,255,0.88);
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 4px 16px rgba(0,0,0,0.30);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  transform: translateX(-50%) translateY(-4px);
  z-index: 1050;
}

/* Tooltip arrow */
.bw-nav-action::before {
  content: "";
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: #0d1f3c;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 1051;
}

.bw-nav-action:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.bw-nav-action:hover::before {
  opacity: 1;
  visibility: visible;
}

/* ---- Language switcher ---- */
.bw-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--bw-nav-link);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.14);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.bw-lang-switch:hover {
  color: var(--bw-nav-link-on);
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.bw-flag {
  font-size: 14px;
  line-height: 1;
}

.bw-lang-text {
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---- Login button with amber glow ---- */
.bw-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--bw-nav-accent);
  background: rgba(245,158,11,0.09);
  border: 1px solid rgba(245,158,11,0.25);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, border-color 0.22s ease,
              color 0.22s ease, box-shadow 0.22s ease;
}

.bw-login-btn:hover,
.bw-login-btn--active {
  background: rgba(245,158,11,0.18);
  border-color: rgba(245,158,11,0.50);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(245,158,11,0.20);
  text-decoration: none;
}

/* ---- Separator between nav zones ---- */
.bw-nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.10);
  flex-shrink: 0;
  align-self: center;
}

/* ---- Mobile: section label + sub-items ---- */
.bw-mobile-section {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  padding: 0.75rem 0 0.25rem;
}

.bw-mobile-nav a.bw-mobile-sub {
  padding-left: 1rem;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
}

.bw-mobile-nav a.bw-mobile-sub:hover {
  color: rgba(255,255,255,0.90);
}

@media (max-width: 768px) {
    .bw-nav-logo {
        height: 40px;
        max-width: 220px;
    }
}

/* ---- Dropdown CTA item (available property) ---- */
.bw-dd-item--cta {
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: 4px;
}

.bw-dd-icon--green {
  background: rgba(16, 185, 129, 0.15);
  color: rgb(16, 185, 129);
}

.bw-dd-title--green {
  color: rgb(16, 185, 129);
  font-weight: 700;
}

/* ---- Mobile nav CTA sub-item ---- */
.bw-mobile-sub--cta {
  color: rgb(16, 185, 129) !important;
  font-weight: 600 !important;
}

.bw-mobile-sub--cta:hover {
  color: rgb(52, 211, 153) !important;
}

/* ---- Responsive: hide contact actions on small screens ---- */
@media (max-width: 900px) {
  .bw-nav-action,
  .bw-nav-sep,
  .bw-lang-switch,
  .bw-login-btn {
    display: none;
  }
}
