/*-----------------------------------------------------------------------------------
    Critical Mobile Fixes for Optimus Energy Website
    - Addresses specific mobile layout issues
    - Ensures proper touch targets
    - Fixes overflow and scrolling problems
-----------------------------------------------------------------------------------*/

/* ===== CRITICAL MOBILE LAYOUT FIXES ===== */

/* Prevent horizontal scrolling on mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure all containers don't exceed viewport width */
.container-fluid,
.container,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for hero section on mobile */
@media (max-width: 768px) {
    .tj-hero-section-two {
        min-height: auto;
        padding: 40px 0;
    }
    
    .tj-hero-section-two .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-content-two {
        padding: 20px 0;
    }
    
    .hero-content-two .sec-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
        margin-bottom: 20px;
    }
    
    .hero-content-two p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 15px;
    }
}

/* ===== FORM MOBILE FIXES ===== */

@media (max-width: 768px) {
    .form-box-two,
    .form-box-three {
        margin: 20px 0;
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .input-form {
        margin-bottom: 15px;
    }
    
    .input-form input,
    .input-form textarea {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 5px;
        box-sizing: border-box;
    }
    
    .input-form textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    .tj-primary-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
        text-align: center;
        box-sizing: border-box;
    }
}

/* ===== NAVIGATION MOBILE FIXES ===== */

@media (max-width: 991px) {
    .tj-header-area {
        position: relative;
        z-index: 999;
    }
    
    .tj-top-content-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 15px;
        position: relative;
    }
    
    .logo-area {
        order: 1;
        margin-bottom: 10px;
    }
    
    .logo-area img {
        max-height: 50px;
        width: auto;
    }
    
    .info-right-item {
        order: 2;
        margin-bottom: 10px;
    }
    
    .info-right-item .logo-area img {
        max-height: 40px;
    }
    
    .hamburger_menu {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 1000;
    }
    
    .hamburger_menu a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: #39ca6e;
        color: white;
        border-radius: 5px;
        text-decoration: none;
    }
}

/* ===== SERVICES SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-service-section-three {
        padding: 40px 0;
    }
    
    .service-item-four {
        margin-bottom: 30px;
        padding: 20px 15px;
        text-align: left;
    }
    
    .service-item-four .title {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .service-item-four .desc h6 {
        font-size: 1rem;
        margin: 15px 0 10px 0;
        color: #39ca6e;
    }
    
    .check-list ul.dot-style {
        padding-left: 0;
        list-style: none;
    }
    
    .check-list ul.dot-style li {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 8px;
        padding-left: 0;
    }
}

/* ===== ABOUT SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-about-section-three {
        padding: 40px 0;
    }
    
    .about-content-three {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .about-content-three .title {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 20px;
    }
    
    .about-content-three p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
        text-align: left;
    }
    
    .about-image-group-three {
        margin-top: 20px;
    }
    
    .about-image-group-three img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
        border-radius: 8px;
    }
}

/* ===== CHOOSE US SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-choose-us-section {
        padding: 40px 0;
    }
    
    .tj-choose-us-item-two {
        margin-bottom: 30px;
        padding: 20px 15px;
        text-align: center;
    }
    
    .choose-us-top-content {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 15px;
        gap: 15px;
    }
    
    .choose-us-icon {
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .choose-us-text span {
        font-size: 1.2rem;
        font-weight: bold;
    }
    
    .tj-choose-us-item-two .title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 15px;
        text-align: center;
    }
}

/* ===== TESTIMONIAL SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-testimonial-section-three {
        padding: 40px 0;
    }
    
    .testimonial-slider-item-two {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .testimonial-slider-item-two .title {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .testimonial-auother .avator-name span {
        font-size: 13px;
        display: block;
        margin-bottom: 5px;
    }
    
    .swiper-pagination {
        bottom: -40px;
    }
}

/* ===== PROJECT SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-project-section-two {
        padding: 40px 0;
    }
    
    .tj-project-item-two {
        margin-bottom: 10px;
    }
    
    .project-images img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 8px;
    }
}

/* ===== CONTACT SECTION MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-contact-section-two {
        padding: 40px 0;
    }
    
    .contact-left-content-two {
        margin-bottom: 30px;
    }
    
    .contact-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 25px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .contact-item .contact-icon {
        margin-bottom: 10px;
    }
    
    .contact-item .contact-text .title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .contact-item .contact-text a,
    .contact-item .contact-text .check-list li {
        font-size: 14px;
        line-height: 1.4;
    }
}

/* ===== FOOTER MOBILE FIXES ===== */

@media (max-width: 768px) {
    .tj-footer-area {
        padding: 40px 0 20px;
    }
    
    .footer-widget {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer-logo img {
        max-height: 60px;
        width: auto;
    }
    
    .footer-title .title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .footer-contact ul,
    .footer-menu ul {
        list-style: none;
        padding: 0;
    }
    
    .footer-contact ul li,
    .footer-menu ul li {
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .footer-share ul {
        display: flex;
        justify-content: center;
        gap: 15px;
        list-style: none;
        padding: 0;
    }
    
    .footer-share ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #39ca6e;
        color: white;
        border-radius: 50%;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .footer-share ul li a:hover {
        background: #2ea85c;
        transform: translateY(-2px);
    }
}

/* ===== BUTTON AND LINK MOBILE FIXES ===== */

@media (max-width: 768px) {
    /* Ensure all buttons are touch-friendly */
    .tj-primary-btn,
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* Improve link touch targets */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }
    
    /* Hero buttons specific fixes */
    .tj-hero-button {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }
    
    .tj-hero-button .tj-primary-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }
}

/* ===== SCROLL AND OVERFLOW FIXES ===== */

/* Fix for horizontal scroll issues */
* {
    box-sizing: border-box;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 576px) {
    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
    .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* ===== WHATSAPP BUTTON MOBILE OPTIMIZATION ===== */

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    
    .whatsapp-float:active {
        transform: scale(0.95);
    }
}

/* ===== LOADING AND PERFORMANCE ===== */

/* Optimize images for mobile */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
        loading: lazy;
    }
    
    /* Reduce motion for better performance on mobile */
    .hero-shape-area,
    .sec-shape-1, .sec-shape-2, .sec-shape-3, .sec-shape-4 {
        display: none;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

/* Improve focus visibility on mobile */
@media (max-width: 768px) {
    *:focus {
        outline: 3px solid #39ca6e;
        outline-offset: 2px;
    }
    
    /* Skip link for keyboard users */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: #39ca6e;
        color: white;
        padding: 8px 12px;
        text-decoration: none;
        border-radius: 0 0 4px 4px;
        z-index: 10000;
        font-size: 14px;
    }
    
    .skip-link:focus {
        top: 0;
    }
}

/* ===== PRINT STYLES FOR MOBILE ===== */

@media print {
    .whatsapp-float,
    .hamburger_menu,
    .tj-offcanvas-area,
    .hero-shape-area,
    .footer-section-shape {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    .tj-primary-btn {
        border: 1px solid black;
        background: white !important;
        color: black !important;
    }
}