/* Mobile Responsive Fixes for Dr. D K Das Website */

/* Base Mobile Styles (Tablets & Phones <= 767px) */
@media only screen and (max-width: 767px) {
    /* Global Overflow & Container Fixes */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .col-xs-12,
    .col-sm-6,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-lg-4,
    .col-lg-6 {
        width: 100% !important;
        margin-bottom: 20px;
    }

    section {
        padding: 30px 0 !important;
    }

    .section-title h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    img {
        max-width: 100%;
        height: auto !important;
    }

    .img-fullwidth {
        width: 100% !important;
        height: auto !important;
    }

    /* 1. Header & Top Bar */
    .header-top {
        padding: 5px 0 !important;
        height: auto !important;
    }

    .header-top .mobile-header {
        height: auto !important;
        padding: 2px 10px !important;
    }

    .header-top [class*="col-"],
    .header-top .col-md-2,
    .header-top .col-md-6,
    .header-top .col-md-4 {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 2px !important;
        padding-bottom: 2px !important;
    }

    .header-top .pull-right,
    .header-top .pull-left {
        float: none !important;
    }

    .header-top ul.list-inline {
        padding: 0;
        margin: 0;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px 10px !important;
    }

    .header-top ul.list-inline li {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.4 !important;
        white-space: nowrap !important;
    }

    .header-top .social-icons {
        display: none !important;
    }

    .header-top .phone,
    .header-top .time,
    .header-top .mail {
        display: inline-flex !important;
        align-items: center !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* Navigation Menu: Logo Left, 3-Dash Hamburger Right */
    .header-nav .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #menuzord-right,
    .menuzord {
        position: relative;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 8px !important;
        min-height: 52px !important;
        width: 100% !important;
        float: none !important;
    }

    #menuzord-right .menuzord-brand,
    #menuzord-right > a:not(.mobile-logo-link):not(.showhide) {
        display: none !important;
    }

    #menuzord-right > a.mobile-logo-link {
        order: 1 !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    #midmoblogo,
    .logo-mobile {
        display: block !important;
        width: auto !important;
        max-width: 170px !important;
        max-height: 38px !important;
        height: auto !important;
        margin: 0 !important;
    }

    .side-push-panel.has-side-panel .menuzord .showhide,
    .menuzord .showhide {
        order: 2 !important;
        float: none !important;
        margin: 0 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        padding: 8px 4px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-end !important;
        gap: 4px !important;
    }

    .menuzord .showhide em {
        float: none !important;
        display: block !important;
        width: 22px !important;
        height: 2.5px !important;
        margin: 0 !important;
        background: #333 !important;
    }

    .menuzord-responsive .menuzord-menu {
        display: none;
        order: 3 !important;
        flex-basis: 100% !important;
        position: static !important;
        width: 100% !important;
        float: none !important;
        margin-top: 6px !important;
    }

    .menuzord-responsive .menuzord-menu.menuzord-menu-show {
        display: block;
    }

    .menuzord-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .menuzord-menu li a {
        padding: 10px 12px !important;
        font-size: 14px;
    }

    /* Logo Fixes for Mobile */
    #leftlogo,
    #rightlogo:not(.logo-mobile),
    #middlelogo,
    .rightlogo1 {
        display: none !important;
    }

    /* Google Translate & Blinker (Compact & Centered) */
    #google_translate_element {
        text-align: center !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .goog-te-gadget {
        font-size: 0 !important;
        line-height: 1 !important;
        color: transparent !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Hide the "Google Translate" branding text completely */
    .goog-te-gadget > span,
    .goog-logo-link,
    .goog-te-gadget img,
    .goog-te-gadget a {
        display: none !important;
    }

    .goog-te-gadget .goog-te-combo,
    .goog-te-combo {
        position: static !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        width: 130px !important;
        max-width: 130px !important;
        margin: 0 !important;
        padding: 3px 6px !important;
        font-size: 11px !important;
        display: inline-block !important;
        color: #333 !important;
        background-color: #f7ddd7 !important;
    }

    .translate1,
    .blinker {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Translate + Appointment row: side by side, centered */
    .header-top .col-md-4 ul.list-inline {
        justify-content: center !important;
        gap: 8px !important;
    }

    .header-top .col-md-4 ul.list-inline li {
        display: inline-flex !important;
        align-items: center !important;
    }

    .blink,
    .blink.blinker {
        animation: none !important;
        opacity: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .blink.blinker a {
        display: inline-block;
        padding: 3px 10px;
        font-size: 11px !important;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        color: #fff !important;
        white-space: nowrap !important;
    }

    /* 2. Hero Slider (#home) */
    #home {
        padding: 0 !important;
    }

    .rev_slider_wrapper,
    .rev_slider {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 220px !important;
        overflow: hidden !important;
    }

    .rev_slider .slotholder {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    .rev_slider .slotholder > img.rev-slidebg {
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .rev_slider .tp-bgimg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-size: cover !important;
        background-position: center center !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .tp-caption {
        font-size: 11px !important;
        line-height: 1.35 !important;
        padding: 5px 10px !important;
        white-space: normal !important;
    }

    .tp-caption.mobileimg,
    .tp-caption.mobileimglayer1 {
        font-size: 12px !important;
        padding: 6px 10px !important;
        border-radius: 16px !important;
    }

    .tp-leftarrow,
    .tp-rightarrow {
        display: none !important;
    }

    /* 3. Welcome & Opening Hours */
    .mobile-view .border-10px {
        padding: 20px !important;
        margin-top: 10px !important;
    }

    .opening-hourse ul li {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px;
    }

    .drdkdas img {
        max-width: 260px !important;
        width: 100% !important;
        height: auto !important;
        margin: 15px auto 0 !important;
        display: block !important;
    }

    /* 4. Our Services */
    .service-icon-box {
        display: flex !important;
        align-items: flex-start !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }

    .service-icon-box a.pull-left {
        float: none !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        width: 48px !important;
        text-align: center !important;
    }

    .service-icon-box > div {
        flex: 1 !important;
        min-width: 0 !important;
    }

    /* 5. Our Specialities (Tabs & Video) */
    .services-tab .nav-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        border-bottom: none !important;
    }

    .services-tab .nav-tabs > li {
        width: 50% !important;
        float: none !important;
        margin-bottom: 6px !important;
    }

    .services-tab .nav-tabs > li > a {
        padding: 10px 8px !important;
        font-size: 12px !important;
        text-align: center !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .services-tab .nav-tabs > li > a span {
        line-height: 1.3 !important;
    }

    .services-tab .tab-content .thumb {
        padding: 15px 0 0 !important;
    }

    .services-tab .tab-content iframe {
        width: 100% !important;
        height: 220px !important;
    }

    /* 6. Testimonials */
    .layer-overlay.p-60 {
        padding: 30px 15px !important;
    }

    .testimonial {
        margin-bottom: 25px !important;
    }

    .testimonial .comment p {
        height: auto !important;
        font-size: 13px !important;
    }

    .img-circle {
        height: 60px !important;
        width: 60px !important;
    }

    /* 7. Hospital Gallery (Override Isotope absolute positioning) */
    .gallery-isotope {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        height: auto !important;
    }

    .gallery-isotope .gallery-item {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .gallery-isotope .gallery-item .thumb img {
        width: 100% !important;
        height: 140px !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* 8. Video Box & Map */
    .video-box .video-card {
        height: 250px !important;
    }

    .video-box .video-thumb a.popup-youtube {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    #map {
        height: 280px !important;
    }

    .pb-110 {
        padding-bottom: 30px !important;
    }

    /* Buttons & Forms */
    .btn {
        padding: 10px 18px;
        font-size: 14px;
        width: auto;
        display: inline-block;
    }

    .mob-btn {
        font-size: 12px !important;
        padding: 8px 15px !important;
    }

    .form-control {
        font-size: 14px;
        padding: 10px;
    }

    .modal-dialog {
        margin: 10px;
        width: auto;
    }

    #appointment_form .col-sm-12,
    #appointment_form .col-lg-6 {
        width: 100% !important;
    }

    /* Tables */
    table {
        font-size: 12px;
    }

    table td,
    table th {
        padding: 5px !important;
    }

    /* 9. Footer */
    .footer {
        text-align: center !important;
    }

    .footer-box-wrapper.equal-height {
        display: block !important;
        height: auto !important;
    }

    .footer-box-one,
    .footer-box-two,
    .footer-box-three {
        padding: 15px !important;
        width: 100% !important;
        height: auto !important;
    }

    .footer .media-left.pull-left {
        float: none !important;
        display: block !important;
        margin: 0 auto 10px !important;
    }

    .footer .widget.pt-120 {
        padding-top: 25px !important;
        padding-bottom: 15px !important;
    }

    .footer .footer-widget.pt-70 {
        padding: 20px 15px !important;
    }

    .footer .col-md-3,
    .footer .col-md-4,
    .footer .col-md-6 {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
}

/* Extra Small Devices (Portrait Phones <= 480px) */
@media only screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 20px !important;
    }

    h3 {
        font-size: 18px !important;
    }

    h4 {
        font-size: 16px !important;
    }

    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    section {
        padding: 20px 0 !important;
    }

    .menuzord-brand img,
    .logo-mobile {
        max-width: 160px !important;
    }

    .tp-caption {
        font-size: 11px !important;
        padding: 5px 8px !important;
    }

    /* Single-column Specialities tabs & Gallery on small phones */
    .services-tab .nav-tabs > li {
        width: 100% !important;
    }

    .gallery-isotope {
        grid-template-columns: 1fr !important;
    }

    .gallery-isotope .gallery-item .thumb img {
        height: 200px !important;
    }

    .video-box .video-card {
        height: 200px !important;
    }

    .btn {
        font-size: 13px;
        padding: 8px 15px;
    }
}
