/*
 * Thumbnails CSS for Ammo Elite Theme
 * Enhanced thumbnail styling and optimization
 */

/* General Thumbnail Styling */
.thumbnail,
.wp-post-image,
.attachment-thumbnail {
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.thumbnail:hover,
.wp-post-image:hover,
.attachment-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Post Thumbnails */
.post-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

/* Gallery Thumbnails */
.gallery-item {
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Archive/Blog Thumbnails */
.archive-thumbnail,
.blog-thumbnail {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* High-quality image rendering for all thumbnails */
.thumbnail,
.wp-post-image,
.attachment-thumbnail,
.post-thumbnail img,
.gallery-item img,
.archive-thumbnail,
.blog-thumbnail {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
    -ms-interpolation-mode: bicubic;
}

/* Desktop-specific high-quality improvements */
@media (min-width: 1024px) {
    .thumbnail,
    .wp-post-image,
    .attachment-thumbnail,
    .post-thumbnail img,
    .gallery-item img {
        image-rendering: auto;
        -ms-interpolation-mode: bicubic;
        will-change: transform;
    }
    
    /* Prevent pixelation on hover transforms */
    .thumbnail:hover,
    .wp-post-image:hover,
    .post-thumbnail:hover img,
    .gallery-item:hover img {
        image-rendering: auto;
    }
}

/* High-DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .thumbnail,
    .wp-post-image,
    .attachment-thumbnail,
    .post-thumbnail img,
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
        image-rendering: auto;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .archive-thumbnail,
    .blog-thumbnail {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .archive-thumbnail,
    .blog-thumbnail {
        height: 160px;
    }
}
