/* ============================================
   KHUSHI WEALTH — MOBILE & TABLET RESPONSIVE
   Target: < 992px (tablet), < 768px (mobile)
   Rule: Do NOT touch desktop (992px+)
   ============================================ */

/* ============================================
   1. GLOBAL — HERO SECTION PADDING
   ============================================ */

/* Tablet */
@media (max-width: 991.98px) {
  .hero-section-padding {
    padding-top: 110px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .hero-section-padding {
    padding-top: 100px;
  }
}

/* ============================================
   2. INDEX PAGE — HERO
   ============================================ */

/* Mobile: center the hero content */
@media (max-width: 767.98px) {
  .hero-section {
    text-align: center;
    padding-bottom: 30px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-left: auto;
    margin-right: auto;
  }

  /* Scale down the banner image */
  .hero-banner-wrap .carousel-item img {
    width: 100% !important;
  }
}

/* ============================================
   3. INDEX PAGE — ABOUT STATS CARDS
   ============================================ */

@media (max-width: 575.98px) {

  /* Stack stats in a single row of 3 even on tiny screens */
  .about-content {
    text-align: center;
  }
}

/* ============================================
   4. INDEX PAGE — OUR SERVICES BOX
   ============================================ */

/* Tablet: reduce padding */
@media (max-width: 991.98px) {
  .services-box {
    padding: 2rem 1.5rem !important;
  }

  /* Carousel: show 1 card at a time on tablet */
  .services-section .carousel-item .col-md-4 {
    max-width: 80%;
    margin: 0 auto;
  }
}

/* Mobile: further reduce */
@media (max-width: 767.98px) {
  .services-box {
    padding: 1.5rem 1rem !important;
  }

  /* Services carousel: full width per card */
  .services-section .carousel-item .row {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
  }

  .services-section .carousel-item .col-md-4 {
    width: 90%;
    max-width: 90%;
  }

  /* Move carousel controls to be visible */
  .carousel-control-prev,
  .carousel-control-next {
    display: flex;
  }
}

/* ============================================
   5. INDEX PAGE — WHAT WE SOLVE (CIRCLE)
   Already handled in style.css, just cleanup
   ============================================ */

@media (max-width: 767.98px) {
  .solve-section {
    padding: 50px 0 20px;
  }

  .solve-circle-wrapper {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 0 10px;
  }

  .solve-item {
    position: static !important;
    transform: none !important;
    width: 46%;
  }

  .solve-content {
    flex-direction: column !important;
    text-align: center !important;
  }

  .solve-text {
    max-width: 100%;
    text-align: center;
  }

  .solve-arc {
    display: none;
  }

  .solve-center {
    position: static;
    transform: none;
    width: 100%;
    text-align: center;
    margin-top: 16px;
  }

  .item-2 .solve-content,
  .item-3 .solve-content,
  .item-4 .solve-content,
  .item-5 .solve-content {
    flex-direction: column !important;
    text-align: center !important;
  }
}

/* ============================================
   6. HOW IT WORKS
   ============================================ */

@media (max-width: 767.98px) {
  .how-section img.w-100 {
    max-height: 240px;
    object-fit: contain;
  }
}

/* ============================================
   7. FOOTER
   ============================================ */

/* Tablet: footer link columns → 2 per row */
@media (max-width: 991.98px) {
  .footer-section .col-md-2 {
    flex: 0 0 auto;
    width: 25%;
  }

  /* Compliance column full width on tablet */
  .footer-section .col-md-2:last-child {
    width: 100%;
    margin-top: 1rem;
  }
}

/* Mobile: footer link columns → 2 per row */
@media (max-width: 767.98px) {
  .footer-section .col-md-2 {
    flex: 0 0 auto;
    width: 50%;
    margin-bottom: 1.5rem;
  }

  .footer-section .col-md-2:last-child {
    width: 100%;
  }

  /* Footer top bar: stack vertically */
  .footer-top.d-flex {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }

  /* Footer description row: stack */
  .footer-section .row.align-items-center.mb-5 {
    flex-direction: column;
  }

  .footer-desc {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }

  /* Footer bottom bar: stack on mobile */
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-bottom .d-flex.gap-4 {
    flex-direction: column;
    gap: 6px !important;
    align-items: center;
  }

  /* App buttons: center on mobile */
  .col-lg-6.text-lg-end {
    text-align: center !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  /* Regulatory info: stack columns */
  .footer-disclaimer .row {
    flex-direction: column;
  }

  .footer-disclaimer .col-lg-7,
  .footer-disclaimer .col-lg-5 {
    width: 100%;
  }
}

/* ============================================
   8. SERVICE PAGES — HERO
   ============================================ */

/* Tablet: text + image side-by-side still fine via Bootstrap
   Just fix image overflow */
@media (max-width: 991.98px) {
  .hero-media img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
  }
}

/* Mobile: stack image below text */
@media (max-width: 767.98px) {

  /* Service hero images smaller on mobile */
  .hero-media img {
    max-height: 220px;
    object-fit: contain;
  }
}

/* ============================================
   9. POLICY/CONTENT PAGES
   ============================================ */

@media (max-width: 767.98px) {
  .policy-section {
    padding-bottom: 30px;
  }

  /* Tables: allow horizontal scroll */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   10. SIP CALCULATOR
   ============================================ */

@media (max-width: 767.98px) {
  .final-result h2 {
    font-size: 1.6rem;
  }

  .result-item h4 {
    font-size: 1.2rem;
  }
}

/* ============================================
   11. NAVBAR SCROLLED STATE ON MOBILE
   Already mostly handled in navbar.css
   ============================================ */

/* Ensure hamburger menu is visible and bg shows on mobile */
@media (max-width: 991.98px) {
  .navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
  }
}

/* ============================================
   12. GENERAL UTILITY FIXES
   ============================================ */

@media (max-width: 767.98px) {

  /* Reduce section padding a bit more on small screens */
  .section-padding {
    padding: 40px 0;
  }

  /* Prevent horizontal scroll globally */
  body {
    overflow-x: hidden;
  }

  /* Fix container overflow */
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Images in cards stay contained */
  .card img {
    max-width: 100%;
  }

  /* Full-width buttons on small screens */
  .btn+.btn {
    margin-top: 0;
  }
}