/* ==========================================================================
   ND & ASSOCIATES - MASTER RESPONSIVE STYLESHEET
   Mobile, Tablet, Desktop, Ultra-Wide & Accessibility Optimization
   ========================================================================== */

/* Mobile Sticky Bottom Floating Action Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(4, 13, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid rgba(212, 175, 55, 0.4);
  padding: 0.65rem 0.85rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  z-index: 999;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
}

.mobile-sticky-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-sticky-btn {
  flex: 1;
  padding: 0.65rem 0.4rem;
  font-size: 0.8125rem;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  white-space: nowrap;
}

/* Off-Canvas Mobile Navigation Drawer */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--navy-950);
  border-left: 1.5px solid rgba(212, 175, 55, 0.3);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  transition: right var(--transition-smooth);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.25rem;
}

.drawer-close-btn {
  color: var(--gold-400);
  font-size: 1.75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  line-height: 1;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.drawer-nav-link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.drawer-nav-link:hover, .drawer-nav-link.active {
  color: var(--gold-300);
  background: rgba(212, 175, 55, 0.1);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   Breakpoints & Responsive Layout Queries
   ========================================================================== */

/* Large Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-intro-box {
    border-left: none;
    border-top: 3px solid var(--gold-500);
    border-radius: var(--radius-md);
    text-align: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-trust-highlights {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-image-card {
    max-width: 440px;
    margin: 0 auto;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .explore-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-us-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .goals-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Medium Tablets & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 74px; /* Space for mobile sticky bottom bar */
  }

  .mobile-sticky-bar {
    display: block;
  }

  .top-bar {
    display: none;
  }

  .nav-menu, .nav-actions .btn-primary {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Stats Section on Mobile */
  .stats-card-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem;
  }

  .stat-box:not(:last-child)::after {
    display: none;
  }

  .stat-box {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 1.25rem;
  }

  .stat-box:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Services Grid on Mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Explore Grid on Mobile */
  .explore-grid {
    grid-template-columns: 1fr;
  }

  /* Why Choose Us Grid */
  .why-us-grid {
    grid-template-columns: 1fr;
  }

  /* About Pillars Grid */
  .about-pillars-grid {
    grid-template-columns: 1fr;
  }

  /* Checkup 12-Card Form Inputs */
  .assessment-card-inputs {
    grid-template-columns: 1fr;
  }

  .assessment-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .assessment-score-picker {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-actions-row {
    grid-template-columns: 1fr;
  }

  /* Floating badges positioning for tablet/mobile */
  .floating-badge.badge-top {
    top: -8px;
    right: 0;
  }

  .floating-badge.badge-bottom {
    bottom: 15px;
    left: 0;
  }

  /* Stepper labels hidden on compact view */
  .wizard-steps .step-title-lbl {
    display: none;
  }

  .wizard-steps::before, .wizard-progress-fill {
    left: 15px;
    right: 15px;
  }

  /* Calculator Tabs Scroll on Mobile */
  .calc-tabs-nav {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .calc-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* Small Smart Phones (<= 480px) */
@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .pillars-badges-grid {
    grid-template-columns: 1fr;
  }

  .goals-selection-grid {
    grid-template-columns: 1fr;
  }

  .wizard-nav-actions {
    flex-direction: column-reverse;
    width: 100%;
  }

  .wizard-nav-actions .btn {
    width: 100%;
  }

  .live-score-gauge-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .gauge-meter-wrapper {
    width: 100%;
    justify-content: space-between;
  }

  .gauge-progress-outer {
    flex: 1;
    width: auto;
  }

  .floating-badge {
    position: static;
    margin: 0.5rem 0;
    width: 100%;
    justify-content: center;
  }

  .hero-visual .portrait-frame {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .experience-stamp {
    position: static;
    margin-top: 1rem;
    max-width: 100%;
  }

  .success-actions-row {
    flex-direction: column;
    width: 100%;
  }

  .success-actions-row .btn {
    width: 100%;
  }
}

/* Extra Small Screens (<= 360px) */
@media (max-width: 360px) {
  .brand-tagline {
    display: none;
  }

  .score-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
}

/* Print Optimization */
@media print {
  .top-bar, .site-header, .mobile-sticky-bar, .calculators-section, .wizard-nav-actions, .hamburger-btn {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    padding-bottom: 0;
  }
  .hero-section, .stats-section, .checkup-section, .why-us-section, .site-footer {
    background: none !important;
    color: #000 !important;
  }
  .section-title, .stat-number, .service-title {
    color: #000 !important;
  }
}
