/*
Theme Name: Avada Child Theme
Template: Avada
Version: 1.0
Description: Child theme for Avada - anama.co.il
*/

/* =====================================================
   Responsive CSS - anama.co.il
   Child Theme - Style Overrides
   ===================================================== */

/* ---- Global: prevent horizontal scroll ---- */
body {
    overflow-x: hidden;
}

img, video, iframe, embed {
    max-width: 100%;
    height: auto;
}

/* ---- Tablet: 801px - 1024px ---- */
@media only screen and (max-width: 1024px) and (min-width: 801px) {
    /* Inner row side padding for breathing room */
    .fusion-fullwidth .fusion-row {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Typography - gentle reduction */
    .fusion-title h2,
    .post-content h2 {
        font-size: 26px !important;
    }

    .fusion-title h3,
    .post-content h3 {
        font-size: 21px !important;
    }
}

/* ---- Mobile: up to 800px (Avada content break point) ---- */
@media only screen and (max-width: 800px) {
    /* Inner row side padding */
    .fusion-fullwidth .fusion-row {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Images inside Avada image frames */
    .fusion-imageframe img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Typography */
    .fusion-title h2,
    .post-content h2 {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }

    .fusion-title h3,
    .post-content h3 {
        font-size: 19px !important;
        line-height: 1.4 !important;
    }

    .fusion-title h4,
    .post-content h4 {
        font-size: 18px !important;
    }

    /* Body text slight reduction */
    body,
    .fusion-text p {
        font-size: 17px !important;
        line-height: 1.65 !important;
    }

    /* Buttons - allow natural width on small screens */
    .fusion-button {
        white-space: normal !important;
        min-width: 0 !important;
        width: auto !important;
    }

    /* Blog grid - single column on mobile */
    .fusion-blog-shortcode .fusion-post-grid {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Testimonials - prevent overflow */
    .fusion-testimonials .flexslider {
        max-width: 100% !important;
    }

    /* Contact form fields full width */
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 textarea {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ---- Small mobile: up to 640px ---- */
@media only screen and (max-width: 640px) {
    /* Extra side breathing room */
    .fusion-fullwidth .fusion-row {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Heading sizes for very small screens */
    .fusion-title h2,
    .post-content h2 {
        font-size: 20px !important;
    }

    .fusion-title h3,
    .post-content h3 {
        font-size: 17px !important;
    }
}

/* ---- Mobile: fix page-title parallax freeze on iOS ---- */
/* background-attachment:fixed is not supported on iOS Safari and causes
   the image to appear frozen/stuck during scroll */
@media only screen and (max-width: 800px) {
    .fusion-page-title-bar,
    .avada-page-titlebar-wrapper .fusion-page-title-bar {
        background-attachment: scroll !important;
    }

    /* Featured image slideshow - prevent overflow on narrow screens */
    .fusion-post-slideshow,
    .fusion-flexslider.fusion-post-slideshow {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .fusion-post-slideshow img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}
