/* =========================================
   Mobile SEO Fixes - Perfect & Shine
   Addresses Yell.com Mobile Friendly score
   ========================================= */

/* All mobile fixes are scoped to media queries to avoid breaking desktop */

/* ---- TABLET (max-width: 768px) ---- */
@media (max-width: 768px) {
    /* Mobile overflow prevention */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

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

    /* Reduce heading sizes for tablets */
    h1, .entry-content h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    h2, .entry-content h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    h3, .entry-content h3 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    h4, .entry-content h4 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }

    /* UAGB info box titles */
    .uagb-ifb-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
    }

    .uagb-ifb-desc {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Container padding fixes */
    .uagb-is-root-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .uagb-container-inner-blocks-wrap {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* CTA buttons should not overflow */
    .uagb-buttons-repeater,
    .wp-block-button__link,
    .ast-custom-button {
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        text-align: center !important;
    }

    /* Flex containers should wrap */
    .uagb-buttons__wrap {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    /* Image alignment fix */
    .wp-block-uagb-image--align-left,
    .wp-block-uagb-image--align-right {
        float: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }

    .wp-block-uagb-image .wp-block-uagb-image__figure {
        text-align: center !important;
    }

    /* Grid layouts should stack */
    .wp-block-columns {
        flex-direction: column !important;
    }

    .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    /* Trust banner adjustments */
    .trust-banner-container {
        padding: 0 15px !important;
    }

    .certification-badges {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .cert-badge {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Footer padding */
    .site-below-footer-wrap {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* ---- MOBILE PHONE (max-width: 480px) ---- */
@media (max-width: 480px) {
    h1, .entry-content h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }

    h2, .entry-content h2 {
        font-size: 1.4rem !important;
    }

    h3, .entry-content h3 {
        font-size: 1.25rem !important;
    }

    h4, .entry-content h4 {
        font-size: 1.1rem !important;
    }

    .uagb-ifb-title {
        font-size: 1.4rem !important;
    }

    .uagb-ifb-desc {
        font-size: 0.95rem !important;
    }

    /* Icon list items should wrap text properly */
    .uagb-icon-list__label {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .uagb-icon-list__wrap {
        padding-left: 0 !important;
    }

    /* Compact padding on small screens */
    .uagb-is-root-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .uagb-container-inner-blocks-wrap {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* Button sizing for small screens */
    .uagb-buttons-repeater,
    .wp-block-button__link {
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
    }

    /* WhatsApp widget positioning */
    #whatsapp-chat-widget {
        bottom: 10px !important;
        right: 10px !important;
    }

    #whatsapp-chat-widget .whatsapp-btn {
        width: 50px !important;
        height: 50px !important;
    }

    /* Scroll to top button */
    #ast-scroll-top {
        bottom: 15px !important;
        right: 15px !important;
    }
}

/* ---- SMALL MOBILE (max-width: 360px) ---- */
@media (max-width: 360px) {
    h1, .entry-content h1 {
        font-size: 1.4rem !important;
    }

    h2, .entry-content h2 {
        font-size: 1.25rem !important;
    }

    .uagb-ifb-title {
        font-size: 1.25rem !important;
    }

    /* Prevent any horizontal scroll */
    .entry-content,
    .ast-container,
    #page {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
}
