﻿/* ==========================================================================
   Standard 16:9 Aspect Ratio & Responsive Image Rendering Optimization
   - Enforces true 16:9 aspect-ratio across all desktop, tablet, and mobile breakpoints
   - Removes calc(100% + 2px) distortion and sub-pixel translate(-50%, -50%)
   - Aligns fixed thumbnail containers to multiples of 16 for exact integer 16:9 dimensions
   - Preserves .noFrame behavior and smooth hover/focus zoom animations
   ========================================================================== */

/* 1. True 16:9 aspect-ratio container without fractional padding distortion */
/* @supports (aspect-ratio: 16 / 9) {
    .wrapImgResize.img16And9:not(.noFrame):not([style*="padding-bottom"]) {
        padding-top: 0 !important;
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
    }
} */

/* 2. Media elements: Fit 100% of the 16:9 frame, eliminate +2px skew & sub-pixel translate */
/* .wrapImgResize:not(.noFrame) img,
.wrapImgResize:not(.noFrame) video,
.wrapImgResize:not(.noFrame) iframe,
.itemNewsHorizontal .linkNews .wrapImg .wrapImgResize:not(.noFrame) img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    object-fit: cover !important;
    -webkit-object-fit: cover !important;
    -o-object-fit: cover !important;
    object-position: center center;
    image-rendering: auto !important;
} */

/* 3. Responsive exact 16:9 integer dimensions (16k x 9k) across all breakpoints */

/* 3.1. Sub News Cards (Home Featured, Medical, Union Activities) */
.itemSlideNewsSub .wrapImg {
    width: 128px; /* 128 x 72 px (exact 16:9) */
}

@media only screen and (max-width: 1400px) {
    .itemSlideNewsSub .wrapImg {
        width: 112px; /* 112 x 63 px (exact 16:9) */
    }
}

@media only screen and (max-width: 1219px) {
    .itemSlideNewsSub .wrapImg {
        width: 128px; /* 128 x 72 px (exact 16:9) */
    }
}

@media only screen and (min-width: 1221px) {
    .col-xl-6 .itemSlideNewsSub .wrapImg {
        width: 96px; /* 96 x 54 px (exact 16:9) */
    }
}

@media only screen and (min-width: 1401px) {
    .col-xl-6 .itemSlideNewsSub .wrapImg {
        width: 112px; /* 112 x 63 px (exact 16:9) */
    }
}

/* 3.2. Horizontal News List (Category & Search Pages) */
.itemNewsHorizontal .linkNews .wrapImg {
    width: 400px; /* 400 x 225 px (exact 16:9) */
    min-width: 400px;
}

@media only screen and (max-width: 1400px) {
    .itemNewsHorizontal .linkNews .wrapImg {
        width: 336px; /* 336 x 189 px (exact 16:9) */
        min-width: 336px;
    }
}

@media only screen and (max-width: 1219px) {
    .itemNewsHorizontal .linkNews .wrapImg {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 991px) {
    .itemNewsHorizontal .linkNews .wrapImg {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

/* 3.3. Related News & Related Services Sidebar/Bottom Blocks */
.wrapOtherNews .itemSlideThreeItem .linkNews .wrapImg,
.wrapOtherService .itemService .linkService .wrapImg {
    width: 192px; /* 192 x 108 px (exact 16:9) */
    min-width: 192px;
}

@media only screen and (max-width: 1400px) {
    .wrapOtherNews .itemSlideThreeItem .linkNews .wrapImg,
    .wrapOtherService .itemService .linkService .wrapImg {
        width: 144px; /* 144 x 81 px (exact 16:9) */
        min-width: 144px;
    }
}

@media only screen and (max-width: 767px) {
    .wrapOtherNews .itemSlideThreeItem .linkNews .wrapImg,
    .wrapOtherService .itemService .linkService .wrapImg {
        width: 128px; /* 128 x 72 px (exact 16:9) */
        min-width: 128px;
    }
}

/* 3.4. Header & Mobile Bottom Bar Search Suggestions */
.wrapSearch .searchSuggestDropdown .listSuggest .itemSuggest .wrapImg,
.wrapBtnBottomBar .wrapSearch .formSearchHeader .searchSuggestDropdown .listSuggest .itemSuggest .wrapImg {
    width: 48px; /* 48 x 27 px (exact 16:9) */
}
