/* --- Palette Colori --- */
:root {
    --primary: #f3dfd9;      /* Rosa pallido */
    --primary-dark: #e4c8c0; /* Rosa più scuro */
    --secondary: #aca5a5;    /* Grigio elegante */
    --secondary-dark: #938d8d;/* Grigio più scuro */
    --accent: #232323;       /* Nero/Grigio scurissimo */
    --accent-light: #464646; /* Grigio scuro */
    --success: #10b981;      /* Verde */
    --warning: #f59e0b;      /* Giallo/Ambra */
    --danger: #ef4444;       /* Rosso */
    --dark: #232323;         /* Alias per accent */
    --light: #f8fafc;       /* Grigio chiarissimo */
    --white: #ffffff;
    --nav-height: 65px;
}

/* --- Impostazioni Base --- */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body { font-family: 'Poppins', sans-serif; color: var(--dark); background-color: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
section { padding: 4rem 1rem; overflow: hidden; position: relative; }
@media (min-width: 768px) { section { padding: 6rem 2rem; } }
@media (min-width: 1024px) { section { padding: 8rem 2rem; } }
.container-lg { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }

/* --- Tema Scuro --- */
.dark-section { background-color: var(--accent); color: var(--light); }
.dark-section h1, .dark-section h2, .dark-section h3, .dark-section h4 { color: var(--white); }
.dark-section .section-subtitle, .dark-section p, .dark-section li { color: var(--gray); }
.dark-section .custom-card { background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--light); }
.dark-section .custom-card h3, .dark-section .custom-card h4 { color: var(--white); }
.dark-section .custom-card p, .dark-section .custom-card li { color: var(--gray); }
.dark-section .styled-list li i { color: var(--primary); background-color: rgba(243, 223, 217, 0.1); }
.dark-section .text-primary { color: var(--primary) !important; }
.dark-section .text-accent { color: var(--white) !important; }
.dark-section .hoverable-card:hover { box-shadow: 0 25px 50px rgba(255, 255, 255, 0.08); }

/* --- Barra Navigazione --- */
#main-nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); padding: 0.75rem 0; height: var(--nav-height); transition: transform 0.3s ease-in-out; border-bottom: 1px solid rgba(0, 0, 0, 0.05); transform: translateY(0); }
#main-nav.nav-hidden { transform: translateY(-100%); }
#main-nav .nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
#main-nav .logo { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--accent); transition: color 0.3s; flex-shrink: 0; }
#main-nav .logo:hover { color: var(--primary-dark); }
.desktop-nav a { color: var(--accent-light); font-weight: 500; padding: 0.5rem 0.8rem; margin: 0 0.15rem; border-radius: 999px; transition: color 0.3s ease, background-color 0.3s ease; position: relative; overflow: hidden; font-size: 0.85rem; text-align: center; white-space: nowrap; }
.desktop-nav a:hover { color: var(--dark); background-color: rgba(0, 0, 0, 0.05); }
.desktop-nav a.active { color: var(--dark); font-weight: 600; background-color: var(--primary); }

/* --- Barra Progresso --- */
#scroll-progress-bar { position: fixed; top: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%); width: 0%; z-index: 1001; transition: width 0.05s linear; }

/* --- Elementi Comuni & Tipografia Mobile --- */
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; text-align: center; line-height: 1.2; }
.section-subtitle { font-size: 1rem; color: var(--secondary-dark); text-align: center; max-width: 750px; margin: 0 auto 3rem auto; font-weight: 400; line-height: 1.7; }
@media (min-width: 768px) { .section-title { font-size: 3.2rem; margin-bottom: 1.5rem;} .section-subtitle { font-size: 1.3rem; margin-bottom: 4rem;} }
.dark-section .section-subtitle { color: var(--gray); }

.hoverable-card { transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.hoverable-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1); }
.dark-section .hoverable-card:hover { box-shadow: 0 25px 50px rgba(255, 255, 255, 0.08); }

.custom-card { background-color: var(--white); border-radius: 1.25rem; padding: 2rem; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.07); display: flex; flex-direction: column; }

.styled-list li { position: relative; padding-left: 2.2rem; margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.6; }
.styled-list li i { position: absolute; left: 0; top: 6px; color: var(--primary); font-size: 1.1rem; background-color: rgba(243, 223, 217, 0.15); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.dark-section .styled-list li i { background-color: rgba(243, 223, 217, 0.1); }

.btn { display: inline-block; padding: 0.9rem 2.2rem; border-radius: 999px; font-weight: 600; text-align: center; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; border: none; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; font-size: 1rem; }
.btn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18); }
.btn-primary { background: var(--primary); color: var(--dark); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-light); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-dark); }
.btn i { margin-right: 0.6rem; }

/* --- Animazioni --- */
.animate-on-scroll { opacity: 0; transition: opacity 0.9s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.9s cubic-bezier(0.165, 0.84, 0.44, 1); }
.fade-in-up { transform: translateY(50px); }
.fade-in-left { transform: translateX(-50px); }
.fade-in-right { transform: translateX(50px); }
.scale-in { transform: scale(0.9); }
.is-visible { opacity: 1; transform: none; }
.delay-100 { transition-delay: 0.1s !important; } .delay-200 { transition-delay: 0.2s !important; } .delay-300 { transition-delay: 0.3s !important; } .delay-400 { transition-delay: 0.4s !important; } .delay-500 { transition-delay: 0.5s !important; } .delay-600 { transition-delay: 0.6s !important; } .delay-700 { transition-delay: 0.7s !important; }

/* --- Stili Specifici Sezioni --- */
/* Hero */
#hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: var(--nav-height); background: var(--accent); color: var(--white); position: relative; }
#hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--white); line-height: 1.3; }
#hero .subtitle { font-size: 1.1rem; font-weight: 400; color: var(--primary); margin-bottom: 3rem; max-width: 650px; margin-left: auto; margin-right: auto; line-height: 1.8; }
@media (min-width: 768px) { #hero h1 { font-size: 4rem; } #hero .subtitle { font-size: 1.5rem; } }
#hero .scroll-down-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); opacity: 0; animation: fadeIn 1s 1.8s forwards, bounce 2.5s infinite 2.8s; color: var(--primary); font-size: 1.8rem; }

/* Problema */
#problema { background-color: var(--white); }
#problema .problem-card { text-align: center; padding: 2rem; border-radius: 1rem; background-color: #fff7f7; border: 1px solid var(--danger); }
#problema .problem-icon { font-size: 2.5rem; color: var(--danger); margin-bottom: 1rem; display: inline-block; }
#problema h3 { color: var(--danger); font-size: 1.25rem; margin-bottom: 0.5rem;}
#problema p { color: var(--accent-light); font-size: 0.95rem;}

/* Valori e Pilastri */
#valori-pilastri { background-color: var(--accent); }
#valori-pilastri .vp-card { text-align: center; height: 100%; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2rem; border-radius: 1rem; }
#valori-pilastri .vp-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 1.5rem; display: inline-block; }
#valori-pilastri .vp-title { font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 0.75rem; }
#valori-pilastri .vp-description { font-size: 0.9rem; color: var(--gray); line-height: 1.6; }

/* Come Funziona (Servizi) */
#come-funziona { background-color: var(--white); }
.service-tabs button { padding: 0.75rem 1.5rem; border-radius: 999px; font-weight: 600; transition: all 0.3s ease; border: 2px solid var(--primary); color: var(--primary-dark); background-color: transparent; }
.service-tabs button:hover { background-color: rgba(243, 223, 217, 0.1); color: var(--dark); }
.service-tabs button.active { background-color: var(--primary); color: var(--dark); border-color: var(--primary); }
.service-content { display: none; animation: fadeIn 0.6s ease; }
.service-content.active { display: block; }
.service-content h3 { margin-bottom: 0.5rem; font-size: 1.8rem; font-weight: 700; }
.service-content .service-subtitle { text-align: center; font-size: 1rem; font-weight: 500; color: var(--accent); margin-bottom: 2rem; }
.service-content .service-point { background-color: #f9fafb; padding: 1.25rem; border-radius: 0.75rem; border: 1px solid #e5e7eb; margin-bottom: 1rem; }
.service-content .service-point h4 { color: var(--accent); font-size: 1.1rem; margin-bottom: 0.25rem; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.service-content .service-point h4 i { color: var(--primary); }
.service-content .service-point p { font-size: 0.95rem; color: var(--secondary-dark); line-height: 1.6; }

/* Perché Sceglierci */
#perche-noi { background-color: var(--accent); }
.differentiator-item { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 2.5rem; }
.differentiator-icon { flex-shrink: 0; font-size: 1.8rem; color: var(--primary); margin-top: 5px; width: 40px; text-align: center; }
.differentiator-title { font-weight: 600; font-size: 1.2rem; color: var(--white); margin-bottom: 0.5rem; }
.differentiator-text { font-size: 1rem; color: var(--gray); line-height: 1.7; }

/* Risultati e Fiducia */
#risultati { background-color: var(--light); }
#caseStudyChartContainer { position: relative; height: 300px; margin-top: 1.5rem; }
@media (min-width: 768px) { #caseStudyChartContainer { height: 350px; } }
.satisfaction-score { font-size: 3.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
@media (min-width: 768px) { .satisfaction-score { font-size: 4rem; } }
.kpi-card { text-align: center; }
.kpi-card p:last-child { font-size: 0.9rem; color: var(--secondary-dark); }
.feedback-box { background-color: var(--white); padding: 2rem; border-radius: 1rem; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #eee;}
.feedback-box h4 { color: var(--accent); margin-bottom: 1rem; }
.feedback-box ul li { list-style: disc; margin-left: 1.5rem; margin-bottom: 0.5rem; color: var(--secondary-dark); font-size: 0.95rem;}


/* L'Immobile Ideale */
#immobile-ideale { background-color: var(--white); }
#immobile-ideale .ideal-property-card { border-left: 4px solid var(--primary); padding: 2rem; background-color: #f9fafb; border-radius: 0 0.75rem 0.75rem 0;}
#immobile-ideale .ideal-property-card h3 { color: var(--accent); font-size: 1.7rem; margin-bottom: 1.5rem;}
#immobile-ideale .ideal-property-list li { margin-bottom: 0.8rem; padding-left: 1.8rem; font-size: 1rem; color: var(--secondary-dark); position: relative; }
#immobile-ideale .ideal-property-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 900; font-size: 1.1rem; top: 2px;}
#immobile-ideale .ideal-property-list strong { font-weight: 600; color: var(--dark); }


/* Offerta e Fiscalità */
#offerta { background-color: var(--gray-50); }
.offer-card { border-left-width: 5px; padding: 2.5rem; border-radius: 0 1rem 1rem 0; background-color: var(--white); display: flex; flex-direction: column; } /* Rimosso height:100% */
.offer-card h3 { margin-bottom: 0.25rem; font-size: 1.5rem; font-weight: 700; }
.offer-card .offer-subtitle { font-size: 1rem; color: var(--secondary-dark); margin-bottom: 1rem; font-weight: 500; }
.offer-card .price { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.25rem; color: var(--accent);}
@media (min-width: 768px) { .offer-card .price { font-size: 2.8rem; } }
.offer-card .price-note { font-size: 0.85rem; color: var(--secondary-dark); margin-bottom: 1.5rem;}
.offer-card-standard { border-color: var(--primary); }
.offer-card .includes-title { font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--accent); font-size: 1.05rem;}
.offer-card ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.offer-card ul li { position: relative; padding-left: 1.8rem; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--secondary-dark);}
.offer-card ul li::before { content: "✓"; position: absolute; left: 0; font-weight: 900; }
.offer-card-standard ul li::before { color: var(--primary); }
.offer-card .taxation-info { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb;} /* Divisore per tassazione */


/* Contatti */
#contatti { background-color: var(--accent); color: var(--light); }
#contatti .section-title, #contatti .section-subtitle { color: var(--white); }
#contatti .footer-text { margin-top: 4rem; color: var(--gray); font-size: 0.9rem;}

/* Stili Menu Mobile */
body.mobile-menu-open {
    overflow: hidden;
}

/* --- Keyframes --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -12px); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; transition-delay: 0ms !important; animation-delay: 0ms !important; }
  .animate-on-scroll, #hero h1, #hero .subtitle, #hero .cta-button, #hero .scroll-down-indicator { opacity: 1; transform: none; animation: none; }
  #main-nav { transform: translateY(0%); }
  .accordion-content { transition: none; }
  .accordion-item.open .accordion-content { max-height: none; }
  #feature-details-box { transition: none; }
  #feature-details-box.visible { max-height: none; }
  .hoverable-card:hover { transform: none; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05); }
  .dark-section .hoverable-card:hover { box-shadow: 0 8px 25px rgba(255, 255, 255, 0.05); }
}

/* Stili per Pacchetto Attivazione Espandibile */
.activation-package-toggle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--dark);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(243, 223, 217, 0.3);
}

.activation-package-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 223, 217, 0.4);
}

.activation-package-toggle i {
    transition: transform 0.3s ease;
}

.activation-package-toggle.active i {
    transform: rotate(180deg);
}

.activation-package-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.activation-package-content.active {
    max-height: 3500px;
}

.activation-package-inner {
    background: linear-gradient(135deg, #faf6f5 0%, #f8f0ee 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 1rem;
    color: var(--dark);
    border: 2px solid rgba(243, 223, 217, 0.5);
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(243, 223, 217, 0.3);
}

.package-item:last-child {
    border-bottom: none;
}

.package-item-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.package-item-name i {
    color: var(--primary);
    font-size: 1.1rem;
}

.package-item-price {
    font-weight: 700;
    color: #d4988a;
    font-size: 1.1rem;
}

.package-box {
    background: rgba(243, 223, 217, 0.1);
    border: 2px solid var(--primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.package-box h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.package-box-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.package-box-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.package-box-item i {
    color: var(--primary);
}

.package-total {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--primary);
}

.package-total-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.package-total-price {
    font-size: 2rem;
    font-weight: 800;
    color: #d4988a;
}

.package-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 1rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .activation-package-inner {
        padding: 1.25rem;
    }

    .package-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .package-item-price {
        align-self: flex-end;
    }

    .package-box h4 {
        font-size: 1rem;
        word-wrap: break-word;
    }

    .package-box-items {
        grid-template-columns: 1fr;
    }

    .package-total-price {
        font-size: 1.75rem;
    }
}

/* --- Stili Video Sezioni --- */
.video-portrait-wrapper {
    max-width: 340px;
    margin: 0 auto;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    position: relative;
    background: #000;
}

.video-portrait-wrapper video {
    width: 100%;
    display: block;
    border-radius: 1.5rem;
}

.video-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.dark-section .video-section-label {
    background: rgba(243, 223, 217, 0.15);
    color: var(--primary);
}

/* Layout video + testo affiancati su desktop */
.video-with-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .video-with-text {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 4rem;
    }

    .video-with-text .video-portrait-wrapper {
        flex-shrink: 0;
        max-width: 280px;
    }

    .video-with-text .video-text-content {
        max-width: 440px;
    }
}

/* Sezione testimonianza */
#testimonianza {
    background-color: var(--white);
}

/* Separatore video media nel dark */
.video-media-block {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Bottone mute/unmute video --- */
.video-mute-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.60);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 10;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.video-mute-btn:hover {
    background: rgba(0, 0, 0, 0.82);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-mute-btn.is-unmuted {
    background: rgba(243, 223, 217, 0.85);
    color: var(--dark);
    border-color: var(--primary);
}

.video-mute-btn.is-unmuted:hover {
    background: var(--primary);
}
