/* =========================================
   SINERGETICA CONFIGURATOR - FULL HERO
   ========================================= */

/* --- 1. HERO WRAPPER (Contenitore Globale) --- */
.sfv-hero-wrapper {
    position: relative;
    width: 100%;
    min-height: 550px; /* Altezza minima per farci stare tutto */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centra tutto verticalmente */
    padding: 60px 20px;
    box-sizing: border-box;
}

.sfv-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Overlay scuro per leggere testo */
    background: rgb(0 0 0 / 17%);
    z-index: 1;
}

/* Contenuto interno (Titolo + Form) che sta sopra l'overlay */
.sfv-hero-inner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 850px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- 2. TITOLI HERO --- */
.sfv-hero-text {
    text-align: center;
    margin-bottom: 30px; /* Spazio tra testo e box bianco */
    color: white;
}

.sfv-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: white;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0,0,0,0.4);
    line-height: 1.1;
}

.sfv-hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: #f1f1f1;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* --- 3. WIZARD BOX (Stile quando dentro Hero) --- */
#sfv-wizard-wrapper.sfv-pro {
    width: 100%; /* Prende larghezza del genitore */
    max-width: 850px;
    margin: 0 auto; /* Centrato */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); /* Ombra forte per staccare dal fondo */
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    color: #2c3e50;
    overflow: hidden;
    border: none; /* Niente bordo grigio se siamo su foto */
    box-sizing: border-box;
}

#sfv-wizard-wrapper * { box-sizing: border-box; }

/* --- SEGUONO GLI STILI STANDARD DEL FORM (IDENTICI A PRIMA) --- */

/* Header Form */
.sfv-header {
    background: #f8f9fa;
    padding: 15px 40px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sfv-logo-placeholder { font-weight: 800; color: #82C341; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.sfv-progress-container { width: 50%; background: #e9ecef; height: 6px; border-radius: 10px; overflow: hidden; }
.sfv-progress-bar { height: 100%; background: linear-gradient(90deg, #82C341, #6da830); border-radius: 10px; transition: width 0.5s ease; }

/* Step Content */
.sfv-step { padding: 30px 40px 40px 40px; display: none; }
.sfv-step.active { display: block; animation: sfvFadeIn 0.5s ease-out; }

.sfv-title { font-size: 26px; font-weight: 700; color: #2c3e50; margin: 0 0 18px 0; text-align: center; }
.sfv-subtitle { text-align: center; color: #7f8c8d; margin: 0 0 25px 0; font-size: 15px; }
.sfv-mini-label { font-weight: 700; font-size: 12px; color: #95a5a6; display: block; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }

/* Grid Layouts */
.sfv-mixed-row { display: flex; gap: 15px; margin-bottom: 25px; align-items: stretch; }
.sfv-col-mq { flex: 1; display: flex; flex-direction: column; }
.sfv-col-shape { flex: 2; display: flex; flex-direction: column; }
.sfv-shape-group { display: flex; gap: 15px; height: 100%; }

/* MQ Box */
.sfv-mq-modern-wrapper { position: relative; flex: 1; display: flex; }
.sfv-mq-input { width: 100%; border: 2px solid #eef2f5; border-radius: 12px; text-align: center; font-size: 28px; font-weight: 700; color: #82C341; background: #fdfdfd; padding-right: 30px; -moz-appearance: textfield; transition: all 0.3s; }
.sfv-mq-input:focus { border-color: #82C341; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(130,195,65,0.15); }
.sfv-mq-suffix { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #b0b0b0; font-weight: 600; pointer-events: none; }

/* Cards */
.sfv-cards-grid { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; margin-bottom: 25px; }
.sfv-cards-grid.mini { gap: 10px; }
.sfv-card { flex: 1; min-width: 130px; background: #fff; border: 2px solid #eef2f5; border-radius: 12px; padding: 20px 10px; cursor: pointer; text-align: center; transition: all 0.2s; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sfv-card:hover { border-color: #82C341; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(130,195,65,0.1); }
.sfv-card.selected { border-color: #82C341 !important; background: #f4fcf0 !important; color: #2c3e50; box-shadow: 0 0 0 1px #82C341 inset; }
.sfv-card.multi-select.selected { transform: scale(0.98); }
.sfv-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.sfv-icon { font-size: 40px; margin-bottom: 10px; display: block; line-height: 1; }
.sfv-label { font-weight: 600; font-size: 14px; display: block; line-height: 1.3; }
.sfv-card .sfv-label br { display: block; }
.sfv-card.mini { padding: 15px 5px; min-width: 100px; height: 100%; }

/* Slider Compact */
.sfv-slider-wrapper.compact { background: #f8f9fa; padding: 15px 30px; border-radius: 12px; text-align: center; margin-bottom: 25px; border: 1px solid #eee; }
.sfv-range { width: 100%; accent-color: #82C341; margin-top: 15px; cursor: pointer; height: 6px; }
.sfv-bill-display { font-size: 34px; font-weight: 800; color: #82C341; margin: 5px 0; }

/* Inputs */
.sfv-final-box { max-width: 500px; margin: 0 auto; text-align: center; }
.sfv-inputs { margin: 25px auto 20px auto; text-align: left; }
.sfv-input-row { margin-bottom: 12px; }
.sfv-input-row.split { display: flex; gap: 12px; }
.sfv-inputs input { width: 100%; padding: 12px 15px; border: 1px solid #dcdcdc; border-radius: 8px; font-size: 15px; outline: none; transition: border 0.3s; background: #fff; }
.sfv-inputs input:focus { border-color: #82C341; box-shadow: 0 0 0 3px rgba(130,195,65,0.2); }
.sfv-privacy-check { font-size: 12px; color: #666; margin-bottom: 20px; text-align: left; }

/* Buttons */
.sfv-actions, .sfv-final-actions { display: flex; justify-content: center; gap: 15px; margin-top: 25px; }
.sfv-actions.split { justify-content: space-between; }
.sfv-actions.right { justify-content: flex-end; }
.sfv-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 25px; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.3s; text-decoration: none; }
.sfv-btn svg { width: 16px; height: 16px; }
.sfv-btn.next, .sfv-btn.submit-btn { background: #82C341; color: white; box-shadow: 0 4px 12px rgba(130,195,65,0.3); }
.sfv-btn.next:hover, .sfv-btn.submit-btn:hover { background: #6da830; transform: translateY(-2px); }
.sfv-btn.prev { background: #fff; border: 2px solid #eef2f5; color: #7f8c8d; }
.sfv-btn.prev:hover { border-color: #ccc; color: #333; background: #f9f9f9; }
.sfv-btn:disabled { opacity: 0.6; cursor: not-allowed; background: #ccc; box-shadow: none; }

/* Loading & Success */
.sfv-loader-content, .sfv-success-message { text-align: center; padding: 50px 20px; }
.sfv-spinner { width: 50px; height: 50px; border: 5px solid #f3f3f3; border-top: 5px solid #82C341; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 25px auto; }
.sfv-check-list { list-style: none; padding: 0; margin-top: 25px; color: #95a5a6; font-size: 15px; }
.sfv-check-list li { margin: 10px 0; opacity: 0; transform: translateY(10px); transition: all 0.5s ease-out; }
.sfv-check-list li.visible { opacity: 1; transform: translateY(0); color: #2c3e50; font-weight: 600; }
.sfv-success-title { font-size: 32px; font-weight: 800; color: #2c3e50; margin-top: 20px; margin-bottom: 15px; }
.sfv-success-text { font-size: 18px; color: #666; margin-bottom: 40px; }

/* Checkmark Animation */
.sfv-checkmark { width: 80px; height: 80px; border-radius: 50%; display: block; stroke-width: 2; stroke: #fff; stroke-miterlimit: 10; margin: 10% auto; box-shadow: inset 0px 0px 0px #82C341; animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.sfv-checkmark__circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 2; stroke-miterlimit: 10; stroke: #82C341; fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.sfv-checkmark__check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 50px #82C341; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes sfvFadeIn { from { opacity:0; transform: translateY(15px); } to { opacity:1; transform: translateY(0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.shake { animation: shake 0.4s ease-in-out; border-color: #e74c3c !important; }

/* Mobile */
@media (max-width: 768px) {
    .sfv-hero-wrapper { min-height: auto; padding: 40px 10px; }
    .sfv-hero-title { font-size: 28px; }
    .sfv-hero-subtitle { font-size: 16px; }
    
    #sfv-wizard-wrapper.sfv-pro { width: 100%; border-radius: 12px; }
    
    .sfv-header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    .sfv-progress-container { width: 100%; }
    .sfv-step { padding: 25px 20px; }
    
    /* Layout Mobile Step 2 */
    .sfv-mixed-row { flex-direction: column; gap: 20px; }
    .sfv-mq-modern-wrapper { height: 60px; }
    
    /* Step 3 & Cards */
    .sfv-step[data-step="3"] .sfv-cards-grid { gap: 10px; }
    .sfv-step[data-step="3"] .sfv-card { min-width: 30%; padding: 10px 2px; }
    .sfv-step[data-step="3"] .sfv-label { font-size: 11px; }
    .sfv-step[data-step="3"] .sfv-icon { font-size: 28px; }
    
    .sfv-card { min-width: 100%; flex-basis: 100%; }
    .sfv-cards-grid.mini .sfv-card { min-width: 45%; }
    
    .sfv-input-row.split { flex-direction: column; gap: 15px; }
    .sfv-actions, .sfv-final-actions { flex-direction: column-reverse; gap: 10px; }
    .sfv-btn { width: 100%; }
    .sfv-actions.right { justify-content: center; }
}