:root {
    --primary-navy: #0F172A;
    --primary-accent: #E63946;
    --secondary-blue: #0284C7;
    --accent-green: #10B981;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #20BA5A;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 28px -5px rgba(0, 0, 0, 0.2);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-dark); 
    background-color: var(--bg-light); 
    line-height: 1.6; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

h1, h2, h3, h4 { 
    font-family: 'Outfit', sans-serif; 
    color: var(--primary-navy); 
    line-height: 1.25; 
}

/* HEADER & NAVIGATION */
header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background-color: rgba(255, 255, 255, 0.96); 
    border-bottom: 1px solid var(--border-color); 
    z-index: 1000; 
    padding: 12px 5%;
    transform: translateZ(0);
    will-change: transform;
}
.nav-container { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 48px; width: auto; object-fit: contain; transition: var(--transition-fast); }
.logo-link:hover .logo-img { transform: scale(1.03); }

.nav-links { display: flex; list-style: none; gap: 24px; align-items: center; }
.nav-links a { 
    text-decoration: none; 
    color: var(--text-dark); 
    font-weight: 500; 
    font-size: 0.95rem; 
    position: relative;
    transition: var(--transition-fast);
    padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-accent); }
.nav-links a::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    width: 0%; 
    height: 2px; 
    background-color: var(--primary-accent); 
    border-radius: 2px;
    transition: var(--transition-fast);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* PULSANTE NAVIGAZIONE "CONTATTACI" STILE WHATSAPP */
.btn-nav { 
    background-color: var(--whatsapp-green) !important; 
    color: var(--bg-white) !important; 
    padding: 10px 22px !important; 
    border-radius: 50px !important; 
    font-weight: 600 !important; 
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important; 
    transition: var(--transition-fast) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}
.btn-nav:hover { 
    background-color: var(--whatsapp-hover) !important; 
    transform: translateY(-2px) scale(1.05) !important; 
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55) !important; 
    color: var(--bg-white) !important;
}
.btn-nav::after { display: none !important; }
.btn-nav i { font-size: 1.1rem; }

.mobile-toggle { display: none; font-size: 1.4rem; color: var(--primary-navy); cursor: pointer; background: none; border: none; padding: 8px; }

/* HERO SECTION */
.hero-banner { 
    padding: 130px 20px 60px; 
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    position: relative;
    overflow: hidden;
    background-color: var(--primary-navy);
    transform: translateZ(0);
    contain: content;
}

.hero-bg-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}

.hero-slide.active { opacity: 1; }

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
}

.hero-banner-container { 
    max-width: 500px; 
    width: 100%;
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 3;
}

.badge-pill-dark { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background-color: #1A202C; 
    color: #E2E8F0; 
    padding: 10px 22px; 
    border-radius: 30px; 
    font-size: 0.85rem; 
    font-weight: 700; 
    letter-spacing: 0.8px; 
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.badge-pill-dark i { color: #E63946; }

.hero-banner h1 { 
    font-size: 2.6rem; 
    font-weight: 800; 
    color: #FFFFFF;
    line-height: 1.15;
    margin: 4px 0;
}

.hashtag-pill {
    background-color: #1A202C;
    color: #F6AD55;
    padding: 10px 28px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 800;
    border: 2px solid #DD6B20;
    margin-bottom: 10px;
}

.hero-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
}

/* EFFETTI HOVER SUI TASTI DELLA HERO */
.btn-hero-red, .btn-hero-dark, .btn-hero-blue, .btn-primary {
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-hero-red {
    background-color: #E63946;
    color: white;
    padding: 14px 28px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}
.btn-hero-red:hover {
    background-color: #ff4d5a;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
    filter: brightness(1.1);
}

.btn-hero-dark {
    background-color: #1A202C;
    color: white;
    padding: 14px 28px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.btn-hero-dark:hover {
    background-color: #2D3748;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: #F6AD55;
}

.btn-hero-blue {
    background-color: #0284C7;
    color: white;
    padding: 14px 28px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}
.btn-hero-blue:hover {
    background-color: #0396e3;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.5);
    filter: brightness(1.1);
}

/* CONTENT SECTIONS */
.main-wrapper { max-width: 1240px; margin: 0 auto; padding: 60px 5%; width: 100%; flex-grow: 1; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.section-title p { color: var(--text-muted); font-size: 1rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 60px; }

/* CARD SERVIZI INTERATTIVE */
.card { 
    background: var(--bg-white); 
    padding: 30px 24px; 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-sm); 
    text-align: center; 
    transition: var(--transition-fast);
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary-blue);
    box-shadow: var(--shadow-md);
}
.card-icon { width: 60px; height: 60px; background: rgba(2, 132, 199, 0.1); color: var(--secondary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto 16px; transition: var(--transition-fast); }
.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* FEATURE HIGHLIGHT */
.highlight-box { background: var(--primary-navy); color: white; border-radius: var(--radius-lg); padding: 40px 30px; display: flex; align-items: center; gap: 30px; margin-bottom: 60px; }
.highlight-box h2 { color: white; font-size: 1.8rem; margin-bottom: 12px; }
.highlight-box p { color: #94A3B8; margin-bottom: 20px; font-size: 1rem; }

.btn-primary { 
    background-color: var(--primary-accent); 
    color: white; 
    padding: 14px 28px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 600; 
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}
.btn-primary:hover {
    background-color: #ff4d5a;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.5);
}

/* SEZIONE PARTNER SLIDER */
.partner-section { margin-bottom: 60px; text-align: center; }
.partner-slider-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 15px 0;
}

.partner-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: scrollLogos 50s linear infinite;
    will-change: transform;
}

.partner-track:hover {
    animation-play-state: paused;
}

@keyframes scrollLogos {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* CARDS PARTNER CON EFFETTO HOVER EVIDENZIATO */
.partner-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    width: 150px;
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition-fast);
}

.partner-card:hover, .partner-card:focus {
    transform: translateY(-6px) scale(1.05);
    border-color: var(--primary-accent);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.25);
    outline: none;
}

.partner-card img {
    max-height: 60px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    pointer-events: none;
    transition: var(--transition-fast);
}
.partner-card:hover img {
    transform: scale(1.08);
}

/* MODAL LOGO */
.logo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.logo-modal.active { display: flex; }
.logo-modal-content {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 80vh;
    position: relative;
}
.logo-modal-content img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.logo-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--primary-accent);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.logo-modal-close:hover {
    background: #ff4d5a;
    transform: scale(1.15) rotate(90deg);
}

/* CALL TO ACTION SECTION */
.cta-banner { background: var(--primary-navy); color: white; padding: 50px 24px; border-radius: var(--radius-lg); text-align: center; }
.cta-banner h2 { color: white; font-size: 1.8rem; margin-bottom: 12px; }
.cta-banner p { color: #94A3B8; margin-bottom: 24px; font-size: 1rem; }

.btn-cta-white {
    background-color: var(--bg-white);
    color: var(--primary-navy);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}
.btn-cta-white:hover {
    background-color: var(--primary-accent);
    color: white;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

/* FOOTER & SOCIAL LINKS */
footer { background-color: var(--primary-navy); color: #94A3B8; padding: 50px 5% 24px; font-size: 0.9rem; border-top: 1px solid #1E293B; }
.footer-container { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: white; font-size: 1.05rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #94A3B8; text-decoration: none; transition: var(--transition-fast); }
.footer-col a:hover { color: var(--primary-accent); padding-left: 4px; }

.social-links { display: flex; gap: 14px; margin-top: 12px; }
.social-links a { 
    width: 38px; 
    height: 38px; 
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    transition: var(--transition-fast);
}
.social-links a:hover {
    background: var(--primary-accent);
    transform: translateY(-3px) scale(1.1);
    color: white;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
}

.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.8rem; }

/* OTTIMIZZAZIONI MOBILE */
@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    .nav-links { 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--bg-white); 
        flex-direction: column; 
        padding: 20px; 
        border-bottom: 1px solid var(--border-color); 
        box-shadow: var(--shadow-md); 
        display: none; 
        gap: 16px; 
    }
    .nav-links.active { display: flex; }
    .nav-links a.active::after { display: none; }
    .highlight-box { flex-direction: column; text-align: center; padding: 30px 20px; }
    
    .partner-slider-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .partner-track {
        animation: none !important;
        padding-bottom: 10px;
    }
    .partner-card {
        scroll-snap-align: center;
    }
}