/* Navbar Styles */
.kp-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
  transition: background-color .3s ease, backdrop-filter .3s ease, box-shadow .3s ease, padding .25s ease;
  padding: 22px 0;
}

.kp-wrap {
  max-width: 1200px;
  margin: auto;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.kp-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  position: relative;
  height: 78px;
}

.kp-brand span {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: auto;
  transition: opacity .25s ease;
}

.brand-logo img.brand-light {
  opacity: 1;
}

.brand-logo img.brand-dark {
  opacity: 0;
}

.logo-badge {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 68px;
  width: auto;
}

.logo-badge img {
  height: 100%;
  width: auto;
}

.kp-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  position: relative;
}

.kp-row {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.kp-row a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  padding: 10px 0;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
  transition: color .25s ease;
}

.kp-top a {
  font-size: 14px;
}

.kp-bottom a {
  font-size: 15px;
  color: #ffffff;
}

.kp-row a:hover {
  color: var(--accent, #f7a022);
}

.menu-title {
  font-weight: 500;
  font-size: 15px;
  color: #ffffff;
  letter-spacing: .4px;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  white-space: nowrap;
}

.has-dd {
  position: relative;
}

.has-dd>a::after {
  content: "\25BE";
  font-size: 0.65rem;
  margin-left: 6px;
  opacity: .75;
}

.kp-dd {
  position: absolute;
  right: 0;
  top: 100%;
  display: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-top: 0;
  /* Removing gap completely to fix hover issue */
  min-width: 220px;
  padding: 12px 0;
  box-shadow: 0 16px 30px rgba(2, 6, 23, .10);
  z-index: 900;
}

.kp-dd a {
  display: block;
  padding: 10px 18px;
  border-radius: 8px;
  color: var(--text, #111827);
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}

.kp-dd a:hover {
  background: rgba(16, 39, 72, 0.08);
  color: var(--primary, #0c1d3b);
}

/* Hover fallback for desktop */
@media (min-width: 981px) {

  .has-dd:hover .kp-dd,
  .has-dd:focus-within .kp-dd {
    display: block;
  }
}

/* Class-based toggle for click/touch (desktop & mobile) */
/* Class-based toggle for click/touch (desktop & mobile) */
.has-dd.is-active .kp-dd {
  display: block;
}

.kp-submenu {
  position: relative;
}

.kp-subdd {
  position: absolute;
  top: 0;
  left: 100%;
  display: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 0;
  min-width: 220px;
  box-shadow: 0 16px 30px rgba(2, 6, 23, .12);
  margin-left: 6px;
  z-index: 1000;
}

/* Fix: Invisible bridge for submenu gap - Removed */

.kp-subdd a {
  display: block;
  padding: 10px 18px;
  border-radius: 8px;
  color: var(--text, #111827);
  font-size: 14px;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.kp-subdd a:hover {
  background: rgba(16, 39, 72, 0.08);
  color: var(--primary);
}

@media (min-width: 981px) {

  .kp-submenu:hover .kp-subdd,
  .kp-submenu:focus-within .kp-subdd {
    display: block;
  }
}

/* Class-based toggle for submenu */
/* Class-based toggle for submenu */
.kp-submenu.is-active .kp-subdd {
  display: block;
}


.kp-burger {
  display: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: border-color .2s ease, background .2s ease;
}

.kp-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  margin: 4px 0;
  transition: transform .25s ease, opacity .2s ease, background .2s ease;
  transform-origin: center;
}

.kp-burger.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.kp-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.kp-burger.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Scrolled State */
.kp-navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 12px 0;
}

.kp-navbar.is-scrolled .brand-logo img.brand-light {
  opacity: 0;
}

.kp-navbar.is-scrolled .brand-logo img.brand-dark {
  opacity: 1;
}

.kp-navbar.is-scrolled .logo-badge {
  filter: brightness(0.95);
}

.kp-navbar.is-scrolled .kp-row a {
  color: var(--primary, #0c1d3b);
}

.kp-navbar.is-scrolled .has-dd>a::after {
  color: var(--primary, #0c1d3b);
}

.kp-navbar.is-scrolled .kp-burger {
  border-color: var(--primary, #0c1d3b);
  background: #fff;
}

.kp-navbar.is-scrolled .kp-burger span {
  background: var(--primary, #0c1d3b);
}

.kp-navbar.is-scrolled .menu-title {
  color: var(--primary, #0c1d3b);
}

@media (max-width:980px) {
  .kp-menu {
    display: none;
    position: absolute;
    right: 16px;
    top: 60px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, .12);
  }

  .kp-menu.is-open {
    display: flex;
  }

  .kp-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .kp-row a,
  .kp-bottom a,
  .menu-title {
    color: var(--primary);
  }

  .kp-top {
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 6px;
  }

  .kp-dd {
    position: relative;
    right: auto;
    top: auto;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 4px 0 0 12px;
  }

  .has-dd>a::after {
    content: "";
  }

  .kp-burger {
    display: block;
  }

  .kp-navbar.is-scrolled .kp-menu {
    background: #fff;
  }

  .kp-navbar.is-scrolled .kp-row a {
    color: var(--text, #111827);
  }

  .kp-navbar.is-scrolled .menu-title {
    color: var(--text, #111827);
  }

  .kp-subdd {
    position: relative;
    left: auto;
    top: auto;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 6px 0 0 18px;
  }

  .kp-subdd a {
    padding: 8px 0;
  }
}
