/**
 * Custom Image Sizing for Consistent Display
 * All images are standardized based on section design patterns
 */

/* ============================================
   CAMPAIGN PROMISES / HIGHLIGHT CARDS
   ============================================ */
.highlight-layout-1 figure,
.highlight-layout-1 figure img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    overflow: hidden;
}

.highlight-layout-1 figure {
    margin: 0;
    padding: 0;
    border-radius: 4px 4px 0 0;
}

/* ============================================
   EVENTS / CAMPAIGNS
   ============================================ */
.event-layout-1 .event-img,
.event-layout-1 .event-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    overflow: hidden;
}

.event-layout-1 .event-img {
    margin: 0;
    padding: 0;
    float: left;
    width: 40%;
}

@media (max-width: 768px) {
    .event-layout-1 .event-img {
        width: 100%;
        height: 200px;
    }
}

/* ============================================
   NEWS / BLOG POSTS
   ============================================ */
/* News List Page */
.single-post-content,
.single-post-content img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    overflow: hidden;
}

.single-post-content {
    margin-bottom: 20px;
}

/* News Card on Home Page */
.latest-news-container figure,
.latest-news-container figure img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    overflow: hidden;
}

.latest-news-container figure {
    margin: 0;
    padding: 0;
    border-radius: 4px 4px 0 0;
}

/* News Single Page */
.post-inner-featured-content,
.post-inner-featured-content img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    overflow: hidden;
}

.post-inner-featured-content {
    margin-bottom: 30px;
}

/* News Sidebar Widget */
.widget-post-list figure,
.widget-post-list figure img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    overflow: hidden;
    border-radius: 4px;
}

/* ============================================
   GALLERY
   ============================================ */
/* Gallery Grid on Home */
.gallery-container .gallery-img,
.gallery-container .gallery-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    overflow: hidden;
}

.gallery-container .gallery-img {
    margin: 0;
    padding: 0;
}

/* Gallery Carousel */
.gallery-carousel .gallery-img,
.gallery-carousel .gallery-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    overflow: hidden;
}

/* Gallery Item Page */
.gallery-item img,
.gallery-item .img-responsive {
    width: 100%;
    height: 280px;
    object-fit: cover;
    overflow: hidden;
}

/* Gallery Show Page (Album View) */
.gallery-item .img-responsive,
.gallery-item img.img-responsive {
    width: 100%;
    height: 280px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

/* ============================================
   TEAM MEMBERS
   ============================================ */
.team-layout-1 .team-member,
.team-layout-1 .team-member img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    overflow: hidden;
}

.team-layout-1 .team-member {
    margin: 0;
    padding: 0;
    border-radius: 4px 4px 0 0;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimony-layout-1 img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 20px auto;
    display: block;
}

/* ============================================
   ACHIEVEMENTS / PROFILE IMAGES
   ============================================ */
/* Profile Image in About Section */
.feat-img-side-bg img,
.about-us-info-block img,
.side-background img,
.feat-img-side-bg .row img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    overflow: hidden;
}

/* Achievement Section Profile Image */
.theme-custom-box-shadow figure img.db,
img.db {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

/* About Page Profile Image */
.about-img img,
.about-img figure img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

/* Achievement Grid Images */
.achievement-layout-1 figure img,
.achievement-layout-1 img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    overflow: hidden;
}

/* Related Items Images */
.related-item img,
.related-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
}

/* Mission Section Side Image */
.section-feat-about-us .side-background img,
.section-feat-about-us .feat-img-side-bg img {
    width: 100%;
    height: auto;
    object-fit: cover;
    overflow: hidden;
}

/* Testimonials Background Image */
.testimonial-container + figure img,
.testimonial-container ~ figure img,
.testimonial-section figure img.db {
    width: 100%;
    height: 500px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

/* ============================================
   CAMPAIGN PROMISE SHOW PAGE
   ============================================ */
.promise-featured-image,
.promise-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    overflow: hidden;
}

/* ============================================
   EVENT SHOW PAGE
   ============================================ */
.event-featured-image,
.event-featured-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    overflow: hidden;
}

/* ============================================
   ACHIEVEMENT SHOW PAGE
   ============================================ */
.achievement-featured-image,
.achievement-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    overflow: hidden;
}

/* ============================================
   SLIDER / HERO IMAGES
   ============================================ */
/* Home Page Slider Background Images */
.slider_item_container[data-bg_img],
.slider-wrap .slider_item_container[data-bg_img] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 600px;
}

@media (max-width: 768px) {
    .slider_item_container[data-bg_img] {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .slider_item_container[data-bg_img] {
        min-height: 300px;
    }
}

/* ============================================
   BACKGROUND IMAGES - Consistent Sizing
   ============================================ */
/* Ensure all background images maintain proper sizing */
.section-custom-bg[data-bg_img] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Specific background image sections */
.section-feat-about-us[data-bg_img] {
    background-size: cover !important;
    background-position: center center !important;
}

.page-header[style*="background-image"] {
    background-size: cover !important;
    background-position: center center !important;
}

.footer-widget-area[data-bg_img] {
    background-size: cover !important;
    background-position: center center !important;
}

/* ============================================
   FOOTER LOGO
   ============================================ */
.about-footer figure,
.about-footer figure img {
    max-width: 200px;
    max-height: 60px;
    width: auto;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.about-footer figure {
    text-align: center;
    margin-bottom: 30px;
}

/* ============================================
   GENERAL IMAGE FIXES
   ============================================ */
/* Ensure all images maintain aspect ratio */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* All figure images should be responsive */
figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* Bootstrap img-responsive class compatibility */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure img-responsive works with our sizing rules */
.gallery-item .img-responsive,
.promise-card .img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

/* Promise Card Images */
.promise-card-full img,
.promise-card-full .img-responsive {
    width: 100%;
    height: 200px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

/* Remove default image spacing issues */
figure {
    margin: 0;
    padding: 0;
}

/* Image container fixes */
.image-container {
    overflow: hidden;
    position: relative;
}

.image-container img {
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Mobile: Reduce heights */
    .highlight-layout-1 figure,
    .highlight-layout-1 figure img {
        height: 200px;
    }
    
    .latest-news-container figure,
    .latest-news-container figure img {
        height: 180px;
    }
    
    .single-post-content,
    .single-post-content img {
        height: 250px;
    }
    
    .post-inner-featured-content,
    .post-inner-featured-content img {
        height: 300px;
    }
    
    .gallery-container .gallery-img,
    .gallery-container .gallery-img img {
        height: 200px;
    }
    
    .team-layout-1 .team-member,
    .team-layout-1 .team-member img {
        height: 280px;
    }
    
    .feat-img-side-bg img,
    .about-us-info-block img,
    .section-feat-about-us .side-background img {
        height: 300px;
    }
    
    .testimonial-section figure img.db {
        height: 300px;
    }
}

@media (max-width: 480px) {
    /* Small Mobile: Further reduce */
    .highlight-layout-1 figure,
    .highlight-layout-1 figure img {
        height: 180px;
    }
    
    .latest-news-container figure,
    .latest-news-container figure img {
        height: 160px;
    }
    
    .single-post-content,
    .single-post-content img {
        height: 200px;
    }
    
    .post-inner-featured-content,
    .post-inner-featured-content img {
        height: 250px;
    }
    
    .gallery-container .gallery-img,
    .gallery-container .gallery-img img {
        height: 180px;
    }
}

