/* 
 * SHEHJAR HOSPITAL - MOBILE & RESPONSIVE v3.1
 * Modern mobile UX: sticky header, native-feeling action bar, iOS fixes,
 * larger tap targets, responsive grids for every section.
 */

/* 1. GLOBAL RESET & iOS FIXES */
html,
body {
    overflow-x: hidden !important;
    width: 100% !important;
    -webkit-text-size-adjust: 100%;
}

.page-wraper {
    overflow-x: hidden !important;
}

input,
select,
textarea {
    font-size: 16px; /* kills iOS focus zoom */
}

/* Smooth, GPU-friendly taps */
a, button, .btn {
    -webkit-tap-highlight-color: rgba(13, 58, 225, 0.12);
    touch-action: manipulation;
}

/* 2. DESKTOP HEADER (992px+) */
@media (min-width: 992px) {
    .inner-bar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .logo-header {
        order: 10 !important;
        flex: 0 0 auto !important;
    }

    .header-nav-wrapper {
        order: 20 !important;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
    }

    .extra-nav {
        order: 30 !important;
        flex: 0 0 auto !important;
        display: flex !important;
    }

    .navbar-nav {
        display: flex !important;
        justify-content: center !important;
    }

    .mobile-nav-toggle,
    .w3menu-toggler,
    .navicon,
    .toggler1,
    .logo-header+button {
        display: none !important;
    }

    .site-header .nav.navbar-nav > li > a {
        font-weight: 500;
        font-size: 15px;
    }
}

/* 3. MOBILE HEADER (<=991px) */
@media (max-width: 991px) {

    .main-bar {
        width: 100% !important;
    }

    .inner-bar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 10px 15px !important;
        flex-wrap: nowrap !important;
    }

    .logo-header {
        order: 1 !important;
        flex: 0 0 auto !important;
    }

    .mobile-nav-toggle {
        order: 3 !important;
        margin-left: auto !important;
        flex: 0 0 auto !important;
    }

    .header-nav-wrapper {
        order: 2 !important;
        width: 0 !important;
        height: 0 !important;
        flex: 0 0 0px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        position: static !important;
    }

    .extra-nav,
    .header-nav-wrapper>*:not(.header-nav) {
        display: none !important;
    }

    /* Modern hamburger: rounded tap target, animated lines */
    .w3menu-toggler.navicon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        background: rgba(13, 58, 225, 0.08) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .w3menu-toggler.navicon span {
        width: 22px !important;
        height: 2px !important;
        border-radius: 2px !important;
        background: #0d3ae1 !important;
        margin: 2.5px 0 !important;
        transition: transform .25s ease, opacity .25s ease;
    }

    .w3menu-toggler.navicon[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }

    .w3menu-toggler.navicon[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .w3menu-toggler.navicon[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }
}

/* 4. MOBILE HERO (<=991px) - centered, thumb-friendly CTAs */
@media (max-width: 991px) {

    .hero-banner {
        padding-top: 96px !important; /* clear the fixed header */
        text-align: center !important;
    }

    .hero-banner,
    .hero-content,
    .hero-banner .container,
    .hero-banner .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .hero-banner h1,
    .hero-banner .title,
    .hero-banner .content-bx,
    .hero-banner p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 92% !important;
        max-width: 92% !important;
    }

    .hero-banner h1.title {
        font-size: clamp(1.65rem, 6.4vw, 2.4rem) !important;
        line-height: 1.25 !important;
        letter-spacing: -0.02em;
    }

    .hero-banner .hero-subtitle {
        font-size: 15.5px !important;
        line-height: 1.65 !important;
        color: #45506b !important;
        background: transparent;
        border: 0;
        padding: 0;
    }

    .hero-content .d-flex {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .hero-banner a.btn-primary,
    .hero-banner .btn-lg {
        margin: 10px auto !important;
        width: fit-content !important;
        min-width: 260px !important;
        min-height: 54px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 17px !important;
    }

    .emergency-contact {
        margin: 10px auto !important;
        width: fit-content !important;
        min-width: 260px !important;
    }

    .emergency-contact .d-flex {
        justify-content: center !important;
    }

    .banner-shape4,
    .banner-shape5,
    .banner-shape6,
    .shape1,
    .shape2,
    .shape3 {
        display: none !important;
    }

    .vertical-info {
        display: none !important;
    }
}

/* 4b. HERO BADGES + THUMBNAIL POLISH (all sizes) */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 10px;
}

.trust-badges .tbadge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e3e8f4;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    color: #22305e;
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1;
    white-space: nowrap;
}

.trust-badges .tbadge i {
    color: #0d3ae1;
    font-size: 14px;
}

/* Hero video pill button (replaces theme demo ring) */
.hero-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #ffffff;
    color: #0d3ae1 !important;
    box-shadow: 0 14px 34px rgba(13, 58, 225, 0.28);
    position: relative;
    text-decoration: none;
}

.hero-video-btn i {
    font-size: 20px;
    margin-left: 3px;
}

.hero-video-btn::before {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 2px solid rgba(13, 58, 225, 0.35);
    animation: hero-pulse-ring 2.2s ease-out infinite;
}

@keyframes hero-pulse-ring {
    0% {
        transform: scale(0.85);
        opacity: 1;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.hero-video-btn:hover {
    transform: scale(1.06);
}

.hero-video-label {
    display: block;
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #22305e;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 5px 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

@media (max-width: 991px) {
    .hero-thumbnail .thumbnail {
        width: 100% !important;
        max-width: 420px !important;
        height: auto !important;
        border-radius: 24px !important;
        box-shadow: 0 25px 60px rgba(13, 58, 225, 0.16) !important;
    }

    .hero-banner .item5 {
        right: 10px !important;
        bottom: 24px !important;
        text-align: center;
    }
}

/* 5. RESPONSIVE SECTIONS (<=991px) */
@media (max-width: 991px) {

    .content-inner,
    .content-inner-1,
    .content-inner-2 {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }

    .section-head .title {
        font-size: clamp(1.4rem, 5.5vw, 2rem) !important;
        line-height: 1.25 !important;
    }

    .content-media .dz-media img {
        width: 100%;
        height: auto;
    }

    .info-widget.style-12 {
        width: 100%;
    }

    .dz-box .dz-media img,
    .video-container {
        height: 210px !important;
    }

    .dz-team.premium-hover {
        margin-bottom: 25px;
    }

    .accordion-button {
        min-height: 52px;
        font-size: 15.5px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .form-wrapper .form-body {
        padding: 22px 18px !important;
    }

    .form-control {
        min-height: 48px;
    }

    textarea.form-control {
        min-height: 110px;
    }

    .map-wrapper iframe {
        width: 100% !important;
        height: 300px !important;
    }

    .map-wrapper .content-bx.position-absolute {
        position: static !important;
        margin: -50px 12px 0 !important;
    }

    .footer-top .widget {
        margin-bottom: 28px;
    }

    .dz-card.style-3 {
        flex-direction: column !important;
    }

    .dz-card.style-3 .dz-media {
        width: 100% !important;
        height: 190px;
    }
}

/* 6. SMALL PHONES (<=575px) */
@media (max-width: 575px) {

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .btn {
        font-size: 15px;
    }

    .glass-premium-sidebar {
        width: 100% !important;
    }

    .site-filters ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start !important;
        padding-bottom: 6px;
    }
}

/* 7. MOBILE ACTION BAR (Call / WhatsApp / Directions / Appointment) */
.mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1090;
    background: #ffffff;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.14);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-action-bar .mab-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.mobile-action-bar a.mab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    font-size: 11px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    border-right: 1px solid #f1f3f9;
    transition: background .2s ease;
}

.mobile-action-bar a.mab-item:active {
    background: #f5f7ff;
}

.mobile-action-bar a.mab-item:last-child {
    border-right: 0;
}

.mobile-action-bar a.mab-item i {
    font-size: 17px;
    line-height: 1;
}

.mobile-action-bar .mab-call {
    color: #0d3ae1 !important;
}

.mobile-action-bar .mab-whatsapp {
    color: #128c4a !important;
}

.mobile-action-bar .mab-directions {
    color: #b45309 !important;
}

.mobile-action-bar .mab-appointment {
    background: linear-gradient(135deg, #0d3ae1 0%, #002bbd 100%);
    color: #fff !important;
}

@media (max-width: 767px) {
    body.has-mab {
        padding-bottom: 58px; /* keep footer links above the bar */
    }

    .scroltop {
        bottom: 72px !important; /* don't collide with action bar */
    }
}

@media (min-width: 768px) {
    .mobile-action-bar {
        display: none !important;
    }
}

/* 8. STICKY HEADER SHADOW WHEN SCROLLED */
.is-fixed .main-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1040 !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.mobile-nav-toggle,
.w3menu-toggler {
    z-index: 1050 !important;
}

/* 9. PREMIUM ACCENTS (kept from v2) */
@keyframes pulse-blue {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(13, 58, 225, 0.55);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(13, 58, 225, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(13, 58, 225, 0);
    }
}

.emergency-pulse {
    animation: pulse-blue 2.4s infinite !important;
    background: linear-gradient(135deg, #0d3ae1 0%, #002bbd 100%) !important;
}

.premium-icon-bx {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.premium-icon-bx i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 10. SIDEBAR (OFFCANVAS) */
.glass-premium-sidebar {
    width: 400px !important;
    max-width: 100% !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15) !important;
}

.sidebar-top-header {
    background: linear-gradient(135deg, #0d3ae1 0%, #002bbd 100%) !important;
    padding: 30px 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 120px !important;
}

.sidebar-logo img {
    max-width: 160px !important;
    height: auto !important;
    filter: brightness(0) invert(1) !important;
}

.offcanvas-body {
    padding: 40px 30px !important;
}

.sidebar-social-icons {
    display: flex !important;
    gap: 12px !important;
    margin-top: 20px !important;
}

.social-btn {
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.social-btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.face-btn { background: #3b5998 !important; }
.insta-btn { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important; }
.x-btn { background: #000 !important; }
.link-btn { background: #0077b5 !important; }
.tube-btn { background: #ff0000 !important; }

/* 11. FOOTER */
.premium-footer {
    background: linear-gradient(135deg, #021a3a 0%, #002bbd 100%) !important;
    position: relative !important;
}

.premium-footer-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    padding-bottom: 12px !important;
    position: relative !important;
}

.premium-footer-title::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 30px !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 2px !important;
}

.premium-footer .list-hover1 li a {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s ease !important;
    display: inline-block;
    padding: 3px 0;
}

.premium-footer .list-hover1 li a:hover {
    color: #ffffff !important;
    transform: translateX(6px) !important;
}

.premium-glass-widget {
    background: rgba(255, 255, 255, 0.05) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    height: 100% !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.premium-glass-widget:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-5px) !important;
}

/* 12. ACCESSIBILITY & CONTRAST FIXES (Lighthouse) */
.type-badge {
    font-weight: 600 !important;
}

.type-badge.video {
    background-color: #fbe3e6 !important;
    color: #a4262c !important;
}

.type-badge.image {
    background-color: #dfeaff !important;
    color: #0a4bb3 !important;
}

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(13, 58, 225, 0.45);
    outline-offset: 2px;
}

/* 13. REDUCED MOTION - respect user preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .wow {
        visibility: visible !important;
        animation-name: none !important;
        opacity: 1 !important;
    }
}

/* 14. "DISCOVER OUR SERVICES" CARD - stacked, readable on mobile */
@media (max-width: 575px) {
    .info-widget.style-12 {
        display: block;
    }
    .info-widget.style-12 .avatar-group {
        display: block;
    }
    .info-widget.style-12 .avatar-group h3 {
        margin: 0 0 6px;
        font-size: 1.1rem;
    }
    .info-widget.style-12 .avatar-group p {
        margin: 0 0 14px;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    .info-widget.style-12 .btn.btn-xl {
        width: 100%;
    }
}

/* 15. WORD-ROTATE RING — properly sized on mobile */
.word-rotate-box {
    width: 120px;
    height: 120px;
}
@media (max-width: 991px) {
    .content-wrapper.style-13 .item3 {
        top: auto;
        bottom: 24px;
        left: auto;
        right: 12px;
    }
    .content-wrapper.style-17 .item2 {
        margin-top: 1.5rem;
    }
}
