/* ══════════════════════════════════════
   AGEYE — Mega-Menu Navigation
   ══════════════════════════════════════ */

/* ── Nav Outer Wrapper ── */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

body.admin-bar #site-nav { top: 32px; }

/* ── Nav Bar (visible header row) ── */
.nav-bar {
  position: relative;
  z-index: 2;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(24px);
  background: rgba(250,250,250,0.88);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.nav-logo a { display: flex; align-items: center; }
.nav-logo img { height: 38px; display: block; }

/* ── Nav Links Container ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: static; /* panels escape to nav */
}

.nav-item {
  position: static; /* panels position relative to nav */
}

/* ── Trigger Links (menu items) ── */
.nav-trigger {
  text-decoration: none;
  color: var(--gray-600);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--t);
  cursor: pointer;
  white-space: nowrap;
}

.nav-trigger:hover {
  color: var(--pink);
}

/* Active pill highlight */
.nav-item.active > .nav-trigger {
  color: var(--pink);
  border-color: rgba(232,21,91,0.15);
  background: rgba(232,21,91,0.03);
}

/* Start Here — pink accent (always) */
.nav-start {
  color: var(--pink) !important;
  border-color: rgba(232,21,91,0.25);
  font-weight: 600 !important;
}

.nav-start:hover {
  border-color: var(--pink) !important;
  background: rgba(232,21,91,0.04);
}

.nav-item.active > .nav-start {
  border-color: var(--pink) !important;
  background: rgba(232,21,91,0.06);
  color: var(--pink) !important;
}

/* Farming-as-a-Service — same gray default, pink on hover/active like others */
.nav-faas {
  font-weight: 500;
}

/* Chevron rotation */
.nav-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.nav-item.active .nav-chevron {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════
   Mega Panel (dropdown)
   ══════════════════════════════════════ */
.mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1;
  backdrop-filter: blur(24px);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 16px 48px rgba(0,0,0,0.07);

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity 0.25s cubic-bezier(0.4,0,0.2,1),
    transform 0.25s cubic-bezier(0.4,0,0.2,1),
    visibility 0s 0.25s;
}

/* Open state */
.nav-item.active > .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.25s cubic-bezier(0.4,0,0.2,1),
    transform 0.25s cubic-bezier(0.4,0,0.2,1),
    visibility 0s 0s;
}

/* ── Panel Interior ── */
.mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 40px 32px;
}

.mega-subtitle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mega-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* When inside the row wrapper, strip standalone spacing */
.mega-subtitle-row .mega-subtitle {
  margin: 0;
  padding: 0;
  border: none;
}

/* "View All →" page link inside subtitle row */
.mega-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1.5px solid rgba(232,21,91,0.2);
  background: rgba(232,21,91,0.03);
  transition: var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}

.mega-view-all:hover {
  background: rgba(232,21,91,0.08);
  border-color: rgba(232,21,91,0.4);
}

.mega-view-all svg {
  width: 12px;
  height: 12px;
}

.mega-body {
  display: flex;
  gap: 40px;
}

/* ── Product Cards ── */
.mega-cards {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.mega-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: var(--t);
  flex: 1;
  min-width: 0;
}

.mega-card:hover {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

.mega-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--gray-100);
  border-radius: 10px;
  overflow: hidden;
}

.mega-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mega-card-title {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--black);
  line-height: 1.3;
}

.mega-card-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-400);
  line-height: 1.4;
  margin-top: 2px;
}

/* ── Right-side Links ── */
.mega-links {
  min-width: 200px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 32px;
  border-left: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.mega-link {
  display: block;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 7px 0;
  transition: var(--t);
}

.mega-link:hover {
  color: var(--pink);
}

/* ══════════════════════════════════════
   Backdrop Overlay
   ══════════════════════════════════════ */
.mega-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  z-index: -1;
  pointer-events: none;
}

#site-nav.mega-open .mega-backdrop {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
  pointer-events: auto;
}

/* ══════════════════════════════════════
   Hamburger Button (hidden on desktop)
   ══════════════════════════════════════ */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  border-radius: 8px;
  transition: var(--t);
}

.nav-hamburger:hover {
  background: rgba(0,0,0,0.04);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: var(--t);
  transform-origin: center;
}

/* Animated X state */
#site-nav.mobile-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#site-nav.mobile-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
#site-nav.mobile-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ══════════════════════════════════════
   Resources Mega Panel — Icon-List Layout
   ══════════════════════════════════════ */
.mega-resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

.mega-resources-group {
  display: flex;
  flex-direction: column;
}

.mega-resources-group-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.mega-resources-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: var(--t);
}

.mega-resources-item:hover {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

.mega-resources-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--gray-600);
  transition: var(--t);
}

.mega-resources-item:hover .mega-resources-icon {
  background: rgba(232,21,91,0.06);
  color: var(--pink);
}

.mega-resources-icon svg {
  width: 18px;
  height: 18px;
}

.mega-resources-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mega-resources-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--black);
  line-height: 1.3;
}

.mega-resources-desc {
  font-size: 0.78rem;
  color: var(--gray-400);
  line-height: 1.4;
}
