/* ==========================================================================
   EXCELSIOR RESEARCH UNIFIED — CLEAN RESPONSIVE ENGINE (DESKTOP PRESERVED)
   ========================================================================== */

/* 1. TABLET & SMALL LAPTOPS (max-width: 1040px) */
@media (max-width: 1040px) {
  .desktop-nav, 
  .desktop-only {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .solutions-grid-3x2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .global-hubs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .database-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
}

/* 2. TABLET VERTICAL / MOBILE SCREENS (max-width: 768px) */
@media (max-width: 768px) {
  /* Prevent horizontal scroll on mobile */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Form inputs text size to prevent iOS zoom */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Header */
  .site-header {
    padding: 0.55rem 0 !important;
  }

  .nav-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .brand-logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 1.15rem !important;
  }

  .logo-icon-box {
    width: 34px !important;
    height: 34px !important;
  }

  .logo-main {
    font-size: 1.05rem !important;
  }

  .logo-sub {
    font-size: 0.52rem !important;
  }

  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  .nav-download-kit-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.75rem !important;
  }

  .nav-roi-pill {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.74rem !important;
  }

  .sound-toggle-btn {
    width: 34px !important;
    height: 34px !important;
  }

  .mobile-menu-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 7px !important;
    cursor: pointer !important;
  }

  /* Hero Section */
  .hero-section {
    padding-top: 5.5rem !important;
    padding-bottom: 2rem !important;
    min-height: auto !important;
  }

  .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    gap: 1.5rem !important;
  }

  .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    gap: 1rem !important;
  }

  .hero-badge-group {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .hero-title {
    font-size: clamp(1.9rem, 6.5vw, 2.5rem) !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .hero-lead {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    text-align: center !important;
    margin: 0 auto !important;
    max-width: 500px !important;
  }

  .hero-cta-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    gap: 0.75rem !important;
  }

  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary {
    width: 100% !important;
    padding: 0.85rem 1.25rem !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .hero-stats-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 1rem auto 0 !important;
  }

  .stat-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .stat-number {
    font-size: 1.45rem !important;
  }

  .stat-label {
    font-size: 0.72rem !important;
    text-align: center !important;
  }

  .hero-3d-visual {
    width: 100% !important;
    max-width: 320px !important;
    height: 230px !important;
    margin: 0.5rem auto 0 !important;
    pointer-events: none !important;
  }

  #three-globe-container {
    pointer-events: none !important;
  }

  .globe-instruction-pill {
    display: none !important;
  }

  /* Section Spacing & Headers */
  .section {
    padding: 3rem 0 !important;
  }

  .section-header {
    text-align: center !important;
    align-items: center !important;
    margin-bottom: 2rem !important;
  }

  .section-header .display-2 {
    font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important;
    text-align: center !important;
  }

  .section-lead {
    font-size: 0.92rem !important;
    text-align: center !important;
  }

  /* Signal Radar Box */
  .signal-canvas-wrapper {
    height: 220px !important;
  }

  .signal-stream-bar {
    grid-template-columns: 1fr !important;
    padding: 0.75rem 1rem !important;
    gap: 0.45rem !important;
  }

  /* Solutions 3x2 Grid & Cards on Mobile */
  .solutions-grid-3x2,
  .solutions-grid,
  .database-stats-grid,
  .global-hubs-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 480px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 1.5rem !important;
  }

  .solution-card-wrapper {
    min-height: 450px !important;
    height: auto !important;
    width: 100% !important;
    position: relative !important;
  }

  .solution-card-inner {
    min-height: 450px !important;
    height: 100% !important;
  }

  .solution-card-face {
    padding: 1.65rem 1.35rem !important;
    border-radius: var(--radius-lg) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .card-feature-list {
    gap: 0.55rem !important;
    margin: 0.85rem 0 !important;
  }

  .db-metric-card {
    padding: 1.6rem 1.35rem !important;
    width: 100% !important;
  }

  /* ROI Estimator Box on Mobile */
  .roi-calculator-box {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem 1.15rem !important;
    gap: 2rem !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
  }

  .calc-controls {
    width: 100% !important;
    gap: 1.25rem !important;
  }

  .calc-metrics-dashboard {
    width: 100% !important;
    padding: 1.5rem 1.15rem !important;
  }

  .calc-metric-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .calc-metric-card.highlight {
    grid-column: span 1 !important;
  }

  /* RFP Proposal Wizard */
  .rfp-wizard-container {
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 1.5rem 1.15rem !important;
  }

  .rfp-step-indicators {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .step-indicator-item {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .form-input-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .chip-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .service-chip, .budget-chip {
    width: 100% !important;
  }

  /* Footer on Mobile */
  .site-footer {
    padding: 3rem 0 1.5rem !important;
  }

  .footer-grid {
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    gap: 2rem !important;
  }

  .footer-brand-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .footer-brand-col .brand-logo {
    justify-content: center !important;
  }

  .footer-brand-col div[style*="display:flex"] {
    justify-content: center !important;
  }

  .footer-links-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.6rem !important;
  }

  .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.85rem !important;
  }

  .footer-legal-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.85rem !important;
  }

  /* Floating Badges */
  .floating-newsletter-badge {
    top: auto !important;
    bottom: 85px !important;
    transform: none !important;
    right: 12px !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: var(--radius-md) !important;
  }

  .floating-newsletter-badge .badge-vertical-text {
    display: none !important;
  }

  .floating-newsletter-badge .badge-icon {
    font-size: 1.35rem !important;
  }

  .newsletter-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 4.5rem 1.25rem 2rem !important;
  }

  .floating-actions {
    bottom: 16px !important;
    right: 14px !important;
  }

  .floating-btn {
    width: 48px !important;
    height: 48px !important;
  }
}

/* 3. EXTRA SMALL PHONES (max-width: 480px) */
@media (max-width: 480px) {
  .logo-sub {
    display: none !important;
  }

  .hero-stats-strip {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}
