/* ========================================
   FINAL MOBILE BACKGROUND FIX
   THIS WILL WORK 100%
   ======================================== */

/* CRITICAL: Override ALL previous styles */
.hero {
  /* Force background to display completely */
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%), url('../img/hero-bg.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  
  /* Full viewport */
  width: 100vw !important;
  min-height: 100vh !important;
  height: auto !important;
  
  /* Perfect centering */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  
  /* Proper spacing */
  padding: 100px 20px 60px !important;
  
  /* Allow content to show */
  overflow: visible !important;
  
  /* Position */
  position: relative !important;
  margin: 0 !important;
}

/* Mobile specific - FORCE background display */
@media (max-width: 767px) {
  .hero {
    /* CRITICAL: Force background image to show completely */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%), url('../img/hero-bg.jpg') !important;
    
    /* FORCE cover to show full image */
    background-size: cover !important;
    
    /* FORCE center position */
    background-position: center center !important;
    
    /* NO repeat */
    background-repeat: no-repeat !important;
    
    /* MUST be scroll on mobile */
    background-attachment: scroll !important;
    
    /* Full screen */
    width: 100vw !important;
    min-height: 100vh !important;
    min-height: -webkit-fill-available !important;
    height: auto !important;
    
    /* Remove any restrictions */
    max-width: none !important;
    max-height: none !important;
    
    /* Proper padding */
    padding: 120px 5% 80px !important;
    
    /* Flexbox */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    
    /* Show everything */
    overflow: visible !important;
    
    /* Position */
    position: relative !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
  }
  
  /* Container must not restrict */
  .hero .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 5% !important;
    margin: 0 auto !important;
    
    /* Flexbox */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* No restrictions */
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    
    /* Position */
    position: relative !important;
    z-index: 10 !important;
  }
  
  /* All content must be visible */
  .hero h2,
  .hero .subtitle,
  .hero .subtitle p,
  .hero .cta-buttons,
  .hero .btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
  }
  
  .hero .cta-buttons {
    display: flex !important;
  }
  
  .hero .btn {
    display: inline-flex !important;
  }
  
  /* Heading */
  .hero h2 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    width: 100% !important;
    color: white !important;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
  }
  
  /* Subtitle */
  .hero .subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem) !important;
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    color: white !important;
  }
  
  .hero .subtitle p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Buttons */
  .hero .cta-buttons {
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
  }
  
  .hero .btn {
    width: 100% !important;
    max-width: 300px !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    min-height: 50px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  
  /* Hide decorative elements */
  .floating-orb,
  .floating-particle,
  .scroll-indicator {
    display: none !important;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero {
    padding: 100px 4% 60px !important;
  }
  
  .hero .container {
    padding: 0 4% !important;
  }
  
  .hero h2 {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
  }
  
  .hero .subtitle {
    font-size: clamp(0.95rem, 4vw, 1.1rem) !important;
  }
  
  .hero .btn {
    max-width: 280px !important;
  }
}

/* Extra small mobile */
@media (max-width: 375px) {
  .hero {
    padding: 90px 3% 50px !important;
  }
  
  .hero h2 {
    font-size: clamp(1.5rem, 8vw, 2.25rem) !important;
  }
  
  .hero .subtitle {
    font-size: clamp(0.9rem, 4vw, 1rem) !important;
  }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: 100vh !important;
    padding: 60px 5% 40px !important;
  }
  
  .hero h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 1rem !important;
  }
  
  .hero .subtitle {
    font-size: clamp(0.9rem, 3vw, 1rem) !important;
    margin-bottom: 1.5rem !important;
  }
  
  .hero .cta-buttons {
    flex-direction: row !important;
    gap: 1rem !important;
  }
  
  .hero .btn {
    max-width: 180px !important;
    padding: 0.75rem 1.25rem !important;
  }
}

/* iOS Safari fix */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 767px) {
    .hero {
      min-height: -webkit-fill-available !important;
      height: 100vh !important;
    }
  }
}

/* Android Chrome fix */
@media screen and (max-width: 767px) {
  .hero {
    min-height: calc(var(--vh, 1vh) * 100) !important;
  }
}

/* Prevent horizontal scroll */
@media (max-width: 767px) {
  body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  .hero,
  .hero .container {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
}

/* ALTERNATIVE: If background still not showing, use this */
@media (max-width: 767px) {
  .hero {
    /* Try contain if cover doesn't work */
    /* background-size: contain !important; */
    
    /* Or try specific dimensions */
    /* background-size: 100% auto !important; */
    
    /* Or try different position */
    /* background-position: center top !important; */
  }
}
