/* =====================================================
   ADVANCED NEXT TECH — Mobile Responsive Styles
   ===================================================== */

/* -------------------------------------------------------
   TABLET & SMALL DESKTOP (max 992px)
------------------------------------------------------- */
@media (max-width: 991.98px) {

  /* Hero */
  .hero {
    padding-top: 5.5rem;
    padding-bottom: 3.5rem;
    min-height: auto;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero .d-flex.flex-wrap {
    justify-content: center;
  }

  .hero-card {
    margin-top: 2.5rem;
    padding: 1.5rem;
  }

  /* Stats bar */
  .stats-bar {
    margin-top: 0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }

  .stat-number {
    font-size: 2rem;
  }

  /* Section spacing */
  section {
    padding: 3rem 0;
  }

  .section-head {
    padding: 3.5rem 0 2.5rem;
  }

  /* Navbar tweaks */
  .logo-wrapper {
    height: 38px;
  }

  .brand-name {
    font-size: 1rem;
  }
}

/* -------------------------------------------------------
   MOBILE (max 767px)
------------------------------------------------------- */
@media (max-width: 767.98px) {

  /* Hero */
  .hero {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-card {
    padding: 1.25rem;
  }

  .hero-feature {
    padding: 0.6rem 0.75rem;
  }

  /* Stats bar */
  .stats-bar {
    padding: 1rem;
    margin-bottom: 0;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* Buttons */
  .btn-primary,
  .btn-outline-light {
    padding: 0.65rem 1.5rem;
    font-size: 0.92rem;
  }

  /* Cards */
  .card-body {
    padding: 1.25rem;
  }

  /* Section head */
  .section-head {
    padding: 3rem 0 2rem;
  }

  /* Section labels */
  .section-label {
    font-size: 0.72rem;
    padding: 0.35rem 0.9rem;
  }

  /* Case study project grid */
  .case-study-slider .swiper-button-prev,
  .case-study-slider .swiper-button-next {
    display: none;
  }

  /* Contact layout */
  .contact-section .card {
    margin-bottom: 1rem;
  }

  /* Footer — centered and tidy on mobile */
  footer {
    padding-top: 2.5rem;
    text-align: center;
  }

  footer .col-lg-4 {
    text-align: center;
  }

  /* Center the heading underline */
  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Center office blocks */
  .footer-office {
    justify-content: center;
    text-align: left;
    display: inline-flex;
    max-width: 320px;
  }

  /* Center links */
  .footer-links {
    text-align: center;
  }

  /* Footer bottom - center everything */
  .footer-bottom .d-flex {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  /* Scroll-to-top lower on mobile */
  .scroll-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }

  /* Project detail gallery: 2 columns on mobile */
  .col-sm-6 {
    width: 50%;
  }
}

/* -------------------------------------------------------
   SMALL PHONES (max 575px)
------------------------------------------------------- */
@media (max-width: 575.98px) {

  /* Hero */
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  /* Stats */
  .stat-number {
    font-size: 1.5rem;
  }

  /* Case study cards: 1 column */
  .case-study-slider {
    padding-bottom: 2.5rem;
  }

  /* hero bg video — disable autoplay effects on small phones */
  .hero-bg-media {
    object-position: center top;
  }

  /* Section spacing */
  section {
    padding: 2.5rem 0;
  }

  /* Popup modal on small screens: full-width */
  .modal-dialog:not(.modal-fullscreen) {
    margin: 0.5rem;
  }

  .modal-content {
    border-radius: var(--radius-md);
  }

  /* Better tap targets */
  .nav-link {
    padding: 0.6rem 1rem !important;
    font-size: 1rem;
  }

  /* Project grid - stack to 1 column */
  .col-md-6.col-lg-4 {
    width: 100%;
  }

  /* Admin sidebar hidden on mobile */
  .admin-sidebar {
    display: none;
  }
}

/* -------------------------------------------------------
   iOS / Android specific fixes
------------------------------------------------------- */
/* Prevent text size inflation on landscape rotation */
html {
  -webkit-text-size-adjust: 100%;
}

/* Prevent background-attachment: fixed from breaking on iOS */
.hero-bg-media {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Smooth scrolling on mobile */
body {
  -webkit-overflow-scrolling: touch;
}
