/* CSS Reset & Variable Definitions */
:root {
    --primary-red: #E20613;
    --primary-red-hover: #c40510;
    --navy-dark: #1D1D1B;
    --text-dark: #333333;
    --text-muted: #666666;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --container-width: 1200px;
    --section-padding: 80px 0;
    --e-global-typography-primary-font-family: "Open Sans", sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--e-global-typography-primary-font-family);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

p {
    font-weight: 400;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography Utilities */
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.color-red { color: var(--primary-red); }

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

/* Header Styles */
header {
    background: transparent;
    padding: 15px 0;
    position: relative;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
    transform: translateY(-100%);
    opacity: 0;
}

header.sticky-nav.show {
    transform: translateY(0);
    opacity: 1;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 110px;
    width: auto;
    transition: height 0.3s ease;
}

header.sticky-nav .header-logo {
    height: 60px;
}

/* Nav Menu */
.nav-menu {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-links-desktop {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links-desktop li a {
    font-family: var(--e-global-typography-primary-font-family);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-dark);
    transition: var(--transition);
}

.nav-links-desktop li a:hover,
.nav-links-desktop li a.active {
    color: var(--primary-red);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-icon img {
    width: 24px;
    height: 24px;
    display: block;
    transition: var(--transition);
}

.action-icon:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.btn-prenota {
    padding: 10px 20px;
    font-size: 0.9rem;
    text-transform: none;
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

/* Hero Section */
.hero {
    padding: 20px 0;
    width: 100%;
}

.hero-full-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Split Sections */
.split-section {
    padding: var(--section-padding);
}

.intro-section {
    padding: var(--section-padding);
}

.intro-section .tagline {
    display: block;
    margin-bottom: 20px;
}

.intro-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.split-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.split-content .tagline {
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.split-image img {
    border-radius: 30px;
    width: 100%;
}

/* Cards Section */
.services {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(226, 6, 19, 0.1);
}

.service-icon {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.service-card:hover .service-icon img {
    transform: translateY(-5px);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding: var(--section-padding);
    text-align: center;
    scroll-margin-top: 100px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Footer Banner */
.footer-banner {
    padding: 40px 0;
}

.footer-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
}

/* Main Footer */
footer {
    background-color: #24243E;
    color: var(--white);
    padding: var(--section-padding);
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
    align-items: flex-start;
}

.footer-logo-neg {
    max-width: 150px;
    height: auto;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.contact-col {
    text-align: left;
}

.aggiorna-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 30px;
}

.aggiorna-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.scarica-btn {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.scarica-btn:hover {
    background-color: var(--primary-red-hover);
    transform: scale(1.05);
}

.phone-number {
    margin-bottom: 25px;
}

.phone-img {
    height: 45px;
    width: auto;
}

.contact-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.email-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--white);
}

.email-container a {
    color: var(--white);
}

.social-icon {
    background: var(--white);
    color: #24243E;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    transform: rotate(10deg) scale(1.1);
}

.footer-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 40px 0;
}

.footer-middle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
}

.digita-logo img {
    height: 60px;
}

.app-buttons {
    display: flex;
    gap: 20px;
}

.app-btn {
    border: 1px solid var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-legal {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    line-height: 1.8;
}

.footer-legal p {
    margin-bottom: 2px;
}

/* Mobile/Desktop Visibility */
.mobile-only { display: none; }

@media (max-width: 768px) {
    .mobile-only { display: block; }
    .desktop-only { display: none; }
}

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

section {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

/* Responsive */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top-grid { grid-template-columns: 1fr 1fr 1.5fr; gap: 40px; }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    .hero-full-img {
        border-radius: 20px;
    }
    .split-grid { grid-template-columns: 1fr; }
    .nav-menu { 
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        z-index: 2001;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-links-desktop {
        flex-direction: column;
        gap: 30px;
    }
    .nav-links-desktop li a {
        font-size: 1.5rem;
    }
    .menu-close {
        position: absolute;
        top: 30px;
        right: 30px;
        font-size: 2rem;
        color: var(--primary-red);
        cursor: pointer;
    }
    .header-logo { height: 70px; }
    header { padding: 15px 0; }
    .header-actions { gap: 10px; }
    .btn-prenota { padding: 8px 12px; font-size: 0.8rem; }
    .action-icon img { width: 20px; height: 20px; }
    .service-icon { height: 45px; }
    .service-card { padding: 20px; }
    .services-grid { gap: 15px; }
    .intro-section h2, .split-content h2 { font-size: 1.8rem; }
    
    .footer-top-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 20px;
    }
    .logo-col { display: none; }
    .mobile-divider { margin: 20px 0; }
    
    .mobile-aggiorna-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 20px 0;
    }

    .phone-number.centered {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .phone-img {
        height: 45px;
    }

    .email-container.centered {
        justify-content: center;
        margin-bottom: 20px;
        font-size: 0.85rem;
    }

    .facebook-centered {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .fb-link {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--white);
    }

    .fb-link i {
        font-size: 1.8rem;
    }

    .footer-middle-row { 
        flex-direction: column; 
        gap: 30px; 
        border-top: none;
        padding-top: 0;
    }
    .app-buttons { flex-wrap: wrap; justify-content: center; }
    .digita-logo img { height: 50px; }
}
