/* Prevent horizontal scroll globally on these templates */
html, body {
    overflow-x: hidden;
}

/* Ensure all images scale correctly within their containers */
.elementor-page-4280 img, 
.elementor-page-4211 img,
.blog img,
.single-post img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

/* -------------------------------------- */
/* TABLET OPTIMIZATION (max-width: 1024px)*/
/* -------------------------------------- */
@media (max-width: 1024px) {
    /* Ensure containers don't touch the edge of the screen */
    .elementor-page-4280 .e-con,
    .elementor-page-4211 .e-con {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
    }
    
    /* Slightly reduce main headings for tablet */
    .elementor-page-4280 h1, .elementor-page-4211 h1 { 
        font-size: 2.5rem !important; 
    }
}

/* -------------------------------------- */
/* MOBILE OPTIMIZATION (max-width: 767px) */
/* -------------------------------------- */
@media (max-width: 767px) {
    /* Force column stacking for flex containers */
    .elementor-page-4280 .e-con,
    .elementor-page-4211 .e-con,
    .single-post .e-con {
        flex-direction: column !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Standardize Headings for mobile readability */
    .elementor-page-4280 h1, .elementor-page-4211 h1, .single-post h1 { 
        font-size: 2rem !important; 
        line-height: 1.2 !important; 
        margin-bottom: 15px !important;
    }
    .elementor-page-4280 h2, .elementor-page-4211 h2, .single-post h2 { 
        font-size: 1.75rem !important; 
        line-height: 1.3 !important; 
    }
    .elementor-page-4280 h3, .elementor-page-4211 h3, .single-post h3 { 
        font-size: 1.5rem !important; 
        line-height: 1.4 !important; 
    }

    /* Fix Post Content width to prevent breaking the viewport */
    .elementor-widget-theme-post-content {
        width: 100% !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* Paragraph readability on small screens */
    .elementor-page-4280 p, .elementor-page-4211 p, .single-post p {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    /* Full-width tap-friendly buttons on mobile */
    .elementor-page-4280 .elementor-button, 
    .elementor-page-4211 .elementor-button {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 15px;
    }
    
    /* Ensure featured images do not overflow */
    .elementor-widget-theme-post-featured-image img {
        width: 100% !important;
    }
}
