/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter";
}

/* ── Header Shell ── */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e9eaeb;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.25s ease;
}

/* .site-header.scrolled {
  box-shadow: 0 2px 12px rgba(10, 13, 18, 0.1);
} */

.header-inner {
  max-width: 1280px;
  height: 52px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Push search to the far right */
.right-group {
  margin-left: auto;
}

/* ── Logo ── */
.logo-group a {
  display: flex;
  align-items: center;
}
.logo-group img {
  display: block;
  width: 150px;
  height: auto;
}

/* ── Right side (nav + search) ── */
.right-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Nav ── */
.nav-items {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: #414651;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.nav-link:hover {
  background: #f5f5f5;
}

.nav-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* ── Dropdown ── */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 6px;
  min-width: 180px;
  list-style: none;
  padding: 0;
  z-index: 999;
}

.sub-menu-inner {
  background: #fff;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(10, 13, 18, 0.1);
  padding: 6px 0;
  overflow: hidden;
  margin-top: 6px;
}

.sub-menu li a {
  display: block;
  padding: 9px 16px;
  text-decoration: none;
  color: #414651;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background 0.12s ease;
}

.sub-menu li a:hover {
  background: #f5f5f5;
  color: #101828;
}

.nav-item.has-dropdown:hover .sub-menu {
  display: block;
}

.nav-item.has-dropdown:hover .nav-link svg {
  transform: rotate(180deg);
}

/* ── Search Box ── */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #d5d7da;
  border-radius: 8px;
  box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
  margin-left: 10px;
}

.search-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-btn:hover svg path {
  stroke: #414651;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #717680;
  background: transparent;
  min-width: 0;
}

.search-box input::placeholder {
  color: #717680;
}

/* ── Hamburger Button ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.hamburger:hover {
  background: #f5f5f5;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #414651;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu Overlay ── */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e9eaeb;
  box-shadow: 0 8px 24px rgba(10, 13, 18, 0.08);
  z-index: 99;
  padding: 12px 0 16px;
}

.mobile-menu.open {
  display: block;
}

/* Mobile search */
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 8px;
  box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
}

.mobile-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #717680;
  background: transparent;
}

.mobile-search input::placeholder {
  color: #717680;
}

/* Mobile nav links */
.mobile-nav {
  list-style: none;
}

.mobile-nav > li > a,
.mobile-nav > li > .mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  text-decoration: none;
  color: #414651;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background 0.12s;
}

.mobile-nav > li > a:hover,
.mobile-nav > li > .mobile-nav-toggle:hover {
  background: #f5f5f5;
}

.mobile-nav-toggle svg {
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.mobile-nav-toggle.open svg {
  transform: rotate(180deg);
}

/* Mobile submenu */
.mobile-sub-menu {
  display: none;
  list-style: none;
  background: #f9fafb;
  border-top: 1px solid #e9eaeb;
  border-bottom: 1px solid #e9eaeb;
}

.mobile-sub-menu.open {
  display: block;
}

.mobile-sub-menu li a {
  display: block;
  padding: 10px 20px 10px 36px;
  text-decoration: none;
  color: #414651;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s;
}

.mobile-sub-menu li a:hover {
  background: #f0f1f3;
  color: #101828;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .search-box {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
    gap: 16px;
  }

  /* Hide desktop nav & search */
  .nav-items {
    display: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }
}
