<style>
/* News Carousel Styles */
#news-carousel {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

/* News Article Card */
#news-carousel article {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#news-carousel article:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* News Image Container */
#news-carousel .aspect-video {
    position: relative;
    padding-bottom: 56.25%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    overflow: hidden;
}

#news-carousel .aspect-video img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

#news-carousel article:hover .aspect-video img {
    transform: scale(1.05);
}

/* Date Badge */
.news-date-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: badge-slide-in 0.5s ease-out;
}

@keyframes badge-slide-in {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Featured Badge */
.news-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
    }
}

/* News Content */
#news-carousel article .p-6 {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#news-carousel article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

#news-carousel article:hover h3 {
    color: #3b82f6;
}

#news-carousel article p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* News Meta */
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid #f3f4f6;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.news-views {
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

.news-views svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* News Link */
#news-carousel article a {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin-top: auto;
}

#news-carousel article a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

#news-carousel article:hover a::before {
    width: calc(100% - 1rem);
}

#news-carousel article a svg {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

#news-carousel article:hover a svg {
    transform: translateX(4px);
}

/* Carousel Navigation */
.news-carousel-nav {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.news-carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-carousel-dot.active {
    width: 2rem;
    border-radius: 0.25rem;
    background: #3b82f6;
}

.news-carousel-dot:hover {
    background: #9ca3af;
}

/* Loading Skeleton */
.news-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.75rem;
    height: 400px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #news-carousel .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #news-carousel article h3 {
        font-size: 1.125rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    #news-carousel .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility Mode */
body.accessibility-mode #news-carousel article {
    animation: none;
    transition: none;
}

body.accessibility-mode #news-carousel article:hover {
    transform: none;
}

body.accessibility-mode .news-featured-badge {
    animation: none;
}

body.high-contrast #news-carousel article {
    background: #000;
    border: 2px solid #fff;
}

body.high-contrast #news-carousel article h3,
body.high-contrast #news-carousel article p,
body.high-contrast #news-carousel article a {
    color: #fff !important;
}

body.high-contrast .news-date-badge {
    background: #fff;
    color: #000;
}

body.high-contrast .news-category {
    background: #fff;
    color: #000;
}

/* Animation on scroll */
#news-carousel article {
    opacity: 0;
    transform: translateY(20px);
    animation: slide-up-fade 0.6s ease forwards;
}

#news-carousel article:nth-child(1) {
    animation-delay: 0.1s;
}

#news-carousel article:nth-child(2) {
    animation-delay: 0.2s;
}

#news-carousel article:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slide-up-fade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
</style>