/* Hero Section con Video Background */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    padding: 80px 0;
    overflow: hidden;
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    object-fit: cover;
}

/* Overlay scuro per rendere il testo leggibile */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Contenuto sopra il video */
.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Controlli video (opzionale) */
.video-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 3;
}

.video-control-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.video-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: var(--white);
    transform: scale(1.1);
}

.video-control-btn i {
    font-size: 18px;
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottoni */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);

}

.btn-primary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--primary-orange);
    color: var(--white);

}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-orange);
    transform: translateY(-3px);
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: var(--gray-light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 30px;
    text-align: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--white);
    padding: 15px;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-content h3,
.service-card h3 {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.service-content p,
.service-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-content a,
.service-card a {
    color: var(--primary-orange);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.service-content a:hover,
.service-card a:hover {
    color: var(--dark-blue);
}

/* Featured Services Section */
.featured-services {
    padding: 80px 0;
    background-color: var(--white);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.featured-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 35px 30px;
    border-left: 5px solid var(--primary-orange);
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left-width: 8px;
}

.featured-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-orange), #FF6B00);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--white);
    margin-bottom: 20px;
}

.featured-card h3 {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 700;
}

.featured-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.featured-link:hover {
    color: var(--dark-blue);
    gap: 12px;
}

.featured-link i {
    transition: transform 0.3s ease;
}

.featured-link:hover i {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-orange), #FF6B00);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.cta h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .services-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .video-control-btn {
        width: 45px;
        height: 45px;
    }
}

/* Fallback per browser che non supportano i video */
@supports not (object-fit: cover) {
    .hero-video {
        display: none;
    }
    .hero {
        background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    }
}
.collab-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: white;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;     /* CENTRA L’INTERO CAROSELLO */
    text-align: center;
}

.collab-track {
    display: flex;
    align-items: center;
    justify-content: center;   /* CENTRA LE IMMAGINI */
    gap: 40px;
    animation: scroll 60s linear infinite;
    width: max-content;        /* IMPORTANTE per il centraggio */
}

.collab-track img {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(1) contrast(1);
    transition: transform .3s ease;
}

.collab-track img:hover {
    transform: scale(1.08);
}
/* Ombre laterali (fade) */
.collab-carousel::before,
.collab-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;            /* quanto deve essere ampia la dissolvenza */
    height: 100%;
    z-index: 2;
    pointer-events: none;    /* non blocca il mouse */
}

/* LATO SINISTRO */
.collab-carousel::before {
    left: 0;
    background: linear-gradient(to right, white 0%, rgba(255,255,255,0) 100%);
}

/* LATO DESTRO */
.collab-carousel::after {
    right: 0;
    background: linear-gradient(to left, white 0%, rgba(255,255,255,0) 100%);
}


/* Animazione scrolling lento */
@keyframes scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}
#videoToggle {
    display: none !important;
}

/* ── Ultime News in Home ──────────────────────────────── */
.home-news {
    padding: 72px 0 64px;
    background: #f8fafc;
}
.home-news .section-title { margin-bottom: 40px; }

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

.home-news-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .22s, box-shadow .22s;
}
.home-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,102,179,.13);
}

/* Layout singola news: card orizzontale a tutta larghezza */
.home-news-grid--single { grid-template-columns: 1fr; }
.home-news-grid--single .home-news-card {
    flex-direction: row;
    max-height: 280px;
}
.home-news-grid--single .home-news-thumb {
    width: 420px;
    min-width: 420px;
    aspect-ratio: unset;
}
.home-news-grid--single .home-news-body {
    padding: 32px 40px;
    justify-content: center;
}
.home-news-grid--single .home-news-body h3 { font-size: 22px; margin-bottom: 12px; }
.home-news-grid--single .home-news-body p  { font-size: 15px; }
@media (max-width: 700px) {
    .home-news-grid--single .home-news-card { flex-direction: column; max-height: none; }
    .home-news-grid--single .home-news-thumb { width: 100%; min-width: unset; aspect-ratio: 16/9; }
}

.home-news-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #e8f2fb;
    flex-shrink: 0;
}
.home-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}
.home-news-card:hover .home-news-thumb img { transform: scale(1.04); }

.home-news-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94b8d4;
    font-size: 36px;
}

.home-news-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.home-news-date {
    font-size: 12px;
    color: #0066B3;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.home-news-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.4;
    margin-bottom: 8px;
}
.home-news-body p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
}
.home-news-more {
    font-size: 13px;
    font-weight: 600;
    color: #0066B3;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.home-news-more i { font-size: 11px; transition: transform .2s; }
.home-news-card:hover .home-news-more i { transform: translateX(4px); }

.home-news-footer { text-align: center; }
.btn-outline-blue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #0066B3;
    border-radius: 8px;
    color: #0066B3;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.btn-outline-blue:hover { background: #0066B3; color: #fff; }

@media (max-width: 900px) {
    .home-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .home-news-grid { grid-template-columns: 1fr; }
}
