/* ============================================
   CONTATTI - Design Premium
   ============================================ */

/* Hero Section */
.contact-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    padding-bottom: 60px;
    overflow: hidden;
    background: var(--bg-primary);
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

body.theme-gradient-vibrant .contact-hero::before {
    background-image:
        linear-gradient(rgba(255, 0, 0, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06) 1px, transparent 1px);
}

.contact-hero > * {
    position: relative;
    z-index: 2;
}

.hero-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

body.theme-gradient-vibrant .hero-badge {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.2);
    color: var(--primary-light);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-title .gradient-text {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    padding: 80px 0 120px;
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

/* Form Card */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
}

body.theme-gradient-vibrant .form-card {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

.form-card h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-card > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    transition: all var(--transition-normal);
    outline: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

body.theme-gradient-vibrant .form-input,
body.theme-gradient-vibrant .form-textarea {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

body.theme-gradient-vibrant .form-input:focus,
body.theme-gradient-vibrant .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input.error,
.form-textarea.error {
    border-color: #ef4444;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Captcha */
.captcha-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.captcha-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

body.theme-gradient-vibrant .captcha-question {
    background: rgba(255, 255, 255, 0.05);
}

.captcha-question span {
    color: var(--primary);
}

.captcha-input {
    width: 80px;
    text-align: center;
    font-weight: 600;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Submit Button */
.form-submit {
    width: 100%;
    padding: 16px 32px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--gradient-warm);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-submit svg {
    width: 20px;
    height: 20px;
}

/* Error Alert */
.error-alert {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 15px;
    line-height: 1.6;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-alert svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-alert-content {
    flex: 1;
}

.error-alert-content strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.error-alert-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.error-alert-content li {
    margin-bottom: 6px;
}

/* MODALE SUCCESS */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.success-modal.show {
    display: flex;
}

.success-modal.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.success-modal-content {
    background: var(--bg-card);
    border: 2px solid rgba(5, 150, 105, 0.5);
    border-radius: 24px;
    padding: 48px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease-out;
}

body.theme-gradient-vibrant .success-modal-content {
    background: var(--glass-bg);
    border-color: rgba(5, 150, 105, 0.6);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: 50%;
    animation: successPulse 1.5s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.success-icon svg {
    width: 48px;
    height: 48px;
    stroke: #059669;
    stroke-width: 3;
}

.success-modal-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
}

.success-modal-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.success-timer {
    font-size: 14px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Sidebar Info */
.contact-info {
    position: sticky;
    top: 100px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    transition: all var(--transition-normal);
}

body.theme-gradient-vibrant .info-card {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-warm);
    border-radius: 12px;
    margin-bottom: 16px;
}

.info-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.info-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.info-card a:hover {
    text-decoration: underline;
}

/* Response Time Badge */
.response-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 12px;
    margin-top: 24px;
}

body.theme-gradient-vibrant .response-badge {
    background: rgba(5, 150, 105, 0.15);
}

.response-badge svg {
    width: 24px;
    height: 24px;
    stroke: #059669;
    flex-shrink: 0;
}

.response-badge span {
    font-size: 14px;
    color: #059669;
    font-weight: 500;
}

/* Privacy Note */
.privacy-note {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 16px;
    line-height: 1.6;
}

.privacy-note a {
    color: var(--primary);
    text-decoration: none;
}

.privacy-note a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .response-badge {
        grid-column: span 2;
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 40px;
    }
    
    .contact-section {
        padding: 60px 0 80px;
    }
    
    .form-card {
        padding: 28px;
    }
    
    .success-modal-content {
        padding: 32px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .response-badge {
        grid-column: span 1;
    }
    
    .captcha-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-input {
        width: 100%;
    }
}
