/* 1. Universal wrapper for all linked images - NEW STANDARD TARGET */
.img-wrap a {
    display: inline-block;
    overflow: hidden;
    line-height: 0;
}

/* 2. All linked images get consistent zoom treatment */
.img-wrap a img {
    display: block !important;
    width: 100%;
    height: auto;
    transform: scale(1);
    transition: transform 0.3s ease !important;
}

/* 3. On hover, zoom image */
.img-wrap a:hover img {
    transform: scale(1.2);
}

/* ---------------------------------------------------- */
/* BACKWARD COMPATIBILITY / :has() FALLBACK (Keep for modern browsers) */
/* If the PHP wrapper is somehow missing, this acts as a good fallback */

/* 1. Universal wrapper for all linked images */
a:has(img) {
    display: inline-block;
    overflow: hidden;
    line-height: 0;
}

/* 2. All linked images get consistent zoom treatment */
a:has(img) img {
    display: block !important;
    width: 100%;
    height: auto;
    transform: scale(1);
    transition: transform 0.3s ease !important;
}

/* 3. On hover, zoom image */
a:has(img):hover img {
    transform: scale(1.2);
}

/* ---------------------------------------------------- */
/* THEME & CORE WP FIXES (Keep these as they still address potential theme conflicts) */

/* 4. Fix for Gutenberg block image wrappers (inside posts) */
.wp-block-image a img {
    transition: transform 0.3s ease !important;
    transform: scale(1);
}

/* 5. Optional: force consistent styling even if theme resets transitions */
.wp-block-image img,
figure.wp-block-image img,
.entry-content img {
    transition: transform 0.3s ease !important;
}