/* Contact Form Enhanced Styles */

/* Enhanced alert styles */
.alert-lg {
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.alert-icon {
    margin-bottom: 1rem;
}

.alert-icon i {
    color: inherit;
    opacity: 0.8;
}

.alert-heading {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* تحسين أنماط الرسائل */
.alert-contact {
    margin-bottom: 2rem;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: none;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #b6d7c5;
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #f1b0b7;
    color: #721c24;
}

.alert-dismissible .btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

/* Notification alert styles */
.notification-alert {
    animation: slideInDown 0.5s ease-out;
    font-family: 'Cairo', sans-serif !important;
    position: relative;
    z-index: 1050;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Contact form improvements and message styling */

/* Success/Error Alert Animations */
.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    z-index: 100;
    font-family: 'Cairo', sans-serif;
}

.alert-success {
    background: linear-gradient(135deg, #d1f2d1, #b8e6b8);
    color: #0f5132;
    border: 2px solid #28a745;
    border-left: 6px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1aeb5);
    color: #721c24;
    border: 2px solid #dc3545;
    border-left: 6px solid #dc3545;
}

.alert i {
    margin-left: 0.5rem;
    font-size: 1.2rem;
    vertical-align: middle;
}

.alert strong {
    font-weight: 700;
}

/* Pulse animation for success */
.pulse-success {
    animation: pulseSuccess 2s infinite;
}

@keyframes pulseSuccess {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
}

/* Form enhancement styles */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.form-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
}

.form-label i {
    color: #667eea;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    font-family: 'Cairo', sans-serif;
    line-height: 1.5;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    background-color: #ffffff;
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M6.5.83 5.84.17 3 3l-1.34-1.34L1 2.33 3 4.33z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.validation-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
}

/* Button styles */
.btn-3d {
    transform: translateY(0);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-3d:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.btn-block {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#submitBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-family: 'Cairo', sans-serif;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: #ffffff;
}

#submitBtn:active:not(:disabled),
#submitBtn:focus:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

#submitBtn:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    opacity: 0.8;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
}

/* Loading and text states */
.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact info styles */
.info-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.info-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.info-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.contact-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    flex-shrink: 0;
}

.contact-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-content p {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}

.contact-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contact-content a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Contact form styles */
.contact-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.contact-form-title {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
    font-family: 'Cairo', sans-serif;
}

.contact-form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Contact info styling */
.contact-info {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    height: fit-content;
}

.contact-info-title {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-info-list li i {
    color: #667eea;
    width: 24px;
    margin-left: 1rem;
    margin-top: 0.2rem;
    font-size: 1.1rem;
}

.contact-info-list li span {
    font-weight: 600;
    color: #495057;
    margin-left: 0.5rem;
    min-width: 80px;
    font-family: 'Cairo', sans-serif;
}

.contact-info-list li a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.contact-info-list li a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Business hours */
.business-hours {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.business-hours h4 {
    color: #856404;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #856404;
}

.hours-item .day {
    font-weight: 500;
}

.hours-item .time {
    font-weight: 600;
}

/* Response info */
.response-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 1rem;
    padding: 1.5rem;
}

.response-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #0c5460;
    font-weight: 500;
}

.response-item:last-child {
    margin-bottom: 0;
}

.response-item i {
    margin-left: 0.75rem;
    font-size: 1.1rem;
}

/* Form focus states */
.form-group-focused .form-label {
    color: #667eea;
}

.form-group-focused .form-control {
    border-color: #667eea;
}

/* Alert positioning and focus styles */
.alert:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .alert {
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
    
    .alert-lg {
        padding: 1.5rem;
    }
    
    .alert-contact {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .form-header, .info-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .contact-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        margin-left: 0.75rem;
    }
    
    .contact-form, .contact-info {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .contact-info-list li {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .contact-info-list li span:first-of-type {
        min-width: 60px;
        font-size: 0.9rem;
    }
    
    #submitBtn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 46px;
    }
}

/* RTL support improvements */
[dir="rtl"] .form-label i {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .contact-icon {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] .contact-info-list li i {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] .contact-info-list li span:first-of-type {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* High visibility for alerts */
#contactSuccessAlert,
#contactErrorAlert {
    position: relative;
    z-index: 1000;
    margin-top: 0;
    margin-bottom: 2rem;
    scroll-margin-top: 20px;
}