/* =========================================================
   HEADER / NAV
   ========================================================= */
/* <header> landmark = sticky container */
header[role="banner"] {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  left: 0;
  right: 0;
  z-index: 1000;
  transition: top var(--cp-ease);
}

body.home header[role="banner"] {
  position: fixed;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 35px);
}

body.home header[role="banner"].header-scrolled {
  top: 0;
}

@media (min-width: 601px) {
  body.home header[role="banner"].header-scrolled {
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 0px);
  }
}

/* #site-header = the actual white bar */
#site-header {
  width: 100%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow var(--cp-ease), background-color var(--cp-ease);
}

#site-header.scrolled {
  box-shadow: 0 2px 20px rgba(13, 32, 96, 0.10);
  background-color: var(--cp-white);
}

#site-header.header-scrolled {
  box-shadow: 0 2px 20px rgba(13, 32, 96, 0.10);
  background-color: var(--cp-white);
}

.cp-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.cp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
}

.cp-logo img {
  height: 114px;
  width: auto;
}

.cp-logo svg {
  height: 114px;
  width: auto;
  display: block;
  transition: height var(--cp-ease);
}

#site-header.scrolled .cp-logo,
#site-header.header-scrolled .cp-logo {
  color: var(--cp-navy);
}

#site-header.header-scrolled .cp-logo svg {
  height: 54px;
}

.cp-logo-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cp-navy);
  line-height: 1.25;
}

.cp-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.cp-nav a {
  color: var(--cp-white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--cp-radius-sm);
  transition: color var(--cp-ease), background-color var(--cp-ease);
  display: block;
  white-space: nowrap;
}

.cp-nav a:hover {
  background: transparent;
  color: #F29420;
}

#site-header.scrolled .cp-nav a {
  color: var(--cp-navy);
}

#site-header.scrolled .cp-nav a:hover,
#site-header.header-scrolled .cp-nav a:hover {
  background: var(--cp-light-blue);
  color: #F29420;
}

.cp-nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--cp-white);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--cp-radius-full);
  border: 1.5px solid var(--cp-border);
  background: transparent;
  cursor: pointer;
  transition: background var(--cp-ease);
}

.cp-nav-lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.cp-lang-dropdown {
  position: relative;
}

.cp-lang-dropdown summary {
  list-style: none;
}

.cp-lang-dropdown summary::-webkit-details-marker {
  display: none;
}

.cp-lang-caret {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform var(--cp-ease);
}

.cp-lang-dropdown[open] .cp-lang-caret {
  transform: rotate(-135deg) translateY(-1px);
}

.cp-lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 170px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(13, 32, 96, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(13, 32, 96, 0.14);
  display: grid;
  gap: 4px;
  z-index: 30;
}

.cp-lang-dropdown-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--cp-navy);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.cp-lang-dropdown-item small {
  color: var(--cp-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.cp-lang-dropdown-item:hover,
.cp-lang-dropdown-item.is-active {
  background: var(--cp-light-blue);
  color: var(--cp-navy);
}

.cp-nav-lang:hover {
  background: var(--cp-light-blue);
  color: var(--cp-navy);
}

#site-header.scrolled .cp-nav-lang {
  color: var(--cp-navy);
}

.cp-nav-lang svg {
  width: 15px;
  height: 15px;
  stroke: var(--cp-white);
  fill: none;
}

.cp-nav-lang:hover svg {
  stroke: var(--cp-navy);
}

#site-header.scrolled .cp-nav-lang svg {
  stroke: var(--cp-navy);
}

#site-header.scrolled .cp-lang-dropdown-menu,
#site-header.header-scrolled .cp-lang-dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
}

.cp-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.cp-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cp-white);
  border-radius: 2px;
  transition: all var(--cp-ease);
}

#site-header.scrolled .cp-nav-toggle span {
  background: var(--cp-navy);
}

/* â”€â”€â”€ Mobile overlay (full-screen dark panel) â”€â”€â”€ */
.cp-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cp-navy-dark);
  z-index: 2000;
  flex-direction: column;
  padding: calc(var(--wp-admin--admin-bar--height, -2px) + 30px) 32px 48px;
  overflow-y: auto;
}



.cp-mobile-nav.open {
  display: flex;
}

.cp-mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.cp-logo-white,
.cp-logo-white svg,
.cp-logo-white img {
  color: #fff;
}

.cp-logo-white img {
  filter: brightness(0) invert(1);
}

.cp-mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 6px;
  display: flex;
  align-items: center;
}

.cp-mobile-nav-close svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
}

.cp-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-mobile-menu li a {
  display: block;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.cp-mobile-menu li a:hover {
  opacity: 0.75;
}

/* Hide desktop nav on mobile, show hamburger */
@media (max-width: 991px) {
  .cp-nav {
    display: none;
  }

  .cp-nav-toggle {
    display: flex;
  }

  .cp-nav-lang-switcher {
    margin-left: auto;
  }

  .cp-lang-dropdown-menu {
    right: 0;
    min-width: 150px;
  }
}