/* General Styles */
:root {
    --primary-color: #0056b3;
    --secondary-color: #e9ecef;
    --accent-color: #ffc107;
    --text-color: #333;
    --light-text: #f8f9fa;
    --dark-bg: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --whatsapp-color: #25D366;
    --call-color: #007bff;
    --email-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

/* For Arabic text */
.ar {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: block;
}

/* For English text */
.en {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: none;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    background-color: white;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.language-switcher button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.language-switcher button.active {
    background-color: var(--primary-color);
    color: white;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--dark-bg);
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
    margin: 10px;
}

.cta-button:hover {
    background-color: #e0a800;
    transform: translateY(-3px);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    margin-bottom: 20px;
    color: #6c757d;
}

.service-details-btn, .request-service-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    margin: 5px;
}

.service-details-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.request-service-btn {
    background-color: var(--primary-color);
    color: white;
}

.service-details-btn:hover {
    background-color: #d1d7dc;
}

.request-service-btn:hover {
    background-color: #004494;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 800px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

form button:hover {
    background-color: #004494;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-stats {
    flex: 1;
    min-width: 300px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: white;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-right: 20px;
}

.contact-text h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.contact-button {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: var(--transition);
}

.contact-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.whatsapp {
    background-color: #25D366;
}

.call {
    background-color: #007bff;
}

.email {
    background-color: #dc3545;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Floating Contact Buttons */
.floating-contact-buttons {
    position: fixed;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.floating-contact-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.floating-contact-button i {
    font-size: 24px;
}

.floating-contact-button:hover {
    transform: scale(1.1);
}

.floating-contact-button .button-label {
    position: absolute;
    right: -100px;
    background-color: var(--dark-bg);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.floating-contact-button:hover .button-label {
    opacity: 1;
    right: 70px;
}

.floating-whatsapp {
    background-color: var(--whatsapp-color);
}

.floating-call {
    background-color: var(--call-color);
}

.floating-email {
    background-color: var(--email-color);
}

/* RTL support for floating buttons */
body.ar-mode .floating-contact-buttons {
    left: auto;
    right: 20px;
}

body.ar-mode .floating-contact-button .button-label {
    right: auto;
    left: -100px;
}

body.ar-mode .floating-contact-button:hover .button-label {
    right: auto;
    left: 70px;
}

/* Form validation styles */
.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-indicator i {
    font-size: 3rem;
    color: white;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification i {
    margin-right: 10px;
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* RTL support for notifications */
body.ar-mode .notification {
    right: auto;
    left: 20px;
}

body.ar-mode .notification i {
    margin-right: 0;
    margin-left: 10px;
}

@keyframes slideInRtl {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

body.ar-mode .notification {
    animation: slideInRtl 0.3s ease-out forwards;
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo, .footer-links, .footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-contact p a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact p a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] .contact-icon,
[dir="rtl"] .footer-contact p i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .contact-button i {
    margin-right: 0;
    margin-left: 10px;
}

/* English mode */
body.en-mode .ar {
    display: none;
}

body.en-mode .en {
    display: block;
}

body.en-mode {
    direction: ltr;
}

/* Arabic mode (default) */
body.ar-mode .ar {
    display: block;
}

body.ar-mode .en {
    display: none;
}

body.ar-mode {
    direction: rtl;
}