/* ============================================
   Responsive Images - serenecare.online
   Ensures all images fit any screen size
   ============================================ */

/* --- Global: all images are fluid by default --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Carousel slider: consistent height across all slides --- */
/* Each slide is locked to the same height so images never vary in size */
#header-carousel .carousel-item {
    height: 600px;
    overflow: hidden;
}

/* Carousel banner images fill the slide box uniformly */
#header-carousel .carousel-item img.w-100.b,
#header-carousel .carousel-item img.b,
img.w-100.b,
img.b {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
}

@media (max-width: 575px) {
    #header-carousel .carousel-item {
        height: 260px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    #header-carousel .carousel-item {
        height: 350px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #header-carousel .carousel-item {
        height: 450px;
    }
}

@media (min-width: 992px) {
    #header-carousel .carousel-item {
        height: 600px;
    }
}

/* --- Navbar logo --- */
img.serlog {
    width: auto;
    max-width: 270px;
    height: auto;
    max-height: 60px;
}

@media (max-width: 575px) {
    img.serlog {
        max-width: 160px;
        margin-left: 0 !important;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    img.serlog {
        max-width: 200px;
        margin-left: 0 !important;
    }
}

/* --- Footer logo --- */
img.footer {
    max-width: 200px;
    width: 100%;
    height: auto;
}

/* --- Feat / decorative banner stripe (feat.png) --- */
img.fe {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 991px) {
    img.fe {
        margin-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* --- Gallery / portfolio images inside lightbox items --- */
.portfolio-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

@media (max-width: 575px) {
    .portfolio-item img {
        height: 180px;
    }
}

/* --- About-us mission / team images --- */
img.m {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

img.h-40.m {
    max-height: 280px;
}

/* --- Hero page-header background (already cover, keep it) --- */
.hero-header,
.hero-header1 {
    background-size: cover !important;
    background-position: center center !important;
    min-height: 180px;
}

/* --- Ensure all carousel-item images don't overflow --- */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* --- Blog listing thumbnail images --- */
.blogimg_listing {
    height: auto !important;
    min-height: 200px;
    max-height: 300px;
    overflow: hidden;
}

.blogimg_listing img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* --- Service / team card images --- */
.team-item img,
.service-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- About section heart collage (meet.gif): show full shape, no cropping --- */
.position-relative > img.position-absolute.w-100.h-100 {
    object-fit: contain;
    object-position: center center;
}

/* --- Application form calendar input image --- */
input[type="image"].calender {
    width: 13px !important;
    height: auto !important;
    max-width: 13px !important;
    vertical-align: middle;
}

/* --- Logo on application form --- */
img.logo-img {
    max-width: 200px;
    height: auto;
}

/* --- Prevent any image from ever overflowing its container --- */
.container img,
.container-fluid img,
.row img,
[class*="col-"] img {
    max-width: 100%;
    height: auto;
}
