/* Contact Form 7 - Enhanced Modern Styles */

/* Form Wrapper */
.cf7-modern-form {
    max-width: 650px;
    margin: 0 auto;
    padding: 50px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Background Decoration */
.cf7-modern-form::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, #f0f4ff 0%, #e6efff 100%);
    transform: rotate(45deg);
    z-index: -1;
    opacity: 0.5;
}

/* Form Row */
.form-row {
    margin-bottom: 25px;
}

.form-row.half-width {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form Group */
.form-group {
    position: relative;
}

/* Labels */
.cf7-modern-form label {
    display: block;
    position: relative;
}

.label-text {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.3px;
}

.optional {
    font-weight: 400;
    color: #95a5a6;
    font-size: 13px;
}

/* Input Fields Enhanced */
.cf7-modern-form .form-control,
.cf7-modern-form input[type="text"],
.cf7-modern-form input[type="email"],
.cf7-modern-form textarea {
    width: 100%;
    padding: 18px 20px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #2c3e50;
    background: #f8fafb;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Effects */
.cf7-modern-form input:focus,
.cf7-modern-form textarea:focus {
    background: #ffffff;
    border-color: #4a90e2;
    box-shadow: 0 0 0 5px rgba(74, 144, 226, 0.1);
    transform: translateY(-2px);
}

/* Textarea */
.cf7-modern-form textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* Submit Button Enhanced */
.form-submit {
    text-align: center;
    margin-top: 35px;
}

.cf7-modern-form .submit-button,
.cf7-modern-form input[type="submit"] {
    display: inline-block;
    padding: 18px 50px;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

/* Button Hover Effect */
.cf7-modern-form .submit-button:hover,
.cf7-modern-form input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Button Click Effect */
.cf7-modern-form .submit-button:active,
.cf7-modern-form input[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Icon Fields */
.icon-field .input-wrapper {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 16px;
    transition: color 0.3s ease;
}

.icon-field input,
.icon-field textarea {
    padding-left: 50px;
}

.icon-field input:focus ~ .field-icon,
.icon-field textarea:focus ~ .field-icon {
    color: #4a90e2;
}

/* Validation States */
.cf7-modern-form .wpcf7-not-valid {
    border-color: #e74c3c !important;
    background: #fff5f5 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Response Messages Enhanced */
.wpcf7-response-output {
    margin: 30px 0 0 0;
    padding: 20px 25px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wpcf7-mail-sent-ok {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: none;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-spam-blocked {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: none;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.2);
}

/* Loading State */
.wpcf7-form.submitting .submit-button {
    pointer-events: none;
    opacity: 0.7;
}

.wpcf7-form.submitting .submit-button::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Placeholder Styling */
.cf7-modern-form input::placeholder,
.cf7-modern-form textarea::placeholder {
    color: #bdc3c7;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cf7-modern-form {
        padding: 30px 20px;
    }
    
    .form-row.half-width {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .cf7-modern-form .submit-button,
    .cf7-modern-form input[type="submit"] {
        width: 100%;
        padding: 16px 40px;
    }
}

/* Two Column Layout */
.cf7-modern-form.two-column .form-row.half-width {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cf7-modern-form {
        background: #1a1a2e;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    .cf7-modern-form::before {
        background: linear-gradient(45deg, #16213e 0%, #0f3460 100%);
    }
    
    .label-text {
        color: #ecf0f1;
    }
    
    .cf7-modern-form input,
    .cf7-modern-form textarea {
        background: #0f3460;
        border-color: #16213e;
        color: #ecf0f1;
    }
    
    .cf7-modern-form input:focus,
    .cf7-modern-form textarea:focus {
        background: #16213e;
        border-color: #4a90e2;
    }
    
    .cf7-modern-form input::placeholder,
    .cf7-modern-form textarea::placeholder {
        color: #7f8c8d;
    }
}

/* Alternative Styles */
/* Minimal Style */
.cf7-minimal {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.cf7-minimal::before {
    display: none;
}

.cf7-minimal input,
.cf7-minimal textarea {
    background: transparent;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 0;
    padding: 12px 0;
}

.cf7-minimal input:focus,
.cf7-minimal textarea:focus {
    border-bottom-color: #4a90e2;
    box-shadow: none;
    transform: none;
}

/* Bordered Style */
.cf7-bordered {
    background: transparent;
    border: 3px solid #e1e8ed;
    box-shadow: none;
}

.cf7-bordered::before {
    display: none;
}

/* Floating Labels */
.cf7-floating-labels .form-group {
    position: relative;
    margin-top: 20px;
}

.cf7-floating-labels .label-text {
    position: absolute;
    top: 18px;
    left: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: #ffffff;
    padding: 0 5px;
}

.cf7-floating-labels input:focus ~ .label-text,
.cf7-floating-labels input:not(:placeholder-shown) ~ .label-text,
.cf7-floating-labels textarea:focus ~ .label-text,
.cf7-floating-labels textarea:not(:placeholder-shown) ~ .label-text {
    top: -10px;
    font-size: 12px;
    color: #4a90e2;
}