/* Breaking News Thumbnail - Main Container */
.breaking-news-thumnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

/* Image Styling */
.breaking-news-thumnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fill container while maintaining aspect ratio */
    object-position: center; /* Center the image */
    transition: all 0.4s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: inherit;
}

/* Lazy Loading Placeholder */
.breaking-news-thumnail img.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Loading Animation */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover Effects */
.breaking-news-thumnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.breaking-news-thumnail:hover img {
    transform: scale(1.05); /* Slight zoom effect */
    filter: brightness(1.1);
}

/* Responsive Breakpoints */

/* Large Desktop (≥ 1200px) */
@media screen and (min-width: 1200px) {
    .breaking-news-thumnail {
        padding-bottom: 56.25%; /* 16:9 */
        min-height: 250px;
    }
    
    .breaking-news-thumnail img {
        min-height: 250px;
    }
}

/* Desktop (992px - 1199px) */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    .breaking-news-thumnail {
        padding-bottom: 60%; /* Slightly taller for desktop */
        min-height: 220px;
    }
    
    .breaking-news-thumnail img {
        min-height: 220px;
    }
}

/* Tablet Large (768px - 991px) */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .breaking-news-thumnail {
        padding-bottom: 65%; /* Taller for tablet */
        min-height: 200px;
    }
    
    .breaking-news-thumnail img {
        min-height: 200px;
    }
}

/* Tablet Small (576px - 767px) */
@media screen and (min-width: 576px) and (max-width: 767px) {
    .breaking-news-thumnail {
        padding-bottom: 70%; /* Even taller for small tablets */
        min-height: 180px;
    }
    
    .breaking-news-thumnail img {
        min-height: 180px;
    }
}

/* Mobile Large (480px - 575px) */
@media screen and (min-width: 480px) and (max-width: 575px) {
    .breaking-news-thumnail {
        padding-bottom: 75%;
        min-height: 160px;
    }
    
    .breaking-news-thumnail img {
        min-height: 160px;
    }
}

/* Mobile (≤ 479px) */
@media screen and (max-width: 479px) {
    .breaking-news-thumnail {
        padding-bottom: 80%; /* Tallest for mobile */
        min-height: 140px;
        border-radius: 6px;
    }
    
    .breaking-news-thumnail img {
        min-height: 140px;
    }
    
    /* Reduce hover effects on mobile */
    .breaking-news-thumnail:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .breaking-news-thumnail:hover img {
        transform: scale(1.02);
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .breaking-news-thumnail {
        padding-bottom: 60%;
        min-height: 120px;
    }
    
    .breaking-news-thumnail img {
        min-height: 120px;
    }
}

/* High DPI/Retina Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2), 
       screen and (min-resolution: 192dpi) {
    .breaking-news-thumnail img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .breaking-news-thumnail {
        background-color: #2d3748;
    }
    
    .breaking-news-thumnail img.lazy-load {
        background: linear-gradient(90deg, #4a5568 25%, #2d3748 50%, #4a5568 75%);
    }
}

/* Print Styles */
@media print {
    .breaking-news-thumnail {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .breaking-news-thumnail img {
        max-width: 100%;
        height: auto;
    }
}

/* Focus States for Accessibility */
.breaking-news-thumnail:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Reduced Motion for Users with Motion Sensitivity */
@media (prefers-reduced-motion: reduce) {
    .breaking-news-thumnail,
    .breaking-news-thumnail img {
        transition: none !important;
    }
    
    .breaking-news-thumnail:hover {
        transform: none !important;
    }
    
    .breaking-news-thumnail:hover img {
        transform: none !important;
    }
}

/* Container for Banner Section */
.banner-section {
    margin-bottom: 2rem;
}

.banner-section .breaking-news-thumnail {
    margin-bottom: 1rem;
}

/* Integration with UIKit Grid */
.uk-grid .breaking-news-thumnail {
    margin-bottom: 0;
}

.uk-grid-collapse .breaking-news-thumnail {
    margin-bottom: 0;
}

/* Custom Aspect Ratios for Different Layouts */
.breaking-news-thumnail--portrait {
    aspect-ratio: 3 / 4;
    padding-bottom: 133.33%;
}

.breaking-news-thumnail--square {
    aspect-ratio: 1 / 1;
    padding-bottom: 100%;
}

.breaking-news-thumnail--wide {
    aspect-ratio: 21 / 9;
    padding-bottom: 42.86%;
}

/* Utility Classes */
.breaking-news-thumnail--no-aspect {
    aspect-ratio: unset;
    padding-bottom: 0;
    height: auto;
}

.breaking-news-thumnail--fixed-height {
    height: 200px;
    padding-bottom: 0;
}

.breaking-news-thumnail--contain {
    object-fit: contain;
}

.breaking-news-thumnail--fill {
    object-fit: fill;
}