/* ========================================
   CSS Image Auto Crop untuk Template
   PT Pelita Inti Mulia
   ======================================== */

/* Global Image Styling - Auto Crop */
img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

/* Banner Section Images */
.banner-video-container img,
.banner-video-background img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Expertise Section - 600x400 */
.expertise-img img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 400px;
}

.expertise-img .image-container {
    overflow: hidden;
    max-height: 400px;
}

/* Why Choose Us Image - 600x400 */
.chooseus-img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

.chooseus-img-container,
.image-container {
    overflow: hidden;
}

/* Why Choose Us Icons */
.chooseus-icon img {
    object-fit: contain !important;
    object-position: center;
}

/* Service Icons */
.service-icon img,
.service-icon-wrapper img {
    object-fit: contain !important;
    object-position: center;
}

/* Process Icons */
.process-icon {
    object-fit: contain !important;
    object-position: center;
}

/* Partner/Client Logos */
.partner-logo,
.partner-slide img {
    object-fit: contain !important;
    object-position: center;
    width: 100%;
    height: auto;
}

/* Blog Images - 600x400 */
.blog-image img,
.card-blog .blog-image img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 400px;
}

.blog-image,
.card-blog .blog-image {
    overflow: hidden;
    height: 400px;
}

/* Case Studies Images */
.case-studies-content img {
    object-fit: cover;
    object-position: center;
}

/* Testimonial Images - Avatar 400x400 */
.testimonial-image img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.avatar {
    object-fit: cover;
    object-position: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.avatar-container .avatar {
    object-fit: cover;
    object-position: center;
}

/* Banner Reviewer Images */
.banner-reviewer .avatar {
    object-fit: cover;
    object-position: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Card Images */
.card img {
    object-fit: cover;
    object-position: center;
}

/* Guide Banner Background */
.guide-banner {
    background-size: cover;
    background-position: center;
}

/* Dummy Images - General */
img[src*="dummy"] {
    object-fit: cover;
    object-position: center;
}

/* Responsive Images */
.img-fluid {
    object-fit: cover;
    object-position: center;
    max-width: 100%;
    height: auto;
}

/* Icon Images - Keep Original Aspect Ratio */
img[src*="Icon"],
img[src*="icon"],
img[src*="digital-marketing-icons"] {
    object-fit: contain !important;
    object-position: center;
}

/* Favicon - Keep Original */
link[rel="icon"] {
    object-fit: contain !important;
}

/* Ensure containers have proper overflow */
.image-container,
.blog-image,
.testimonial-image,
.card-blog .blog-image,
.expertise-img {
    overflow: hidden;
    position: relative;
}

/* Portrait Images untuk Blog/Case Studies */
@media (max-width: 768px) {
    .blog-image img,
    .card-blog .blog-image img {
        height: 250px;
    }
    
    .blog-image,
    .card-blog .blog-image {
        height: 250px;
    }
}

/* Landscape Images untuk Section Besar */
@media (min-width: 1200px) {
    .expertise-img img {
        height: 450px;
    }
    
    .expertise-img .image-container {
        max-height: 450px;
    }
}

/* Hover Effect - Optional (uncomment jika diinginkan) */
/*
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}
*/

/* Loading State - Optional */
img {

}

img:not([src]),
img[src=""] {
    
    min-height: 200px;
}

/* Print Media - Prevent Cropping */
@media print {
    img {
        object-fit: contain !important;
        page-break-inside: avoid;
    }
}
