/* 
 * News Card Image Fix - Non-intrusive Override
 * This file adds specific styling only for news.html cards
 * to show full images with gradient blend effect
 */

/* Override only the news page cards with new image display */
/* Targets all f-media containers in news cards */
.news-card .f-media {
    position: relative !important;
    height: 260px !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #0a0a0a;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: grid !important;
    place-items: center !important;
}

/* Blurred background layer - fills empty space automatically */
.news-card .f-media::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.35) saturate(1.2);
    transform: scale(1.15);
    z-index: 0;
}

/* Gradient vignette overlay on top of blurred background */
.news-card .f-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 30%,
        rgba(10, 10, 10, 0.3) 50%,
        rgba(10, 10, 10, 0.6) 70%,
        rgba(10, 10, 10, 0.9) 95%
    );
    z-index: 1;
    pointer-events: none;
}

/* Main image styling - centered, full size, sharp and clear */
/* Using !important to override inline styles that cause cropping */
.news-card .f-media img {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;  /* Critical: prevents cropping */
    transition: transform 0.4s ease, filter 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    filter: brightness(1.1) contrast(1.08) saturate(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Enhanced hover effect */
.news-card:hover .f-media img {
    transform: scale(1.08) translateZ(0);
    filter: brightness(1.15) contrast(1.12) saturate(1.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhance blur on hover for depth effect */
.news-card:hover .f-media::before {
    filter: blur(35px) brightness(0.3) saturate(1.3);
    transform: scale(1.18);
}

/* Lighten vignette on hover */
.news-card:hover .f-media::after {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 35%,
        rgba(10, 10, 10, 0.2) 55%,
        rgba(10, 10, 10, 0.5) 75%,
        rgba(10, 10, 10, 0.85) 95%
    );
}

/* Color-adaptive gradient variations - adds color tint to vignette */

/* Blue Gradient - Tech/Professional */
.news-card[data-gradient="blue"] .f-media::after {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 30%,
        rgba(26, 44, 74, 0.3) 50%,
        rgba(13, 33, 61, 0.6) 70%,
        rgba(10, 20, 40, 0.92) 95%
    );
}

.news-card[data-gradient="blue"] .f-media::before {
    filter: blur(30px) brightness(0.35) saturate(1.3) hue-rotate(-10deg);
}

/* Purple Gradient - Innovation/Premium */
.news-card[data-gradient="purple"] .f-media::after {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 30%,
        rgba(42, 26, 58, 0.3) 50%,
        rgba(33, 20, 46, 0.6) 70%,
        rgba(21, 13, 31, 0.92) 95%
    );
}

.news-card[data-gradient="purple"] .f-media::before {
    filter: blur(30px) brightness(0.35) saturate(1.4) hue-rotate(10deg);
}

/* Orange Gradient - Energy/Action */
.news-card[data-gradient="orange"] .f-media::after {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 30%,
        rgba(58, 42, 26, 0.3) 50%,
        rgba(46, 33, 20, 0.6) 70%,
        rgba(31, 21, 13, 0.92) 95%
    );
}

.news-card[data-gradient="orange"] .f-media::before {
    filter: blur(30px) brightness(0.38) saturate(1.3) hue-rotate(-5deg);
}

/* Green Gradient - Growth/Environment */
.news-card[data-gradient="green"] .f-media::after {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 30%,
        rgba(26, 58, 42, 0.3) 50%,
        rgba(20, 46, 33, 0.6) 70%,
        rgba(13, 31, 21, 0.92) 95%
    );
}

.news-card[data-gradient="green"] .f-media::before {
    filter: blur(30px) brightness(0.35) saturate(1.35) hue-rotate(5deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .news-card .f-media {
        height: 220px;
    }
    
    .news-card .f-media img {
        max-width: 88% !important;
        max-height: 88% !important;
    }
    
    .news-card .f-media::before {
        filter: blur(25px) brightness(0.35) saturate(1.2);
    }
}

@media (max-width: 480px) {
    .news-card .f-media {
        height: 200px;
    }
    
    .news-card .f-media img {
        max-width: 85% !important;
        max-height: 85% !important;
    }
    
    .news-card .f-media::before {
        filter: blur(20px) brightness(0.35) saturate(1.15);
    }
}

