:root { 
    --primary: #2c3e50; 
    --accent: #d4af37; 
    --whatsapp: #25d366;
    --bg: #f8f9fa; 
}

* { box-sizing: border-box; }
body { font-family: 'Roboto', sans-serif; margin: 0; color: #333; background: var(--bg); scroll-behavior: smooth; }

/* ========================================================
   HEADER & NAV
   ======================================================== */
header {
    background: var(--primary);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.logo-img { height: 60px; width: auto; transition: 0.3s; }
.logo-img:hover { opacity: 0.85; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu > a,
.nav-dropdown-toggle {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.nav-menu > a:hover,
.nav-dropdown-toggle:hover,
.nav-menu > a.active {
    color: var(--accent);
    background: rgba(255,255,255,0.06);
}

/* CTA preventivo nel menu */
.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
}
.nav-cta:hover {
    background: #b8962e !important;
    color: white !important;
}

/* ========================================================
   DROPDOWN LAVORAZIONI SPECIALI (Stile PC Default)
   ======================================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.dropdown-arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Menu fluttuante per PC */
.dropdown-menu {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    min-width: 240px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 999;
}

/* Triangolino sopra il dropdown (Solo PC) */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid white;
}

/* Mostra la tendina al passaggio del mouse su PC */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.dropdown-menu li a:hover {
    background: var(--bg);
    color: var(--accent);
}

.dropdown-icon { font-size: 1rem; }

/* ========================================================
   HAMBURGER BUTTON (Solo mobile)
   ======================================================== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s, width 0.3s;
    width: 100%;
}

/* Animazione X quando aperto */
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================================
   HERO
   ======================================================== */
.hero { 
    position: relative; height: 70vh; min-height: 500px;
    display: flex; align-items: center; justify-content: center; 
    color: white; text-align: center; overflow: hidden;
}
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); z-index: -1; }
.hero-content h1 { font-family: 'Montserrat', sans-serif; font-size: clamp(2rem, 5vw, 4rem); margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.btn-cta { background: var(--accent); color: white; padding: 15px 35px; text-decoration: none; border-radius: 4px; display: inline-block; margin-top: 20px; font-weight: bold; transition: 0.3s; }

/* ========================================================
   PRODOTTI & CARDS
   ======================================================== */
.container { padding: 60px 5%; max-width: 1200px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card { background: white; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; transition: 0.3s; }
.card:hover { transform: translateY(-10px); }

.card-img-container { 
    width: 100%; 
    aspect-ratio: 16 / 11; 
    overflow: hidden; 
}
.card img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: 0.6s ease; }
.card:hover img { transform: scale(1.1); }
.card-body { padding: 25px; text-align: center; }

/* ========================================================
   SEZIONE CONTATTI
   ======================================================== */
.contact-section { background: white; border-top: 1px solid #eee; }
.contact-buttons-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; 
    max-width: 800px; 
    margin: 0 auto; 
}
.contact-card { 
    background: var(--bg); 
    padding: 30px; 
    border-radius: 8px; 
    text-align: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contact-card h3 { font-family: 'Montserrat', sans-serif; color: var(--primary); margin: 0 0 10px 0; }
.contact-card p { color: #666; font-size: 0.95rem; margin: 0 0 20px 0; }

.btn-contact-action { 
    padding: 15px 25px; 
    text-decoration: none; 
    border-radius: 5px; 
    font-weight: bold; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.95rem;
}
.btn-whatsapp { background-color: var(--whatsapp); color: white !important; box-shadow: 0 4px 10px rgba(37,211,102,0.2); }
.btn-whatsapp img { width: 24px; height: 24px; margin-right: 10px; flex-shrink: 0; }
.btn-whatsapp:hover { background: #1ebe57; transform: translateY(-2px); }

.btn-email { background-color: var(--primary); color: white !important; box-shadow: 0 4px 10px rgba(44,62,80,0.2); }
.btn-email:hover { background: #34495e; transform: translateY(-2px); }

/* ========================================================
   FOOTER
   ======================================================== */
footer { background: var(--primary); color: white; text-align: center; padding: 30px; margin-top: 50px; font-size: 0.8rem; }

.footer-socials { display: flex; justify-content: center; gap: 25px; margin-bottom: 20px; }
.social-link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.social-link svg { width: 24px; height: 24px; fill: white; }
.social-link[aria-label="Facebook"] { background: #1877F2; box-shadow: 0 4px 10px rgba(24, 119, 242, 0.2); }
.social-link[aria-label="Instagram"] { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); box-shadow: 0 4px 10px rgba(214, 36, 159, 0.2); }
.social-link:hover { transform: translateY(-4px); }
.social-link[aria-label="Facebook"]:hover { box-shadow: 0 6px 15px rgba(24, 119, 242, 0.4); }
.social-link[aria-label="Instagram"]:hover { box-shadow: 0 6px 15px rgba(214, 36, 159, 0.4); }

/* ========================================================
   SLIDER SWIPER
   ======================================================== */
.swiper.swiper-mancini {
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 50px !important;
    margin: 30px auto 0 auto !important;
}
.swiper-mancini .slide-mancini {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #111111 !important; 
    height: 500px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    position: relative !important;
}
.swiper-mancini .bg-sfocato-mancini {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    filter: blur(15px) brightness(0.35) !important; 
    transform: scale(1.15) !important; 
    z-index: 1 !important;
}
.swiper-mancini .img-fronte-mancini {
    position: relative !important;
    z-index: 2 !important;
    height: 100% !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important; 
}
.swiper-mancini .swiper-pagination-bullet-active { background: var(--accent) !important; }
.swiper-mancini .swiper-button-next, .swiper-mancini .swiper-button-prev { color: var(--accent) !important; }

/* ========================================================
   RESPONSIVE MOBILE (Sotto i 900px)
   ======================================================== */
@media (max-width: 900px) {
    /* Hamburger visibile */
    .nav-toggle { display: flex; }

    /* Sidebar mobile */
    .nav-menu {
        position: fixed;
        top: 0; right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 24px 40px;
        gap: 2px;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 20px rgba(0,0,0,0.25);
        overflow-y: auto;
    }

    .nav-menu.open { transform: translateX(0); }

    .nav-menu > a,
    .nav-dropdown-toggle {
        width: 100%;
        font-size: 0.95rem;
        padding: 12px 10px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-cta {
        margin: 16px 0 0 0 !important;
        text-align: center;
        width: 100% !important;
    }

    /* Dropdown riadattato per mobile (stile fisarmonica) */
    .nav-dropdown { width: 100%; }

    .dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border-radius: 0;
        background: rgba(0,0,0,0.2);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        transition: max-height 0.3s ease;
        pointer-events: all !important; 
    }

    .dropdown-menu::before { display: none; }

    /* Questa classe viene attivata dal click del JS su mobile */
    .nav-dropdown.open .dropdown-menu {
        max-height: 300px;
        pointer-events: all;
    }

    .dropdown-menu li a {
        color: rgba(255,255,255,0.85);
        padding: 11px 20px 11px 28px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        font-size: 0.85rem;
    }

    .dropdown-menu li a:hover {
        background: rgba(255,255,255,0.08);
        color: var(--accent);
    }

    /* Altre regole mobile */
    .card-img-container { aspect-ratio: 4 / 3; }
    .hero { height: 60vh; }
    .contact-buttons-container { grid-template-columns: 1fr; }
    .swiper-mancini .slide-mancini { height: 340px !important; }
}