/* ============================================================
   Prozo Navigation — Redesigned Header
   Prefix: pz-nav
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --nav-height: 64px;
  --nav-mobile-height: 56px;
  --nav-orange: #ea6425;
  --nav-dark: #1a1a2e;
  --nav-gray-50: #f9fafb;
  --nav-gray-100: #f3f4f6;
  --nav-gray-200: #e5e7eb;
  --nav-gray-400: #9ca3af;
  --nav-gray-600: #4b5563;
  --nav-gray-900: #111827;
  --nav-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --nav-mega-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Top Utility Bar
   ============================================================ */
.pz-nav__topbar {
  background: var(--nav-dark);
  padding: 6px 0;
}

.pz-nav__topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.pz-nav__topbar a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pz-nav__topbar a:hover {
  color: #fff;
}

.pz-nav__topbar-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Header Bar
   ============================================================ */
.pz-nav {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--nav-height);
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: none;
  transition: box-shadow 0.3s;
}

.pz-nav--scrolled {
  box-shadow: var(--nav-shadow);
}

/* ============================================================
   Inner Container
   ============================================================ */
.pz-nav__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ============================================================
   Logo
   ============================================================ */
.pz-nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   Nav Wrapper (the <nav> element inside .pz-nav__inner)
   ============================================================ */
.pz-nav__inner > nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.pz-nav__logo img {
  height: 52px;
}

/* ============================================================
   Desktop Navigation
   ============================================================ */
.pz-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Nav Item
   ============================================================ */
.pz-nav__item {
  position: relative;
}

/* Mega items: static so mega panel anchors to .pz-nav header */
.pz-nav__item--mega {
  position: static;
}

/* ============================================================
   Nav Link
   ============================================================ */
.pz-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 500;
  color: #2d2d2d;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  background: transparent;
  border: none;
}

.pz-nav__link:hover {
  color: var(--nav-orange);
  background: var(--nav-gray-50);
}

.pz-nav__link--active {
  color: var(--nav-orange);
}

/* ============================================================
   Chevron
   ============================================================ */
.pz-nav__chevron {
  font-size: 12px;
  transition: transform 0.2s;
}

.pz-nav__item--open .pz-nav__chevron {
  transform: rotate(180deg);
}

/* ============================================================
   Actions
   ============================================================ */
.pz-nav__actions {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ============================================================
   CTA Button
   ============================================================ */
.pz-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--nav-orange);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.pz-nav__cta:hover {
  background: #d55a1f;
  transform: translateY(-1px);
}

/* ============================================================
   Hamburger
   ============================================================ */
.pz-nav__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  position: relative;
}

.pz-nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nav-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
  position: absolute;
  left: 8px;
}

.pz-nav__hamburger span:nth-child(1) {
  top: 12px;
}

.pz-nav__hamburger span:nth-child(2) {
  top: 19px;
}

.pz-nav__hamburger span:nth-child(3) {
  top: 26px;
}

.pz-nav__hamburger--open span:nth-child(1) {
  transform: rotate(45deg);
  top: 19px;
}

.pz-nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.pz-nav__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg);
  top: 19px;
}

/* ============================================================
   Mega Menu Panel — full-width, anchored to .pz-nav header
   ============================================================ */
.pz-nav__mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--nav-mega-shadow);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
  z-index: 200;
}

/* Hover bridge — invisible area above panel to maintain hover continuity */
.pz-nav__mega::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
}

.pz-nav__item--open .pz-nav__mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   Mega Inner Container — centers content with max-width
   ============================================================ */
.pz-nav__mega-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 40px;
}

/* ============================================================
   Mega Grid
   ============================================================ */
.pz-nav__mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pz-nav__mega-grid--featured {
  grid-template-columns: repeat(4, 1fr) 240px;
}

/* ============================================================
   Desktop Mega Overlay — dims page content behind mega menu
   ============================================================ */
.pz-nav__mega-dim {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 50;
  pointer-events: none;
}

.pz-nav__mega-dim--visible {
  display: block;
}

/* ============================================================
   Column Heading
   ============================================================ */
.pz-nav__col-heading {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--nav-gray-400);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nav-gray-100);
  padding-left: 12px;
  border-left: 3px solid var(--nav-gray-200);
}

/* Column accent colors */
.pz-nav__mega-col:nth-child(1) .pz-nav__col-heading { border-left-color: #3b82f6; }
.pz-nav__mega-col:nth-child(2) .pz-nav__col-heading { border-left-color: #ea6425; }
.pz-nav__mega-col:nth-child(3) .pz-nav__col-heading { border-left-color: #663f95; }
.pz-nav__mega-col:nth-child(4) .pz-nav__col-heading { border-left-color: #10b981; }

.pz-nav__col-heading--link {
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.pz-nav__col-heading--link:hover {
  color: var(--nav-orange);
}

/* ============================================================
   Column Item
   ============================================================ */
.pz-nav__col-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 2px 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--nav-gray-600);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.2s, transform 0.2s, background 0.2s, border-color 0.2s;
}

.pz-nav__col-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Column-specific hover colors */
.pz-nav__mega-col:nth-child(1) .pz-nav__col-item:hover { color: #3b82f6; background: rgba(59, 130, 246, 0.06); border-color: rgba(59, 130, 246, 0.15); }
.pz-nav__mega-col:nth-child(2) .pz-nav__col-item:hover { color: #ea6425; background: rgba(234, 100, 37, 0.06); border-color: rgba(234, 100, 37, 0.15); }
.pz-nav__mega-col:nth-child(3) .pz-nav__col-item:hover { color: #663f95; background: rgba(102, 63, 149, 0.06); border-color: rgba(102, 63, 149, 0.15); }
.pz-nav__mega-col:nth-child(4) .pz-nav__col-item:hover { color: #10b981; background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.15); }

/* Icon inside mega-menu items */
.pz-nav__col-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.pz-nav__col-item:hover .pz-nav__col-icon {
  opacity: 1;
}

/* ============================================================
   Featured Card
   ============================================================ */
.pz-nav__featured {
  background: linear-gradient(135deg, #1a1a2e, #2E3192);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pz-nav__featured-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pz-nav__featured-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.pz-nav__featured-cta {
  color: var(--nav-orange);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.pz-nav__featured-cta:hover {
  text-decoration: underline;
}

/* ============================================================
   Simple Dropdown
   ============================================================ */
.pz-nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--nav-mega-shadow);
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}

.pz-nav__item--open .pz-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   Dropdown Item
   ============================================================ */
.pz-nav__drop-item {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--nav-gray-600);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.pz-nav__drop-item:hover {
  color: var(--nav-orange);
  background: var(--nav-gray-50);
}

/* ============================================================
   Mobile Overlay
   ============================================================ */
.pz-nav__mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 72px 24px 24px;
}

.pz-nav__mobile--open {
  transform: translateX(0);
}

/* ============================================================
   Mobile Close
   ============================================================ */
.pz-nav__mobile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--nav-dark);
}

/* ============================================================
   Mobile Accordion
   ============================================================ */
.pz-nav__mobile-item {
  border-bottom: 1px solid var(--nav-gray-100);
}

/* ============================================================
   Mobile Accordion Trigger
   ============================================================ */
.pz-nav__mobile-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--nav-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.pz-nav__mobile-trigger .pz-nav__chevron {
  transition: transform 0.2s;
}

.pz-nav__mobile-item--open .pz-nav__mobile-trigger .pz-nav__chevron {
  transform: rotate(180deg);
}

/* ============================================================
   Mobile Accordion Panel
   ============================================================ */
.pz-nav__mobile-panel {
  padding-bottom: 12px;
}

/* ============================================================
   Mobile Section Heading
   ============================================================ */
.pz-nav__mobile-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: var(--nav-gray-400);
  margin: 16px 0 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--nav-gray-100);
}

.pz-nav__mobile-heading:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

.pz-nav__mobile-heading--link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.pz-nav__mobile-heading--link:hover,
.pz-nav__mobile-heading--link:active {
  color: var(--nav-orange);
}

/* ============================================================
   Mobile Sub Item
   ============================================================ */
.pz-nav__mobile-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--nav-gray-600);
  text-decoration: none;
  min-height: 44px;
}

.pz-nav__mobile-link:hover,
.pz-nav__mobile-link:active {
  color: var(--nav-orange);
}

/* ============================================================
   Mobile Simple Link (items without submenus)
   ============================================================ */
.pz-nav__mobile-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--nav-dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.pz-nav__mobile-simple:hover,
.pz-nav__mobile-simple:active {
  color: var(--nav-orange);
}

/* ============================================================
   Mobile CTA
   ============================================================ */
.pz-nav__mobile-cta {
  display: block;
  width: 100%;
  padding: 14px 0;
  margin-top: 24px;
  background: var(--nav-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* ============================================================
   Mobile Backdrop
   ============================================================ */
.pz-nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.pz-nav__backdrop--visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   Responsive — Tablet & Mobile (max-width: 1023px)
   ============================================================ */
@media (max-width: 1023px) {
  .pz-nav__menu {
    display: none;
  }

  .pz-nav__mega,
  .pz-nav__dropdown,
  .pz-nav__mega-dim {
    display: none !important;
  }

  .pz-nav__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pz-nav {
    height: var(--nav-mobile-height);
  }

  .pz-nav__logo img {
    height: 44px;
  }

  .pz-nav__cta {
    padding: 8px 16px;
    font-size: 12px;
  }
}

/* ============================================================
   Responsive — Tablet (768px–1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .pz-nav__mobile {
    width: 380px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .pz-nav__mobile-link {
    font-size: 14px;
    padding: 8px 16px;
  }
}

/* ============================================================
   Responsive — Desktop (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .pz-nav__mobile,
  .pz-nav__backdrop,
  .pz-nav__hamburger {
    display: none !important;
  }

  .pz-nav__menu {
    display: flex;
  }
}

/* ============================================================
   Responsive — Narrow Desktop (1024px–1279px)
   ============================================================ */
@media (min-width: 1024px) and (max-width: 1279px) {
  .pz-nav__mega-inner {
    padding: 28px 24px;
  }

  .pz-nav__mega-grid {
    gap: 16px;
  }

  .pz-nav__mega-grid--featured {
    grid-template-columns: repeat(4, 1fr) 200px;
  }

  .pz-nav__col-heading {
    font-size: 11px;
  }

  .pz-nav__col-item {
    font-size: 13px;
    padding: 6px 0;
  }

  .pz-nav__link {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* ============================================================
   Responsive — Small Phones (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .pz-nav__cta {
    padding: 8px 12px;
    font-size: 12px;
  }
}
