/* --- RESET / BASE --- */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",Arial,sans-serif;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility
}

html{scroll-behavior:smooth}

body{
    background:linear-gradient(#eee,#ddd);
    color:#222
}

/* --- NAVBAR --- */
.navbar{
    position:fixed;
    top:0;
    width:100%;
    height:70px;
    padding:0 8%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(10px);
    box-shadow:0 2px 15px rgba(0,0,0,.3);
    z-index:1000;
    transition:.3s
}
.navbar.scrolled{
    background:rgba(0,0,0,.9);
    height:64px
}
.logo{
    font-size:1.7rem;
    font-weight:900;
    letter-spacing:4px;
    color:#c78a2a
}
.logo span{color:white}
.navbar ul{display:flex;list-style:none}
.navbar li{margin-left:30px}
.navbar a{
    text-decoration:none;
    color:white;
    font-weight:500;
    padding:8px 14px;
    border-radius:10px;
    transition:.3s
}
.navbar a:hover{
    background:#c78a2a;
    transform:translateY(-2px)
}
.navbar .cta{
    background:#c78a2a;
    padding:10px 22px;
    border-radius:25px;
    font-weight:700
}
.navbar .cta:hover{background:#a36f1f}

/* Menu Toggle (Hamburger) */
.menu-toggle{
    display:none;
    flex-direction:column;
    background:transparent;
    border:none;
    cursor:pointer;
    padding:5px;
    gap:5px;
    z-index:1001
}
.menu-toggle span{
    width:25px;
    height:3px;
    background:#c78a2a;
    border-radius:3px;
    transition:.3s
}
.menu-toggle.active span:nth-child(1){
    transform:rotate(45deg) translate(8px,8px)
}
.menu-toggle.active span:nth-child(2){
    opacity:0
}
.menu-toggle.active span:nth-child(3){
    transform:rotate(-45deg) translate(7px,-7px)
}

/* --- HERO --- */
.hero{
    height:100vh;
    padding-top:70px;
    background:url("background.jpg") center/cover no-repeat;
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative
}
.hero::after{
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(circle at center,transparent 0%,rgba(0,0,0,.6) 70%)
}
.overlay{
    background:rgba(0,0,0,.6);
    padding:70px 40px;
    border-radius:22px;
    text-align:center;
    color:white;
    max-width:900px;
    position:relative;
    z-index:2;
    animation:heroIn 1.2s ease forwards
}
@keyframes heroIn{
    from{opacity:0;transform:translateY(30px) scale(.98)}
    to{opacity:1;transform:translateY(0) scale(1)}
}
.hero-title{
    font-size:4.6rem;
    font-weight:900;
    letter-spacing:6px;
    color:#c78a2a
}
.hero-title span{color:white}
.hero-sub{
    margin:20px 0;
    font-size:1.3rem;
    opacity:.9
}

/* --- CTA HERO & ABOUT (CORRETTE) --- */
.btn{
    background:#c78a2a;
    padding:16px 44px;
    border-radius:40px;
    color:white;
    font-weight:bold;
    text-decoration:none;
    transition:background .3s, transform .3s, box-shadow .3s;
    box-shadow:0 10px 25px rgba(0,0,0,.35);
    display:inline-block
}
.btn:hover{
    background:#a36f1f;
    transform:translateY(-2px);
    box-shadow:0 14px 35px rgba(0,0,0,.45)
}

.lead{
    margin-top:25px;
    font-size:1rem;
    opacity:.9
}

/* --- SECTIONS --- */
section{
    padding:90px 10%;
    text-align:center;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
    scroll-margin-top:90px
}
section h2{
    font-size:2.6rem;
    letter-spacing:2px;
    position:relative;
    margin-bottom:50px
}
section h2::after{
    content:"";
    width:80px;
    height:4px;
    background:#c78a2a;
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    bottom:-15px;
    border-radius:10px
}
.section-desc{
    max-width:700px;
    margin:0 auto 40px;
    font-size:1.1rem;
    opacity:.8
}

/* --- REVEAL --- */
.reveal{
    opacity:0;
    transform:translateY(60px);
    transition:opacity .9s ease,transform .9s ease
}
.reveal.active{
    opacity:1;
    transform:translateY(0)
}

/* --- SERVIZI --- */
.services{
    background:#111;
    color:white
}
.service-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:30px
}
.service{
    background:linear-gradient(145deg,#1a1a1a,#222);
    padding:45px 30px;
    border-radius:18px;
    transition:.4s
}
.service h3{
    font-size:1.4rem;
    margin-bottom:15px
}
.service p{
    line-height:1.6;
    opacity:.9
}
.service:hover{
    transform:translateY(-10px) scale(1.02);
    box-shadow:0 18px 40px rgba(0,0,0,.5);
    background:#c78a2a
}

/* --- GALLERIA --- */
.gallery{
    background:linear-gradient(#fff,#f0f0f0)
}
.gallery-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:22px
}
.gallery-grid img{
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    border-radius:18px;
    box-shadow:0 15px 35px rgba(0,0,0,.35);
    transition:transform .4s ease,box-shadow .4s ease;
    cursor:pointer
}
.gallery-grid img:hover{
    transform:scale(1.08);
    box-shadow:0 25px 60px rgba(0,0,0,.6)
}
.gallery-cta{
    margin-top:60px;
    padding:50px 20px;
    background:linear-gradient(145deg,#111,#222);
    color:#fff;
    border-radius:22px
}

/* --- ABOUT --- */
.about{
    background:linear-gradient(135deg,#f5f5f5,#ffffff)
}
.about-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:60px;
    align-items:center
}
.about-text{text-align:left}
.about-tag{
    display:inline-block;
    background:#c78a2a;
    color:#fff;
    padding:6px 14px;
    border-radius:20px;
    font-weight:600;
    font-size:.85rem;
    margin-bottom:15px
}
.about-text h3{
    font-size:2rem;
    margin-bottom:20px;
    line-height:1.3
}
.about-highlights{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin:30px 0
}
.about-highlights div{
    background:#111;
    color:#fff;
    padding:20px;
    border-radius:16px;
    text-align:center
}
.about-highlights strong{
    display:block;
    font-size:1.8rem;
    color:#c78a2a
}
.about-highlights span{
    font-size:.9rem;
    opacity:.8
}
.about-image img{
    width:100%;
    border-radius:22px;
    box-shadow:0 20px 50px rgba(0,0,0,.35)
}

/* --- CONTATTI --- */
.contact{
    background:#111;
    color:white
}
.trust{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:20px;
    margin:30px 0;
    font-size:1rem;
    opacity:.9
}
.trust div{
    padding:10px 20px;
    background:rgba(199,138,42,.1);
    border-radius:20px;
    border:1px solid rgba(199,138,42,.3)
}
.preventivo-form{
    max-width:600px;
    margin:40px auto 0;
    display:flex;
    flex-direction:column;
    gap:15px
}
.form-group{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px
}
.preventivo-form input,
.preventivo-form select,
.preventivo-form textarea{
    padding:14px;
    border-radius:8px;
    border:none;
    font-size:1rem;
    transition:border .3s,box-shadow .3s
}
.preventivo-form input.error,
.preventivo-form select.error,
.preventivo-form textarea.error{
    border:2px solid #ff4444;
    box-shadow:0 0 10px rgba(255,68,68,.3)
}
.preventivo-form .error-message{
    color:#ff4444;
    font-size:.85rem;
    margin-top:5px;
    display:block
}
.preventivo-form button{
    background:#c78a2a;
    color:white;
    padding:14px;
    border-radius:30px;
    border:none;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 10px 25px rgba(0,0,0,.35)
}
.preventivo-form button:hover{
    background:#a36f1f;
    transform:translateY(-2px)
}

/* --- FOOTER --- */
footer{
    background:linear-gradient(135deg,#0a0a0a,#111);
    color:#aaa;
    padding:0
}
.footer-container{
    max-width:1200px;
    margin:0 auto;
    padding:50px 10%;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
    text-align:left
}
.footer-section h3{
    color:#c78a2a;
    font-size:1.5rem;
    margin-bottom:15px;
    letter-spacing:2px
}
.footer-section h3 span{
    color:#fff
}
.footer-section h4{
    color:#fff;
    font-size:1.1rem;
    margin-bottom:15px;
    font-weight:600
}
.footer-section p{
    line-height:1.8;
    margin-bottom:10px;
    opacity:.9
}
.footer-section ul{
    list-style:none;
    padding:0
}
.footer-section ul li{
    margin-bottom:10px
}
.footer-section a{
    color:#aaa;
    text-decoration:none;
    transition:.3s;
    display:inline-flex;
    align-items:center;
    gap:8px
}
.footer-section a:hover{
    color:#c78a2a;
    transform:translateX(5px)
}
.footer-section a i{
    width:20px;
    text-align:center
}
.footer-bottom{
    background:#000;
    padding:20px;
    text-align:center;
    border-top:1px solid rgba(199,138,42,.2);
    font-size:.85rem
}
.footer-bottom p{
    margin:0;
    opacity:.8
}
.footer-social{
    display:flex;
    gap:12px;
    margin-top:20px;
    padding-top:20px;
    border-top:1px solid rgba(199,138,42,.2)
}
.footer-social a{
    width:40px;
    height:40px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    text-decoration:none;
    transition:all .3s;
    font-size:1.1rem;
    box-shadow:0 4px 10px rgba(0,0,0,.3)
}
.footer-social a:hover{
    transform:translateY(-3px) scale(1.1);
    box-shadow:0 6px 15px rgba(0,0,0,.4)
}
.footer-facebook{
    background:#1877F2
}
.footer-facebook:hover{
    background:#1565c0
}
.footer-instagram{
    background:linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%)
}
.footer-instagram:hover{
    background:linear-gradient(45deg,#ff9a4d 0%,#f6785c 25%,#e63953 50%,#d63376 75%,#cc2898 100%)
}

/* --- CONTACT BAR --- */
.contact-bar{
    position:fixed;
    right:20px;
    bottom:20px;
    display:flex;
    flex-direction:column;
    gap:12px;
    z-index:9999
}
.contact-bar a{
    color:#fff;
    width:50px;
    height:50px;
    border-radius:50%;
    font-weight:bold;
    text-decoration:none;
    box-shadow:0 8px 20px rgba(0,0,0,.4);
    transition:all .3s;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.2rem
}
.contact-bar a:hover{
    transform:translateY(-5px) scale(1.1);
    box-shadow:0 12px 30px rgba(0,0,0,.5)
}
.whatsapp{
    background:#25D366
}
.whatsapp:hover{
    background:#20ba5a
}
.phone{
    background:#c78a2a
}
.phone:hover{
    background:#a36f1f
}
.mail{
    background:#444
}
.mail:hover{
    background:#555
}
.facebook{
    background:#1877F2
}
.facebook:hover{
    background:#1565c0
}
.instagram{
    background:linear-gradient(45deg,#f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%)
}
.instagram:hover{
    background:linear-gradient(45deg,#ff9a4d 0%,#f6785c 25%,#e63953 50%,#d63376 75%,#cc2898 100%)
}

/* --- POPUP --- */
.popup{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.8);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:10000;
    animation:fadeIn .3s ease
}
.popup-box{
    background:linear-gradient(145deg,#111,#222);
    color:#fff;
    padding:50px 40px;
    border-radius:22px;
    text-align:center;
    max-width:450px;
    width:90%;
    position:relative;
    box-shadow:0 25px 60px rgba(0,0,0,.6);
    animation:popupSlide .4s ease
}
.popup-box h3{
    font-size:1.8rem;
    margin-bottom:15px;
    color:#c78a2a
}
.popup-box p{
    margin-bottom:25px;
    opacity:.9;
    line-height:1.6
}
.popup-box .close{
    position:absolute;
    top:15px;
    right:20px;
    font-size:1.8rem;
    cursor:pointer;
    color:#aaa;
    transition:.3s;
    line-height:1;
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(255,255,255,.1)
}
.popup-box .close:hover{
    color:#fff;
    background:rgba(255,255,255,.2);
    transform:rotate(90deg)
}
@keyframes fadeIn{
    from{opacity:0}
    to{opacity:1}
}
@keyframes popupSlide{
    from{opacity:0;transform:scale(.8) translateY(-20px)}
    to{opacity:1;transform:scale(1) translateY(0)}
}

/* --- TABLET --- */
@media(max-width:1024px){
    section{padding:70px 8%}
    .hero-title{font-size:4rem}
    .service-grid{grid-template-columns:repeat(2,1fr)}
    .gallery-grid{grid-template-columns:repeat(2,1fr)}
    .about-container{gap:40px}
}

/* --- MOBILE --- */
@media(max-width:768px){
    .menu-toggle{display:flex}
    .navbar{
        padding:0 5%
    }
    .navbar ul{
        position:fixed;
        top:70px;
        left:0;
        width:100%;
        background:rgba(0,0,0,.95);
        backdrop-filter:blur(10px);
        flex-direction:column;
        padding:30px 0;
        transform:translateX(-100%);
        transition:transform .3s ease;
        box-shadow:0 5px 20px rgba(0,0,0,.5)
    }
    .navbar ul.active{
        transform:translateX(0)
    }
    .navbar li{
        margin:0;
        text-align:center;
        padding:15px 0
    }
    .navbar a{
        display:block;
        padding:12px 20px;
        font-size:1.1rem
    }
    .hero{
        padding-top:70px
    }
    .hero-title{
        font-size:2.5rem;
        letter-spacing:3px
    }
    .hero-sub{
        font-size:1.1rem;
        padding:0 10px
    }
    .overlay{
        padding:50px 25px;
        margin:0 15px
    }
    section{
        padding:50px 5%;
        scroll-margin-top:70px
    }
    section h2{
        font-size:2rem
    }
    .service-grid{
        grid-template-columns:1fr;
        gap:20px
    }
    .gallery-grid{
        grid-template-columns:1fr;
        gap:15px
    }
    .about-container{
        grid-template-columns:1fr;
        gap:30px
    }
    .about-text{
        text-align:center
    }
    .form-group{
        grid-template-columns:1fr
    }
    .about-highlights{
        grid-template-columns:1fr;
        gap:15px
    }
    .contact-bar{
        right:15px;
        bottom:15px;
        gap:10px
    }
    .contact-bar a{
        width:45px;
        height:45px;
        font-size:1.1rem
    }
    .footer-container{
        grid-template-columns:1fr;
        gap:30px;
        padding:40px 5%;
        text-align:center
    }
    .footer-section{
        text-align:center
    }
    .footer-section ul{
        text-align:left;
        display:inline-block
    }
    .popup-box{
        padding:35px 25px;
        max-width:90%;
        margin:0 15px
    }
    .popup-box h3{
        font-size:1.5rem
    }
    .btn{
        padding:14px 35px;
        font-size:.95rem
    }
    .trust{
        flex-direction:column;
        gap:10px;
        margin-bottom:30px
    }
}

/* --- MOBILE PICCOLO --- */
@media(max-width:480px){
    .hero-title{
        font-size:2rem;
        letter-spacing:2px
    }
    .hero-sub{
        font-size:1rem
    }
    section h2{
        font-size:1.7rem
    }
    .service{
        padding:35px 20px
    }
    .gallery-cta{
        padding:40px 15px
    }
    .about-highlights div{
        padding:15px
    }
    .preventivo-form input,
    .preventivo-form select,
    .preventivo-form textarea{
        padding:12px;
        font-size:.95rem
    }
    .contact-bar a{
        width:40px;
        height:40px;
        font-size:1rem
    }
    .footer-container{
        padding:30px 4%
    }
    .footer-section h3{
        font-size:1.3rem
    }
}
