/* ===========================
   RESET E VARIABILI
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nero: #000000;
    --rosso: #ba121f;
    --bianco: #ffffff;
    --grigio-chiaro: #e0e0e0;
    --transition: all 0.3s ease;
    
    /* Tema bianco */
    --bg-primary: #ffffff;
    --text-primary: #000000;
    --text-secondary: #333333;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Accessibilità: nasconde visivamente ma mantiene per screen reader e SEO */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===========================
   NAVBAR
   =========================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 1rem 0;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(186, 18, 31, 0.4));
    transition: var(--transition);
}

.logo img:hover {
    filter: drop-shadow(0 0 15px rgba(186, 18, 31, 0.8));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rosso);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--rosso);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.3rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--rosso);
    transition: var(--transition);
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 6rem 0 3rem 0;
    }
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.logo-hero {
    margin-bottom: 2rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.logo-hero img {
    height: 200px;
    width: auto;
    max-width: 90vw;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(186, 18, 31, 0.5))
                drop-shadow(0 0 40px rgba(186, 18, 31, 0.3));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(186, 18, 31, 0.8))
                drop-shadow(0 0 60px rgba(186, 18, 31, 0.5));
    }
}

.claim {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--rosso);
    color: var(--bianco);
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(186, 18, 31, 0.4);
}

.cta-button:hover {
    background-color: var(--rosso);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(186, 18, 31, 0.8);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   BRAND SECTION
   =========================== */
.brand-section {
    background-color: #f8f8f8;
    padding: 2.5rem 0;
    border-bottom: 1px solid #eee;
}

.brand-title {
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 1.5rem;
}

.brand-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    max-width: 100%;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.brand-item img {
    height: 60px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: var(--transition);
}

.brand-item:hover img {
    transform: scale(1.05);
}

/* Mobile marquee - nascosto su desktop */
.brand-marquee-mobile {
    display: none;
}

/* Desktop version - nascosto su mobile */
.brand-container-desktop {
    display: block;
}

@media (max-width: 768px) {
    .brand-section {
        padding: 1.5rem 0;
    }
    
    /* Nasconde desktop, mostra mobile */
    .brand-container-desktop {
        display: none;
    }
    
    .brand-marquee-mobile {
        display: block;
        padding: 0 0;
    }
    
    .brand-marquee-mobile .brand-title {
        padding: 0 1rem;
    }
    
    .brand-marquee-wrapper {
        overflow: hidden;
        width: 100%;
    }
    
    .brand-marquee-track {
        display: flex;
        gap: 2.5rem;
        animation: marquee 20s linear infinite;
        width: max-content;
    }
    
    .brand-marquee-track .brand-item {
        flex-shrink: 0;
    }
    
    .brand-marquee-track .brand-item img {
        height: 45px;
        width: auto;
        max-width: 120px;
    }
    
    @keyframes marquee {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* ===========================
   SEZIONI COMUNI
   =========================== */
section {
    padding: 4rem 0;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--rosso);
    margin: 1rem auto;
}

/* ===========================
   SEZIONE SERVIZI
   =========================== */
.services {
    background: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateY(50px);
}

.service-card.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--rosso);
    box-shadow: 0 10px 40px rgba(186, 18, 31, 0.3);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* ===========================
   SEZIONE PERCHÉ SF
   =========================== */
.why-us {
    background: var(--bg-primary);
}

.why-grid {
    display: grid;
    gap: 2rem;
}

.why-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateX(-50px);
}

.why-item.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

.why-item:hover {
    background: rgba(186, 18, 31, 0.1);
    box-shadow: 0 5px 30px rgba(186, 18, 31, 0.2);
}

.why-icon {
    font-size: 3rem;
    min-width: 60px;
}

.why-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.why-content p {
    color: var(--text-secondary);
}

/* ===========================
   SEZIONE PORTFOLIO
   =========================== */
.portfolio {
    background: var(--bg-primary);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.gallery-item.aos-animate {
    opacity: 1;
    transform: scale(1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(186, 18, 31, 0.85), transparent);
    padding: 2rem;
    transform: translateY(0);
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    background: linear-gradient(to top, rgba(186, 18, 31, 0.95), transparent);
}

.gallery-title {
    color: var(--bianco);
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.gallery-cta {
    color: var(--bianco);
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
    font-weight: 500;
}

/* ===========================
   SEZIONE CONTATTI
   =========================== */
.contact {
    background: var(--bg-primary);
}

.contact-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--rosso);
    box-shadow: 0 5px 20px rgba(186, 18, 31, 0.2);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 3rem;
}

.contact-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    min-width: 40px;
}

.info-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.info-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.phone-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.phone-link:hover {
    color: var(--rosso);
}

.map-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(186, 18, 31, 0.2);
}

.contact-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rosso);
    box-shadow: 0 0 20px rgba(186, 18, 31, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--rosso);
    color: var(--bianco);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(186, 18, 31, 0.4);
}

.submit-button:hover {
    background-color: var(--rosso);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(186, 18, 31, 0.8);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    display: none;
}

.form-message.success {
    background-color: rgba(186, 18, 31, 0.2);
    color: var(--rosso);
    border: 1px solid var(--rosso);
    display: block;
}

.form-message.error {
    background-color: rgba(255, 100, 100, 0.2);
    color: #ff6464;
    border: 1px solid #ff6464;
    display: block;
}

/* Form Success Message */
.form-success-message {
    display: none;
    opacity: 0;
    background: #f8f8f8;
    border: 2px solid var(--rosso);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.form-success-message.show {
    display: block;
    animation: fadeInSuccess 0.6s ease forwards;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.form-success-message h3 {
    color: var(--rosso);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-success-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

@keyframes fadeInSuccess {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background-color: var(--bg-primary);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(186, 18, 31, 0.4));
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--rosso);
}


/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
    }

    .logo img {
        height: 40px;
    }

    .logo-hero img {
        height: 120px;
    }

    .claim {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .why-item {
        flex-direction: column;
        text-align: center;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   ANIMAZIONI
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   PAGINE DEDICATE (DOMOTICA/SICUREZZA)
   =========================== */

/* Breadcrumb Navigation */
.breadcrumb-container {
    background-color: var(--bg-primary);
    padding: 1rem 0;
    margin-top: 80px;
    border-bottom: 1px solid var(--grigio-chiaro);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--rosso);
}

.breadcrumb .separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--rosso);
    font-weight: 600;
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #f5f5f5 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
}

.page-hero h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-hero .hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Content Section */
.content-section {
    padding: 4rem 0;
    background-color: var(--bg-primary);
}

.content-text {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-text h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.content-text h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.content-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background-color: #f9f9f9;
}

.gallery-section .section-title {
    text-align: center;
    margin-bottom: 1rem;
}

.gallery-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Carousel Container */
.carousel-container {
    max-width: 1000px;
    margin: 0 auto;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-primary);
}

.carousel-track {
    position: relative;
    width: 100%;
}

.carousel-slide {
    display: none;
    width: 100%;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.slide-caption {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background-color: var(--rosso);
    color: var(--bianco);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 1rem;
}

.carousel-btn-next {
    right: 1rem;
}

.carousel-btn span {
    display: block;
    line-height: 1;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    background-color: transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.indicator:hover {
    background-color: var(--text-secondary);
    transform: scale(1.2);
}

.indicator.active {
    background-color: var(--rosso);
    border-color: var(--rosso);
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--rosso) 0%, #8a0e18 100%);
    text-align: center;
    color: var(--bianco);
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-section .cta-button {
    background-color: var(--bianco);
    color: var(--rosso);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-section .cta-button:hover {
    background-color: var(--nero);
    color: var(--bianco);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive - Pagine Dedicate */
@media (max-width: 768px) {
    .breadcrumb-container {
        margin-top: 70px;
    }

    .page-hero {
        padding: 3rem 0 2rem;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .page-hero .hero-subtitle {
        font-size: 1rem;
    }

    .content-section {
        padding: 3rem 0;
    }

    .content-text h2 {
        font-size: 1.5rem;
    }

    .content-text h3 {
        font-size: 1.2rem;
    }

    .content-text p {
        font-size: 1rem;
    }

    .gallery-section {
        padding: 3rem 0;
    }

    .carousel-slide img,
    .carousel-slide video {
        max-height: 400px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-btn-prev {
        left: 0.5rem;
    }

    .carousel-btn-next {
        right: 0.5rem;
    }

    .slide-caption {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

/* ===========================
   MODAL PRIVACY & COOKIE
   =========================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 2rem auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    background: linear-gradient(135deg, var(--rosso), #d41b2c);
    color: var(--bianco);
    padding: 1.5rem 2rem;
    margin: 0;
    font-size: 1.8rem;
    border-radius: 15px 15px 0 0;
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    color: var(--bianco);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    z-index: 1;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    opacity: 0.7;
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
    max-height: calc(85vh - 80px);
    overflow-y: auto;
    color: var(--text-primary);
}

.modal-body h3 {
    color: var(--rosso);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.modal-body h4 {
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.modal-body a {
    color: var(--rosso);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.modal-body a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Scrollbar personalizzata per modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--grigio-chiaro);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--rosso);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a00f1a;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem auto;
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding: 1.2rem 1.5rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 1.8rem;
    }

    .modal-body {
        padding: 1.5rem;
        max-height: calc(90vh - 70px);
    }

    .modal-body h3 {
        font-size: 1.2rem;
    }

    .modal-body h4 {
        font-size: 1.05rem;
    }
}
