/* ============================================
   VR CONNECT AI - RESPONSIVE FIX
   MOBILE-FIRST PRECISION REPAIR
   
   Purpose: Fix all mobile responsive issues
   Approach: Mobile-first with clean breakpoints
   Priority: Content visibility > Effects
   
   NO FUNCTIONALITY CHANGES
   NO DESKTOP DESIGN CHANGES
   ONLY RESPONSIVE LAYOUT FIXES
============================================ */

/* ============================================
   CRITICAL: PREVENT HORIZONTAL OVERFLOW
============================================ */
html {
  overflow-x: hidden !important;
  width: 100%;
}

body {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
}

/* Universal box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box !important;
}

/* ============================================
   GLOBAL CONTAINER FIX
============================================ */
.container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Mobile: Comfortable padding */
@media (max-width: 767px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
    max-width: 720px !important;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    padding-left: 32px !important;
    padding-right: 32px !important;
    max-width: 1200px !important;
  }
}

/* ============================================
   HERO SECTION - MOBILE RESPONSIVE FIX
   ROOT CAUSE: Desktop grid forced onto mobile
============================================ */

/* Remove conflicting padding from premium/cinematic CSS */
@media (max-width: 767px) {
  .hero-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* CRITICAL: Single column on mobile */
@media (max-width: 767px) {
  .hero {
    padding: 100px 0 60px !important;
    overflow: hidden !important;
  }
  
  .hero-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    grid-template-columns: none !important; /* Override grid */
  }
}

/* Tablet: Keep single column if needed */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero {
    padding: 120px 0 80px !important;
  }
  
  .hero-container {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }
}

/* Desktop: Two column (preserve original) */
@media (min-width: 1024px) {
  .hero-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 60px !important;
    align-items: center !important;
  }
}

/* ============================================
   HERO CONTENT - MOBILE TYPOGRAPHY
============================================ */
@media (max-width: 767px) {
  .hero-content {
    text-align: center !important;
    max-width: 100% !important;
    order: 1;
  }
  
  .hero-badge-wrapper {
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
  }
  
  .hero-badge {
    font-size: 10px !important;
    padding: 8px 16px !important;
    white-space: nowrap;
  }
  
  .hero-title {
    font-size: clamp(28px, 8vw, 36px) !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-title .title-line {
    display: block;
  }
  
  .hero-subtitle {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
    max-width: 100% !important;
  }
}

/* Tablet typography */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content {
    text-align: center !important;
  }
  
  .hero-title {
    font-size: clamp(36px, 5vw, 44px) !important;
  }
  
  .hero-subtitle {
    font-size: 17px !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ============================================
   HERO CTA BUTTONS - MOBILE
============================================ */
@media (max-width: 767px) {
  .hero-cta {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
  }
  
  .hero-cta .btn {
    width: 100% !important;
    max-width: 280px !important;
    padding: 14px 24px !important;
    font-size: 14px !important;
    justify-content: center !important;
  }
  
  .hero-cta .btn i {
    font-size: 14px !important;
  }
}

/* ============================================
   HERO TRUST BADGES - MOBILE STACK
============================================ */
@media (max-width: 767px) {
  .hero-trust {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
  }
  
  .hero-trust .trust-item {
    font-size: 13px !important;
    white-space: nowrap;
  }
  
  .hero-trust .trust-icon {
    width: 20px !important;
    height: 20px !important;
  }
  
  .hero-trust .trust-icon i {
    font-size: 12px !important;
  }
}

/* Tablet: Horizontal */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-trust {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px !important;
  }
}

/* ============================================
   HERO STATS - MOBILE COMPACT
============================================ */
@media (max-width: 767px) {
  .hero-stats {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px 16px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }
  
  .hero-stats .stat-box {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: center !important;
  }
  
  .hero-stats .stat-number {
    font-size: 24px !important;
    line-height: 1 !important;
  }
  
  .hero-stats .stat-label {
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hero-stats .stat-divider {
    width: 1px !important;
    height: 30px !important;
  }
}

/* ============================================
   HERO VISUAL - MOBILE RESPONSIVE
   ROOT CAUSE: Fixed widths and absolute positioning
============================================ */
@media (max-width: 767px) {
  .hero-visual {
    width: 100% !important;
    max-width: 100% !important;
    order: 2;
    position: relative !important;
    margin: 0 auto !important;
  }
  
  .visual-container {
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    position: relative !important;
    padding: 0 !important;
  }
}

/* ============================================
   FLOATING CARDS - MOBILE ADJUST
============================================ */
@media (max-width: 767px) {
  .floating-card {
    position: absolute !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    border-radius: 10px !important;
    max-width: 140px !important;
    animation: none !important; /* Disable floating on mobile */
  }
  
  .floating-card .card-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
  
  .floating-card .card-title {
    font-size: 11px !important;
    font-weight: 600 !important;
  }
  
  .floating-card .card-sub {
    font-size: 9px !important;
  }
  
  /* Reposition floating cards for mobile */
  .floating-card.card-1 {
    top: -10px !important;
    left: -10px !important;
    transform: none !important;
  }
  
  .floating-card.card-2 {
    top: 50% !important;
    right: -10px !important;
    transform: translateY(-50%) !important;
  }
  
  .floating-card.card-3 {
    bottom: -10px !important;
    left: 10px !important;
    transform: none !important;
  }
}

/* Tablet floating cards */
@media (min-width: 768px) and (max-width: 1023px) {
  .floating-card {
    font-size: 12px !important;
    padding: 10px 14px !important;
  }
}

/* ============================================
   PHONE MOCKUP - MOBILE RESPONSIVE
   ROOT CAUSE: Too large for small screens
============================================ */
@media (max-width: 767px) {
  .mockup-wrapper {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    position: relative !important;
  }
  
  .mockup-phone {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
    animation: none !important; /* Disable floating on mobile */
  }
  
  .phone-screen {
    border-radius: 20px !important;
  }
  
  .chat-message {
    font-size: 12px !important;
  }
  
  .message-bubble {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
  
  .message-time {
    font-size: 9px !important;
  }
  
  .ai-indicator {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
}

/* Tablet phone mockup */
@media (min-width: 768px) and (max-width: 1023px) {
  .mockup-wrapper {
    max-width: 320px !important;
    margin: 0 auto !important;
  }
  
  .mockup-phone {
    max-width: 320px !important;
  }
}

/* ============================================
   DASHBOARD MOCKUP - MOBILE COMPACT
============================================ */
@media (max-width: 767px) {
  .mockup-dashboard {
    width: 100% !important;
    max-width: 260px !important;
    padding: 12px !important;
    font-size: 11px !important;
    position: absolute !important;
    bottom: -20px !important;
    right: -10px !important;
    animation: none !important; /* Disable floating */
  }
  
  .dashboard-header {
    margin-bottom: 8px !important;
  }
  
  .dashboard-title {
    font-size: 11px !important;
  }
  
  .dashboard-title i {
    font-size: 10px !important;
  }
  
  .dashboard-live {
    font-size: 8px !important;
    padding: 2px 6px !important;
  }
  
  .dash-metric {
    margin-bottom: 8px !important;
  }
  
  .dash-label {
    font-size: 9px !important;
  }
  
  .dash-value {
    font-size: 16px !important;
  }
  
  .dash-trend {
    font-size: 9px !important;
  }
}

/* ============================================
   HERO BACKGROUND - MOBILE OPTIMIZE
============================================ */
@media (max-width: 767px) {
  .hero-bg {
    overflow: hidden !important;
  }
  
  .hero-gradient-orb {
    opacity: 0.3 !important; /* Reduce on mobile */
    filter: blur(80px) !important;
  }
  
  .hero-gradient-orb.orb-1 {
    width: 300px !important;
    height: 300px !important;
  }
  
  .hero-gradient-orb.orb-2 {
    width: 250px !important;
    height: 250px !important;
  }
  
  .hero-gradient-orb.orb-3 {
    width: 200px !important;
    height: 200px !important;
  }
  
  .hero-particles {
    display: none !important; /* Hide particles on mobile for performance */
  }
}

/* ============================================
   ALL SECTIONS - MOBILE SPACING
============================================ */
@media (max-width: 767px) {
  .tech-stack,
  .comparison,
  .features,
  .architecture,
  .pricing,
  .faq-section {
    padding: 60px 0 !important;
  }
  
  .section-title,
  .tech-title,
  .comp-title,
  .feat-title,
  .arch-title,
  .pricing-title,
  .faq-title {
    font-size: clamp(28px, 7vw, 32px) !important;
    margin-bottom: 16px !important;
  }
  
  .section-subtitle,
  .tech-subtitle,
  .comp-subtitle,
  .feat-subtitle,
  .arch-subtitle,
  .pricing-subtitle,
  .faq-subtitle {
    font-size: 15px !important;
    margin-bottom: 32px !important;
  }
}

/* ============================================
   GRIDS - MOBILE SINGLE COLUMN
============================================ */
@media (max-width: 767px) {
  .tech-grid,
  .features-grid,
  .comp-grid,
  .impact-grid,
  .arch-grid,
  .pricing-grid,
  .faq-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Tablet: 2 columns where appropriate */
@media (min-width: 768px) and (max-width: 1023px) {
  .tech-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
  }
}

/* ============================================
   CARDS - MOBILE RESPONSIVE
============================================ */
@media (max-width: 767px) {
  .tech-card,
  .feat-card,
  .comp-card,
  .impact-card,
  .arch-card,
  .pricing-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 20px !important;
  }
  
  .tech-card:hover,
  .feat-card:hover,
  .pricing-card:hover {
    transform: translateY(-2px) !important; /* Smaller lift on mobile */
  }
}

/* ============================================
   PRICING SECTION - MOBILE FIX
============================================ */
@media (max-width: 767px) {
  .pricing {
    padding: 60px 0 !important;
  }
  
  .pricing-header {
    margin-bottom: 40px !important;
  }
  
  .pricing-badge {
    font-size: 10px !important;
    padding: 7px 16px !important;
    margin-bottom: 20px !important;
  }
  
  .pricing-title {
    font-size: clamp(28px, 7vw, 32px) !important;
    margin-bottom: 14px !important;
  }
  
  .pricing-subtitle {
    font-size: 15px !important;
    margin-bottom: 32px !important;
  }
  
  .billing-toggle {
    margin-bottom: 40px !important;
    padding: 3px !important;
    max-width: calc(100% - 32px) !important;
    width: auto !important;
  }
  
  .billing-label {
    padding: 9px 18px !important;
    font-size: 13px !important;
  }
  
  .save-badge {
    font-size: 9px !important;
    padding: 3px 8px !important;
    margin-left: 6px !important;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .pricing-card {
    max-width: 100% !important;
    padding: 32px 24px !important;
  }
  
  .popular-badge {
    font-size: 10px !important;
    padding: 6px 16px !important;
  }
  
  .plan-icon {
    width: 56px !important;
    height: 56px !important;
    font-size: 22px !important;
  }
  
  .plan-name {
    font-size: 20px !important;
  }
  
  .plan-desc {
    font-size: 13px !important;
  }
  
  .price-amount {
    font-size: 36px !important;
  }
  
  .price-currency {
    font-size: 18px !important;
  }
  
  .price-period {
    font-size: 14px !important;
  }
  
  .feature-item {
    font-size: 13px !important;
  }
  
  .btn-plan {
    padding: 12px 24px !important;
    font-size: 14px !important;
  }
}

/* ============================================
   FOOTER - MOBILE RESPONSIVE
============================================ */
@media (max-width: 767px) {
  .footer-full {
    padding: 50px 0 30px !important;
  }
  
  .footer-top-new {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  
  .footer-col {
    text-align: center !important;
  }
  
  .footer-logo-section {
    text-align: center !important;
  }
  
  .footer-nav {
    justify-content: center !important;
  }
}

/* ============================================
   NAVBAR - MOBILE FIX
============================================ */
@media (max-width: 967px) {
  .navbar-container {
    padding: 1rem 1rem !important;
  }
  
  .logo-icon {
    width: 40px !important;
    height: 40px !important;
  }
  
  .logo-icon i {
    font-size: 1.25rem !important;
  }
  
  .logo-brand {
    font-size: 1.125rem !important;
  }
  
  .logo-accent {
    font-size: 0.8125rem !important;
  }
  
  .navbar-menu {
    width: 260px !important;
    padding: 5rem 1.5rem 2rem !important;
  }
}

/* Extra small mobile (360px) */
@media (max-width: 400px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  .hero-title {
    font-size: clamp(24px, 7vw, 28px) !important;
  }
  
  .hero-subtitle {
    font-size: 14px !important;
  }
  
  .hero-stats .stat-number {
    font-size: 20px !important;
  }
  
  .hero-stats .stat-label {
    font-size: 10px !important;
  }
  
  .mockup-phone {
    max-width: 240px !important;
  }
  
  .mockup-dashboard {
    max-width: 220px !important;
    font-size: 10px !important;
  }
  
  .floating-card {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }
}

/* ============================================
   IMAGES - RESPONSIVE
============================================ */
img {
  max-width: 100% !important;
  height: auto !important;
}

/* ============================================
   BACK TO TOP BUTTON - MOBILE
============================================ */
@media (max-width: 767px) {
  #backToTop,
  .back-to-top-btn {
    bottom: 20px !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 18px !important;
  }
}

/* ============================================
   ANIMATIONS - MOBILE OPTIMIZATION
============================================ */
@media (max-width: 767px) {
  /* Reduce animation intensity on mobile */
  * {
    animation-duration: 0.3s !important;
  }
  
  /* Disable heavy animations */
  .mockup-phone,
  .mockup-dashboard,
  .floating-card {
    animation: none !important;
  }
}

/* ============================================
   REDUCED MOTION - ACCESSIBILITY
============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   HORIZONTAL SCROLL PREVENTION
   Final safety net
============================================ */
@media (max-width: 767px) {
  * {
    max-width: 100%;
  }
  
  /* Exception for specific elements that need full width */
  .container,
  section,
  .hero,
  .hero-bg,
  .pricing,
  .features,
  .comparison,
  .architecture {
    max-width: none !important;
    width: 100% !important;
  }
}

/* ============================================
   END OF RESPONSIVE FIX
   All changes are surgical and targeted
   Desktop design preserved
   Mobile experience optimized
============================================ */
