/* ─── JDI Common Design System (Resets, Variables, Nav & Footer) ─── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --jdi-navy:    #193450;
  --jdi-blue:    #1b5f90;
  --jdi-cyan:    #1ea8fc;
  --jdi-gold:    #f9ad0a;
  --jdi-gold2:   #c68018;
  --jdi-white:   #ffffff;
  --nav-font:    'Inter', sans-serif;
  --body-font:   'Outfit', sans-serif;
  --success:     #10b981;
  --warning:     #f59e0b;
}

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  font-family: var(--body-font);
  position: relative;
}

/* ─── Global Navigation Bar ────────────────────────────────────── */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5% 18px 3%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.nav-bar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 5% 12px 3%;
  box-shadow: 0 4px 20px rgba(25, 52, 80, 0.03);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 52px;
  list-style: none;
}

.nav-links a {
  font-family: var(--nav-font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--jdi-navy);
  text-decoration: none;
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--jdi-cyan);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover { color: var(--jdi-cyan); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--jdi-cyan); }
.nav-links a.active::after { width: 100%; }

/* ─── Global Footer Row ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: #64748b;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--jdi-cyan);
}
/* ─── Shareable Project Details Modal Styling ──────────────────────── */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 52, 80, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.modal-container {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-radius: 24px;
  max-width: 760px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(25, 52, 80, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.project-modal.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(25, 52, 80, 0.6);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 300;
  z-index: 20;
  transition: background 0.2s, transform 0.2s;
}

.modal-close:hover {
  background: rgba(25, 52, 80, 0.9);
  transform: scale(1.05);
}

.modal-hero {
  width: 100%;
  height: 380px;
  overflow: hidden;
  position: relative;
  background: var(--jdi-navy);
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.8s ease;
}

.project-modal.active .modal-hero img {
  filter: grayscale(0%);
}

.modal-hero img[src*="vectorized-logo.svg"] {
  object-fit: contain;
  width: 50%;
  height: 50%;
  margin: auto;
  position: absolute;
  inset: 0;
  opacity: 0.85;
}

/* Modal Gallery Carousel for additional pictures */
.modal-gallery-container {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.modal-gallery-slider {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
}

.modal-gallery-slider::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.modal-gallery-slider img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.modal-gallery-slider img:hover {
  transform: scale(1.02);
}

.project-modal.active .modal-gallery-slider img {
  filter: grayscale(0%);
}

.modal-gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.modal-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}

.modal-gallery-dot.active {
  background: #ffffff;
  transform: scale(1.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modal-body {
  padding: 36px;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--body-font);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--jdi-navy);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}

.modal-description {
  font-size: 1.02rem;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 28px;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  border-top: 1px solid #f1f5f9;
  padding-top: 24px;
  margin-bottom: 28px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-detail-label {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modal-detail-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--jdi-navy);
}

.modal-insights {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
}

.modal-insights h4 {
  font-family: var(--body-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--jdi-navy);
  margin-bottom: 12px;
}

.modal-insights ul {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-insights li {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.modal-insights li::before {
  content: "•";
  color: var(--jdi-cyan);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  position: absolute;
  left: 0px;
}

/* Category badging styling inside modal */
.modal-meta .category-label {
  font-family: var(--nav-font);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--jdi-cyan);
  background: rgba(30, 168, 252, 0.08);
  border: 1px solid rgba(30, 168, 252, 0.22);
  border-radius: 40px;
  padding: 4px 14px;
}

.modal-meta .status-badge {
  font-family: var(--nav-font);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 40px;
  padding: 4px 14px;
}

.modal-meta .status-badge.completed {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.modal-meta .status-badge.running {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ─── Architectural Blueprint background ────────────────── */
.architectural-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Sits behind text content but fits visual stack */
  pointer-events: none;
  overflow: hidden;
  
  /* Subtle drafting grid paper background */
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(27, 95, 144, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 95, 144, 0.035) 1px, transparent 1px),
    linear-gradient(to right, rgba(30, 168, 252, 0.015) 10px, transparent 10px),
    linear-gradient(to bottom, rgba(30, 168, 252, 0.015) 10px, transparent 10px);
}

.blueprint-svg {
  position: absolute;
  width: min(500px, 35vw);
  height: auto;
  opacity: 0.14; /* very subtle */
  transition: transform 0.5s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

/* Floating positions */
.blueprint-truss {
  top: 15vh;
  left: 2%;
  transform: rotate(-5deg);
  animation: slowFloat1 20s ease-in-out infinite;
}

.blueprint-plan {
  top: 95vh;
  right: 2%;
  transform: rotate(8deg);
  animation: slowFloat2 24s ease-in-out infinite;
}

.blueprint-compass {
  top: 175vh;
  left: 5%;
  transform: rotate(-15deg);
  animation: slowFloat3 22s ease-in-out infinite;
}

/* Blueprint drawing line style */
.blueprint-line {
  fill: none;
  stroke: var(--jdi-blue);
  stroke-width: 1.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawBlueprint 15s linear forwards infinite;
  will-change: stroke-dashoffset, opacity;
}

.blueprint-dash {
  fill: none;
  stroke: var(--jdi-cyan);
  stroke-width: 1px;
  stroke-dasharray: 5 4;
  stroke-dashoffset: 200;
  animation: drawBlueprintDash 25s linear forwards infinite;
}

.blueprint-solid {
  fill: rgba(25, 52, 80, 0.2);
  stroke: var(--jdi-navy);
  stroke-width: 1px;
  opacity: 0;
  animation: fadeSolid 3s ease forwards 1s;
}

.blueprint-dim {
  fill: none;
  stroke: #a0aec0;
  stroke-width: 0.8px;
  opacity: 0.7;
}

.blueprint-text {
  fill: var(--jdi-navy);
  font-family: var(--nav-font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Drawing animations */
@keyframes drawBlueprint {
  0% { stroke-dashoffset: 1000; }
  40% { stroke-dashoffset: 0; }
  90% { stroke-dashoffset: 0; opacity: 0.14; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes drawBlueprintDash {
  0% { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}

@keyframes fadeSolid {
  to { opacity: 0.8; }
}

@keyframes slowFloat1 {
  0% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
  100% { transform: translateY(0) rotate(-5deg); }
}

@keyframes slowFloat2 {
  0% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(15px) rotate(6deg); }
  100% { transform: translateY(0) rotate(8deg); }
}

@keyframes slowFloat3 {
  0% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-10px) rotate(-18deg); }
  100% { transform: translateY(0) rotate(-15deg); }
}

/* Clickable modal images */
.clickable-image {
  cursor: zoom-in;
  transition: opacity 0.25s ease;
}

.clickable-image:hover {
  opacity: 0.9;
}

/* Fullscreen Image Lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.image-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 300;
  z-index: 3010;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-content {
  position: relative;
  z-index: 3005;
  max-width: 90%;
  max-height: 85vh;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 2.2rem;
  font-weight: 300;
  z-index: 3010;
  transition: all 0.2s ease;
  user-select: none;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }
  .lightbox-prev {
    left: 12px;
  }
  .lightbox-next {
    right: 12px;
  }
}

/* ─── JDI Living Bot Ambient States ───────────────────────────────── */
body {
  transition: filter 1.2s ease;
}

/* Lonely / Dormant State */
body.jdi-lonely-mode {
  filter: grayscale(18%) brightness(95%);
}

body.jdi-lonely-mode .architectural-bg .blueprint-truss {
  animation: drawBlueprint 60s linear forwards infinite !important;
}
body.jdi-lonely-mode .architectural-bg .blueprint-dash {
  animation: drawBlueprintDash 80s linear forwards infinite !important;
}

/* Bottom-Right Pulsing Bot Status */
.jdi-bot-status {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(10, 15, 29, 0.15);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.jdi-bot-status.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.jdi-bot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a0aec0;
  animation: jdiBotPulse 2s infinite;
}

.jdi-bot-status-text {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  color: #a0aec0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

@keyframes jdiBotPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(160, 174, 192, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(160, 174, 192, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(160, 174, 192, 0); }
}

/* Executive Welcoming Toast */
.jdi-bot-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: min(380px, 90vw);
  background: rgba(25, 53, 80, 0.95);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid rgba(30, 168, 252, 0.25);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 15, 29, 0.3);
  z-index: 1001;
  transform: translateX(120%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jdi-bot-toast.visible {
  transform: translateX(0);
}

.jdi-bot-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jdi-bot-toast-title {
  font-family: var(--body-font);
  font-size: 0.85rem;
  font-weight: 700;
  color: #1ea8fc;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.jdi-bot-toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.jdi-bot-toast-close:hover {
  color: #ffffff;
}

.jdi-bot-toast-body {
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
  font-weight: 400;
}

/* ─── Navbar Guide Indicatives ───────────────────────────────────── */
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-indicator-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jdi-cyan);
  display: inline-block;
  opacity: 0.8;
}

.nav-indicator-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  position: relative;
}

.nav-indicator-pulse::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #10b981;
  animation: navPulse 1.8s infinite;
}

@keyframes navPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

.nav-indicator-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.nav-indicator-badge.gold {
  background: rgba(249, 173, 10, 0.12);
  border: 1px solid rgba(249, 173, 10, 0.4);
  color: #f9ad0a;
  animation: goldPulse 2s infinite;
}

.nav-indicator-badge.blue {
  background: rgba(30, 168, 252, 0.1);
  border: 1px solid rgba(30, 168, 252, 0.35);
  color: #1ea8fc;
}

.nav-indicator-badge.gray {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}

@keyframes goldPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(249, 173, 10, 0.2); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(249, 173, 10, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(249, 173, 10, 0); }
}

/* ─── Crimson Real-Time Dashboard Helpers ────────────────────────── */
.telemetry-card {
  background: rgba(20, 10, 10, 0.35);
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s;
}

.telemetry-card:hover {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(20, 10, 10, 0.45);
}

.telemetry-sparkline {
  width: 100%;
  height: 48px;
  stroke: #ef4444;
  stroke-width: 1.5px;
  fill: url(#red-gradient);
}

/* ─── Dropdown Menu Styles ──────────────────────────────────────── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px !important;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(25, 52, 80, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(25, 52, 80, 0.08);
  padding: 8px 0;
  min-width: 190px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}

.dropdown-menu li {
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  width: 100% !important;
}

.dropdown-menu a {
  display: block !important;
  padding: 10px 20px !important;
  color: var(--jdi-navy) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  width: 100% !important;
  transition: all 0.25s ease !important;
  border-radius: 0;
  text-align: left;
}

.dropdown-menu a::after {
  display: none !important; /* remove underline for dropdown items */
}

.dropdown-menu a:hover {
  background: rgba(27, 95, 144, 0.05);
  color: var(--jdi-cyan) !important;
  padding-left: 24px !important;
}

/* Adjust dropdown position and spacing on mobile */
@media (max-width: 768px) {
  .dropdown-menu {
    min-width: 160px;
  }
  .dropdown-menu a {
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
  }
}

/* ─── Mobile Navigation & Standalone Drawer Styles ───────────────── */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px 8px;
  flex-direction: column;
  justify-content: space-around;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 100000;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle .bar {
  width: 100%;
  height: 2.5px;
  background-color: var(--jdi-navy);
  border-radius: 3px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, background-color 0.3s ease;
  transform-origin: left center;
  pointer-events: none;
}

/* Animations into X */
.nav-bar.active-menu .nav-toggle .bar {
  background-color: #ffffff !important;
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(2) {
  opacity: 0;
}

.nav-bar.active-menu .nav-toggle .bar:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

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

body.mobile-menu-open .mobile-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Mobile responsive drawer overlay */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    background: #193450 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s ease;
    padding: 85px 24px 40px;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
  }

  .nav-bar.active-menu .nav-links-wrapper {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-links a:active,
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--jdi-cyan) !important;
  }

  .nav-links a::after {
    display: none !important;
  }

  /* Inline mobile dropdown styling */
  .nav-dropdown {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0 0 16px;
    min-width: 100%;
    width: 100%;
    gap: 8px;
    transition: none;
  }

  .dropdown-menu a {
    color: rgba(255, 255, 255, 0.82) !important;
    padding: 8px 12px !important;
    font-size: 0.95rem !important;
    border-radius: 6px;
  }

  .dropdown-menu a:hover,
  .dropdown-menu a:active {
    color: var(--jdi-cyan) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }
}

