/* ============================================================
   BOSS MARINE — language switcher + header collapse
   Tablet/Mobile: max-width 1179px  (raised from 1024 so PC nav fits 1 row)
   PC:            min-width 1180px
   ============================================================ */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
}

.header-actions .hamburger {
  margin-left: 0;
}

/* Language switch — secondary to yellow CTA */
.lang-switch {
  position: relative;
  z-index: 1002;
  flex-shrink: 0;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 59, 142, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary, #003B8E);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  line-height: 1;
  white-space: nowrap;
}

.lang-switch__btn:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 59, 142, 0.28);
}

.lang-switch__btn:focus-visible {
  outline: 2px solid rgba(0, 59, 142, 0.35);
  outline-offset: 2px;
}

.lang-switch__globe {
  font-size: 0.9rem;
  line-height: 1;
}

.lang-switch__chev {
  font-size: 0.65rem;
  opacity: 0.7;
  transform: translateY(1px);
}

.lang-switch__label-short {
  display: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lang-switch__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(0, 59, 142, 0.12);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 30, 80, 0.12);
  z-index: 1003;
}

.lang-switch__panel[hidden] {
  display: none !important;
}

.lang-switch__panel [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary, #003B8E);
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-switch__panel [role="option"]:hover,
.lang-switch__panel [role="option"]:focus {
  background: rgba(0, 59, 142, 0.06);
  outline: none;
}

.lang-switch__panel [role="option"].is-selected::after {
  content: '✓';
  font-size: 0.75rem;
  color: var(--secondary, #45C8D8);
}

/* Transparent header over hero: lighten trigger */
.header:not(.scrolled) .lang-switch__btn {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.header:not(.scrolled) .lang-switch__btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Panel stays light for readability */
.header:not(.scrolled) .lang-switch__panel {
  background: rgba(255, 255, 255, 0.94);
}

/* Mobile menu reserve CTA */
.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  margin-top: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--accent, #FFD83D);
  color: var(--primary, #003B8E);
  font-weight: 900;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 216, 61, 0.35);
}

.mobile-menu-cta:hover {
  background: #f0c900;
}

/* ===== Tablet / Mobile: ≤1179 — keep completed compact header ===== */
@media (max-width: 1179px) {
  .nav {
    display: none !important;
  }

  .header-cta {
    display: none !important;
  }

  .hamburger {
    display: flex !important;
  }

  .lang-switch__globe {
    display: none;
  }

  .lang-switch__label-full {
    display: none;
  }

  .lang-switch__label-short {
    display: inline;
  }

  .lang-switch__btn {
    height: 34px;
    padding: 0 10px;
    min-width: 52px;
    justify-content: center;
  }

  .lang-switch__panel {
    right: 0;
    left: auto;
    min-width: min(200px, calc(100vw - 32px));
  }
}

/* ===== PC: ≥1180 — full header, single-row nav ===== */
@media (min-width: 1180px) {
  .hamburger {
    display: none !important;
  }

  .header-cta {
    display: inline-flex !important;
    /* minimal horizontal trim — keep presence */
    padding: 9px 14px;
    gap: 6px;
  }

  .lang-switch__label-full {
    display: inline;
  }

  .lang-switch__label-short {
    display: none;
  }

  /* Give the bar a bit more usable width without changing page containers */
  .header .container {
    width: min(1280px, 95%);
  }

  .header-inner {
    gap: 16px;
  }

  .header-actions {
    gap: 8px;
  }

  .nav {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .nav-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
  }

  .nav-link {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 8px 8px;
  }

  /* Compact language control (still left of CTA, still secondary) */
  .lang-switch__btn {
    height: 34px;
    padding: 0 8px;
    gap: 4px;
    font-size: 0.74rem;
  }

  .lang-switch__globe {
    font-size: 0.78rem;
  }

  .lang-switch__chev {
    font-size: 0.58rem;
    margin-left: -1px;
  }
}
