/* === FIX SCROLL ORIZZONTALE E LARGHEZZA === */
    html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; }

    /* === ARCHITETTURA CSS ARMORED === */
    #soc-stargate { 
        all: initial; font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; 
        display: block; width: 100%; max-width: 1200px; margin: 60px auto; 
        background: white; border-radius: 24px; box-shadow: 0 40px 120px rgba(0,43,73,0.2); 
        overflow-x: hidden !important; border: 1px solid #e2e8f0; color: #1e293b; position: relative; box-sizing: border-box;
    }
    #soc-stargate * { box-sizing: border-box !important; font-family: inherit; }
    
    .soc-h1 { font-size: clamp(30px, 5vw, 48px) !important; font-weight: 900 !important; color: #002b49 !important; line-height: 1.1 !important; margin-bottom: 25px !important; text-transform: uppercase; letter-spacing: -1.5px;}
    .soc-h2 { font-size: clamp(22px, 4vw, 32px) !important; font-weight: 800 !important; color: #002b49 !important; margin-bottom: 35px !important; border-left: 8px solid #D93025; padding-left: 20px; position: relative; padding-bottom: 12px; display: inline-block; }
    .soc-h2::after { content: ''; position: absolute; left: 20px; bottom: 0; width: calc(100% - 20px); height: 4px; background: #D93025; border-radius: 2px; }
    
    .soc-p { font-size: 20px !important; line-height: 1.8 !important; color: #475569 !important; margin-bottom: 30px !important; }
    .soc-p-large { font-size: 22px !important; line-height: 1.6 !important; color: #1e293b !important; margin-bottom: 40px !important; font-weight: 600; }
    
    /* FIX SPAZIATURA TRA DOMANDE */
    .soc-field-group { margin-bottom: 80px !important; width: 100% !important; }
    .soc-label { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; font-size: 16px !important; font-weight: 900 !important; color: #002b49 !important; margin-bottom: 15px !important; text-transform: uppercase; letter-spacing: 1px;}
    .soc-label > span:first-child { flex: 1; line-height: 1.4; }
    .soc-char-counter { white-space: nowrap; flex-shrink: 0; font-size: 12px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 1px; padding: 6px 12px; border-radius: 6px; transition: all 0.3s ease; }
    
    .soc-input, .soc-textarea { 
        width: 100% !important; padding: 22px !important; font-size: 18px !important; 
        background: #f8fafc !important; border: 2px solid #cbd5e1 !important; border-radius: 12px !important; 
        border-left: 8px solid #002b49 !important; transition: all 0.3s ease !important; 
        outline: none !important; color: #0f172a !important; display: block !important; 
    }
    
    /* FIX CORAZZATO PER ALTEZZA TEXTAREA (CONTRO BRICKS BUILDER) */
    #soc-stargate textarea.soc-textarea { 
        height: 220px !important; 
        min-height: 220px !important; 
        resize: vertical !important; 
        line-height: 1.6 !important; 
    }
    
    .soc-input:focus, .soc-textarea:focus { border-color: #D93025 !important; background: #fff !important; box-shadow: 0 10px 30px rgba(0,43,73,0.1) !important;}
    select.soc-input { appearance: auto !important; font-weight: 700 !important; cursor: pointer !important; height: 75px !important; }
    
    .val-success { border-color: #15803d !important; border-left-color: #15803d !important; background-color: #f0fdf4 !important; }
    .val-error { border-color: #D93025 !important; border-left-color: #D93025 !important; background-color: #fff5f5 !important; }
    .soc-feed-text { font-size: 12px !important; font-weight: 900 !important; text-align: right; display: block; margin-top: 8px; height: 16px; text-transform: uppercase; letter-spacing: 1px;}
    .ft-ok { color: #15803d !important; } .ft-ko { color: #D93025 !important; }

    .soc-guide-box { background: #fef2f2; border: 2px solid #fecdd3; padding: 22px 30px; border-radius: 12px; margin-bottom: 25px !important; margin-top: 20px !important; }
    .soc-guide-title { font-size: 14px !important; font-weight: 900 !important; color: #D93025 !important; text-transform: uppercase; margin-bottom: 10px !important; display: flex; align-items: center; gap: 10px;}
    .soc-guide-text { font-size: 16px !important; color: #991b1b !important; line-height: 1.6 !important; font-weight: 600 !important; }
    
    /* BOTTONI CON FLEX E WORD-WRAP PER MOBILE */
    .soc-btn-primary { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; line-height: 1.3; background: #002b49; color: white; padding: 22px 45px; font-size: 18px !important; font-weight: 900 !important; text-transform: uppercase; border: none; border-radius: 12px; cursor: pointer; transition: 0.3s; }
    .soc-btn-primary:hover:not(:disabled) { background: #D93025; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(217,48,37,0.3); }
    .soc-btn-primary:disabled { background: #e2e8f0 !important; color: #94a3b8 !important; cursor: not-allowed; opacity: 0.8; transform: none;}
    
    .soc-btn-secondary { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; line-height: 1.3; background: #f1f5f9; color: #475569; padding: 22px 40px; font-size: 16px !important; font-weight: 800 !important; text-transform: uppercase; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: 0.3s; }
    
    .soc-btn-submit { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; line-height: 1.3; background: #D93025; color: white; width: 100%; padding: 30px; font-size: 22px !important; font-weight: 900 !important; text-transform: uppercase; border: none; border-radius: 16px; cursor: pointer; transition: 0.4s; box-shadow: 0 20px 40px rgba(217,48,37,0.4);}
    .soc-btn-submit:hover:not(:disabled) { background: #b91c1c; transform: translateY(-4px); }
    .soc-btn-submit:disabled { background: #f1f5f9; color: #cbd5e1; cursor: not-allowed; box-shadow: none; transform: none;}

    .soc-progress-bg { background: #f1f5f9; height: 12px; width: 100%; }
    .soc-progress-fill { background: linear-gradient(90deg, #002b49, #D93025); height: 100%; transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1); }
    .soc-loader { position: fixed; inset: 0; background: rgba(0,43,73,0.98); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; }
    #confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9998; pointer-events: none; }

    @media (max-width: 768px) {
        #soc-stargate { margin: 0; border-radius: 0; border: none; }
        .tw-p-8.md\:tw-p-16 { padding: 30px 20px !important; }
        .soc-btn-group { display: flex; flex-direction: column-reverse !important; gap: 15px !important; width: 100%; }
        
        .soc-btn-primary, .soc-btn-secondary { width: 100% !important; padding: 18px 15px !important; font-size: 15px !important; height: auto; }
        .soc-btn-submit { width: 100% !important; padding: 20px 15px !important; font-size: 16px !important; height: auto;}
        
        .soc-h1 { font-size: 28px !important; }
        .soc-h2 { font-size: 22px !important; border-left-width: 6px; padding-left: 15px; }
        .soc-label { flex-direction: column; align-items: flex-start; gap: 8px; }
        .soc-char-counter { align-self: flex-start; padding: 4px 8px; font-size: 11px !important; }
        
        /* FIX MOBILE TEXTAREA HEIGHT */
        #soc-stargate textarea.soc-textarea { 
            height: 180px !important; 
            min-height: 180px !important; 
            padding: 18px !important;
        }
        
        .soc-guide-box { padding: 15px 20px; margin-top: 15px !important; }
        .soc-field-group { margin-bottom: 50px !important; }
    }