/* CSS FIX CHO HÌNH ẢNH TIN TỨC - HIỂN THỊ FULL SIZE (NO BORDER) */

/* Trang tin tức news.php */
.news-image {
    flex: 0 0 200px !important;
    margin-right: 20px !important;
    overflow: hidden !important;
}

.news-image img {
    width: 200px !important;
    height: 150px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.3s ease !important;
    display: block !important;
}

.news-image img:hover {
    transform: scale(1.02) !important;
}

/* Trang chi tiết news-detail.php */
.article-image-left {
    overflow: hidden !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.article-image-left img {
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
}

.article-image-left img:hover {
    transform: scale(1.02) !important;
}

/* Hình ảnh trong nội dung bài viết */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 20px auto !important;
    display: block !important;
    box-shadow: none !important;
    transition: transform 0.3s ease !important;
    cursor: pointer !important;
}

.article-content img:hover {
    transform: scale(1.02) !important;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .news-image {
        flex: none !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
        text-align: center !important;
        width: 100% !important;
    }

    .news-image img {
        width: 100% !important;
        height: 200px !important;
        max-width: 350px !important;
        margin: 0 auto !important;
    }

    .article-image-left {
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto 20px auto !important;
    }

    .article-image-left img {
        width: 100% !important;
        max-width: 350px !important;
        height: 200px !important;
    }

    .article-content img {
        margin: 15px auto !important;
        max-width: 100% !important;
    }
}

/* Trang chủ index.html - News slider */
.slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* News block trên trang chủ */
.news-block__img img {
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Fallback cho tất cả hình ảnh tin tức */
img[alt*="tin tức"], 
img[alt*="TIN TỨC"],
img[alt*="news"],
img[alt*="NEWS"] {
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Đảm bảo hình ảnh không bị méo */
.news-item img,
.news-content img,
.content-image img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Hiệu ứng loading cho hình ảnh */
.news-image img[src=""],
.news-image img:not([src]),
.article-image-left img[src=""],
.article-image-left img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%) !important;
    background-size: 200% 100% !important;
    animation: loading 1.5s infinite !important;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error fallback */
.news-image img[src*="data:image/svg+xml"],
.article-image-left img[src*="data:image/svg+xml"] {
    background: #f8f9fa !important;
    border: 2px dashed #dee2e6 !important;
    color: #6c757d !important;
}

/* Clean, borderless image display */
.news-image,
.article-image-left,
.article-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Override any existing borders */
.news-image *,
.article-image-left *,
.article-content img {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Lightbox functionality preserved */
.article-image-left img,
.article-content img {
    cursor: pointer !important;
}