/* ==========================================================================
   Ashok Healthcare — Responsive Stylesheet (assets/css/responsive.css)
   Desktop, Laptop, Tablet, Android & iPhone Breakpoints
   ========================================================================== */

@media (min-width: 1200px) {
  .main-header .navbar-collapse {
    position: static;
  }

  .dropdown:hover > .dropdown-menu,
  .dropdown:focus-within > .dropdown-menu,
  .dropdown:hover > .mega-menu,
  .dropdown:focus-within > .mega-menu {
    display: block;
  }

  .dropdown-menu.mega-menu {
    right: 0;
    left: auto;
    width: min(940px, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
  }

  .main-header .mobile-menu-toggle,
  .main-header .mobile-nav-top,
  .main-header .mobile-nav-actions,
  .main-header .mobile-nav-backdrop {
    display: none;
  }

  .main-header .navbar-collapse {
    display: flex !important;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .main-header .brand-logo-img {
    width: 168px;
    height: 48px;
  }

  .navbar-nav .nav-link {
    font-size: 0.84rem;
    padding: 0.5rem 0.55rem !important;
  }

  .btn-emergency,
  .header-wa-btn {
    padding: 0.46rem 0.7rem !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 1199.98px) {
  .main-header {
    z-index: 1100;
    backdrop-filter: none;
  }

  .main-header .navbar > .container {
    flex-wrap: nowrap;
  }

  .main-header .brand-logo-img {
    width: 176px;
    height: 50px;
  }

  .main-header .navbar-toggler.mobile-menu-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    margin-left: auto;
    padding: 0;
    border-radius: 12px;
    background: var(--bg);
    color: var(--secondary);
    font-size: 1.8rem;
  }

  .mobile-nav-backdrop {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
  }

  .main-header.nav-open .mobile-nav-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .main-header .navbar-collapse {
    position: fixed;
    z-index: 2;
    inset: 0 0 0 auto;
    display: flex;
    width: min(100vw, 440px);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    background: var(--white);
    box-shadow: -18px 0 48px rgba(18, 59, 86, 0.18);
    overflow: hidden;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
    will-change: transform;
  }

  .main-header .navbar-collapse.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .mobile-nav-top {
    display: flex;
    min-height: 76px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav-top .brand-logo-img {
    width: 168px;
    height: 48px;
  }

  .mobile-menu-close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: var(--bg);
    color: var(--secondary);
    font-size: 1.15rem;
  }

  .main-header .navbar-collapse > .navbar-nav {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0 !important;
    padding: 0.7rem 0 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .main-header .navbar-nav .nav-item {
    margin: 0 !important;
  }

  .main-header .navbar-nav .nav-link {
    padding: 0.75rem 0.9rem !important;
    font-size: 1rem;
  }

  .main-header .navbar-nav .desktop-nav-actions {
    display: none;
  }

  .main-header .mobile-nav-actions {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
  }

  .main-header .mobile-nav-actions .btn {
    min-height: 48px;
    justify-content: center;
    padding: 0.65rem 0.55rem;
    font-size: 0.86rem;
    white-space: normal;
  }

  .main-header .mega-menu,
  .main-header .dropdown-menu {
    min-width: 0;
    width: 100%;
    max-width: none;
    box-shadow: none;
    border: 1px solid var(--border);
    background: #FAFCFE;
    margin: 0.35rem 0 0.65rem;
    padding: 0.85rem;
  }

  .main-header .mega-menu {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .main-header .dropdown-menu.show {
    display: block;
  }

  .main-header .dropdown-toggle::after {
    float: right;
    margin-top: 0.58rem;
  }

  .hero-home {
    padding: 2.8rem 0 3.4rem;
  }

  .hero-visual-stage {
    margin-top: 1.5rem;
  }

  .carousel-control-prev {
    left: 6px;
  }

  .carousel-control-next {
    right: 6px;
  }

  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

@media (max-width: 767.98px) {
  img,
  video,
  iframe {
    max-width: 100%;
  }

  img,
  video {
    height: auto;
  }

  .row > * {
    min-width: 0;
  }

  .section-pad {
    padding: 3.5rem 0;
  }

  .page-hero {
    padding: 2.75rem 0;
  }

  .form-ah {
    padding: 1.4rem;
  }

  .hero-visual-stage {
    min-height: 0;
    flex-direction: column;
    align-items: center;
  }

  .hero-doctor-img {
    max-width: 290px;
  }

  .hero-floating-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
    margin-top: 0.75rem;
  }

  .hero-float-card,
  .hero-float-pill {
    position: static;
    max-width: none;
    justify-content: flex-start;
    white-space: normal;
  }

  .testi-slide {
    padding: 1.75rem 1.35rem;
  }

  .ah-card img.card-img,
  .gallery-img {
    height: 205px;
  }

  .clinical-table {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .clinical-table table {
    min-width: 600px;
  }

  .article-body,
  .info-box,
  .why-item,
  .step-card {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 575.98px) {
  .section-pad {
    padding: 3rem 0;
  }

  .hero-headline {
    font-size: clamp(1.85rem, 8.5vw, 2.15rem);
  }

  .hero-checks,
  .hero-floating-group {
    grid-template-columns: 1fr;
  }

  .hero-cta-stack,
  .btn-hero-emergency,
  .btn-hero-assess,
  .cta-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-cta-stack {
    align-items: stretch;
  }

  .btn-hero-emergency,
  .btn-hero-assess {
    min-height: 48px;
    min-width: 0;
    padding-right: 1rem;
    padding-left: 1rem;
    text-align: center;
  }

  .wa-float {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    right: 14px;
    bottom: 14px;
  }

  .back-top {
    right: 18px;
    bottom: 78px;
    width: 42px;
    height: 42px;
  }

  .main-header .navbar-collapse {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}
