/* =========================================================
   HEADER / MEGA NAVIGATION - ENHANCED
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 30px rgba(27, 27, 46, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 84px;
}

/* --- Logo --- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand svg,
.brand .brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  line-height: 1.05;
}

.brand-text .b1 {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.brand-text .b2 {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
}

/* Logo image styling */
.brand .brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

/* For mobile nav */
.mobile-nav-head .brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Footer logo */
.footer-brand .brand .brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

/* Brand container */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}
/* --- Primary Nav --- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-radius: 10px;
  transition: color 0.25s ease, background 0.25s ease;
  position: relative;
  text-decoration: none;
}

.nav-link:hover,
.nav-item.is-open .nav-link {
  color: var(--primary);
  background: rgba(241, 97, 11, 0.06);
}

.nav-link .chev {
  width: 10px;
  height: 10px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.is-open .nav-link .chev {
  transform: rotate(180deg);
}

.nav-link.is-current {
  color: var(--primary);
}

.nav-link.is-current::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
}

/* =========================================================
   MEGA PANEL - ENHANCED
   ========================================================= */
.mega-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  top: 100%;
  background: var(--ivory);
  border-radius: 16px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.12), 0 8px 32px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
  min-width: 720px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-panel::-webkit-scrollbar {
  width: 4px;
}

.mega-panel::-webkit-scrollbar-track {
  background: transparent;
}

.mega-panel::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.nav-item.is-open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-inner {
  padding: 40px 44px 48px;
  max-width: 1240px;
  margin: 0 auto;
}

/* --- Mega Panel Header --- */
.mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mega-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--forest-2);
  margin: 0;
  font-family: var(--font-display);
}

.mega-header .mega-link-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease;
  text-decoration: none;
}

.mega-header .mega-link-all:hover {
  gap: 10px;
}

.mega-header .mega-link-all svg {
  width: 14px;
  height: 14px;
}

/* --- Verticals grid mega (What We Do) --- */
.mega-verticals-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.mega-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px 12px;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  background: var(--sage);
  border: 1px solid transparent;
}

.mega-vertical:hover {
  background: var(--ivory);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  border-color: var(--line);
}

.mega-vertical .ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.mega-vertical:hover .ring {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.mega-vertical .ring svg {
  width: 26px;
  height: 26px;
  transition: transform 0.3s ease;
}

.mega-vertical:hover .ring svg {
  transform: scale(1.1);
}

.mega-vertical span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  transition: color 0.3s ease;
}

.mega-vertical:hover span {
  color: var(--primary);
}

/* --- Mega Feature --- */
.mega-feature {
  display: flex;
  gap: 28px;
  background: var(--sage);
  border-radius: 14px;
  padding: 24px 28px;
  align-items: center;
  border: 1px solid var(--line);
}

.mega-feature img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.mega-feature-text h4 {
  font-size: 18px;
  margin-bottom: 6px;
  font-family: var(--font-display);
  color: var(--forest-2);
}

.mega-feature-text p {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 480px;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* --- About-style mega (About Us) --- */
.mega-about {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 40px;
}

.mega-about-intro h3 {
  font-size: 28px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  color: var(--forest-2);
}

.mega-about-intro .about-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.mega-about-intro .about-tag {
  display: inline-block;
  background: rgba(241, 97, 11, 0.08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.mega-links-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  align-content: start;
}

.mega-links-cols .col-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dk);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  grid-column: 1 / -1;
}

.mega-links-cols a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.25s ease;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.mega-links-cols a:hover {
  color: var(--primary);
  padding-left: 6px;
  border-color: var(--primary);
}

.mega-feature-card {
  background: var(--sage);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--line);
}

.mega-feature-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}

.mega-feature-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
  font-family: var(--font-display);
  color: var(--forest-2);
}

.mega-feature-card p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* --- Simple list mega (Projects) --- */
.mega-simple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.mega-simple-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dk);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.mega-simple-col a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  transition: all 0.25s ease;
  text-decoration: none;
}

.mega-simple-col a:hover {
  color: var(--primary);
  border-color: var(--primary);
  padding-left: 4px;
}

/* --- Legal/Contact Mega --- */
.mega-legal {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: 40px;
}

.mega-legal-col h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dk);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.mega-legal-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-legal-col ul li {
  margin-bottom: 10px;
}

.mega-legal-col ul li a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.25s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-legal-col ul li a:hover {
  color: var(--primary);
}

.mega-legal-col ul li a svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.mega-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.mega-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.mega-contact-item strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

/* --- Mega Footer CTA --- */
.mega-footer-cta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mega-footer-cta p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.mega-footer-cta .btn-ghost {
  font-size: 14px;
}

/* =========================================================
   MOBILE NAV
   ========================================================= */
@media (max-width: 1080px) {
  .primary-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .header-actions .btn-outline {
    display: none;
  }

  .mega-panel {
    display: none !important;
  }
}

/* =========================================================
   RESPONSIVE MEGA PANEL
   ========================================================= */
@media (max-width: 1240px) {
  .mega-panel {
    min-width: 600px;
  }
  .mega-inner {
    padding: 32px 32px 40px;
  }
}

@media (max-width: 1024px) {
  .mega-panel {
    min-width: 500px;
  }
  .mega-about {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .mega-legal {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .mega-verticals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mega-feature {
    flex-direction: column;
    text-align: center;
  }
  .mega-feature img {
    width: 100%;
    height: 180px;
  }
  .mega-feature-text p {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .mega-panel {
    min-width: unset;
    width: 100%;
    left: 0;
    transform: translateX(0) translateY(8px);
    border-radius: 0 0 16px 16px;
  }
  .nav-item.is-open .mega-panel {
    transform: translateX(0) translateY(0);
  }
  .mega-inner {
    padding: 24px 20px 32px;
  }
  .mega-verticals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-simple {
    grid-template-columns: 1fr;
  }
  .mega-links-cols {
    grid-template-columns: 1fr;
  }
  .mega-footer-cta {
    flex-direction: column;
    text-align: center;
  }
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 600;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.mobile-nav-close:hover {
  background: rgba(241, 97, 11, 0.08);
  color: var(--primary);
}

.mobile-nav-close svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-body {
  padding: 12px 24px 40px;
  flex: 1;
}

.mobile-accordion {
  border-bottom: 1px solid var(--line);
}

.mobile-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 18px 4px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
  text-align: left;
  transition: color 0.25s ease;
  cursor: pointer;
}

.mobile-accordion-trigger:hover {
  color: var(--primary);
}

.mobile-accordion-panel a:hover {
  color: var(--primary);
}

.mobile-nav-body>a.mobile-plain-link:hover {
  color: var(--primary);
}

.mobile-accordion-trigger svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.mobile-accordion.is-open .mobile-accordion-trigger svg {
  transform: rotate(180deg);
}

.mobile-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-accordion-panel>div {
  padding: 0 4px 20px;
}

.mobile-accordion-panel a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s ease;
}

.mobile-nav-body>a.mobile-plain-link {
  display: block;
  padding: 18px 4px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.25s ease;
}

.mobile-nav-cta {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-cta .btn {
  justify-content: center;
  width: 100%;
}