/* ================================================================
   SAMDTU Klinika - Rasm O'lchami Tuzatish Patch
   ----------------------------------------------------------------
   Bu fayl saytdagi BARCHA rasmlarni avtomatik chiroyli
   joylashishini ta'minlaydi. Har qanday o'lchamdagi rasm
   qo'yilsa - to'g'ri kesilib, chiroyli ko'rinadi.

   Faylni joylash: /staticfiles/css/image-fix.css
   HTML'ga qo'shish: <link rel="stylesheet" href="/staticfiles/css/image-fix.css?v=1">
   ================================================================ */

/* === 1. YANGILIKLAR KARTASI RASMLARI === */
/* .news-head ichidagi rasmni 16:9 formatiga moslash */
.single-news .news-head {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}

.single-news .news-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

/* Hover'da rasm kattalashadi */
.single-news:hover .news-head img {
    transform: scale(1.08);
}

/* === 2. KARUSEL RASMLARI (yangiliklar slayderi) === */
.img-areyl {
    overflow: hidden;
}

.img-areyl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* === 3. HERO SLAYDER RASMLARI === */
.single-slider {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* === 4. BO'LIMLAR RASMLARI === */
.single-service img,
.department-img img,
.single-department img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* === 5. SHIFOKORLAR RASMLARI === */
.doctor-img img,
.single-doctor img,
.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* === 6. YANGILIK DETAL RASMI (news detail page) === */
.news-detail-img img,
.blog-detail-img img,
.single-post img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    max-height: 500px;
}

/* === 7. GALEREYA RASMLARI === */
.gallery-img img,
.foto-img img,
.single-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* === 8. UMUMIY - BARCHA IMG TAGLARI UCHUN XAVFSIZ VARIANT === */
/* Bu hech qachon buzmaydi, faqat yordam beradi */
img.img-fluid,
.img-fluid {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

/* === 9. RASM YUKLANMASA - GRADIENT FON === */
.news-head {
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
}

/* === 10. MOBIL UCHUN MOSLASHUV === */
@media (max-width: 768px) {
    .single-news .news-head {
        aspect-ratio: 16 / 9;
    }

    .img-areyl img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .single-news .news-head {
        aspect-ratio: 4 / 3;
    }

    .img-areyl img {
        height: 200px;
    }
}
