/* ============================================
   MOBILE RESPONSIVE FIX FOR TANYSERVICES
   Add this CSS file AFTER all other stylesheets
   ============================================ */

/* Base Mobile Fixes */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container Fixes */
.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
}

/* Header Mobile Fixes */
@media (max-width: 991px) {
    #top-bar {
        display: none; /* Hide top bar on mobile for cleaner look */
    }
    
    .nav-wrap {
        width: 100%;
    }
    
    .logo {
        max-width: 150px;
    }
    
    .logo img {
        max-width: 100%;
        height: auto;
    }
    
    .navigation {
        width: 100%;
    }
    
    .navigation ul {
        padding: 0;
        margin: 0;
    }
}

/* Top Location Bar - Make Responsive */
@media (max-width: 767px) {
    .top_loction ul {
        display: flex;
        flex-direction: column;
        padding: 0;
    }
    
    .top_loction ul li {
        margin-bottom: 5px;
        font-size: 12px;
    }
    
    .top-social-icon {
        text-align: center;
        margin-top: 10px;
    }
}

/* Banner/Slider Mobile Fixes */
.main-banner,
.banner_up {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

#rev_slider_34_1_wrapper,
#rev_slider_34_1,
.rev_slider_wrapper,
.rev_slider {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.rev-slidebg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .main-banner,
    .banner_up {
        height: auto !important;
        min-height: 400px !important;
    }
    
    #rev_slider_34_1_wrapper,
    #rev_slider_34_1 {
        height: auto !important;
        min-height: 400px !important;
    }
    
    .tp-caption {
        width: 90% !important;
        max-width: 90% !important;
        left: 5% !important;
        padding: 15px !important;
    }
    
    .banner-text {
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .banner-text h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    .banner-text p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    
    .banner-text .sub-text {
        font-size: 11px !important;
        display: block;
        margin-bottom: 8px;
    }
    
    .banner-text .btn-text {
        font-size: 13px !important;
        padding: 10px 20px !important;
    }
}

@media (max-width: 480px) {
    .banner-text h2 {
        font-size: 18px !important;
    }
    
    .banner-text p {
        font-size: 12px !important;
    }
}

/* Section Padding Mobile Adjustments */
@media (max-width: 767px) {
    .padding {
        padding: 40px 15px !important;
    }
    
    .ptb-xs-40 {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
    
    .pb-60 {
        padding-bottom: 30px !important;
    }
    
    .mt-30,
    .mt-xs-30 {
        margin-top: 20px !important;
    }
    
    .mb-30,
    .mb-xs-30 {
        margin-bottom: 20px !important;
    }
}

/* Feature Boxes Mobile */
@media (max-width: 767px) {
    .feature-box {
        margin-bottom: 20px;
    }
    
    .clean_top {
        padding: 20px;
        text-align: center;
    }
    
    .clean_top h3 {
        font-size: 18px;
    }
    
    .clean_top p {
        font-size: 14px;
    }
}

/* Call Section Mobile */
@media (max-width: 767px) {
    .call_headding h3 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }
    
    .contact_info {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .contact_info span {
        margin: 10px 0;
    }
    
    .call-us {
        font-size: 16px !important;
        word-wrap: break-word;
    }
}

/* Services Carousel Mobile */
@media (max-width: 767px) {
    .courses_popular {
        margin-bottom: 20px;
    }
    
    .courses_detail h3 {
        font-size: 18px;
    }
    
    .courses_detail p {
        font-size: 14px;
    }
}

/* Form Section Mobile */
@media (max-width: 767px) {
    .form_home {
        padding: 30px 20px !important;
    }
    
    .form_home .col-md-6,
    .form_home .col-md-12 {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .form-field {
        margin-bottom: 15px;
    }
    
    .input-sm,
    .form-full {
        width: 100% !important;
        padding: 12px;
        font-size: 14px;
    }
    
    textarea.form-full {
        min-height: 120px;
    }
    
    .margin_top {
        margin-top: 40px !important;
    }
}

/* Gallery Mobile */
@media (max-width: 767px) {
    .nf-item {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    .container-grid {
        display: block !important;
    }
    
    .gallery-heading h4 {
        font-size: 16px;
    }
}

/* Team Section Mobile */
@media (max-width: 767px) {
    .color_box {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .left_picher {
        width: 100% !important;
        max-width: 100%;
    }
    
    .detail_box {
        padding: 20px;
        text-align: center;
    }
    
    .detail_box h3 {
        font-size: 18px;
    }
    
    .detail_box p {
        font-size: 14px;
    }
}

/* Testimonials Mobile */
@media (max-width: 767px) {
    .item_testimonial {
        padding: 20px;
    }
    
    .patient_head {
        flex-direction: column;
        text-align: center;
    }
    
    .patient_img {
        margin: 0 auto 15px;
    }
    
    .patient_detail h3 {
        font-size: 18px;
    }
    
    .patient_text p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Footer Contact Info Section - Top Bar Mobile */
.top_footer_info__block {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

@media (max-width: 991px) {
    .top_footer_info__block .row {
        margin: 0 !important;
    }
    
    .top_footer_info__block [class*="col-"] {
        padding: 10px 15px !important;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .single_info__block {
        margin-bottom: 15px;
        text-align: center;
        padding: 15px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .single_info__block i {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .single_info__block h4 {
        font-size: 14px !important;
        margin: 0 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .single_info__block h4 a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .single_info__block span {
        font-size: 11px !important;
        display: block;
        margin-top: 5px;
    }
}

@media (max-width: 767px) {
    .top_footer_info__block {
        padding: 20px 10px !important;
    }
    
    .single_info__block {
        padding: 10px 5px;
    }
}

/* Button Mobile Fixes */
@media (max-width: 767px) {
    .btn,
    .btn-text,
    .bnt {
        padding: 12px 25px !important;
        font-size: 14px !important;
        display: inline-block;
        white-space: nowrap;
    }
}

/* Text Alignment Mobile */
@media (max-width: 767px) {
    .text-md-left {
        text-align: center !important;
    }
    
    .text-right {
        text-align: center !important;
    }
}

/* Video Section Mobile */
@media (max-width: 767px) {
    .video_sec {
        min-height: 300px !important;
    }
    
    .pop_section {
        padding: 20px;
    }
}

/* Ensure no horizontal scroll */
@media (max-width: 991px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Fix offset columns on mobile */
@media (max-width: 767px) {
    [class*="offset-"] {
        margin-left: 0 !important;
    }
    
    .col-lg-8.offset-lg-2,
    .col-md-8.offset-md-2 {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* Footer Mobile */
@media (max-width: 767px) {
    .main_footer__block {
        padding: 40px 15px !important;
    }
    
    .footer_box__block {
        margin-bottom: 30px;
    }
    
    .footer_box__block h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .footer_box__block ul li {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .footer_box__block p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .copyriight_block {
        text-align: center;
    }
    
    .copyriight_block .col-sm-6 {
        text-align: center !important;
        margin-bottom: 15px;
    }
    
    .footer__block-logo img {
        max-width: 150px;
    }
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}