/**
 * ==============================================================================
 * Project: AI Trucking Website
 * Module: Navigation Stylesheet (navigation.css)
 * Theme: LIGHT THEME (Rich Crimson, Asphalt Charcoal & Crisp White)
 * Description: Styles for the 3D Web Entrance Loader, Top Bar, Interactive Truck Slider,
 *              Desktop Mega Menu (with max fixed width), and Mobile Drawer.
 * ==============================================================================
 */

/* =============================================================================
   1. Light Theme Design Tokens & Variables
   ============================================================================= */
:root {
  --nav-bg-dark: #ffffff;
  --nav-bg-surface: #ffffff;
  --nav-bg-card: #ffffff;
  --nav-bg-card-hover: #f8fafc;
  --nav-border: #e2e8f0;
  --nav-border-hover: rgba(153, 27, 27, 0.35);

  /* Brand Colors (Derived from the "Ai LOAD DISPATCH" 3D Logo) */
  --nav-primary: #991b1b;           /* Deep Crimson Red */
  --nav-primary-dark: #7f1d1d;      /* Maroon */
  --nav-primary-glow: rgba(153, 27, 27, 0.25);
  --nav-crimson: #8b1e3f;
  --nav-cyan: #0284c7;              /* Tech Accent */
  --nav-emerald: #059669;           /* Active Status */
  --nav-amber: #d97706;

  --nav-text-main: #0f172a;         /* Deep Slate / Charcoal */
  --nav-text-muted: #475569;
  --nav-text-dim: #64748b;

  --nav-road-bg: #0b0f17;           /* High-contrast highway asphalt */
  --nav-road-line: #475569;
  --nav-road-glow: rgba(153, 27, 27, 0.3);

  --nav-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --nav-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

/* Base Navigation Container */
.site-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1050;
  width: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #ffffff;
}

/* =============================================================================
   2. TOP BAR & INTERACTIVE TRUCK SLIDER (Light Theme)
   ============================================================================= */
.nav-topbar {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
  border-bottom: 1px solid var(--nav-border);
  color: var(--nav-text-muted);
  font-size: 0.8125rem;
  padding: 0.45rem 1rem;
  position: relative;
  z-index: 1052;
}

.nav-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
  width: 100%;
}

/* Left: Hotline & Status */
.nav-topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.nav-topbar-hotline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--nav-text-main);
  text-decoration: none;
  font-weight: 600;
  transition: var(--nav-transition);
}

.nav-topbar-hotline:hover {
  color: var(--nav-primary);
}

.nav-topbar-hotline svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--nav-emerald);
  filter: drop-shadow(0 0 4px rgba(5, 150, 105, 0.4));
}

/* Center: Interactive Truck Slider */

/* Social Media Links Corner Group */
.nav-social-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-social-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--nav-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  transition: var(--nav-transition);
}

.nav-social-btn:hover {
  background: var(--nav-primary);
  border-color: var(--nav-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-social-btn svg {
  width: 13px;
  height: 13px;
}

.nav-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 9999px;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #059669;
  box-shadow: 0 0 6px #059669;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* =============================================================================
   Center: HIGH-TECH TRUCK SLIDER REVEALING "AI LOAD DISPATCH"
   ============================================================================= */
.truck-slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 540px;
  min-width: 280px;
  margin: 0 auto;
}

.truck-slider-track-wrap {
  position: relative;
  width: 100%;
  height: 40px;
  background: var(--nav-road-bg);
  border: 1px solid rgba(15, 23, 42, 0.3);
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 10px var(--nav-road-glow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.truck-slider-track-wrap:hover {
  border-color: rgba(153, 27, 27, 0.6);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 16px rgba(153, 27, 27, 0.4);
}

/* Highway Road Center Markings */
.road-markings {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background-image: repeating-linear-gradient(
    90deg,
    #ffffff 0,
    #ffffff 10px,
    transparent 10px,
    transparent 20px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

/* Revealed Content (Behind the truck as it slides) */
.truck-slider-revealed {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.3) 0%, rgba(2, 132, 199, 0.45) 100%);
  border-right: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  transition: width 0.08s ease-out;
}

.revealed-text-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.85rem;
  white-space: nowrap;
}

.revealed-title {
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  text-transform: uppercase;
}

.revealed-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #0284c7;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.5);
}

/* Prompt Overlay (Fades as truck moves) */
.truck-slider-prompt {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.25s ease;
}

.truck-slider-prompt svg {
  animation: bounce-right 1.5s infinite;
}

@keyframes bounce-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* Draggable Truck Handle (Crimson/Metallic Styling matching Logo) */
.truck-slider-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 50px;
  height: 34px;
  background: linear-gradient(135deg, #991b1b 0%, #6b1124 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 0 12px rgba(153, 27, 27, 0.5);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: border-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.truck-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), 0 0 16px rgba(220, 38, 38, 0.8);
}

/* Headlights beam from truck */
.truck-headlights {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 20px;
  background: radial-gradient(ellipse at left, rgba(56, 189, 248, 0.9), transparent 80%);
  pointer-events: none;
  opacity: 0.75;
  filter: blur(1px);
}

.truck-slider-thumb.active-state .truck-headlights {
  opacity: 1;
  width: 28px;
  background: radial-gradient(ellipse at left, rgba(56, 189, 248, 1), transparent 85%);
  filter: blur(1px) drop-shadow(0 0 8px #38bdf8);
}

.truck-icon-svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6));
  pointer-events: none;
}

/* Auto-Drive Action Button */
.truck-slide-btn {
  background: #ffffff;
  border: 1px solid var(--nav-border);
  color: var(--nav-primary);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: var(--nav-transition);
}

.truck-slide-btn:hover {
  background: var(--nav-primary);
  color: #ffffff;
  border-color: var(--nav-primary);
  box-shadow: 0 4px 10px rgba(153, 27, 27, 0.25);
}

/* Right: Quick Links */
.nav-topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.nav-topbar-link {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--nav-transition);
}

.nav-topbar-link:hover {
  color: var(--nav-primary);
}

/* =============================================================================
   3. DESKTOP MAIN NAVIGATION (Light Theme & Max Fixed Width)
   ============================================================================= */
.desktop-nav-bar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 1051;
}

.desktop-nav-container {
  max-width: var(--desktop-max-width, 1360px);
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 0.75rem;
}

/* Brand Logo (Adjusted with User's Uploaded Logo) */
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-img {
  height: 44px;
  width: auto;
  max-width: 125px;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.nav-brand:hover .nav-brand-img {
  transform: scale(1.03);
}

/* Desktop Nav Menu - Single Line, Never Split */
.desktop-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.desktop-nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-item-wrapper {
  position: relative;
  flex-shrink: 0;
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.42rem 0.58rem;
  border-radius: 6px;
  color: #334155;
  text-decoration: none;
  font-size: 0.835rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--nav-transition);
}

.nav-link-btn:hover,
.nav-item-wrapper.active .nav-link-btn,
.nav-item-wrapper:hover .nav-link-btn {
  color: var(--nav-primary);
  background: rgba(153, 27, 27, 0.06);
}

/* Last two menu options a bit smaller as requested ("Careers", "FAQs") */
.desktop-nav-menu .nav-item-wrapper:nth-last-child(1) .nav-link-btn,
.desktop-nav-menu .nav-item-wrapper:nth-last-child(2) .nav-link-btn {
  font-size: 0.795rem;
  padding: 0.4rem 0.46rem;
}

.desktop-nav-menu .nav-item-wrapper:nth-last-child(3) .nav-link-btn {
  font-size: 0.815rem;
  padding: 0.4rem 0.5rem;
}

.nav-item-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.1rem 0.32rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.badge-cyan {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-emerald {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.nav-chevron {
  width: 11px;
  height: 11px;
  transition: transform 0.25s ease;
  color: #64748b;
  flex-shrink: 0;
}

.nav-item-wrapper:hover .nav-chevron,
.nav-item-wrapper.active .nav-chevron {
  transform: rotate(180deg);
  color: var(--nav-primary);
}

/* Desktop Action CTAs */
.desktop-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-nav-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--nav-border);
  background: #ffffff;
  color: var(--nav-text-main);
  font-size: 0.785rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  transition: var(--nav-transition);
}

.btn-nav-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--nav-text-main);
  transform: translateY(-1px);
}

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.88rem;
  border-radius: 6px;
  border: 1px solid rgba(153, 27, 27, 0.8);
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  color: #ffffff;
  font-size: 0.785rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.3);
  position: relative;
  overflow: hidden;
  transition: var(--nav-transition);
}

.btn-nav-primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  box-shadow: 0 6px 18px rgba(153, 27, 27, 0.4);
  transform: translateY(-1px);
  color: #ffffff;
}

/* =============================================================================
   4. MEGA MENU DROPDOWN PANEL (Light Theme)
   ============================================================================= */
.mega-menu-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 980px;
  max-width: 94vw;
  background: #ffffff;
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--nav-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1060;
}

.nav-item-wrapper:hover .mega-menu-panel,
.nav-item-wrapper.active .mega-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 290px;
  gap: 1.5rem;
}

.mega-column-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-text-dim);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid #f1f5f9;
}

.mega-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: var(--nav-transition);
}

.mega-item-card:hover {
  background: #f8fafc;
  border-color: var(--nav-border);
  transform: translateX(4px);
}

.mega-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-primary);
  flex-shrink: 0;
  transition: var(--nav-transition);
}

.mega-item-card:hover .mega-item-icon {
  background: rgba(153, 27, 27, 0.1);
  border-color: rgba(153, 27, 27, 0.3);
  color: var(--nav-primary);
}

.mega-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mega-item-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mega-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nav-text-main);
}

.mega-item-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  letter-spacing: 0.02em;
}

.mega-item-desc {
  font-size: 0.75rem;
  color: var(--nav-text-muted);
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* Feature Callout Card */
.mega-feature-card {
  background: linear-gradient(145deg, #fff5f5 0%, #fef2f2 100%);
  border: 1px solid rgba(153, 27, 27, 0.22);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 25px -5px rgba(153, 27, 27, 0.08);
  position: relative;
  overflow: hidden;
}

.mega-card-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nav-primary);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.mega-card-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nav-text-main);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.mega-card-desc {
  font-size: 0.78rem;
  color: var(--nav-text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.mega-card-metric {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: 6px;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.mega-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--nav-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--nav-transition);
}

.mega-card-cta:hover {
  color: var(--nav-primary-dark);
  transform: translateX(4px);
}

/* =============================================================================
   5. STANDARD DROPDOWNS (Light Theme)
   ============================================================================= */
.standard-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(10px);
  width: 320px;
  background: #ffffff;
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--nav-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1060;
}

.nav-item-wrapper:hover .standard-dropdown-panel,
.nav-item-wrapper.active .standard-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.standard-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  background: transparent;
  transition: var(--nav-transition);
}

.standard-dropdown-item:hover {
  background: #f8fafc;
  transform: translateX(3px);
}

.standard-dropdown-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-primary);
  flex-shrink: 0;
}

.standard-dropdown-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nav-text-main);
}

.standard-dropdown-desc {
  font-size: 0.72rem;
  color: var(--nav-text-muted);
  line-height: 1.35;
  margin-top: 0.1rem;
}

/* =============================================================================
   6. MOBILE NAVIGATION (Light Theme Drawer)
   ============================================================================= */
.mobile-nav-bar {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1051;
}

.mobile-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--nav-border);
  color: var(--nav-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--nav-transition);
}

.mobile-toggle-btn:hover {
  background: #f1f5f9;
  border-color: var(--nav-primary);
}

.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--nav-border);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--nav-border);
}

.mobile-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--nav-border);
  color: var(--nav-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--nav-transition);
}

.mobile-close-btn:hover {
  color: var(--nav-text-main);
  border-color: var(--nav-primary);
}

.mobile-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nav-border);
}

.mobile-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 48px;
  transition: var(--nav-transition);
}

.mobile-action-emerald {
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: #047857;
}

.mobile-action-cyan {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  border: 1px solid rgba(153, 27, 27, 0.6);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.25);
}

.mobile-action-slate {
  background: #f8fafc;
  border: 1px solid var(--nav-border);
  color: var(--nav-text-main);
}

.mobile-accordion-list {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-accordion-item {
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--nav-border);
  overflow: hidden;
}

.mobile-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: transparent;
  border: none;
  color: var(--nav-text-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}

.mobile-accordion-btn .chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
  color: #64748b;
}

.mobile-accordion-item.expanded .mobile-accordion-btn .chevron {
  transform: rotate(180deg);
  color: var(--nav-primary);
}

.mobile-accordion-content {
  display: none;
  padding: 0.25rem 0.75rem 0.75rem 0.75rem;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.mobile-accordion-item.expanded .mobile-accordion-content {
  display: flex;
}

.mobile-sub-link {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  transition: var(--nav-transition);
}

.mobile-sub-link:hover {
  background: #f1f5f9;
}

.mobile-sub-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--nav-text-main);
}

.mobile-sub-note {
  font-size: 0.7rem;
  color: var(--nav-text-muted);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--nav-border);
  font-size: 0.72rem;
  color: var(--nav-text-dim);
  text-align: center;
}

/* =============================================================================
   7. SIMPLE CENTERED ROTATING LOGO WAITING LOADER
   ============================================================================= */
.waiting-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
}

.waiting-loader-overlay.waiting-fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.waiting-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.waiting-rotating-logo {
  width: 250px;
  max-width: 80vw;
  height: auto;
  display: block;
  animation: logoSpin3D 2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes logoSpin3D {
  0% {
    transform: perspective(900px) rotateY(0deg) scale(0.96);
    filter: drop-shadow(0 12px 22px rgba(153, 27, 27, 0.2));
  }
  50% {
    transform: perspective(900px) rotateY(180deg) scale(1.05);
    filter: drop-shadow(0 22px 38px rgba(153, 27, 27, 0.38));
  }
  100% {
    transform: perspective(900px) rotateY(360deg) scale(0.96);
    filter: drop-shadow(0 12px 22px rgba(153, 27, 27, 0.2));
  }
}

/* =============================================================================
   8. RESPONSIVE BREAKPOINTS
   ============================================================================= */
@media (max-width: 1120px) {
  .desktop-nav-bar {
    display: none;
  }
  
  .mobile-nav-bar {
    display: flex;
  }

  .nav-topbar-left .nav-status-badge {
    display: none;
  }

  .nav-topbar-right {
    display: none;
  }

  .truck-slider-container {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .nav-topbar-left {
    display: none;
  }

  .nav-topbar-inner {
    justify-content: center;
  }

  .truck-slider-container {
    width: 100%;
    min-width: 0;
  }
}

/* Keep configured icons visible in desktop navigation links. */
.desktop-nav-menu .nav-link-btn > .nav-svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

/* Keep mobile drawer icons at a consistent, compact size. */
@media (max-width: 1120px) {
  .mobile-nav-drawer .nav-svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .mobile-nav-drawer .nav-chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }
}


/* Keep mobile quick-action icons small and aligned with their labels. */
@media (max-width: 1120px) {
  .mobile-quick-actions .mobile-action-btn > .nav-svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px;
    max-height: 24px;
    flex: 0 0 24px;
  }
}


/* Keep submenu text inside the dropdown and wrap long descriptions. */
.standard-dropdown-panel {
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
}

.standard-dropdown-list,
.standard-dropdown-item {
  min-width: 0;
}

.standard-dropdown-item {
  width: 100%;
  box-sizing: border-box;
}

.standard-dropdown-item > div:last-child {
  flex: 1 1 0;
  min-width: 0;
}

.standard-dropdown-title,
.standard-dropdown-desc,
.mobile-sub-link,
.mobile-sub-title,
.mobile-sub-note {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

