/* =====================================================
   Zero Zeta — New UI Header (standalone, Bootstrap-safe)
   Scoped to avoid conflicts with Bootstrap / old frontend
   ===================================================== */

/* CSS Variables — safe globally */
:root {
  --zz-primary: #009962;
  --zz-secondary: #0A1F1A;
  --zz-bg-white: #ffffff;
  --zz-bg-light: #f6faf9;
  --zz-bg-mint: #ECFFEE;
  --zz-text-dark: #0A1F1A;
  --zz-text-muted: #536b65;
  --zz-text-light: #ffffff;
  --zz-border-light: rgba(10, 31, 26, 0.08);
  --zz-border-mint: rgba(0, 153, 98, 0.18);
  --zz-font-title: 'Outfit', 'Sora', system-ui, -apple-system, sans-serif;
  --zz-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --zz-shadow-sm: 0 4px 12px rgba(10, 31, 26, 0.03);
  --zz-shadow-lg: 0 24px 64px rgba(10, 31, 26, 0.08);
  --zz-shadow-primary: 0 10px 25px rgba(0, 153, 98, 0.2);
  --zz-header-height: 80px;
  --zz-radius-sm: 8px;
  --zz-radius-md: 14px;
  --zz-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Header wrapper ─────────────────────────────── */
body {
  padding-top: var(--zz-header-height);
}

header.zz-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--zz-header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--zz-border-light);
  z-index: 1000;
  transition: var(--zz-transition);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 var(--zz-border-light);
}

header.zz-header.scrolled {
  box-shadow: var(--zz-shadow-sm);
  background-color: rgba(255, 255, 255, 0.98);
}

/* ─── Layout container inside header ─────────────── */
header.zz-header .zz-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
}

/* ─── Logo ────────────────────────────────────────── */
header.zz-header .zz-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

header.zz-header .zz-logo img {
  height: 27px;
  width: auto;
  display: block;
}

/* ─── Desktop Nav ─────────────────────────────────── */
header.zz-header nav#zz-navbar {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
  margin-left: 2rem;
}

header.zz-header .zz-nav-list {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  margin-right: 1.5rem;
}

header.zz-header .zz-nav-list > li {
  position: relative;
}

header.zz-header .zz-nav-link {
  font-family: var(--zz-font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--zz-text-dark);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--zz-transition);
}

header.zz-header .zz-nav-link i {
  font-size: 0.75rem;
  transition: var(--zz-transition);
}

header.zz-header .zz-nav-link:hover,
header.zz-header .zz-nav-link.active {
  color: var(--zz-primary);
}

/* ─── Dropdown Menu ───────────────────────────────── */
header.zz-header .zz-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  background-color: var(--zz-bg-white);
  border: 1px solid var(--zz-border-light);
  border-radius: var(--zz-radius-sm);
  box-shadow: var(--zz-shadow-lg);
  min-width: 260px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 0.75rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--zz-transition);
  list-style: none;
  z-index: 1010;
  margin: 0;
}

header.zz-header .zz-dropdown-divider {
  height: 1px;
  margin: 0.45rem 1rem;
  background-color: var(--zz-border-light);
  list-style: none;
}

header.zz-header .zz-dropdown-section-heading {
  padding: 0.5rem 1.5rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zz-text-muted);
  list-style: none;
  font-family: var(--zz-font-title);
}

header.zz-header .zz-dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--zz-text-dark);
  text-decoration: none;
  transition: var(--zz-transition);
}

header.zz-header .zz-dropdown-menu li a:hover {
  background-color: var(--zz-bg-light);
  color: var(--zz-primary);
  padding-left: 1.7rem;
}

header.zz-header .zz-dropdown-menu li a .zz-dropdown-title {
  font-weight: 600;
  display: block;
  line-height: 1.3;
}

header.zz-header .zz-dropdown-menu li a .zz-dropdown-desc {
  font-size: 0.75rem;
  color: var(--zz-text-muted);
  display: block;
  margin-top: 3px;
  font-weight: 500;
}

header.zz-header .zz-dropdown-menu li a:hover .zz-dropdown-desc {
  color: var(--zz-primary);
}

/* Show dropdown on hover — desktop only */
@media (min-width: 1025px) {
  header.zz-header .zz-nav-list > li.dropdown:hover .zz-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  header.zz-header .zz-nav-list > li.dropdown:hover .zz-nav-link i {
    transform: rotate(180deg);
  }
}

/* ─── Mega Dropdown (Enterprise) ─────────────────── */
@media (min-width: 1025px) {
  header.zz-header .zz-dropdown-menu.zz-dropdown-mega {
    min-width: 740px;
    width: 740px;
    left: -100px;
    padding: 1.15rem 1.25rem;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.35rem;
    box-shadow: 0 16px 36px rgba(11, 19, 32, 0.12), 0 4px 12px rgba(11, 19, 32, 0.05);
    border-radius: var(--zz-radius-md);
  }

  header.zz-header .zz-dropdown-col-platform {
    background-color: #F8FAF9;
    border: 1px solid var(--zz-border-light);
    border-radius: var(--zz-radius-sm);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  header.zz-header .zz-dropdown-col-platform .zz-dropdown-section-heading {
    padding: 0.1rem 0.25rem 0.45rem;
    margin: 0 0 0.25rem 0;
    border-bottom: 1px solid var(--zz-border-light);
  }

  header.zz-header .zz-dropdown-item-rich {
    display: block;
    padding: 0.55rem 0.65rem;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--zz-transition);
  }

  header.zz-header .zz-dropdown-item-rich:hover {
    background-color: var(--zz-bg-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  header.zz-header .zz-dropdown-item-rich .zz-dropdown-title {
    font-family: var(--zz-font-title);
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--zz-secondary);
    display: block;
    line-height: 1.3;
    transition: color 0.15s ease;
  }

  header.zz-header .zz-dropdown-item-rich .zz-dropdown-desc {
    font-size: 0.74rem;
    color: var(--zz-text-muted);
    display: block;
    margin-top: 2px;
    line-height: 1.35;
  }

  header.zz-header .zz-dropdown-item-rich:hover .zz-dropdown-title {
    color: var(--zz-primary);
  }

  header.zz-header .zz-dropdown-col-copilots {
    display: flex;
    flex-direction: column;
  }

  header.zz-header .zz-dropdown-col-copilots .zz-dropdown-section-heading {
    padding: 0.15rem 0.35rem 0.45rem;
    margin: 0 0 0.45rem 0;
    border-bottom: 1px solid var(--zz-border-light);
  }

  header.zz-header .zz-dropdown-copilots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 0.75rem;
  }

  header.zz-header .zz-copilot-subcol {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  header.zz-header .zz-dropdown-subitem {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--zz-text-dark);
    text-decoration: none;
    padding: 0.38rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
  }

  header.zz-header .zz-dropdown-subitem:hover {
    background-color: var(--zz-bg-mint);
    color: var(--zz-primary);
    padding-left: 0.75rem;
  }
}

/* ─── Header CTAs (desktop buttons) ──────────────── */
.zz-header-ctas {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

.zz-header-ctas .zz-btn,
.zz-mobile-nav-ctas .zz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--zz-font-title);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--zz-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--zz-transition);
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 11px 18px;
  height: 42px;
  box-sizing: border-box;
  line-height: 1;
}

.zz-header-ctas .zz-btn-primary,
.zz-mobile-nav-ctas .zz-btn-primary {
  background-color: var(--zz-primary);
  color: var(--zz-text-light) !important;
  box-shadow: var(--zz-shadow-primary);
}

.zz-header-ctas .zz-btn-primary:hover,
.zz-mobile-nav-ctas .zz-btn-primary:hover {
  background-color: #008253;
  transform: translateY(-1px);
  color: var(--zz-text-light) !important;
}

.zz-header-ctas .zz-btn-secondary,
.zz-mobile-nav-ctas .zz-btn-secondary {
  background-color: transparent;
  color: var(--zz-secondary) !important;
  border-color: var(--zz-primary);
}

.zz-header-ctas .zz-btn-secondary:hover,
.zz-mobile-nav-ctas .zz-btn-secondary:hover {
  background-color: var(--zz-bg-mint);
  transform: translateY(-1px);
}

/* ─── Mobile Toggle ───────────────────────────────── */
header.zz-header .zz-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--zz-text-dark);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

/* ─── Mobile Nav CTAs (inside nav drawer) ─────────── */
.zz-mobile-nav-ctas {
  display: none !important;
}

/* ─── Responsive: Tablet & Mobile (≤1024px) ──────── */
@media (max-width: 1024px) {
  body {
    padding-top: 70px;
  }

  header.zz-header {
    height: 70px !important;
    overflow: visible !important;
  }

  header.zz-header.menu-open {
    z-index: 99999 !important;
    overflow: visible !important;
  }

  header.zz-header .zz-header-container {
    overflow: visible !important;
  }

  header.zz-header .zz-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .zz-header-ctas {
    display: none;
  }

  header.zz-header nav#zz-navbar {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100vh - 70px) !important;
    height: calc(100dvh - 70px) !important;
    margin: 0 !important;
    background-color: var(--zz-bg-white) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1.5rem 1.5rem 4rem 1.5rem !important;
    gap: 1.5rem !important;
    overflow-y: auto !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    border-top: 1px solid var(--zz-border-light);
    box-sizing: border-box !important;
    z-index: 99999 !important;
  }

  header.zz-header nav#zz-navbar.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  header.zz-header .zz-nav-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }

  header.zz-header .zz-nav-link {
    font-size: 1.05rem;
    display: flex !important;
    justify-content: space-between !important;
    padding: 0.75rem 0.25rem !important;
    border-bottom: 1px solid var(--zz-border-light);
  }

  header.zz-header .zz-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-left: 2px solid var(--zz-primary) !important;
    border-radius: 0 !important;
    margin-left: 0.5rem !important;
    margin-top: 0.25rem !important;
    padding: 0.25rem 0 !important;
    display: none;
    background-color: transparent !important;
    width: auto !important;
    min-width: unset !important;
  }

  header.zz-header .zz-dropdown-menu.active {
    display: block !important;
  }

  header.zz-header .zz-dropdown-menu.zz-dropdown-mega {
    min-width: 0 !important;
    width: 100% !important;
    display: none;
    padding: 0.4rem 0 !important;
  }

  header.zz-header .zz-dropdown-menu.zz-dropdown-mega.active {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  header.zz-header .zz-dropdown-col-platform {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(0, 153, 98, 0.04) !important;
    border: 1px solid rgba(0, 153, 98, 0.15) !important;
    border-radius: 6px !important;
    padding: 0.6rem 0.5rem !important;
    gap: 0.35rem !important;
  }

  header.zz-header .zz-dropdown-item-rich {
    display: block;
    padding: 0.4rem 0.5rem;
    text-decoration: none;
  }

  header.zz-header .zz-dropdown-item-rich .zz-dropdown-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--zz-text-dark);
    display: block;
  }

  header.zz-header .zz-dropdown-item-rich .zz-dropdown-desc {
    font-size: 0.74rem;
    color: var(--zz-text-muted);
    display: block;
    margin-top: 2px;
  }

  header.zz-header .zz-dropdown-col-copilots {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
  }

  header.zz-header .zz-dropdown-copilots-grid {
    display: flex;
    flex-direction: column;
  }

  header.zz-header .zz-dropdown-subitem {
    display: block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--zz-text-dark);
    padding: 0.4rem 0.5rem;
    text-decoration: none;
  }

  header.zz-header .zz-dropdown-menu li a {
    padding: 0.5rem 1rem;
    font-size: 0.92rem;
  }

  .zz-mobile-nav-ctas {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding-top: 0.5rem;
    border-top: 1px solid var(--zz-border-light);
  }

  .zz-mobile-nav-ctas .zz-btn {
    text-align: center;
    width: 100%;
    height: auto;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* Body overlay when mobile menu is open */
body.zz-mobile-menu-open {
  overflow: hidden !important;
}
