/* UI/UX Enhancements */

/* Smooth scroll per tutta la pagina */
html {
    scroll-behavior: smooth;
}

/* Effetti hover e tocco (touch/active) per pulsanti */
.button {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease-in-out, color 0.2s ease-in-out !important;
}

.button.primary:hover,
.button.primary:active {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.button:not(.primary):hover,
.button:not(.primary):active {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.15);
}

/* Effetto di sollevamento (lift) per le card/immagini delle sezioni */
.spotlight .image img {
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out !important;
}

.spotlight:hover .image img {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

/* --- Soluzioni e Fix --- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
#page-wrapper {
    border: none !important;
    box-shadow: none !important;
}
#header {
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* --- Fix doppie linee su mobile --- */
@media screen and (max-width: 736px) {
    .features > li:first-child,
    .features > li:first-of-type {
        border-top: none !important;
    }
}

/* --- Personalizzazione Colori Sezioni --- */
@media screen and (max-width: 736px) {
    #cta {
        background-color: #fff7f3 !important; /* Colore sfondo chiaro tema (#fff7f3) solo per mobile */
    }
}

@media screen and (min-width: 737px) {
    .wrapper.style5.contatti {
        background-color: transparent !important;
        padding: 6em 0 !important;
    }
    .wrapper.style5.contatti .inner {
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-radius: 20px;
        padding: 5em 4em !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        max-width: 800px;
        margin: 0 auto;
    }
}

/* --- Decorazioni in Trasparenza (More.aspx) --- */
.bg-decoration {
    position: absolute;
    top: 5%;
    right: 0;
    width: 350px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    transform: rotate(15deg);
}
@media screen and (max-width: 980px) {
    .bg-decoration {
        width: 250px;
        right: -5%;
        top: 10%;
        opacity: 0.03;
    }
}
.wrapper.style5 .inner {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.wrapper.style5 .inner > * {
    position: relative;
    z-index: 2;
}

/* --- Nuove Features Interattive --- */

/* 1. Effetto Parallax sul Banner Hero (solo desktop per performance) */
@media screen and (min-width: 737px) {
    #banner.hero-left, body.landing #page-wrapper {
        background-attachment: fixed !important;
    }
}

/* 2. Animazioni eleganti sui link testuali (sottolineatura animata) */
/* Seleziono i link testuali escludendo pulsanti e immagini */
#main a:not(.button):not(.image), 
#footer .legal-links a {
    position: relative;
    text-decoration: none;
    border-bottom: none !important;
}
#main a:not(.button):not(.image)::after, 
#footer .legal-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease-in-out;
}
#main a:not(.button):not(.image):hover::after, 
#footer .legal-links a:hover::after {
    width: 100%;
}

/* 3. Floating Action Button (FAB) */
.fab-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #e8a682; /* Colore richiesto (Beige/Primary) */
    color: #502d29 !important; /* Icona scura per mantenere leggibilità e contrasto */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Animazione di Pulsazione */
.fab-button::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background-color: #e8a682;
    z-index: -1;
    animation: fab-pulse 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes fab-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

.fab-button:hover {
    transform: scale(1.1);
    background-color: #502d29; /* Hover nel colore principale scuro */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    color: #fff !important;
}
.fab-button:hover::after {
    background-color: #502d29;
}
@media screen and (max-width: 736px) {
    .fab-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* Uniformare colore placeholder a quello della dropdown Categorie */
.wrapper.style5.contatti input::placeholder, .wrapper.style5.contatti textarea::placeholder { color: #4a4a4a !important; opacity: 1 !important; }
.wrapper.style5.contatti select { color: #4a4a4a !important; }
.wrapper.style5.contatti input[type='text'], .wrapper.style5.contatti input[type='email'], .wrapper.style5.contatti textarea { color: #4a4a4a !important; }

/* --- Effetto di Schiarimento Animato sul Banner --- */

/* 1. Sfondo BASE (Stato Finale Schiarito: 40% -> 30%) */
#banner.hero-left {
    background: linear-gradient(90deg, rgba(80, 45, 41, 0.40) 0%, rgba(80, 45, 41, 0.25) 50%, rgba(80, 45, 41, 0) 75%), url('../../images/banner.jpg') center/cover no-repeat !important;
}

/* Colore testo bianco puro */
#banner .hero-wrap,
#banner .hero-title,
#banner .hero-subtitle {
    color: #ffffff !important;
}

/* 2. Sfondo INIZIALE (Stato Iniziale Scuro: 85% -> 50%) applicato tramite :after */
#banner.hero-left:after {
    content: '';
    position: absolute;
    inset: 0;
    display: block !important;
    background: linear-gradient(90deg, rgba(80, 45, 41, 0.85) 0%, rgba(80, 45, 41, 0.50) 50%, rgba(80, 45, 41, 0) 90%), url('../../images/banner.jpg') center/cover no-repeat !important;
    z-index: 0;
    pointer-events: none;
    /* L'animazione si attiva non appena la pagina rimuove la classe .is-preload */
    transition: none !important;
    animation: fadeSchiarimento 5s ease-in-out forwards !important;
}

/* Keyframes per completare la transizione (da opacity 1 a opacity 0) in 1 secondo */
@keyframes fadeSchiarimento {
    0% { opacity: 1; }
}

/* --- Override per mostrare 2 recensioni affiancate su desktop --- */
@media screen and (min-width: 981px) {
    .testimonial-box {
        flex: 1 1 calc(50% - 30px) !important;
    }
}

