/* ============================================================
   CORSODORO — GLOBAL NAVIGATION
   Single source of truth. Included on every page.
   ============================================================ */

/* ── Top bar ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.35s, box-shadow 0.35s;
}

.nav--transparent { background: transparent; }

/* Pages with light backgrounds start with solid nav */
.nav--solid-start { background: rgba(255,255,255,0.98); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.nav--solid-start .nav__logo { color: #1B4332; }
.nav--solid-start .nav__link { color: #4a5568; }
.nav--solid-start .nav__link:hover { color: #2D6A4F; }
.nav--solid-start .hamburger span { background: #1a1a1a; }

.nav--solid {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.03);
  backdrop-filter: blur(16px);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav__logo-icon {
  width: 28px;
  height: 28px;
  display: none;
}

/* Show white icon on transparent nav (dark hero), green on solid */
.nav--transparent .nav__logo-icon--white { display: block; }
.nav--transparent .nav__logo-icon--green { display: none; }
.nav--solid .nav__logo-icon--white { display: none; }
.nav--solid .nav__logo-icon--green { display: block; }
.nav--solid-start .nav__logo-icon--white { display: none; }
.nav--solid-start .nav__logo-icon--green { display: block; }

.nav--solid .nav__logo { color: #1B4332; }

/* ── Desktop nav links ── */
.nav__center {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__center > li {
  position: relative;
}

.nav__link {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.nav--solid .nav__link {
  color: #4a5568;
}

.nav--solid .nav__link:hover {
  color: #2D6A4F;
  background: rgba(45,106,79,0.06);
}

/* Dropdown chevron */
.nav__link--has-sub::after {
  content: '';
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 3.5px solid currentColor;
  opacity: 0.5;
  margin-left: 1px;
  transition: transform 0.2s;
}

.nav__center > li:hover > .nav__link--has-sub::after {
  transform: rotate(180deg);
}

/* ── CTA button ── */
.nav__cta {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2D6A4F;
  padding: 9px 20px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

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

.nav__cta-wrap { display: flex; }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: background 0.3s, transform 0.3s, opacity 0.3s;
}

.nav--solid .hamburger span { background: #1a1a1a; }

/* Hamburger active state */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger.active span { background: #fff; }

/* ============================================================
   MEGA MENU — Desktop dropdowns
   ============================================================ */

.nav__mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  pointer-events: none;
  overflow: hidden;
}

.nav__center > li:hover > .nav__mega {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Invisible bridge so mouse can travel to mega */
.nav__center > li::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 16px;
}

/* ── Resources mega (2x2 grid + featured) ── */
.nav__mega--resources { width: 580px; }

.nav__mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 12px;
}

.nav__mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 10px;
  transition: background 0.15s;
  text-decoration: none;
}

.nav__mega-item:hover { background: #f8faf9; }

.nav__mega-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__mega-icon svg {
  width: 20px; height: 20px;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Brand-aligned icon colors */
.nav__mega-icon--primary { background: rgba(45,106,79,0.08); }
.nav__mega-icon--primary svg { stroke: #2D6A4F; }
.nav__mega-icon--accent { background: rgba(200,164,94,0.12); }
.nav__mega-icon--accent svg { stroke: #A0833E; }
.nav__mega-icon--sage { background: rgba(122,155,126,0.12); }
.nav__mega-icon--sage svg { stroke: #5C8060; }
.nav__mega-icon--dark { background: rgba(26,42,33,0.06); }
.nav__mega-icon--dark svg { stroke: #4a5568; }

.nav__mega-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 3px;
  line-height: 1.3;
}

.nav__mega-text p {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin: 0;
}

/* Featured banner at bottom of mega */
.nav__mega-featured {
  display: flex;
  gap: 16px;
  padding: 14px 20px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafbfa;
  text-decoration: none;
  transition: background 0.15s;
}

.nav__mega-featured:hover { background: #f4f7f5; }

.nav__mega-featured-img {
  width: 100px; height: 64px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav__mega-featured-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.nav__mega-featured-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2D6A4F;
  margin-bottom: 3px;
}

.nav__mega-featured-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}

/* ── Products mega (3 col grid) ── */
.nav__mega--products { width: 620px; }

.nav__mega-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 16px 8px;
}

.nav__mega-col-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  padding: 8px 16px 6px;
  margin: 0;
}

.nav__mega-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  padding: 7px 16px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}

.nav__mega-link:hover {
  background: #f0fdf4;
  color: #2D6A4F;
}

.nav__mega-all {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2D6A4F;
  padding: 8px 16px 4px;
  text-decoration: none;
}

.nav__mega-all:hover { text-decoration: underline; }

/* ── Services mega (horizontal cards) ── */
.nav__mega--services { width: 540px; }

.nav__mega-services {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__mega-svc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  transition: background 0.15s;
  text-decoration: none;
}

.nav__mega-svc:hover { background: #f8faf9; }

.nav__mega-svc-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(45,106,79,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__mega-svc-icon svg {
  width: 18px; height: 18px;
  stroke: #2D6A4F;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav__mega-svc h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.nav__mega-svc p {
  font-size: 12px;
  color: #6b7280;
  margin: 2px 0 0;
}

/* ============================================================
   MOBILE NAVIGATION — Slide panel with depth
   ============================================================ */

.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  background: #fff;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.mobile-nav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav__backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8e5;
}

.mobile-nav__logo {
  font-size: 20px;
  font-weight: 700;
  color: #1B4332;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav__logo-icon {
  width: 26px;
  height: 26px;
}

.mobile-nav__close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
}

.mobile-nav__close svg {
  width: 24px; height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Panels (slide layers) ── */
.mobile-nav__panels {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.mobile-nav__panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 8px 0 120px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.mobile-nav__panel--main {
  transform: translateX(0);
  opacity: 1;
}

.mobile-nav__panel--sub {
  transform: translateX(100%);
  opacity: 0;
}

.mobile-nav__panel--main.pushed {
  transform: translateX(-30%);
  opacity: 0.3;
}

.mobile-nav__panel--sub.active {
  transform: translateX(0);
  opacity: 1;
}

/* ── Menu items ── */
.mobile-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s;
  border: none;
  border-bottom: 1px solid #f3f4f6;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mobile-nav__item:hover { background: #f9fafb; }

.mobile-nav__item svg {
  width: 18px; height: 18px;
  stroke: #9ca3af;
  stroke-width: 2;
  fill: none;
}

/* Sub-panel back button */
.mobile-nav__back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  color: #2D6A4F;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  background: #f9fafb;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid #e2e8e5;
  margin-bottom: 4px;
}

.mobile-nav__back svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.mobile-nav__sub-item {
  display: block;
  padding: 13px 24px 13px 40px;
  color: #374151;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-nav__sub-item:hover {
  background: #f0fdf4;
  color: #2D6A4F;
}

.mobile-nav__sub-label {
  padding: 12px 24px 4px 40px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

/* ── Mobile CTA ── */
.mobile-nav__cta {
  padding: 16px 24px 32px;
  margin-top: auto;
}

.mobile-nav__cta {
  border-top: 1px solid #e2e8e5;
}

.mobile-nav__cta a {
  display: block;
  text-align: center;
  background: #2D6A4F;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.mobile-nav__cta a:hover { background: #52876B; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .nav__center,
  .nav__cta-wrap {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* Mobile nav logo — always on dark bg, so always white */
.mobile-nav__logo-icon { width: 26px; height: 26px; }
