/* ========================================================================== 
   KUDEN PRODUCT — SHARED PREMIUM HEADER
   ========================================================================== */

.page-ia-v2 {
  --product-header-accent: var(--ia2-accent);
  --product-header-accent-rgb: var(--ia2-accent-rgb);
}

.page-qa-v2 {
  --product-header-accent: var(--qa2-accent);
  --product-header-accent-rgb: var(--qa2-accent-rgb);
}

.product-v2-navbar {
  height: auto;
  padding: 10px 18px 0;
  border: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg-primary) 94%, transparent) 0%, transparent 100%);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.product-v2-navbar-inner {
  position: relative;
  width: min(calc(100% - 2px), 1320px);
  max-width: 1320px;
  height: 64px;
  padding: 0 10px 0 12px;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--product-header-accent) 17%, var(--glass-border));
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-solid) 89%, transparent);
  box-shadow:
    0 18px 50px rgba(29, 36, 70, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

html[data-theme="dark"] .product-v2-navbar-inner {
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.product-v2-brand {
  min-width: 174px;
  gap: 10px;
}

.product-v2-brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--product-header-accent-rgb), 0.22);
  border-radius: 13px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9), transparent 45%),
    linear-gradient(145deg, rgba(var(--product-header-accent-rgb), 0.16), rgba(23, 191, 233, 0.1));
  box-shadow: 0 8px 20px rgba(var(--product-header-accent-rgb), 0.13);
}

.product-v2-brand-mark::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  background: #20c997;
}

.product-v2-brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.product-v2-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  line-height: 1;
}

.product-v2-brand-copy strong {
  color: var(--text-title);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.product-v2-brand-copy small {
  overflow: hidden;
  color: var(--product-header-accent);
  font-size: 0.61rem;
  font-weight: 760;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-v2-primary-nav {
  padding: 4px;
  gap: 1px;
  border: 1px solid color-mix(in srgb, var(--product-header-accent) 10%, var(--glass-border));
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-secondary) 70%, transparent);
}

.product-v2-primary-nav .hub-nav-link {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 11px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 650;
}

.product-v2-primary-nav .hub-nav-link:hover {
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  color: var(--text-title);
}

.product-v2-primary-nav .hub-nav-link.active {
  gap: 7px;
  background: var(--surface-solid);
  color: var(--text-title);
  box-shadow: 0 6px 18px rgba(29, 36, 70, 0.08);
}

.product-v2-primary-nav .hub-nav-link.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--product-header-accent);
  box-shadow: 0 0 0 4px rgba(var(--product-header-accent-rgb), 0.1);
}

.product-v2-actions {
  gap: 7px;
}

.product-v2-actions .hub-theme-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-secondary) 72%, transparent);
  box-shadow: none;
}

.product-v2-actions .hub-theme-btn:hover {
  border-color: rgba(var(--product-header-accent-rgb), 0.34);
  background: rgba(var(--product-header-accent-rgb), 0.08);
  color: var(--text-title);
  transform: translateY(-1px);
}

.product-v2-actions .hub-theme-btn #hub-theme-label {
  display: none;
}

.product-v2-actions > .hub-nav-dropdown > .hub-nav-link {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 74%, transparent);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 680;
}

.product-v2-actions > .hub-nav-dropdown > .hub-nav-link:hover,
.product-v2-actions > .hub-nav-dropdown.open > .hub-nav-link {
  border-color: rgba(var(--product-header-accent-rgb), 0.28);
  background: rgba(var(--product-header-accent-rgb), 0.07);
  color: var(--text-title);
}

.product-v2-actions .hub-btn-demo {
  min-height: 42px;
  padding: 8px 9px 8px 16px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: linear-gradient(125deg, var(--product-header-accent), #257ee8 66%, #17bfe9);
  box-shadow: 0 10px 24px rgba(var(--product-header-accent-rgb), 0.24);
  font-size: 0.82rem;
  font-weight: 760;
}

.product-v2-actions .hub-btn-demo::after {
  content: "↗";
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
  line-height: 1;
}

.product-v2-actions .hub-btn-demo:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(var(--product-header-accent-rgb), 0.3);
}

.product-v2-navbar .hub-dropdown-menu {
  top: calc(100% + 10px);
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--product-header-accent) 13%, var(--line-strong));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 22px 60px rgba(29, 36, 70, 0.18);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.product-v2-navbar .hub-dropdown-item {
  position: relative;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
}

.product-v2-navbar .hub-dropdown-item:hover {
  border-color: rgba(var(--product-header-accent-rgb), 0.1);
  background: rgba(var(--product-header-accent-rgb), 0.07);
}

.product-v2-navbar .hub-dropdown-item[aria-current="page"] {
  border-color: rgba(var(--product-header-accent-rgb), 0.16);
  background: rgba(var(--product-header-accent-rgb), 0.09);
}

.product-v2-navbar .hub-dropdown-item[aria-current="page"]::after {
  content: "Actual";
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--product-header-accent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-v2-primary-nav .hub-nav-dropdown.open .hub-dropdown-menu,
.product-v2-primary-nav .hub-nav-dropdown:hover .hub-dropdown-menu {
  transform: translateX(-50%) translateY(0);
}

.product-v2-actions .hub-dropdown-menu {
  transform: translateY(8px);
}

.product-v2-actions .hub-nav-dropdown.open .hub-dropdown-menu,
.product-v2-actions .hub-nav-dropdown:hover .hub-dropdown-menu {
  transform: translateY(0);
}

.product-v2-navbar .hub-hamburger {
  flex: 0 0 auto;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-secondary) 72%, transparent);
}

.page-ia-v2 .ia2-subnav,
.page-qa-v2 .qa2-subnav {
  top: 74px;
}

.product-v2-mobile-menu {
  top: 74px;
  gap: 5px;
  border: 0;
  background: color-mix(in srgb, var(--bg-primary) 96%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-border), 0 24px 60px rgba(29, 36, 70, 0.14);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.product-v2-mobile-menu .hub-mobile-link {
  position: relative;
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 13px;
}

.product-v2-mobile-menu .hub-mobile-link:hover,
.product-v2-mobile-menu .hub-mobile-link.active {
  border-color: rgba(var(--product-header-accent-rgb), 0.12);
  background: rgba(var(--product-header-accent-rgb), 0.07);
  color: var(--text-title);
}

.product-v2-mobile-menu .hub-mobile-link.active {
  padding-left: 29px;
}

.product-v2-mobile-menu .hub-mobile-link.active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--product-header-accent);
  transform: translateY(-50%);
  box-shadow: 0 0 0 5px rgba(var(--product-header-accent-rgb), 0.1);
}

.product-v2-mobile-menu .hub-mobile-demo {
  min-height: 50px;
  margin-top: 10px;
  border-radius: 14px;
  background: linear-gradient(125deg, var(--product-header-accent), #257ee8 66%, #17bfe9);
  box-shadow: 0 12px 28px rgba(var(--product-header-accent-rgb), 0.23);
}

@media (max-width: 1180px) {
  .product-v2-primary-nav .hub-nav-link {
    padding-inline: 9px;
    font-size: 0.76rem;
  }

  .product-v2-brand {
    min-width: 160px;
  }
}

@media (max-width: 1100px) {
  .product-v2-navbar-inner {
    padding-inline: 12px 10px;
  }

  .product-v2-brand {
    min-width: 0;
  }

  .product-v2-mobile-menu {
    position: fixed;
    top: 74px;
    right: 18px;
    bottom: auto;
    left: auto;
    width: min(420px, calc(100vw - 36px));
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--product-header-accent) 14%, var(--glass-border));
    border-radius: 18px;
  }
}

@media (max-width: 680px) {
  .product-v2-navbar {
    padding: 8px 10px 0;
  }

  .product-v2-navbar-inner {
    height: 58px;
    padding: 0 7px 0 9px;
    border-radius: 17px;
  }

  .product-v2-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .product-v2-brand-mark img {
    width: 27px;
    height: 27px;
  }

  .product-v2-brand-copy {
    display: grid;
  }

  .product-v2-brand-copy strong {
    font-size: 0.84rem;
  }

  .product-v2-brand-copy small {
    max-width: 130px;
    font-size: 0.55rem;
  }

  .product-v2-actions .hub-theme-btn,
  .product-v2-navbar .hub-hamburger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .page-ia-v2 .ia2-subnav,
  .page-qa-v2 .qa2-subnav,
  .product-v2-mobile-menu {
    top: 66px;
  }

  .product-v2-mobile-menu {
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: none;
    padding: 18px 16px 28px;
    border-width: 1px 0 0;
    border-radius: 0;
  }
}

@media (max-width: 440px) {
  .product-v2-brand-copy small {
    display: none;
  }

  .product-v2-brand-copy strong {
    display: block;
  }
}

@media (max-width: 350px) {
  .product-v2-brand-copy {
    display: none;
  }
}
