/* ============================================================
   NexVuel — Glass Morphism Theme (White / Black / Grey)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Neutral palette */
  --nv-white:         #ffffff;
  --nv-black:         #0a0a0a;
  --nv-grey-50:       #fafafa;
  --nv-grey-100:      #f4f4f5;
  --nv-grey-200:      #e4e4e7;
  --nv-grey-300:      #d4d4d8;
  --nv-grey-400:      #a1a1aa;
  --nv-grey-500:      #71717a;
  --nv-grey-600:      #52525b;
  --nv-grey-700:      #3f3f46;
  --nv-grey-800:      #27272a;
  --nv-grey-900:      #18181b;

  /* Semantic */
  --nv-text:          var(--nv-black);
  --nv-text-muted:    var(--nv-grey-500);
  --nv-border:        rgba(0, 0, 0, 0.06);
  --nv-border-strong: rgba(0, 0, 0, 0.10);

  /* Glass */
  --nv-glass-bg:      rgba(255, 255, 255, 0.72);
  --nv-glass-bg-dark: rgba(20, 20, 22, 0.72);
  --nv-glass-blur:    saturate(180%) blur(18px);
  --nv-glass-border:  rgba(255, 255, 255, 0.55);
  --nv-glass-shadow:  0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   NAVBAR — GLASS
   ============================================================ */
.nv-navbar {
  background: var(--nv-glass-bg);
  -webkit-backdrop-filter: var(--nv-glass-blur);
  backdrop-filter: var(--nv-glass-blur);
  border-bottom: 1px solid var(--nv-glass-border);
  padding: 0.6rem 0;
  transition: box-shadow 0.25s ease, background 0.25s ease;
  z-index: 1030;
}
.nv-navbar.nv-scrolled {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.nv-container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ============================================================
   BRAND
   ============================================================ */
.nv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 0;
  margin-right: 2rem;
}
.nv-brand:hover { text-decoration: none; }
.nv-brand-icon {
  height: 46px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.nv-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nv-brand-name {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--nv-black);
}
.nv-brand-tagline {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--nv-grey-500);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}

/* ============================================================
   TOGGLER (mobile)
   ============================================================ */
.nv-toggler {
  background: transparent !important;
  padding: 6px 8px !important;
}
.nv-toggler:focus {
  box-shadow: none !important;
  outline: none !important;
}
.nv-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(10,10,10,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ============================================================
   NAV LINKS
   ============================================================ */
.nv-nav {
  align-items: center;
  gap: 4px;
}
.nv-nav-link {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500 !important;
  font-size: 0.95rem;
  color: var(--nv-black) !important;
  padding: 0.5rem 0.95rem !important;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  border-radius: 10px;
}
.nv-nav-link:hover {
  color: var(--nv-black) !important;
  background: rgba(0, 0, 0, 0.04);
}
.nv-nav-link.active {
  color: var(--nv-black) !important;
  font-weight: 600 !important;
  background: rgba(0, 0, 0, 0.05);
}

/* Custom chevron */
.nv-nav-link.dropdown-toggle::after {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.nv-nav-link.dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(-2px);
}
.nv-nav .dropdown-toggle::after {
  border-top: 0;
  border-left: 0;
}

/* Badge */
.nv-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--nv-black);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============================================================
   CTA — Contact Us (glass pill, black fill)
   ============================================================ */
.nv-nav-cta { margin-left: 12px; }
.nv-nav-cta.nv-nav-cta-highlight {
  background: var(--nv-black);
  color: var(--nv-white) !important;
  border-radius: 999px;
  padding: 0.55rem 1.4rem !important;
  font-weight: 500 !important;
  border: 1px solid var(--nv-black);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}
.nv-nav-cta.nv-nav-cta-highlight:hover {
  background: var(--nv-grey-800);
  border-color: var(--nv-grey-800);
  color: var(--nv-white) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

/* ============================================================
   MATRIX DROPDOWN — GLASS DARK PANEL
   ============================================================ */
.nv-matrix-menu {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(20, 20, 22, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
width: max-content;
min-width: 320px;
max-width: min(90vw, 720px);
  margin-top: 10px;
  z-index: 1040;
  animation: nvDropIn 0.18s ease;
}
@keyframes nvDropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MATRIX GRID — FIXED 3 COLUMNS PER ROW
   ------------------------------------------------------------
   Every row uses 3 equal columns, so cells line up vertically
   across rows. Empty cells just don't render anything.
   ============================================================ */
.nv-matrix-row {
  display: grid;
  /* Column count set per-dropdown via inline style from header.php */
  gap: 6px 22px;
  margin-bottom: 6px;
}
.nv-matrix-row:last-child { margin-bottom: 0; }

/* Section headers inside dropdown */
.nv-matrix-header {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  color: var(--nv-grey-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 10px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   MATRIX CELLS — ALLOW WRAPPING FOR LONG LABELS
   ============================================================ */
.nv-matrix-cell {
  display: block;
  padding: 9px 12px;
  color: var(--nv-grey-200);
  text-decoration: none;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.nv-matrix-cell:hover,
.nv-matrix-cell:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--nv-white);
  text-decoration: none;
  transform: translateX(2px);
}
.nv-matrix-cell .nv-cell-label { display: block; }
.nv-matrix-cell .nv-cell-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--nv-grey-500);
  margin-top: 2px;
}
.nv-matrix-cell.nv-fw-bold   { font-weight: 700; }
.nv-matrix-cell.nv-fw-medium { font-weight: 600; }
.nv-matrix-cell.nv-fw-normal { font-weight: 500; }
.nv-matrix-cell.nv-fs-xs { font-size: 0.75rem; }
.nv-matrix-cell.nv-fs-sm { font-size: 0.85rem; }
.nv-matrix-cell.nv-fs-md { font-size: 0.95rem; }
.nv-matrix-cell.nv-fs-lg { font-size: 1.05rem; }

/* ============================================================
   DROPDOWN POSITIONING — prevent right-edge overflow
   ============================================================ */
@media (min-width: 992px) {
  .nv-nav .nav-item.dropdown {
    position: relative;
  }
  .nv-nav .nav-item.dropdown > .nv-matrix-menu {
    left: auto;
    right: 0;
  }
}

/* Slightly narrower panel on 992–1280px screens */
@media (min-width: 992px) and (max-width: 1280px) {
  .nv-matrix-menu {
    min-width: 480px;
    max-width: 600px;
    padding: 14px 16px;
  }
  .nv-matrix-row {
    gap: 4px 16px;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 991.98px) {
  .nv-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .nv-brand { margin-right: 0.5rem; }
  .nv-brand-icon { height: 38px; }
  .nv-brand-name { font-size: 1.15rem; }
  .nv-brand-tagline {
    font-size: 0.52rem;
    letter-spacing: 0.4px;
    white-space: normal;
    max-width: 220px;
  }

  .nv-nav {
    align-items: stretch;
    padding-top: 0.5rem;
    width: 100%;
    background: transparent;
  }
  .nv-nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin-bottom: 2px;
  }
  .nv-nav-link.active::after { display: none; }

  .nv-nav-link.dropdown-toggle::after {
    float: right;
    margin-top: 8px;
  }
  .nv-nav-link.dropdown-toggle[aria-expanded="true"]::after {
    margin-top: 12px;
  }

  .nv-nav-cta {
    margin-left: 0;
    margin-top: 0.75rem;
  }
  .nv-nav-cta.nv-nav-cta-highlight {
    text-align: center;
    display: block;
  }

  /* Matrix dropdown becomes static block on mobile */
  .nv-matrix-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: 1px solid var(--nv-border-strong);
    border-radius: 12px;
    background: rgba(20, 20, 22, 0.95);
    margin: 6px 0 10px;
    min-width: 0;
    max-width: none;
    width: 100%;
    animation: none;
    padding: 12px;
  }
  .nv-matrix-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .nv-matrix-header {
    padding: 10px 6px 4px;
  }
  .nv-matrix-cell {
    white-space: normal;
    word-break: break-word;
  }
}

/* ============================================================
   FOOTER — dark glass
   ============================================================ */
.nv-footer {
  background: rgba(10, 10, 10, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  color: var(--nv-grey-400);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.nv-footer h5 {
  color: var(--nv-white);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.nv-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nv-footer-links li { margin-bottom: 0.5rem; }
.nv-footer-links a {
  color: var(--nv-grey-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.nv-footer-links a:hover {
  color: var(--nv-white);
  text-decoration: none;
}
.nv-footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.nv-footer-social a {
  color: var(--nv-grey-400);
  font-size: 1.1rem;
  transition: color 0.15s ease;
}
.nv-footer-social a:hover { color: var(--nv-white); }
.nv-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--nv-grey-500);
  text-align: center;
  letter-spacing: 0.2px;
}

/* ============================================================
   GLOBAL LAYOUT HELPERS
   ============================================================ */
html, body {
  min-height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--nv-grey-50);
  color: var(--nv-text);
}
body > main,
main {
  flex: 1 0 auto;
}