/* ==================================================================
   MoveWell – responsive overrides
   Desktop-first: base styles in style.css target ≥1200px.
   ================================================================== */

/* Desktop: open dropdowns on hover as well as click ---------------- */
@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu,
    .navbar .dropdown:focus-within > .dropdown-menu {
        display: block;
        animation: dropIn .22s ease both;
    }
    .navbar .dropdown > .dropdown-menu { margin-top: 0; top: 100%; }
    .navbar-nav .nav-link { white-space: nowrap; }
    .navbar .dropdown-toggle:hover::after { transform: rotate(180deg); }
    .navbar .mega { position: static; }
    .navbar .mega > .mega-menu { left: 50%; transform: translateX(-50%); width: max-content; max-width: 720px; padding: 1rem; }
    .navbar .mega-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
    .offcanvas-lg .offcanvas-body { display: flex; }
}

/* Long clinic names: wrap the brand onto two lines until there is room */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .brand-text { max-width: 170px; }
    .brand-name { white-space: normal; font-size: 1.1rem; line-height: 1.15; }
    .brand-sub { white-space: normal; }
}

/* Narrow desktops: keep the whole nav on one row */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-nav .nav-link { padding: .5rem .4rem !important; font-size: 13.5px; }
    .navbar-nav > .nav-item > .nav-link::before { left: .4rem !important; right: .4rem !important; }
    .brand { margin-right: .25rem; gap: 8px; }
    .brand img { width: 38px; height: 38px; }
    .brand-text { max-width: 125px; }
    .brand-name { font-size: 1rem; }
    .brand-sub { display: none; }
    .btn-appointment { padding: .55rem .85rem; font-size: 13px; }
}

@keyframes dropIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* Large laptops ---------------------------------------------------- */
@media (max-width: 1199.98px) {
    /* Keep the widest gutter inside the container padding (no sideways scroll) */
    .g-5, .gx-5, .g-lg-5 { --bs-gutter-x: 2rem; }
    .navbar-nav .nav-link { padding: .5rem .6rem !important; font-size: 14px; }
    .navbar-nav > .nav-item > .nav-link::before { left: .6rem !important; right: .6rem !important; }
    .brand { margin-right: .75rem; }
    .hero h1, .hero .hero-title { font-size: 2.8rem; }
    .doctor-card { grid-template-columns: 300px 1fr; gap: 36px; }
    .scroller-item { flex-basis: calc((100% - 48px) / 3); }
    .journey { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets & mobile menu --------------------------------------------- */
@media (max-width: 991.98px) {
    :root { --mw-header-h: 72px; }

    .site-header .navbar { padding: 6px 0; }

    .offcanvas-lg { width: min(340px, 88vw) !important; }
    .offcanvas-lg .offcanvas-header { border-bottom: 1px solid var(--mw-border); }
    .offcanvas-lg .offcanvas-body { padding: 1rem 1.25rem 2rem; }
    .navbar-nav .nav-link { padding: .75rem 0 !important; font-size: 15px; border-bottom: 1px solid var(--mw-border); display: flex; justify-content: space-between; align-items: center; }
    .navbar-nav > .nav-item > .nav-link::before { display: none; }
    .navbar-nav .dropdown-menu { box-shadow: none; border: 0; border-left: 3px solid var(--mw-primary); border-radius: 0; padding: .25rem 0 .5rem .5rem; margin: 0; }
    .navbar-nav .dropdown-toggle.show::after { transform: rotate(180deg); }
    .mega-grid { grid-template-columns: 1fr; }
    .btn-appointment { width: 100%; margin-top: 1.25rem; padding: .8rem; }

    .section { padding: 70px 0; }
    .section-title { font-size: 2rem; }
    .hero-slide { min-height: 560px; }
    .hero h1, .hero .hero-title { font-size: 2.4rem; }
    .page-banner { padding: 70px 0 60px; }
    .page-banner h1 { font-size: 2.1rem; }

    .doctor-card { grid-template-columns: 1fr; padding: 30px; }
    .doctor-portrait { max-width: 320px; width: 100%; margin: 0 auto; }
    .about-visual { margin-bottom: 30px; }

    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .scroller-item { flex-basis: calc((100% - 24px) / 2); }
    .sidebar-sticky { position: static; }
    .cta-band { padding: 44px 32px; text-align: center; }
    .tour-slide { padding: 30px 60px; gap: 24px; }
}

/* Small tablets ------------------------------------------------------ */
@media (max-width: 767.98px) {
    body { font-size: 14.5px; }
    .section { padding: 60px 0; }
    .section-title { font-size: 1.75rem; }
    .section-head { margin-bottom: 2.25rem; }

    .hero-slide { min-height: 520px; }
    .hero-slide::before { background: linear-gradient(180deg, rgba(8, 24, 60, .85), rgba(8, 24, 60, .75)); }
    .hero-content { text-align: center; margin: 0 auto; padding: 60px 0 70px; }
    .hero h1, .hero .hero-title { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-badges { justify-content: center; gap: 14px 20px; }
    .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }

    .testimonial-carousel .carousel-item .col-md-6 + .col-md-6 { display: none; }
    .stat-value { font-size: 2.1rem; }
    .cta-band h2 { font-size: 1.6rem; }
    .cta-inline { flex-direction: column; align-items: flex-start; }
    .journey { grid-template-columns: 1fr; }
    .check-list.columns-2 { columns: 1; }
    .post-nav { grid-template-columns: 1fr; }
    .contact-card, .contact-info-card { padding: 28px 22px; }
    .map-frame { height: 320px; }
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .portal-card { padding: 22px 18px; }
    .portal-card-head { align-items: stretch; flex-direction: column; }
    .portal-card-head .search-box { flex: 1 1 100%; }
    .detail-list { grid-template-columns: 1fr; gap: 2px; }
    .detail-list dd { margin-bottom: 10px; }
    .search-box { min-width: 0; }

    .tour-slide { grid-template-columns: 1fr; padding: 24px 56px 32px; text-align: center; min-height: 0; }
    .tour-visual { max-width: 180px; width: 100%; margin: 0 auto; font-size: 3.5rem; }
}

/* Phones --------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .brand img { width: 38px; height: 38px; }
    .brand-name { font-size: 1.15rem; }
    .brand-sub { font-size: .6rem; letter-spacing: .08em; }

    .hero-slide { min-height: 480px; }
    .hero h1, .hero .hero-title { font-size: 1.7rem; }
    .hero-kicker { font-size: 12px; letter-spacing: .18em; }
    .hero .btn-lg { padding: .7rem 1.3rem; font-size: .95rem; }
    .page-banner h1 { font-size: 1.7rem; }

    .condition-checklist { grid-template-columns: 1fr; }
    .scroller-item { flex-basis: 85%; }
    .process-steps { grid-template-columns: 1fr 1fr; gap: 10px; }
    .doctor-card { padding: 22px; }
    .doctor-name { font-size: 1.6rem; }
    .about-experience { right: 10px; bottom: -18px; padding: 12px 16px; }
    .about-experience strong { font-size: 1.7rem; }
    .error-code { font-size: 5.5rem; }

    .modal-body { padding: 1.1rem; }
    .float-whatsapp { width: 50px; height: 50px; font-size: 1.6rem; left: 14px; bottom: 14px; }
    .back-to-top { right: 14px; bottom: 14px; }
    .timeline::before { left: 28px; }
    .timeline-year { flex-basis: 58px; height: 58px; font-size: 14px; }
}

/* Narrow desktops (repeated here so the general ≤1199px rule above can't undo it) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar-nav .nav-link { padding: .5rem .35rem !important; font-size: 13.5px; }
    .navbar-nav > .nav-item > .nav-link::before { left: .35rem !important; right: .35rem !important; }
    .btn-appointment { padding: .55rem .8rem; font-size: 13px; }
}
