/* ===============================================
   📝 FORMS SYSTEM - ULTRA-MODERN CONTACT FORMS
   =============================================== */

/* ===== FORM FOUNDATION ===== */
.form-section {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.form-section.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

/* ===== CONTACT FORM CONTAINER ===== */
.contact-form-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.05) 0%, 
        rgba(88, 86, 214, 0.05) 50%, 
        rgba(255, 45, 85, 0.05) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ===== FORM HEADER ===== */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.form-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    position: relative;
}

.form-icon-glow {
    position: absolute;
    inset: -10px;
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(15px);
    z-index: -1;
}

.form-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* ===== CONTACT FORM - CORRECTED LAYOUT ===== */
.contact-form-simple {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

/* ===== INPUT WRAPPERS - KORREKTE ABSTÄNDE ===== */
.input-wrapper,
.textarea-wrapper {
    position: relative;
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== LABELS - VERBESSERTE UX ===== */
.input-wrapper label,
.textarea-wrapper label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    opacity: 0.95;
    position: relative;
}

/* Required Field Indicators - NUR für Pflichtfelder */
.input-wrapper label[for="name"]::after,
.input-wrapper label[for="email"]::after,
.textarea-wrapper label[for="message"]::after {
    content: ' *';
    color: #ff3b30;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Optional Field Styling - NUR für Telefon */
.input-wrapper label[for="phone"] {
    color: var(--text-secondary);
    opacity: 0.85;
}

.input-wrapper label[for="phone"]::after {
    content: ' (Optional)';
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* ===== INPUT FIELDS - MODERNE DESIGN ===== */
.input-wrapper input,
.textarea-wrapper textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(15px);
    outline: none;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.08);
}

.textarea-wrapper textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 1rem;
    line-height: 1.6;
}

/* ===== PLACEHOLDER STYLING ===== */
.input-wrapper input::placeholder,
.textarea-wrapper textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 400;
}

/* ===== FOCUS STATES - KORRIGIERT ===== */
.input-wrapper input:focus,
.textarea-wrapper textarea:focus {
    border-color: rgba(0, 122, 255, 0.6);
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(0, 122, 255, 0.12);
    transform: translateY(-1px);
}

/* VALIDATION STATES - KORRIGIERT */
.input-wrapper input:valid:not(:placeholder-shown):not([type="tel"]),
.textarea-wrapper textarea:valid:not(:placeholder-shown) {
    border-color: rgba(0, 208, 132, 0.4);
    background: rgba(0, 208, 132, 0.03);
}

/* Telefon-Feld wird NICHT grün, auch wenn gültig */
.input-wrapper input[type="tel"]:valid {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

/* ===== FIELD ICONS - KORREKT POSITIONIERT ===== */
.field-icon {
    position: absolute;
    top: 3.5rem;
    left: 1rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 1rem;
    z-index: 2;
    opacity: 0.7;
}

.input-wrapper:focus-within .field-icon,
.textarea-wrapper:focus-within .field-icon {
    color: #007AFF;
    opacity: 1;
    transform: scale(1.1);
}

.input-wrapper input:valid:not(:placeholder-shown):not([type="tel"]) ~ .field-icon,
.textarea-wrapper textarea:valid:not(:placeholder-shown) ~ .field-icon {
    color: #00d084;
    opacity: 1;
}

/* ===== SUCCESS INDICATORS - NUR für Pflichtfelder ===== */
.input-wrapper.success::after {
    content: '✓';
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d084, #32d74b);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 3;
    animation: successPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== CHARACTER COUNTER - NUR für Textarea ===== */
.char-counter {
    position: absolute;
    bottom: -1.5rem;
    right: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.char-counter::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
}

.char-counter.warning {
    color: #ff9500;
    opacity: 1;
}

.char-counter.warning::before {
    background: #ff9500;
    opacity: 1;
}

.char-counter.error {
    color: #ff3b30;
    opacity: 1;
    font-weight: 600;
}

.char-counter.error::before {
    background: #ff3b30;
    opacity: 1;
}

/* ===== ERROR MESSAGES ===== */
.error-message {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.75rem;
    color: #ff3b30;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-wrapper.error .error-message,
.textarea-wrapper.error .error-message {
    opacity: 1;
    transform: translateY(0);
}

.error-message::before {
    content: '!';
    width: 16px;
    height: 16px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== SUBMIT BUTTON - ULTRA-MODERN ===== */
.btn-submit {
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    border: none;
    border-radius: 1rem;
    padding: 1.25rem 2rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 
        0 10px 30px rgba(0, 122, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 15px 40px rgba(0, 122, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #0056d6, #4a9eff);
}

.btn-submit:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Button States */
.btn-text,
.btn-loading,
.btn-success {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-text {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.btn-loading,
.btn-success {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
}

.btn-submit.loading .btn-text {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
}

.btn-submit.loading .btn-loading {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.btn-submit.success .btn-text,
.btn-submit.success .btn-loading {
    opacity: 0;
    transform: translateY(-20px);
    visibility: hidden;
}

.btn-submit.success .btn-success {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Button Glow Effect */
.btn-submit::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.btn-submit:hover::before {
    opacity: 0.5;
}

/* Success State */
.btn-submit.success {
    background: linear-gradient(135deg, #32d74b, #00d084);
    box-shadow: 
        0 10px 30px rgba(0, 208, 132, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Button Icon */
.btn-icon {
    font-size: 1rem;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-submit:hover .btn-icon {
    transform: translateX(2px);
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    25%, 75% { transform: scale(1.02); }
    50% { transform: scale(1.01); }
}

/* ===== NOTIFICATION STYLES ===== */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    color: white;
    font-weight: 500;
    z-index: 999999;
    max-width: 400px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-message {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== SOCIAL PROOF SECTION ===== */
.contact-social-proof {
    margin-top: 3rem;
    text-align: center;
}

.proof-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.proof-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(10px);
}

.proof-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
}

.proof-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.proof-stat {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.proof-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.9;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .input-wrapper input,
    .textarea-wrapper textarea {
        padding: 1rem 1rem 1rem 2.5rem;
        font-size: 0.95rem;
    }

    .field-icon {
        left: 0.75rem;
        top: 3.25rem;
    }

    .btn-submit {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .proof-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 1.5rem 1rem;
    }
    
    .input-wrapper input,
    .textarea-wrapper textarea {
        padding: 0.875rem 0.875rem 0.875rem 2.25rem;
        font-size: 0.9rem;
    }

    .field-icon {
        left: 0.625rem;
        top: 3rem;
        font-size: 0.9rem;
    }

    .btn-submit {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .char-counter {
        font-size: 0.7rem;
    }

    .proof-grid {
        grid-template-columns: 1fr;
    }
} 