/* ========================================
   MODERN CONTACT FORM STYLES
   Floating labels and enhanced design
   ======================================== */

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Modern Form Container */
.modern-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Form Field with Floating Label */
.form-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

/* Input and Textarea Base Styles */
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all var(--transition-base);
    outline: none;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* Floating Label */
.form-field label {
    position: absolute;
    left: 3rem;
    top: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    pointer-events: none;
    transition: all var(--transition-base);
    background: white;
    padding: 0 0.5rem;
}

/* Floating Label Animation */
.form-field input:focus+label,
.form-field input:not(:placeholder-shown)+label,
.form-field textarea:focus+label,
.form-field textarea:not(:placeholder-shown)+label,
.form-field select:focus+label,
.form-field select:valid+label {
    top: -0.5rem;
    left: 2.5rem;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Icon */
.form-icon {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: color var(--transition-base);
    pointer-events: none;
}

/* Focus States */
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 181, 229, 0.1);
}

.form-field input:focus~.form-icon,
.form-field textarea:focus~.form-icon,
.form-field select:focus~.form-icon {
    color: var(--primary-color);
}

/* Submit Button Enhancement */
.form-submit {
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.form-submit:hover::before {
    width: 300px;
    height: 300px;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E2E8F0;
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-footer i {
    color: #10B981;
}

/* Error States */
.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown),
.form-field select:invalid:not(:placeholder-shown) {
    border-color: #EF4444;
}

.form-field input:invalid:not(:placeholder-shown)~.form-icon,
.form-field textarea:invalid:not(:placeholder-shown)~.form-icon,
.form-field select:invalid:not(:placeholder-shown)~.form-icon {
    color: #EF4444;
}

/* Success Animation */
@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.form-field.success input,
.form-field.success textarea,
.form-field.success select {
    border-color: #10B981;
    animation: successPulse 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-form {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }
}