/**
 * =====================================================
 * NEWS CAROUSEL SECTION - Gli Amici di Colombo
 * =====================================================
 * 
 * Modern news carousel with premium card styling
 * and warm design aesthetics.
 */

/* ===================================================
   SECTION BASE
   =================================================== */

.news-section {
    background: var(--bg-secondary, #faf8f5);
    padding: var(--section-padding-y, clamp(3rem, 8vh, 6rem)) 0;
    position: relative;
    overflow: hidden;
}

/* Section Header */
.news-section .section-header {
    text-align: center;
    margin-bottom: var(--space-10, 2.5rem);
}

.news-section .section-header h2 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: var(--text-4xl, clamp(2rem, 5vw, 2.5rem));
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #1e293b);
    margin-bottom: var(--space-4, 1rem);
}

.news-section .section-header p {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-lg, 1.125rem);
    color: var(--text-secondary, #475569);
    max-width: 600px;
    margin: 0 auto;
}

/* Section divider */
.news-section .section-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--gradient-accent, linear-gradient(135deg, #d4a853, #f59e0b));
    margin: var(--space-6, 1.5rem) auto 0;
    border-radius: var(--radius-full, 50px);
}

/* ===================================================
   NEWS CAROUSEL
   =================================================== */

.news-carousel {
    position: relative;
}

.news-carousel-wrapper {
    overflow: hidden;
}

.news-carousel-container {
    display: flex;
    gap: var(--space-6, 1.5rem);
}

/* ===================================================
   NEWS CARDS
   =================================================== */

.news-card {
    background: var(--surface-elevated, #ffffff);
    border-radius: var(--radius-xl, 1.5rem);
    overflow: hidden;
    border: 1px solid var(--border-light, #e2e8f0);
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(30, 58, 95, 0.06));
    transition: all var(--duration-normal, 250ms) var(--ease-out, ease-out);
    flex: 0 0 calc(33.333% - var(--space-4, 1rem));
    min-width: 300px;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl, 0 16px 40px rgba(30, 58, 95, 0.14));
    border-color: rgba(212, 168, 83, 0.3);
}

/* News Card Image */
.news-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow, 350ms) var(--ease-out, ease-out);
}

.news-card:hover .news-card-image img {
    transform: scale(1.08);
}

/* Category Badge */
.news-card-category {
    position: absolute;
    top: var(--space-4, 1rem);
    left: var(--space-4, 1rem);
    background: var(--gradient-accent-warm, linear-gradient(135deg, #fcd34d, #d97706));
    color: var(--color-primary-dark, #0f2744);
    padding: var(--space-1, 0.25rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-full, 50px);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-bold, 700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(212, 168, 83, 0.3));
}

/* News Card Content */
.news-card-content {
    padding: var(--space-5, 1.25rem);
}

.news-card-date {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
    color: var(--text-muted, #94a3b8);
    margin-bottom: var(--space-2, 0.5rem);
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
}

.news-card-date i {
    color: var(--color-accent, #d4a853);
}

.news-card-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: var(--text-lg, 1.125rem);
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary, #1e293b);
    line-height: var(--leading-snug, 1.375);
    margin-bottom: var(--space-3, 0.75rem);
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-fast, 150ms) var(--ease-out, ease-out);
}

.news-card-title a:hover {
    color: var(--color-accent, #d4a853);
}

.news-card-excerpt {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #475569);
    line-height: var(--leading-relaxed, 1.625);
    margin-bottom: var(--space-4, 1rem);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link */
.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    color: var(--color-primary, #1e3a5f);
    text-decoration: none;
    transition: all var(--duration-fast, 150ms) var(--ease-out, ease-out);
}

.news-card-link i {
    transition: transform var(--duration-fast, 150ms) var(--ease-out, ease-out);
}

.news-card-link:hover {
    color: var(--color-accent, #d4a853);
}

.news-card-link:hover i {
    transform: translateX(4px);
}

/* ===================================================
   CAROUSEL NAVIGATION
   =================================================== */

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-4, 1rem);
    margin-top: var(--space-8, 2rem);
}

.carousel-btn {
    width: 48px;
    height: 48px;
    background: var(--surface-elevated, #ffffff);
    border: 2px solid var(--border-light, #e2e8f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-normal, 250ms) var(--ease-out, ease-out);
    color: var(--text-secondary, #475569);
}

.carousel-btn:hover {
    background: var(--gradient-accent, linear-gradient(135deg, #d4a853, #f59e0b));
    border-color: var(--color-accent, #d4a853);
    color: var(--color-primary-dark, #0f2744);
    transform: scale(1.1);
    box-shadow: var(--shadow-accent, 0 4px 16px rgba(212, 168, 83, 0.3));
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: var(--surface-elevated, #ffffff);
    border-color: var(--border-light, #e2e8f0);
    color: var(--text-secondary, #475569);
    transform: none;
    box-shadow: none;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2, 0.5rem);
    margin-top: var(--space-6, 1.5rem);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: var(--border-light, #e2e8f0);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--duration-normal, 250ms) var(--ease-out, ease-out);
}

.carousel-dot:hover {
    background: var(--border-default, #cbd5e1);
}

.carousel-dot.active {
    background: var(--gradient-accent, linear-gradient(135deg, #d4a853, #f59e0b));
    width: 32px;
    border-radius: var(--radius-full, 50px);
}

/* ===================================================
   SWIPER OVERRIDES
   =================================================== */

.news-swiper {
    padding-bottom: var(--space-10, 2.5rem);
}

.news-swiper .swiper-slide {
    height: auto;
}

.news-swiper .swiper-pagination {
    bottom: 0 !important;
}

.news-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--border-light, #e2e8f0);
    opacity: 1;
    transition: all var(--duration-normal, 250ms) var(--ease-out, ease-out);
}

.news-swiper .swiper-pagination-bullet-active {
    background: var(--gradient-accent, linear-gradient(135deg, #d4a853, #f59e0b));
    width: 32px;
    border-radius: var(--radius-full, 50px);
}

.news-swiper .swiper-button-next,
.news-swiper .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: var(--surface-elevated, #ffffff);
    border: 2px solid var(--border-light, #e2e8f0);
    border-radius: 50%;
    box-shadow: var(--shadow-sm, 0 2px 4px rgba(30, 58, 95, 0.06));
}

.news-swiper .swiper-button-next::after,
.news-swiper .swiper-button-prev::after {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-secondary, #475569);
}

.news-swiper .swiper-button-next:hover,
.news-swiper .swiper-button-prev:hover {
    background: var(--gradient-accent, linear-gradient(135deg, #d4a853, #f59e0b));
    border-color: var(--color-accent, #d4a853);
}

.news-swiper .swiper-button-next:hover::after,
.news-swiper .swiper-button-prev:hover::after {
    color: var(--color-primary-dark, #0f2744);
}

/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 1024px) {
    .news-card {
        flex: 0 0 calc(50% - var(--space-3, 0.75rem));
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: var(--space-12, 3rem) var(--space-4, 1rem);
    }
    
    .news-section .section-header h2 {
        font-size: var(--text-3xl, 1.875rem);
    }
    
    .news-card {
        flex: 0 0 100%;
        min-width: unset;
    }
    
    .news-card-content {
        padding: var(--space-4, 1rem);
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

/* ===================================================
   ACCESSIBILITY
   =================================================== */

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card-image img,
    .carousel-btn,
    .carousel-dot,
    .news-card-link i {
        transition: none;
    }
    
    .news-card:hover {
        transform: none;
    }
}

.news-card:focus-within {
    outline: 2px solid var(--color-accent, #d4a853);
    outline-offset: 4px;
}

.carousel-btn:focus-visible,
.carousel-dot:focus-visible {
    outline: 2px solid var(--color-accent, #d4a853);
    outline-offset: 2px;
}
