/* ═══════════════════════════════════════════════════════════════════════
 * Digital Dynamics — UNIFIED NAV + MOBILE DRAWER
 * Self-contained styles with `dd-` prefix to avoid clashing with page CSS.
 * Used together with /nav.js which injects the HTML and wires up the drawer.
 * One file → applies to every page that includes it.
 * =================================================================== */

/* Container */
.dd-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  z-index: 1000;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.dd-nav.scrolled { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }

/* Logo */
.dd-nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0f172a; }
.dd-nav-logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #6366f1, #06b6d4, #a855f7);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800; font-size: 16px; color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.dd-nav-logo-text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: #0f172a; }

/* Center links */
.dd-nav-links { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.dd-nav-links a {
  font-size: 13px; font-weight: 600;
  color: #475569; text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.005em;
}
.dd-nav-links a:hover { color: #0f172a; }
.dd-nav-links a.current { color: #6366f1; }

/* Right side: lang + CTA + toggle */
.dd-nav-right { display: flex; align-items: center; gap: 10px; }
.dd-lang-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.dd-lang-btn {
  padding: 5px 11px;
  font-size: 11.5px; font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  border: none; background: transparent;
  color: #94a3b8; cursor: pointer;
  transition: all 0.2s;
}
.dd-lang-btn.active { background: #6366f1; color: white; }
.dd-lang-btn:hover:not(.active):not(:disabled) { color: #475569; }
.dd-lang-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dd-nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #6366f1, #06b6d4, #a855f7);
  color: white;
  font-size: 13px; font-weight: 600; font-family: 'DM Sans', sans-serif;
  border-radius: 8px; cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.dd-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35); }

/* Mobile hamburger toggle */
.dd-mobile-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #475569;
  font-size: 20px;
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.dd-mobile-toggle:hover { background: rgba(99, 102, 241, 0.08); }

@media (max-width: 880px) {
  .dd-nav-links, .dd-nav-cta, .dd-lang-switch { display: none; }
  .dd-mobile-toggle { display: flex; }
  .dd-nav { padding: 0 16px; }
}

/* ═══════════════════════ MOBILE DRAWER ═══════════════════════ */
.dd-drawer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; visibility: hidden; font-family: 'DM Sans', system-ui, sans-serif; }
.dd-drawer.open { pointer-events: auto; visibility: visible; }

.dd-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.dd-drawer.open .dd-drawer-backdrop { opacity: 1; }

.dd-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 252, 0.98));
  backdrop-filter: blur(24px);
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: -20px 0 60px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
  padding: 24px;
}
.dd-drawer.open .dd-drawer-panel { transform: translateX(0); }

.dd-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); margin-bottom: 24px; }
.dd-drawer-close {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #475569;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.dd-drawer-close:hover { background: rgba(99, 102, 241, 0.08); color: #0f172a; }

.dd-drawer-links { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dd-drawer-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 12px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 18px; font-weight: 700;
  color: #0f172a; text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
  letter-spacing: -0.015em;
}
.dd-drawer-links a:hover { background: rgba(99, 102, 241, 0.06); color: #6366f1; transform: translateX(4px); }
.dd-drawer-links a.current { color: #6366f1; background: rgba(99, 102, 241, 0.06); }
.dd-drawer-links a .arrow { margin-left: auto; opacity: 0.4; transition: opacity 0.2s; }
.dd-drawer-links a:hover .arrow { opacity: 1; }

.dd-drawer-foot { padding-top: 20px; border-top: 1px solid rgba(0, 0, 0, 0.06); display: flex; flex-direction: column; gap: 12px; }
.dd-drawer-foot .dd-lang-switch { align-self: center; display: flex; }
.dd-drawer-foot .dd-nav-cta {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 15px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  display: inline-flex;
}
