/* =========================================================================
   NEXUS - MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================= */

/* Tablets and below */
@media screen and (max-width: 991px) {
  
  /* Make main container full width and remove horizontal overflow */
  body, html {
    overflow-x: hidden !important;
    width: 100%;
  }

  /* Reduce huge paddings on sections */
  section {
    padding: 60px 20px !important;
  }

  /* Force side-by-side grids to stack */
  .features-grid,
  .services-grid,
  .team-grid,
  .footer-grid,
  .about-grid,
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Force flexbox containers to stack if they don't wrap */
  .hero-content,
  .about-content,
  .service-card,
  .footer-content,
  .auth-container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Reset widths for full screen */
  .page-wrapper,
  .container,
  .hero-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Make typography readable */
  h1, .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  h2, .section-title {
    font-size: 2rem !important;
    line-height: 1.3 !important;
  }

  p, .subtitle {
    font-size: 1.1rem !important;
  }

  /* Fix navigation menu display for mobile */
  .nav-inner {
    flex-direction: row !important; /* Keep logo and hamburger inline */
    justify-content: space-between !important;
    padding: 10px 20px !important;
  }
  
  .nav-right, .nav-actions {
    display: none !important; /* Hide desktop auth buttons on small screens, user uses hamburger */
  }

  .main-nav-menu {
    width: 250px !important;
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
  }

  /* Modals must be full screen */
  .modal-content,
  .auth-modal,
  .profile-modal,
  #plannerModal .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    margin: 20px auto !important;
    padding: 20px !important;
    height: auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

/* Phones */
@media screen and (max-width: 768px) {
  
  section {
    padding: 40px 15px !important;
  }

  h1, .hero-title {
    font-size: 2rem !important;
  }

  h2, .section-title {
    font-size: 1.75rem !important;
  }

  /* Fix absolute positioning that breaks out of bounds on mobile */
  .absolute-element {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  /* Ensure inputs and buttons don't overflow */
  input, select, textarea, button, .btn {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix toast notifications */
  .toast-container {
    width: 90% !important;
    left: 5% !important;
    right: 5% !important;
    bottom: 20px !important;
  }
}
