/* =========================
   TOP UTILITY BAR
========================= */
.top-bar {
  background: var(--neutral-700);
  color: #fff;
  font-size: 13px;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.top-links a:hover {
  text-decoration: underline;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: .6;
}

/* Dark */
:root[data-theme="dark"].top-bar {
  background: #020617;
}
/**/
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-base),
              border-color var(--transition-base);
}

.header-inner {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding: var(--space-sm) var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================
   LOGO
========================================================= */
/* ===================================
   Logo Section
=================================== */
.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-badge img {
  height: 30px;
  width: auto;
}

.logo .muted {
  margin-top: -2px;
  color: var(--color-text-muted);
  font-size: 0.76rem;
  letter-spacing: .2px;
}
 
.logo .small {
  display: block;
  font-weight: 600;
  font-size: 0.825rem;
  line-height: 1.3;
  margin-top: 2px;
  color: var(--color-text-muted); /* subtle tagline */
}
 
/* =========================================================
   DESKTOP NAV
========================================================= */
.desktop-nav {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.desktop-nav a,
.desktop-nav .nav-link {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
  text-decoration:none;
}

.desktop-nav a:hover,
.desktop-nav .nav-link:hover {
  color: var(--emco-brand-primary);
}

/* CTA */
.desktop-nav .btn-primary {
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
  color: var(--color-text-inverse);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.desktop-nav .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   EMCO MEGA MENU (DESKTOP)
   CMS-driven | Token-based | Dark-mode safe
========================================================= */

/* Dropdown wrapper */
.nav-dropdown {
  position: relative;
}

/* Hidden by default */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%) translateY(14px);

  opacity: 0;
  pointer-events: none;

  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

/* Hover intent */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px; /* bridge height */
}

/* =========================================================
   MEGA PANEL
========================================================= */
.dropdown-mega {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);

  min-width: 760px;
  padding: var(--space-xl);

  background: var(--neutral-0);
  backdrop-filter: blur(16px);

  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   COLUMN
========================================================= */
.dropdown-mega > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* =========================================================
   COLUMN TITLE
========================================================= */
.mega-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;

  color: var(--emco-brand-primary);
  margin-bottom: var(--space-xs);
  text-decoration: none;
}

.mega-title:hover {
  text-decoration: none;
  color: var(--emco-brand-primary);
}

/* =========================================================
   LINKS
========================================================= */
.mega-link {
  position: relative;
  display: block;

  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);

  color: var(--color-text-muted);
  text-decoration: none;

  padding: 0.2rem 0;
  transition:
    color var(--transition-fast),
    transform var(--transition-fast);
}

.mega-link:hover {
  color: var(--color-text-inverse);
  transform: translateX(2px);
}

/* Optional bullet indicator (subtle) */
.mega-link::before {
  content: "›";
  position: absolute;
  left: -0.75rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: var(--emco-brand-accent);
}

.mega-link:hover::before {
  opacity: 1;
}

/* =========================================================
   DARK MODE TUNING
========================================================= */
:root[data-theme="dark"] .dropdown-mega {
  border-color: var(--neutral-700);
}

:root[data-theme="dark"] .mega-link {
  color: var(--neutral-400);
}

:root[data-theme="dark"] .mega-link:hover {
  color: var(--neutral-50);
}
.dropdown-mega {
  max-width: 1100px;
}

/* =========================================================
   MOBILE CONTROLS
========================================================= */
.mobile-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hamburger {
  width: 28px;
  height: 20px;
  display: grid;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: background var(--transition-fast);
}

/* Theme Toggle (Emoji or SVG safe) */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

/* =========================================================
   MOBILE NAV
========================================================= */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-bg);
  padding: var(--space-lg);
  overflow-y: auto;

  transform: translateX(100%);
  transition: transform var(--transition-base);
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav a,
.mobile-submenu-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: var(--space-sm) 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: none;

  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  cursor: pointer;
}

/* Submenu */
.mobile-submenu {
  display: none;
  padding-left: var(--space-md);
}

.mobile-submenu.open {
  display: block;
}

.mobile-submenu a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  padding: var(--space-xs) 0;
}

/* =========================================================
   RESPONSIVE BREAKPOINT
========================================================= */
@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }

  .mobile-controls,
  .mobile-nav {
    display: none;
  }
}
/* =========================================================
   MOBILE NAV – CLOSE BUTTON
========================================================= */

.mobile-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: var(--space-md);

  background: none;
  border: none;
  cursor: pointer;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--color-text);
}

.mobile-close svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.mobile-close:hover {
  color: var(--emco-brand-primary);
}
@media (max-width: 720px) {
  .logo-badge img {
    height: 16px;
  }
}