/* FINAL FIX - Text centered, cards below, no overlap */

/* === Z-INDEX LAYERING - Text should be ABOVE cards === */
.hero-title-wrapper {
  z-index: 100 !important; /* Above everything */
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 0 2rem !important;
  box-sizing: border-box !important;
  /* RESTORE ORIGINAL POSITION */
  top: 19vh !important; /* Original positioning */
}

.hero-title {
  z-index: 101 !important;
  position: relative !important;
  white-space: nowrap !important;
  text-align: center !important;
  width: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

.hero-title.smaller {
  z-index: 101 !important;
  position: relative !important;
  white-space: nowrap !important;
  text-align: center !important;
  width: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

.hero-subtitle {
  z-index: 101 !important;
  position: relative !important;
  text-align: center !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Cards should be BELOW text */
.hero-cards-wrapper {
  z-index: 10 !important; /* Below text */
  position: absolute !important;
  /* Keep original positioning */
  top: 8vh !important;
  left: 0 !important;
  right: 0 !important;
}

.hero-card-wrapper {
  z-index: 10 !important;
}

.hero-card {
  z-index: 10 !important;
}

/* Hero wrapper should allow layering */
.hero-wrapper {
  overflow-x: hidden !important;
  width: 100% !important;
  position: relative !important;
  height: 100vh !important;
}

.hero-section {
  overflow-x: hidden !important;
  position: relative !important;
}

body {
  overflow-x: hidden !important;
}

/* === DESKTOP SIZES (1920px and above) === */
@media screen and (min-width: 1920px) {
  .hero-title {
    font-size: 14rem !important;
    line-height: 0.8 !important;
  }

  .hero-title.smaller {
    font-size: 7rem !important;
    line-height: 0.9 !important;
  }
  
  .hero-title-wrapper {
    max-width: 1400px !important;
    margin: 0 auto !important;
  }
}

/* === LARGE DESKTOP (1440px - 1919px) === */
@media screen and (max-width: 1919px) and (min-width: 1440px) {
  .hero-title {
    font-size: 12rem !important;
    line-height: 0.8 !important;
  }

  .hero-title.smaller {
    font-size: 6rem !important;
    line-height: 0.9 !important;
  }
}

/* === STANDARD DESKTOP (1024px - 1439px) === */
@media screen and (max-width: 1439px) and (min-width: 1024px) {
  .hero-title {
    font-size: 10rem !important;
    line-height: 0.8 !important;
  }

  .hero-title.smaller {
    font-size: 5rem !important;
    line-height: 0.9 !important;
  }
}

/* === SMALL DESKTOP / TABLET LANDSCAPE (768px - 1023px) === */
@media screen and (max-width: 1023px) and (min-width: 768px) {
  .hero-title {
    font-size: 7rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 3.5rem !important;
    line-height: 1 !important;
  }
  
  .hero-title-wrapper {
    padding: 0 2rem !important;
    top: 12rem !important;
  }
}

/* === TABLET PORTRAIT (600px - 767px) === */
@media screen and (max-width: 767px) and (min-width: 600px) {
  .hero-title {
    font-size: 5rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 2.5rem !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 1.5rem !important;
    top: 10rem !important;
  }
}

/* === LARGE MOBILE (480px - 599px) === */
@media screen and (max-width: 599px) and (min-width: 480px) {
  .hero-title {
    font-size: 4rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 2rem !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 1rem !important;
    top: 8rem !important;
  }
}

/* === STANDARD MOBILE (414px - 479px) === */
@media screen and (max-width: 479px) and (min-width: 414px) {
  .hero-title {
    font-size: 3.5rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.75rem !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 1rem !important;
    top: 8rem !important;
  }
  
  .hero-subtitle {
    font-size: 0.9rem !important;
  }
}

/* === IPHONE 12/13 (390px - 413px) === */
@media screen and (max-width: 413px) and (min-width: 390px) {
  .hero-title {
    font-size: 3.2rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.6rem !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 0.8rem !important;
    top: 8rem !important;
  }
}

/* === IPHONE SE / STANDARD SMALL MOBILE (375px - 389px) === */
@media screen and (max-width: 389px) and (min-width: 375px) {
  .hero-title {
    font-size: 3rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.5rem !important;
    line-height: 1 !important;
    letter-spacing: -0.015em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 0.7rem !important;
    top: 8rem !important;
  }
}

/* === SMALL MOBILE (360px - 374px) === */
@media screen and (max-width: 374px) and (min-width: 360px) {
  .hero-title {
    font-size: 2.8rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.4rem !important;
    line-height: 1 !important;
    letter-spacing: -0.02em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 0.6rem !important;
    top: 8rem !important;
  }
}

/* === EXTRA SMALL MOBILE (320px - 359px) === */
@media screen and (max-width: 359px) and (min-width: 320px) {
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.25rem !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 0.5rem !important;
    top: 8rem !important;
  }
}

/* === VERY SMALL MOBILE (below 320px) === */
@media screen and (max-width: 319px) {
  .hero-title {
    font-size: 2.2rem !important;
    line-height: 0.9 !important;
  }

  .hero-title.smaller {
    font-size: 1.1rem !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
  }
  
  .hero-title-wrapper {
    padding: 0 0.3rem !important;
    top: 8rem !important;
  }
}

/* === FORCE NO WRAPPING === */
.hero-title, 
.hero-title.smaller,
.hero-subtitle {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* === ENSURE PROPER MIX BLEND MODE FOR TEXT === */
.hero-title,
.hero-title.smaller {
  mix-blend-mode: difference !important;
  color: #fff !important; /* White for mix-blend-mode */
}

.hero-subtitle {
  mix-blend-mode: exclusion !important;
  color: #fff !important;
}
