/**
 * Image Aspect Ratio Fixes
 * Ensures all images maintain their natural aspect ratios
 * Prevents distorted images and improves Core Web Vitals
 */

/* Small post thumbnails in sidebars and widgets */
.widget-popular-posts .small-post .small-post-image img,
.post-single-next-previous .small-post .small-post-image img {
    -o-object-fit: cover;
       object-fit: cover;
}

/* Author profile images - maintain circular shape without distortion */
.post-list .entry-meta .post-author-img img,
.post-single-title .entry-meta .post-author-img img,
.blog-home5 .post-list-hero .entry-meta .post-author-img img,
.blog-home9 .post-list-style8 .post-list-content .entry-meta .post-author-img img {
    -o-object-fit: cover;
       object-fit: cover;
}

/* Main post list images - ensure proper aspect ratio */
.post-list-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post thumbnails should maintain aspect ratio */
.post-list-style4 .post-list-image img,
.post-list-style1 .post-list-image img {
    -o-object-fit: cover;
       object-fit: cover;
}

/* Featured post images */
.blog-item img,
.post-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Logo images - maintain aspect ratio */
.logo img {
    width: auto;
    height: auto;
    max-height: 150px;
    display: block;
}

/* Ensure all images in content maintain aspect ratio */
.post-single-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Comment author avatars */
.comment-item img {
    -o-object-fit: cover;
       object-fit: cover;
}

/* Media thumbnails */
.media img {
    -o-object-fit: cover;
       object-fit: cover;
}

/* Prevent layout shift by adding aspect-ratio support where needed */
@supports (aspect-ratio: 1) {
    .post-list-style4 .post-list-image,
    .post-list-style1 .post-list-image {
        aspect-ratio: 16 / 9;
    }
    
    .widget-popular-posts .small-post .small-post-image,
    .post-single-next-previous .small-post .small-post-image {
        aspect-ratio: 1 / 1;
    }
    
    .post-author-img {
        aspect-ratio: 1 / 1;
    }
}
