/* CSS per pagina Lavora con Noi - Versione Migliorata */

/* =============== VARIABILI =============== */
:root {
    --lavora-primary: #001eff;
    --lavora-secondary: #F2921D;
    --lavora-accent: #3A9BF6;
    --lavora-light: #F8FAFF;
    --lavora-dark: #0A0F2C;
    --lavora-text: #2A2F4F;
    --lavora-text-light: #6B7280;
    --lavora-border: rgba(0, 30, 255, 0.08);
    --lavora-success: #10B981;
    --lavora-error: #EF4444;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* =============== BASE =============== */
.lavora-con-noi-page {
    background: var(--lavora-light);
    color: var(--lavora-text);
    line-height: 1.7;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =============== HERO SECTION =============== */
.lavora-hero {
    position: relative;
    background: linear-gradient(135deg, var(--lavora-dark) 0%, var(--lavora-primary) 50%, var(--lavora-accent) 100%);
    color: white;
    padding: 8rem 1rem 6rem;
    text-align: center;
    overflow: hidden;
}

.lavora-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.lavora-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.lavora-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lavora-hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
    margin-bottom: 2rem;
}

.lavora-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--lavora-light);
    clip-path: polygon(0 70%, 100% 100%, 0% 100%);
}

/* =============== FORM SECTION =============== */
.lavora-form-section {
    padding: 6rem 1rem;
    background: var(--lavora-light);
    position: relative;
}

.lavora-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--lavora-secondary), var(--lavora-accent));
    border-radius: 2px;
}

.lavora-form {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    border: 1px solid var(--lavora-border);
    position: relative;
    overflow: hidden;
}

.lavora-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--lavora-primary), var(--lavora-secondary), var(--lavora-accent));
}

.lavora-form h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--lavora-dark);
    text-align: center;
}

.lavora-form .form-subtitle {
    text-align: center;
    color: var(--lavora-text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* =============== FORM INPUTS =============== */
.lavora-form .form-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.lavora-form .form-actions {
    text-align: center;
    margin-top: 3rem;
}

.lavora-form .input-wrapper {
    position: relative;
    margin-bottom: 0;
}

.lavora-form label {
    display: block;
    font-weight: 600;
    color: var(--lavora-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.lavora-form input,
.lavora-form textarea,
.lavora-form select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FAFBFC;
    font-family: inherit;
}

.lavora-form input:focus,
.lavora-form textarea:focus,
.lavora-form select:focus {
    outline: none;
    border-color: var(--lavora-secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(242, 146, 29, 0.1);
    transform: translateY(-1px);
}

.lavora-form input:hover,
.lavora-form textarea:hover,
.lavora-form select:hover {
    border-color: var(--lavora-accent);
    background: white;
}

.lavora-form textarea {
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

/* =============== FILE UPLOAD =============== */
.lavora-form .file-wrapper {
    position: relative;
    border: 2px dashed var(--lavora-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #FAFBFC;
}

.lavora-form .file-wrapper:hover {
    border-color: var(--lavora-secondary);
    background: rgba(242, 146, 29, 0.05);
}

.lavora-form .file-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

.lavora-form .file-wrapper .file-icon {
    font-size: 3rem;
    color: var(--lavora-accent);
    margin-bottom: 1rem;
}

.lavora-form .file-wrapper .file-text {
    color: var(--lavora-text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lavora-form .file-wrapper .file-subtext {
    color: var(--lavora-text-light);
    font-size: 0.9rem;
}

/* CAPTCHA */
.g-recaptcha {
    margin-top: 1rem;
    transform: scale(0.85);
    transform-origin: 0 0;
}

.grecaptcha-badge {
    visibility: hidden;
}

/* =============== VALIDATION =============== */
.lavora-form .error-message {
    display: block;
    font-size: 0.85rem;
    color: var(--lavora-error);
    margin-top: 0.5rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.lavora-form .error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.lavora-form input.error,
.lavora-form textarea.error,
.lavora-form select.error {
    border-color: var(--lavora-error);
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.lavora-form input.success,
.lavora-form textarea.success,
.lavora-form select.success {
    border-color: var(--lavora-success);
    background: rgba(16, 185, 129, 0.05);
}

/* =============== SUBMIT BUTTON =============== */
.lavora-form .cta-button {
    background: linear-gradient(135deg, var(--lavora-secondary) 0%, #E67E00 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.lavora-form .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.lavora-form .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(242, 146, 29, 0.4);
    background: linear-gradient(135deg, #E67E00 0%, var(--lavora-dark) 100%);
}

.lavora-form .cta-button:hover::before {
    left: 100%;
}

.lavora-form .cta-button:active {
    transform: translateY(0px);
}

/* =============== LOADING STATE =============== */
.lavora-form .cta-button.loading {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

.lavora-form .cta-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============== SUCCESS MESSAGE =============== */
.lavora-form .success-message {
    background: linear-gradient(135deg, var(--lavora-success), #059669);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.lavora-form .success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* =============== RESPONSIVE DESIGN =============== */
@media (max-width: 768px) {
    .lavora-hero {
        padding: 6rem 1rem 4rem;
    }
    
    .lavora-hero h1 {
        font-size: 2.5rem;
    }
    
    .lavora-hero p {
        font-size: 1.1rem;
    }
    
    .lavora-form {
        padding: 2rem;
        margin: 0;
    }
    
    .lavora-form h2 {
        font-size: 2rem;
    }
    
    .lavora-form .form-row.two-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .lavora-form .cta-button {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .lavora-hero {
        padding: 4rem 1rem 3rem;
    }
    
    .lavora-hero h1 {
        font-size: 2rem;
    }
    
    .lavora-form {
        padding: 1rem;
    }
    
    .lavora-form h2 {
        font-size: 1.8rem;
    }
    
    .lavora-form-section {
        padding: 4rem 0.5rem;
    }
}

/* =============== ACCESSIBILITY =============== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.lavora-form input:focus-visible,
.lavora-form textarea:focus-visible,
.lavora-form select:focus-visible,
.lavora-form button:focus-visible {
    outline: 3px solid var(--lavora-secondary);
    outline-offset: 2px;
}