/**
 * Mobile Responsive Fixes
 * Fixes horizontal scroll and overflow issues on mobile devices
 */

/* Global overflow fix */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Main wrapper overflow fix */
.page-wrapper {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix for shape elements causing overflow */
@media only screen and (max-width: 991px) {
    /* Hide decorative shapes on mobile that cause overflow */
    .slider-two__shape-1,
    .slider-two__shape-2,
    .slider-two__shape-3,
    .slider-two__shape-4,
    .slider-two__shape-5,
    .about-two__shape-1,
    .about-two__shape-2,
    .about-two__shape-3,
    .services-two__shape-1,
    .services-two__shape-2,
    .why-choose-one__shape-1,
    .why-choose-one__shape-2,
    .faq-two__shape-1,
    .faq-two__shape-2,
    .services-details__shape-1,
    .services-details__shape-2,
    .newsletter-two__shape-1,
    .newsletter-two__shape-2,
    .contact-one__left-shape-1,
    .contact-one__left-shape-2 {
        display: none !important;
    }
    
    /* Fix sliding text marquee overflow */
    .sliding-text-one,
    .sliding-text-two {
        overflow: hidden;
        max-width: 100vw;
    }
    
    .sliding-text-one__wrap,
    .sliding-text-two__wrap {
        overflow: hidden;
    }
    
    /* Fix slider overflow */
    .slider-two {
        overflow: hidden;
    }
    
    .slider-two__single {
        overflow: hidden;
    }
    
    /* Fix any absolute positioned elements */
    [class*="__shape"],
    [class*="-shape"] {
        max-width: 100%;
        overflow: hidden;
    }
}

@media only screen and (max-width: 767px) {
    /* Additional mobile fixes */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }
    
    /* Fix counter elements */
    .counter-one__single,
    .counter-two__single {
        overflow: hidden;
    }
    
    /* Fix service cards */
    .services-two__single {
        overflow: hidden;
    }
    
    /* Fix testimonial slider */
    .testimonial-two {
        overflow: hidden;
    }
    
    /* Fix blog cards */
    .blog-two__single {
        overflow: hidden;
    }
    
    /* Fix pricing cards */
    .pricing-one__single {
        overflow: hidden;
    }
    
    /* Fix portfolio items */
    .portfolio-one__single {
        overflow: hidden;
    }
    
    /* Fix event/process section */
    .event-one {
        overflow: hidden;
    }
    
    /* Fix footer overflow */
    .site-footer {
        overflow: hidden;
    }
    
    /* Fix animations causing overflow */
    .wow {
        visibility: visible !important;
    }
    
    /* Reduce animation distances on mobile */
    .slideInLeft,
    .slideInRight {
        animation-name: fadeIn !important;
    }
}

@media only screen and (max-width: 575px) {
    /* Extra small devices */
    .slider-two__title {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }
    
    .section-title__title {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    
    /* Fix button overflow */
    .thm-btn {
        white-space: normal;
        max-width: 100%;
    }
    
    /* Fix form elements */
    .contact-one__form input,
    .contact-one__form textarea,
    .contact-one__form select {
        max-width: 100%;
    }
    
    /* Fix image overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix table overflow */
    table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
}

/* Fix GSAP animation overflow */
[style*="transform"] {
    backface-visibility: hidden;
}

/* Fix for typed.js cursor */
.typed-cursor {
    display: inline;
}

/* Fix header mobile menu */
@media only screen and (max-width: 1199px) {
    .main-menu__list,
    .mobile-nav__content {
        overflow-x: hidden;
    }
    
    .stricky-header {
        overflow: hidden;
    }
}

/* Fix CTA section overflow */
.cta-one,
.cta-two {
    overflow: hidden;
}

/* Fix newsletter section */
.newsletter-two {
    overflow: hidden;
}

/* Fix brand slider */
.brand-one,
.brand-two {
    overflow: hidden;
}

/* Fix team section */
.team-one,
.team-two {
    overflow: hidden;
}

/* Fix FAQ section */
.faq-two {
    overflow: hidden;
}

/* Fix about section */
.about-two,
.about-one {
    overflow: hidden;
}

/* Fix services section */
.services-one,
.services-two {
    overflow: hidden;
}

/* Fix all sections to prevent horizontal overflow */
section {
    overflow-x: hidden;
    max-width: 100vw;
}
