/* Contact Section Styles */
#contact-section {
    background: var(--brand-gradient-subtle);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

#contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, var(--shadow-light) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--border-light) 0%, transparent 40%);
    pointer-events: none;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Left Side Styles */
.contact-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease-out 0.3s forwards;
}

.contact-badge {
    display: inline-block;
    background: var(--brand-gradient-primary);
    color: var(--text-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.contact-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.contact-title {
    font-size: 2.8rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.contact-description {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 90%;
}

/* Call to Action Styles */
.contact-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.contact-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-medium);
    background: rgba(255, 255, 255, 0.9);
}

.cta-icon {
    width: 60px;
    height: 60px;
    background: var(--brand-gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    box-shadow: 0 8px 20px var(--shadow-medium);
    flex-shrink: 0;
}

.cta-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cta-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.cta-phone {
    font-size: 1.5rem;
    color: var(--primary-green);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cta-phone:hover {
    color: var(--primary-green-dark);
}

/* Right Side Form Styles */
.contact-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease-out 0.5s forwards;
}

.contact-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px var(--shadow-light);
    border: 1px solid var(--border-light);
}

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

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Input Styles */
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--surface-gray);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--surface-light);
    color: var(--text-dark);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: var(--surface-white);
    box-shadow: 0 0 0 3px var(--shadow-light);
    transform: translateY(-2px);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-light-gray);
    font-weight: 400;
}

/* Select Dropdown Styling */
.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.contact-form select option {
    padding: 10px;
    color: var(--text-dark);
}

/* Textarea Specific Styling */
.contact-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* Submit Button */
.contact-submit-btn {
    width: 100%;
    background: var(--brand-gradient-primary);
    color: var(--text-white);
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px var(--shadow-medium);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.contact-submit-btn::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 ease;
}

.contact-submit-btn:hover::before {
    left: 100%;
}

.contact-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px var(--shadow-strong);
    background: var(--brand-gradient-dark);
}

.contact-submit-btn:active {
    transform: translateY(-1px);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Form Validation States */
.contact-form input:invalid:not(:placeholder-shown),
.contact-form select:invalid:not(:placeholder-shown),
.contact-form textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.contact-form input:valid:not(:placeholder-shown),
.contact-form select:valid:not(:placeholder-shown),
.contact-form textarea:valid:not(:placeholder-shown) {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--shadow-light);
}

/* Loading state for submit button */
.contact-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.contact-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-title {
        font-size: 2.2rem;
    }
    
    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    #contact-section {
        padding: 60px 0;
    }
    
    .contact-container {
        padding: 0 15px;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-form {
        padding: 25px;
        border-radius: 15px;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 15px 18px;
    }
    
    .contact-cta {
        padding: 20px 25px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .cta-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 1.8rem;
    }
    
    .contact-description {
        font-size: 15px;
        max-width: 100%;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .cta-phone {
        font-size: 1.3rem;
    }
}

/* Contact Form Message Styles */
.contact-message {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.contact-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.contact-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-icon {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

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

.message-close {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.contact-message-success .message-close {
    color: #155724;
}

.contact-message-success .message-close:hover {
    background-color: rgba(21, 87, 36, 0.1);
}

.contact-message-error .message-close {
    color: #721c24;
}

.contact-message-error .message-close:hover {
    background-color: rgba(114, 28, 36, 0.1);
}

/* Form Field Error Styling */
.field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.field-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

/* Submit Button Loading State */
.contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.contact-submit-btn:disabled:hover {
    transform: none;
}

/* Animation for messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-message {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .message-icon {
        font-size: 14px;
        margin-right: 8px;
        width: 18px;
    }
    
    .message-close {
        font-size: 18px;
        width: 18px;
        height: 18px;
        margin-left: 10px;
    }
}

/* Contact Form Enhancements */
.contact-form {
    position: relative;
}

/* Form validation improvements */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Required field indicator */
.form-group input[required],
.form-group select[required],
.form-group textarea[required] {
    position: relative;
}

.form-group input[required]:invalid,
.form-group select[required]:invalid {
    box-shadow: none; /* Remove browser default */
}

/* Loading state for form */
.contact-form.form-loading {
    opacity: 0.8;
    pointer-events: none;
}

.contact-form.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
