:root {
    /* TEMA DARK NAVY & GOLD */
    --bg-navy: #0a192f;
    --bg-card: #112240;
    --text-white: #e6f1ff;
    --accent-gold: #d4af37;
    --accent-hover: #b39025;
    --whatsapp-green: #25D366;
    --danger-red: #ff6b6b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background-color: var(--bg-navy);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
header {
    background: rgba(10, 25, 47, 0.95);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1e3a5f;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-white);
    margin: 0 10px; /* Ridotto da 15 a 10 per guadagnare spazio */
    font-weight: 500;
    font-size: 0.9rem; /* Leggermente più piccolo per sicurezza */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    white-space: nowrap; /* Evita che il testo vada a capo rompendo il layout */
}

@media (max-width: 480px) {
    nav a {
        margin: 0 5px; /* Ancora più stretto su telefoni molto piccoli */
        font-size: 0.8rem;
    }
    .btn-nav {
        padding: 6px 10px; /* Compatta il tasto Chiama */
    }
}

nav a:hover {
    color: var(--accent-gold);
}

.btn-nav {
    border: 1px solid var(--accent-gold);
    padding: 8px 16px;
    border-radius: 4px;
    color: var(--accent-gold) !important;
}

.btn-nav:hover {
    background: var(--accent-gold);
    color: var(--bg-navy) !important;
}

/* HERO */
.hero {
    padding: 60px 0 80px;
    text-align: center;
    background: radial-gradient(circle at center, #1b2e4b 0%, #0a192f 100%);
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-white);
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #8892b0;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px; /* Ripristinato padding originale */
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem; /* Ripristinato font originale */
    text-decoration: none;
    width: 100%;
    max-width: 320px; /* Ripristinato width originale */
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Override specifico per Mobile Sticky Bar */
.mobile-sticky-bar .btn {
    padding: 10px 15px !important;
    font-size: 0.85rem !important;
    max-width: none; /* Occupa tutto lo spazio disponibile nel flex */
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--bg-navy);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.btn-whatsapp {
    background: var(--whatsapp-green); /* Solid background */
    border: none;
    color: white; /* White text on green */
}

.btn-whatsapp:hover {
    background: #1ebd59; /* Slightly darker green */
    color: white;
    transform: translateY(-2px);
}

/* SERVICES */
.services {
    padding: 80px 0;
}

.services h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent-gold);
    font-size: 2rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #1e3a5f;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-white);
}

.service-card p {
    color: #8892b0;
    font-size: 0.9rem;
}

/* PRICES SECTION */
.prices-section {
    padding: 60px 0;
    background: #0d1f3a;
    border-top: 1px solid #1e3a5f;
    border-bottom: 1px solid #1e3a5f;
}

.prices-section h2 {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

/* IVA CONTROL PANEL */
.iva-control-panel {
    text-align: center;
    margin-bottom: 40px;
}

.btn-iva-toggle {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-iva-toggle:hover {
    background: rgba(212, 175, 55, 0.1);
}

.btn-iva-toggle.active {
    background: var(--accent-gold);
    color: var(--bg-navy);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.price-card {
    background: var(--bg-navy);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #1e3a5f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    position: relative; /* Per posizionamento */
}

.price-card h3 {
    font-size: 1.1rem;
    color: #8892b0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-card .price {
    font-size: 2.5rem; /* Numero un po' più grande */
    color: var(--text-white);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

/* NUOVO STILE PER L'ETICHETTA IVA */
.iva-tag {
    font-size: 0.8rem;
    font-weight: bold;
    color: #ff8787; /* Rosso chiaro elegante */
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.price-desc {
    font-size: 0.95rem;
    color: #e6f1ff;
    margin-bottom: 5px;
}

.small-note {
    font-size: 0.8rem;
    color: #8892b0;
    font-style: italic;
}

/* Card in evidenza */
.price-card.featured {
    border: 1px solid var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
}

/* STICKY BAR MOBILE */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 10px 15px;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    border-top: 1px solid var(--accent-gold);
    display: flex;
    gap: 10px;
    transform: translateY(100%); /* Nascosta di base */
    transition: transform 0.3s ease-in-out;
}

/* Mostra solo su mobile e solo quando attiva */
@media (max-width: 768px) {
    .mobile-sticky-bar.active {
        transform: translateY(0);
    }
    body {
        padding-bottom: 0; /* Rimosso padding fisso */
    }
}

@media (min-width: 769px) {
    .mobile-sticky-bar {
        display: none;
    }
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0px rgba(212, 175, 55, 0); }
}

.price-card .btn-whatsapp {
    margin-top: 20px;
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
}

.price-card {
    transition: transform 0.2s;
    cursor: default;
}

.price-card:hover {
    transform: scale(1.02);
}

    padding: 100px 0 80px; /* Aumentato da 80px a 100px */
    background: var(--bg-navy);
    border-top: 1px solid #1e3a5f; /* Aggiunto bordo separatore */
}

.about h2 {
    text-align: center;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.benefit-item strong {
    display: block;
    color: var(--accent-gold);
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.benefit-item p {
    color: #8892b0;
}

/* GALLERY SECTION (MARQUEE) */
.gallery-section {
    padding: 60px 0;
    background: var(--bg-card);
    overflow: hidden; /* Nasconde ciò che esce dai bordi */
}

.gallery-section h2 {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 30px;
}

/* Contenitore che scorre */
.gallery-track {
    display: flex;
    gap: 20px;
    width: max-content; /* Larghezza basata sul contenuto */
    animation: scroll-left 40s linear infinite; /* Scorrimento lento e continuo */
}

/* Stop animazione al passaggio del mouse per vedere meglio */
.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    position: relative;
    width: 300px; /* Larghezza fissa per ogni foto */
    height: 225px; /* Aspect ratio 4:3 */
    flex-shrink: 0; /* Impedisce che si rimpiccioliscano */
    border-radius: 8px;
    border: 1px solid #1e3a5f;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 25, 47, 0.9);
    color: var(--text-white);
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
    /* Sempre visibile su mobile/carosello, o solo hover? Facciamo sempre visibile ma piccola */
    opacity: 0; 
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Si sposta di metà (perché duplicheremo il contenuto) */
}

/* FAQ SECTION */
.faq-section {
    padding: 80px 0;
    background: #0d1f3a;
}

.faq-section h2 {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 50px;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.faq-item h4 {
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq-item p {
    color: #8892b0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* CONTACT */
.contact {
    padding: 80px 0;
    background: var(--bg-card);
}

.contact-card {
    text-align: center;
}

.contact-card h2 {
    color: var(--text-white);
    margin-bottom: 20px;
}

.big-phone {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
    margin-bottom: 10px;
}

hr {
    margin: 30px auto;
    width: 50%;
    border: none;
    border-top: 1px solid #1e3a5f;
}

/* FOOTER */
footer {
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    background: #020c1b;
    color: #556075;
    border-top: 1px solid #1e3a5f;
}

.footer-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.8;
    filter: grayscale(20%);
}

/* MEDIA QUERIES */
@media (min-width: 768px) {
    .cta-group {
        flex-direction: row;
        justify-content: center;
    }
    .hero h1 {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* REVIEWS SECTION */
.reviews-section {
    padding: 80px 0;
    background: #0d1f3a; /* Similar to prices section */
}

.reviews-section h2 {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 30px;
}

.overall-rating {
    text-align: center;
    margin-bottom: 50px;
}

.rating-score {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-white);
    display: block;
    line-height: 1;
}

.stars {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin: 10px 0;
}

.review-count {
    color: #8892b0;
    font-weight: bold;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #1e3a5f;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #1e3a5f;
    padding-bottom: 10px;
}

.review-header strong {
    color: var(--text-white);
}

.review-card p {
    color: #8892b0;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* STILE SLIDER PRIMA/DOPO */
.works-section {
    padding: 80px 0;
    background: #0a192f; /* Dark Navy come sfondo */
}

.works-section h2 {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.work-item h4 {
    text-align: center;
    color: var(--text-white);
    margin-bottom: 15px;
    font-weight: 500;
}

.ba-slider {
    position: relative;
    width: 100%;
    /* Aspect ratio fisso per evitare salti (es. 4:3) */
    padding-bottom: 75%; 
    background: #000;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--accent-gold);
    cursor: col-resize;
    user-select: none;
    touch-action: pan-y; /* Permette scroll verticale ma BLOCCA scroll orizzontale del browser */
    -webkit-user-drag: none; /* Impedisce il drag delle immagini su Safari/Chrome */
}

.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Evita drag dell'immagine */
}

/* Immagine DOPO sta sopra */
.img-after {
    z-index: 2;
    /* Clip-path gestito via JS */
}

/* Immagine PRIMA sta sotto */
.img-before {
    z-index: 1;
}

/* Maniglia centrale */
.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gold);
    z-index: 3;
    pointer-events: none; /* Clicca attraverso */
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Area touch invisibile per migliorare la presa */
.slider-handle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -20px;
    right: -20px;
    z-index: 4;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-navy);
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    font-size: 14px;
}