/* Mobile-first overrides to improve professionalism on small screens
   - Keep content unchanged; override layout, spacing, type, and heavy visual effects
*/

/* Base mobile-first adjustments */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure media and interactive elements scale */
img, video, canvas, lottie-player {
  max-width: 100% !important;
  height: auto !important;
}

/* Topbar: avoid fixed overlap on small screens */
.topbar-sticky {
  position: static !important;
  width: 100% !important;
  box-shadow: none !important;
  padding: .35rem 0 !important;
}

/* Make room for fixed nav on small screens so content isn't hidden */
@media (max-width: 991px) {
  body {
    padding-top: 120px; /* accommodates topbar + nav on mobile */
  }
  #home {
    padding-top: 0 !important;
    min-height: calc(100vh - 120px) !important;
  }
}
@media (min-width: 992px) {
  body { padding-top: 0; }
  .topbar-sticky { position: fixed !important; }
}

/* Navbar / brand */
.nav-logo {
  width: 40px !important;
  height: auto !important;
}
@media (min-width: 768px) {
  .nav-logo { width: 56px !important; }
}

/* Mobile nav panel styling */
@media (max-width: 991px) {
  .navbar-collapse.collapse {
    background: rgba(1, 6, 20, 0.96);
    padding: 1rem 1.25rem;
    position: fixed;
    top: 112px; /* below topbar + small offset */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    overflow-y: auto;
  }
  .navbar-nav .nav-link {
    padding: .75rem 0 !important;
    font-size: 1.02rem !important;
    border-radius: 8px;
  }
  .mobile-nav-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
}

/* Hero typography: responsive, mobile-first */
#home h1 {
  font-size: clamp(1.6rem, 7.2vw, 2.4rem) !important;
  line-height: 1.06 !important;
  font-weight: 800 !important;
  margin-bottom: .6rem !important;
}
#home p {
  font-size: clamp(.95rem, 3.6vw, 1.05rem) !important;
  max-width: 100% !important;
}

/* CTA buttons stack and become full width on small screens */
#home .flex a, #home .flex > a {
  display: block !important;
  width: 100% !important;
  padding-left: 1rem !important;
  /* padding-right: 1rem !important; */
}
@media (min-width: 640px) {
  #home .flex a { display: inline-flex !important; width: auto !important; }
}

/* Reduce heavy decorative effects on small screens */
@media (max-width: 639px) {
  lottie-player {
    filter: none !important;
    transform: none !important;
    min-height: 220px !important;
  }
  .drop-shadow-2xl, .shadow-2xl { box-shadow: none !important; }
}

/* Make counters compact on mobile */
.counter-value {
  font-size: 2rem !important;
}
.counter h5 { font-size: 0.94rem !important; }

/* Improve hit target sizes for nav links */
.navbar-nav .nav-link {
  padding: .55rem .6rem !important;
}

/* Accessibility and motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Minor polish for mobile text contrast */
.text-white, .text-white-50, .text-secondary { color-adjust: exact; }

/* Desktop (larger) improvements kept minimal to avoid changing layout */
@media (min-width: 992px) {
  #home h1 { font-size: clamp(2.8rem, 4.5vw, 4.5rem) !important; }
  #home p { font-size: 1.25rem !important; }
  .nav-logo { width:56px !important; }
}

/* Modernized Mobile Hero Stacking and Contrast Improvements */
@media (max-width: 768px) {
  #home {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh !important;
    padding-top: 100px !important;
    padding-bottom: 60px !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* Stack robot ABOVE text for visual impact on mobile */
  #home .col-lg-6 {
    order: 1 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
  }

  #home lottie-player {
    width: 280px !important;
    height: 280px !important;
    max-width: 80% !important;
    margin: 0 auto !important;
    transform: none !important; /* Remove 3D rotation for mobile clarity */
  }

  #home .relative.z-10 {
    order: 2 !important;
    width: 100% !important;
    padding-top: 0 !important;
    margin-top: -20px !important;
  }

  /* Badge / Capsule */
  #home .inline-block.bg-adey-blue {
    background: rgba(249, 178, 51, 0.1) !important;
    border: 1px solid rgba(249, 178, 51, 0.3) !important;
    padding: 6px 15px !important;
    margin-bottom: 1.5rem !important;
  }

  #home .inline-block.bg-adey-blue span {
    font-size: 0.75rem !important;
    color: #f9b233 !important;
    letter-spacing: 1px !important;
  }

  /* Title & Text */
  #home h1 {
    font-size: 2.4rem !important;
    line-height: 1.15 !important;
    margin-bottom: 1.5rem !important;
  }

  #home p.text-xl {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    color: #ccd6f6 !important;
    margin-bottom: 2.5rem !important;
  }

  /* Buttons Visibility Fixes */
  #home a.bg-adey-gold {
    background-color: #f9b233 !important;
    color: #0a192f !important; /* Dark text on gold bg */
    border: none !important;
    font-weight: 700 !important;
  }

  #home a.border-adey-blue {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }
}

/* Footer CTA buttons full width on small screens */
@media (max-width: 767px) {
  .footer-modern .cta-buttons-wrapper a.btn {
    width: 100% !important;
    margin-bottom: 0.5rem;
  }
  .footer-modern .cta-buttons-wrapper {
    flex-direction: column;
  }
}
