/* ============================================================
   KWANG GROUP — FULLY RESPONSIVE NAVBAR (DARK GLASS)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 60px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  margin: 0;
  padding: 0;
  padding-top: 0 !important;
}

/* ---------- Navbar (Fixed) - Dark Glass ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 26, 47, 0.75);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

/* ---------- Logo - White ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  flex-shrink: 0;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* ---------- Navigation Links (Desktop) ---------- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links > li {
  position: relative;
}

/* ---------- Dropdown Header & Link - White text ---------- */
.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.dropdown-link {
  flex: 1;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

/* Active state - Line below instead of background (Desktop only) */
.nav-links > li.active .dropdown-link {
  background: transparent;
  font-weight: 600;
  color: #ffffff;
  position: relative;
}

.nav-links > li.active .dropdown-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, #6c8cff, #a78bfa);
  border-radius: 2px;
}

/* ---------- Normal links (non-dropdown) - White ---------- */
.nav-links > li > a:not(.btn) {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links > li > a:not(.btn):hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

/* Active state - Line below instead of background (Desktop only) */
.nav-links > li.active > a:not(.btn) {
  background: transparent;
  font-weight: 600;
  color: #ffffff;
  position: relative;
}

.nav-links > li.active > a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, #6c8cff, #a78bfa);
  border-radius: 2px;
}

/* ---------- Arrow - White ---------- */
.arrow {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0;
  margin-left: -6px;
  background: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: transform .25s ease;
}

.arrow:hover {
  background: transparent;
  color: #6c8cff;
}

.dropdown:hover .arrow,
.dropdown.open .arrow {
  transform: rotate(180deg);
}

/* ---------- Dropdown Menu (Desktop) - Dark ---------- */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 190px;
  background: rgba(11, 26, 47, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown:hover > .dropdown-menu,
.dropdown.open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.4rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 450;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #6c8cff;
  color: #ffffff;
}

/* ============================================================
   CONTACT BUTTON — Light variant on dark
   ============================================================ */

/* Desktop & Base */
.nav-links > li > a.btn,
.nav-links > li .dropdown-link.btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.28rem 1rem;
  font-size: 0.88rem;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-links > li > a.btn:hover,
.nav-links > li .dropdown-link.btn:hover {
  background: rgba(255, 255, 255, 0.20);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Remove active line for button */
.nav-links > li.active > a.btn::after,
.nav-links > li.active .dropdown-link.btn::after {
  display: none !important;
}

/* ---------- Search Box - Dark ---------- */
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 0.1rem 0.1rem 0.1rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-left: 0.2rem;
  transition: all 0.25s ease;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: #6c8cff;
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 0.3rem 0;
  font-size: 0.78rem;
  width: 90px;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  transition: width 0.25s ease;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-box input:focus {
  width: 140px;
}

.search-box button {
  background: transparent;
  border: none;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-box button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ---------- Mobile Menu Toggle - White ---------- */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #ffffff;
  padding: 0 0.3rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS — BIGGER ON MOBILE
   ============================================================ */

/* ---------- Tablet & Mobile (≤ 992px) ---------- */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    background: rgba(11, 26, 47, 0.95);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.8rem 1.2rem 1.8rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    pointer-events: none;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links > li {
    width: 100%;
  }

  /* Bigger links on mobile - White */
  .nav-links > li > a:not(.btn),
  .dropdown-header {
    padding: 0.8rem 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links > li:last-child > a:not(.btn),
  .nav-links > li:last-child .dropdown-header {
    border-bottom: none;
  }

  .dropdown-link {
    padding: 0;
    font-size: 1.05rem;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85);
  }

  /* Remove active line on mobile */
  .nav-links > li.active > a:not(.btn)::after,
  .nav-links > li.active .dropdown-link::after {
    display: none !important;
  }

  /* Just keep text white and bold on mobile */
  .nav-links > li.active > a:not(.btn),
  .nav-links > li.active .dropdown-link {
    background: transparent;
    font-weight: 600;
    color: #ffffff;
  }

  /* ---------- Mobile Dropdown - Dark ---------- */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 0 0 0 0.8rem;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.04);
  }

  .dropdown.open > .dropdown-menu {
    max-height: 400px;
    padding: 0.4rem 0 0.4rem 0.8rem;
  }

  .dropdown-menu li a {
    padding: 0.6rem 0.6rem;
    border-left: none;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
  }

  .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
  }

  /* ---------- Mobile Search - Dark ---------- */
  .search-box {
    margin: 0.8rem 0 0.3rem;
    width: 100%;
    border-radius: 5px;
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    background: rgba(255, 255, 255, 0.08);
  }

  .search-box input {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    color: #ffffff;
  }

  .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  .search-box input:focus {
    width: 100%;
  }

  .search-box button {
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
  }

  .search-box button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  /* Arrow touch target - bigger */
  .arrow {
    padding: 12px 16px;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.7);
  }

  /* Contact button mobile */
  .nav-links > li > a.btn,
  .nav-links > li .dropdown-link.btn {
    justify-content: center;
    margin-top: 0.4rem;
    border-radius: 5px;
    padding: 0.7rem 1rem;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-bottom: none !important;
  }
}

/* ---------- Small Tablets (≤ 768px) ---------- */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    height: 62px;
  }

  /* BIGGER LOGO ON TABLETS */
  .logo img {
    height: 36px;
  }
  .logo span {
    font-size: 1.3rem;
  }

  .nav-links {
    top: 62px;
    max-height: calc(100vh - 62px);
    padding: 0.8rem 1rem 1.5rem;
  }

  .nav-links > li > a:not(.btn),
  .dropdown-header {
    padding: 0.7rem 0.2rem;
  }

  .dropdown-link {
    font-size: 1rem;
  }

  .dropdown-menu li a {
    font-size: 0.9rem;
    padding: 0.5rem 0.6rem;
  }

  /* Contact button small tablet */
  .nav-links > li > a.btn,
  .nav-links > li .dropdown-link.btn {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }

  .search-box input {
    font-size: 0.9rem;
  }
}

/* ---------- Mobile Phones (≤ 480px) ---------- */
@media (max-width: 480px) {
  .nav-container {
    height: 56px;
    padding: 0 0.8rem;
  }

  .nav-links {
    top: 56px;
    max-height: calc(100vh - 56px);
    padding: 0.6rem 0.8rem 1.2rem;
  }

  /* BIGGER LOGO ON PHONES */
  .logo img {
    height: 32px;
  }
  .logo span {
    font-size: 1.2rem;
  }

  .nav-links > li > a:not(.btn),
  .dropdown-header {
    padding: 0.6rem 0.2rem;
  }

  .dropdown-link {
    font-size: 0.95rem;
  }

  .arrow {
    padding: 10px 14px;
    font-size: 1.4rem;
  }

  .dropdown-menu li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
  }

  .search-box {
    padding: 0.2rem 0.2rem 0.2rem 0.8rem;
  }

  .search-box input {
    font-size: 0.85rem;
    padding: 0.4rem 0;
  }

  .search-box button {
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
  }

  /* Contact button phones */
  .nav-links > li > a.btn,
  .nav-links > li .dropdown-link.btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* ---------- Very Small Phones (≤ 360px) ---------- */
@media (max-width: 360px) {
  .nav-container {
    height: 52px;
    padding: 0 0.6rem;
  }

  .nav-links {
    top: 52px;
    max-height: calc(100vh - 52px);
    padding: 0.5rem 0.6rem 1rem;
  }

  /* BIGGER LOGO ON TINY PHONES */
  .logo img {
    height: 28px;
  }
  .logo span {
    font-size: 1.05rem;
  }

  .nav-links > li > a:not(.btn),
  .dropdown-header {
    padding: 0.5rem 0.2rem;
  }

  .dropdown-link {
    font-size: 0.85rem;
  }

  .arrow {
    padding: 8px 12px;
    font-size: 1.2rem;
  }

  .dropdown-menu li a {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }

  .search-box input {
    font-size: 0.8rem;
    padding: 0.3rem 0;
  }

  .nav-links > li > a.btn,
  .nav-links > li .dropdown-link.btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ============================================================
   NESTED DROPDOWN (SUBMENU)
   ============================================================ */

/* Parent Item */
.has-submenu {
  position: relative;
}

/* Parent Link */
.has-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Right Arrow - White */
.has-submenu > a::after {
  content: "›";
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform .2s ease;
}

/* Submenu - Dark */
.submenu {
  position: absolute;
  top: -6px;
  left: calc(100% + 8px);
  min-width: 240px;
  background: rgba(11, 26, 47, 0.92);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  list-style: none;
  padding: .4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all .25s ease;
  z-index: 999;
}

/* Show submenu */
.has-submenu:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Rotate Arrow */
.has-submenu:hover > a::after {
  transform: translateX(2px);
  color: #6c8cff;
}

/* Submenu Links - White */
.submenu li {
  list-style: none;
}

.submenu li a {
  display: block;
  padding: 10px 18px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: .82rem;
  font-weight: 450;
  transition: all .2s ease;
}

.submenu li a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding-left: 22px;
}

/* Mobile Submenu - Dark */
@media (max-width: 992px) {
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    padding-left: 15px;
    display: none;
  }

  .has-submenu.open > .submenu {
    display: block;
  }

  .has-submenu > a::after {
    content: "+";
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
  }

  .has-submenu.open > a::after {
    content: "−";
  }

  .has-submenu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: .3s;
  }

  .has-submenu.open .submenu {
    max-height: 1000px;
  }

  /* Bigger submenu links on mobile */
  .submenu li a {
    font-size: 0.9rem;
    padding: 0.6rem 0.6rem;
    color: rgba(255, 255, 255, 0.8);
  }

  .submenu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
  }
}

@media (max-width: 480px) {
  .submenu li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.5rem;
  }
}