/* ==========================================================================
   Header & Mega Menu Styles
   ========================================================================== */

.siteheader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #FFFFFF;
  box-shadow: 0px 2px 6px 2px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}

.siteheader.fixed-menu {
  box-shadow: 0px 4px 12px 2px rgba(0, 0, 0, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .header-logo img {
    height: 38px;
  }
}

/* Navigation List */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-item.active > .nav-link {
  color: var(--color-primary, #7EA449);
}

.nav-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.nav-item:hover > .nav-link .nav-indicator,
.nav-item.mobile-expanded > .nav-link .nav-indicator {
  transform: rotate(-135deg) translateY(-2px);
}

.nav-item.mobile-expanded > .nav-link {
  color: var(--color-primary, #7EA449);
}

/* Header CTA Button (Hire a Developer) */
.nav-cta-btn {
  background: var(--color-primary, #7EA449);
  color: #FFFFFF !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 10px 18px;
  margin-left: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-cta-btn:hover {
  background: var(--color-primary-dark, #4A7B03) !important;
  transform: translateY(-1px);
}

/* Dropdowns & Mega Menus (Desktop) */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1001;
}

.nav-item:hover > .mega-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Specific Dropdown Widths */
.dropdown-solutions {
  width: 620px;
  left: -20px;
  transform: translateY(10px);
  border-radius: 16px;
  padding: 26px 26px 20px 26px;
  background: #FFFFFF;
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #ECECEC;
}

.dropdown-solutions::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-item:hover > .dropdown-solutions {
  transform: translateY(0);
}

.dropdown-solutions .mega-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.dropdown-solutions .mega-col:first-child {
  padding-right: 22px;
}

.dropdown-solutions .mega-col:last-child {
  padding-left: 24px;
  border-left: 1px solid #EEEEEE;
}

.dropdown-solutions .mega-col-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #0E1324;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.dropdown-solutions .mega-col-accent {
  width: 28px;
  height: 3px;
  background-color: var(--color-primary, #7EA449);
  border-radius: 2px;
  margin-bottom: 16px;
}

.dropdown-solutions .mega-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dropdown-solutions .mega-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.35;
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown-solutions .mega-item a:hover {
  color: var(--color-primary, #7EA449);
  transform: translateX(4px);
}

.dropdown-solutions .solution-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-solutions .mega-item a:hover .solution-icon {
  transform: scale(1.08);
}

.dropdown-solutions .megactasection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #EEEEEE;
}

.dropdown-solutions .megatitle {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #0E1324;
  margin: 0 0 4px 0;
}

.dropdown-solutions .megades {
  font-family: var(--font-secondary, 'Open Sans', sans-serif);
  font-size: 12.5px;
  color: #4B5563;
  margin: 0;
  line-height: 1.4;
  max-width: 320px;
}

.dropdown-solutions .megacta {
  background: var(--color-primary, #7EA449);
  color: #FFFFFF;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.dropdown-solutions .megacta:hover {
  background: var(--color-primary-dark, #4A7B03);
  transform: translateY(-1px);
}

.dropdown-solutions .megacta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-solutions .megacta:hover svg {
  transform: translateX(2px);
}

/* Hiring Mega Menu (Matches user screenshot 1:1) */
.dropdown-hiring {
  width: 980px;
  left: -220px;
  right: auto;
  transform: translateY(10px);
  border-radius: 16px;
  padding: 26px 28px 22px 28px;
  background: #FFFFFF;
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #ECECEC;
}

.dropdown-hiring::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-item:hover > .dropdown-hiring {
  transform: translateY(0);
}

.dropdown-hiring .mega-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.dropdown-hiring .mega-col {
  padding: 0 16px;
  border-right: 1px solid #EEEEEE;
}

.dropdown-hiring .mega-col:first-child {
  padding-left: 0;
}

.dropdown-hiring .mega-col:last-child {
  padding-right: 0;
  border-right: none;
}

.dropdown-hiring .mega-col-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #0E1324;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.dropdown-hiring .mega-col-accent {
  width: 28px;
  height: 3px;
  background-color: var(--color-primary, #7EA449);
  border-radius: 2px;
  margin-bottom: 16px;
}

.dropdown-hiring .mega-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-hiring .mega-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.35;
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown-hiring .mega-item a:hover {
  color: var(--color-primary, #7EA449);
  transform: translateX(4px);
}

.dropdown-hiring .solution-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-hiring .mega-item a:hover .solution-icon {
  transform: scale(1.1);
}

/* Resources / Simple Dropdown (Matches user screenshot 1:1) */
.dropdown-simple {
  width: 260px;
  left: -10px;
  transform: translateY(10px);
  border-radius: 16px;
  padding: 24px 22px 20px 22px;
  background: #FFFFFF;
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #ECECEC;
}

.dropdown-simple.dropdown-end {
  left: auto;
  right: -10px;
}


.dropdown-simple::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-item:hover > .dropdown-simple {
  transform: translateY(0);
}

.dropdown-simple .mega-col-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #0E1324;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.dropdown-simple .mega-col-accent {
  width: 28px;
  height: 3px;
  background-color: var(--color-primary, #7EA449);
  border-radius: 2px;
  margin-bottom: 18px;
}

.dropdown-simple .mega-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-simple .mega-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.35;
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.dropdown-simple .mega-item a:hover {
  color: var(--color-primary, #7EA449);
  transform: translateX(4px);
}

.dropdown-simple .solution-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-simple .mega-item a:hover .solution-icon {
  transform: scale(1.1);
}

/* Mega Menu Columns */
.mega-grid {
  display: grid;
  gap: 24px;
}

.mega-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.mega-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.mega-col-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-primary, #7EA449);
}

.mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-item a {
  display: block;
  font-size: 14px;
  color: #333333;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mega-item a:hover {
  color: var(--color-primary, #7EA449);
  transform: translateX(3px);
}

/* Mega CTA Bar inside dropdown */
.megactasection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #EEEEEE;
}

.megactasection .megatitle {
  color: #000;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.megactasection .megades {
  color: #666;
  font-size: 13px;
  margin: 0;
}

.megactasection .megacta {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  background: var(--color-primary, #7EA449);
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.megactasection .megacta:hover {
  background: var(--color-primary-dark, #4A7B03);
}

.megactasection .megacta img {
  width: 16px;
  height: 16px;
}

/* Hamburger Button (Mobile) */
.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 44px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mobile-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.mobile-toggle:active {
  transform: scale(0.95);
}

.mobile-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background-color: #111827;
  border-radius: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, top 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.2s ease;
  transform-origin: center center;
}

.mobile-toggle span:nth-child(1) {
  top: 14px;
}

.mobile-toggle span:nth-child(2) {
  top: 21px;
  width: 17px;
}

.mobile-toggle span:nth-child(3) {
  top: 28px;
}

.mobile-toggle:hover span:nth-child(2) {
  width: 22px;
}

/* Active / Open state: Geometric centered X */
.mobile-toggle.is-active {
  background: #f1f5f9;
  border-color: #0f172a;
}

.mobile-toggle.is-active span {
  width: 22px;
  background-color: #0f172a;
}

.mobile-toggle.is-active span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.mobile-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.is-active span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* Mobile Drawer Navigation (< 1024px) */
@media (max-width: 1024px) {
  .mobile-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item {
    border-bottom: 1px solid #F0F0F0;
  }

  .nav-link {
    padding: 14px 8px;
    font-size: 16px;
    justify-content: space-between;
    width: 100%;
  }

  .nav-cta-btn {
    margin: 16px 0 0 0;
    text-align: center;
    justify-content: center;
  }

  /* In mobile, mega dropdown turns into clean vertical accordion cards */
  .mega-dropdown,
  .dropdown-solutions,
  .dropdown-hiring,
  .dropdown-simple {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    transform: none !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
    padding: 14px 12px !important;
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    margin: 8px 0 14px 0 !important;
    display: none;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
  }

  .nav-item.mobile-expanded > .mega-dropdown,
  .nav-item.mobile-expanded > .dropdown-simple {
    display: block !important;
  }

  /* Force all mega grids into a 100% vertical stack */
  .mega-grid,
  .mega-grid-2,
  .mega-grid-5,
  .dropdown-solutions .mega-grid-2,
  .dropdown-hiring .mega-grid-5 {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile category column sections */
  .dropdown-hiring .mega-col,
  .dropdown-solutions .mega-col,
  .dropdown-simple .mega-col,
  .mega-col {
    width: 100% !important;
    padding: 14px 0 0 0 !important;
    border-right: none !important;
    border-left: none !important;
    border-top: 1px solid #E2E8F0 !important;
    box-sizing: border-box !important;
  }

  .dropdown-hiring .mega-col:first-child,
  .dropdown-solutions .mega-col:first-child,
  .dropdown-simple .mega-col:first-child,
  .mega-col:first-child {
    border-top: none !important;
    padding-top: 0 !important;
  }

  .dropdown-hiring .mega-col-title,
  .dropdown-solutions .mega-col-title,
  .mega-col-title {
    font-family: var(--font-primary, 'DM Sans', sans-serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 4px 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }

  .dropdown-hiring .mega-col-accent,
  .dropdown-solutions .mega-col-accent {
    width: 26px !important;
    height: 3px !important;
    background-color: var(--color-primary, #7EA449) !important;
    border-radius: 3px !important;
    margin-bottom: 12px !important;
  }

  .dropdown-hiring .mega-list,
  .dropdown-solutions .mega-list,
  .mega-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  .dropdown-hiring .mega-item,
  .dropdown-solutions .mega-item,
  .mega-item {
    width: 100% !important;
    list-style: none !important;
  }

  .dropdown-hiring .mega-item a,
  .dropdown-solutions .mega-item a,
  .mega-item a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 9px 12px !important;
    background: #FFFFFF !important;
    border: 1px solid #EDF2F7 !important;
    border-radius: 8px !important;
    font-family: var(--font-primary, 'DM Sans', sans-serif) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1E293B !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .dropdown-hiring .mega-item a:active,
  .dropdown-hiring .mega-item a:hover,
  .dropdown-solutions .mega-item a:active,
  .dropdown-solutions .mega-item a:hover,
  .mega-item a:active,
  .mega-item a:hover {
    background: #F0FDF4 !important;
    border-color: #BBF7D0 !important;
    color: var(--color-primary, #7EA449) !important;
    transform: translateX(3px) !important;
  }

  .dropdown-hiring .solution-icon,
  .dropdown-solutions .solution-icon,
  .solution-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .dropdown-hiring .solution-icon svg,
  .dropdown-solutions .solution-icon svg,
  .solution-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  .megactasection {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px 14px 12px 14px !important;
    background: #F1F5F9 !important;
    border-radius: 8px !important;
    margin-top: 14px !important;
    box-sizing: border-box !important;
  }

  .megacta {
    justify-content: center !important;
    text-align: center !important;
  }
}
