/* Contact Page Styles */
.contact-page {
    padding-bottom: 4rem;
}

.page-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info,
.contact-form-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info:hover,
.contact-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 0.75rem;
}

.contact-info h2::after,
.contact-form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 3px;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: #e9f5ff;
    transform: translateX(5px);
}

.contact-icon {
    flex: 0 0 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: #fff;
    border-radius: 50%;
    margin-right: 1rem;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-text {
    flex: 1;
}

.contact-text h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: #2c3e50;
}

.contact-text p {
    margin: 0;
    color: #555;
}

.contact-text a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-text a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Form Styles */
.contact-form-container {
    background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
    position: relative;
    z-index: 5;
}

#contact-form {
    margin-top: 1.5rem;
}

/* Target all contact forms with the contact-page-form class */
.contact-page-form {
    margin-top: 1.5rem;
    position: relative;
    z-index: 5;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    color: #333; /* Ensure text is dark on light background */
    position: relative;
    z-index: 10;
    isolation: isolate;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Fix for placeholder text */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    opacity: 1;
}

button.btn {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.btn:hover {
    background: linear-gradient(135deg, #2980b9, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

button.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Success and Error Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* WhatsApp Button */
.whatsapp-direct-button,
.contact-whatsapp .whatsapp-button a {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.whatsapp-direct-button:hover,
.contact-whatsapp .whatsapp-button a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #1da851, #0e6d63);
}

.whatsapp-direct-button svg,
.contact-whatsapp .whatsapp-button a svg {
    margin-right: 8px;
}

/* Social Media Links */
.contact-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    position: relative;
    z-index: 1;
}

.contact-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f2f5;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.contact-social a:hover {
    transform: translateY(-3px);
    background-color: #3498db;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Language Switcher */
.language-switcher {
    margin-top: 2rem;
    text-align: center;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 1s ease-in-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info,
    .contact-form-container {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .contact-info,
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] .contact-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .contact-icon {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .contact-info h2::after,
[dir="rtl"] .contact-form-container h2::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .whatsapp-direct-button svg,
[dir="rtl"] .contact-whatsapp .whatsapp-button a svg {
    margin-right: 0;
    margin-left: 8px;
}

/* Dark Mode Improvements - Enhanced Contrast */
.dark-mode .contact-info,
.dark-mode .contact-form-container {
    background-color: #0f172a; /* Darker background for form container */
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155; /* Add border for better definition */
}

.dark-mode .contact-form-container h2 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #3b82f6; /* Add colored border under heading */
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.dark-mode .contact-info h2 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dark-mode .contact-item {
    background-color: #1f2937;
    border: 1px solid #374151;
}

.dark-mode .contact-item:hover {
    background-color: #2d3748;
    border-color: #4b5563;
}

.dark-mode .contact-text h3 {
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.dark-mode .contact-text p {
    color: #e5e7eb;
}

.dark-mode .contact-text a {
    color: #3b82f6;
    font-weight: 600;
}

.dark-mode .contact-text a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.dark-mode .form-group label {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

/* Critical fix for form fields in dark mode */
.dark-mode .form-group input,
.dark-mode .form-group textarea,
.dark-mode .contact-page-form input,
.dark-mode .contact-page-form textarea {
    background-color: #1e293b !important; /* Slightly lighter than container for contrast */
    border: 2px solid #4b5563 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-weight: 500 !important;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus,
.dark-mode .contact-page-form input:focus,
.dark-mode .contact-page-form textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
    background-color: #1e293b !important; /* Maintain dark background when focused */
}

.dark-mode .form-group input::placeholder,
.dark-mode .form-group textarea::placeholder,
.dark-mode .contact-page-form input::placeholder,
.dark-mode .contact-page-form textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Fix for autofill in dark mode with higher contrast */
.dark-mode input:-webkit-autofill,
.dark-mode input:-webkit-autofill:hover, 
.dark-mode input:-webkit-autofill:focus,
.dark-mode textarea:-webkit-autofill,
.dark-mode textarea:-webkit-autofill:hover,
.dark-mode textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset !important;
    box-shadow: 0 0 0px 1000px #1e293b inset !important;
    caret-color: #ffffff !important;
    border-color: #4b5563 !important;
}

/* Add a highlight to form fields in dark mode for better visibility */
.dark-mode .form-group::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    z-index: 0;
}

/* Make sure the form is always on top of other elements */
.contact-page-form {
    isolation: isolate;
    position: relative;
    z-index: 100;
}

/* Fix for the form field text in dark mode */
.dark-mode .contact-page-form input,
.dark-mode .contact-page-form textarea {
    color: #ffffff !important; /* Force white text in dark mode */
    background-color: #1e293b !important; /* Force dark but visible background */
    border: 2px solid #4b5563 !important; /* Visible border */
    font-size: 1rem !important;
    font-weight: 500 !important;
}

/* Add inner shadow to make text fields more visible */
.dark-mode .form-group input,
.dark-mode .form-group textarea {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(255, 255, 255, 0.05) !important;
}

/* Improve button visibility in dark mode */
.dark-mode button.btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.dark-mode button.btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Fix for dark mode text in page header */
.dark-mode .page-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.dark-mode .page-header h1 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fix for the language switcher in dark mode */
.dark-mode .btn-secondary {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #ffffff;
}

.dark-mode .btn-secondary:hover {
    background-color: #374151;
}

/* Fix for success and error messages in dark mode */
.dark-mode .success-message {
    background-color: #065f46;
    color: #ffffff;
    border: 1px solid #047857;
}

.dark-mode .error-message {
    background-color: #991b1b;
    color: #ffffff;
    border: 1px solid #b91c1c;
} 