/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --dark-blue: #1e40af;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Arabic font for Arabic content */
[lang="ar"], [lang="ar"] * {
    font-family: 'Cairo', sans-serif;
}

/* English font for English content */
[lang="en"], [lang="en"] * {
    font-family: 'Roboto', sans-serif;
}

/* Chinese font for Chinese content */
[lang="zh"], [lang="zh"] * {
    font-family: 'Noto Sans SC', 'SimHei', sans-serif;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn-login {
    background: var(--primary-blue);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 25px;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    background: none;
    border: 1px solid var(--light-blue);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    color: var(--dark-gray);
}

.lang-btn:hover {
    background: var(--light-blue);
    border-color: var(--primary-blue);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--light-blue);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: none;
    min-width: 120px;
    z-index: 1001;
}

.lang-dropdown.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.lang-option {
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-gray);
}

.lang-option:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-text h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-text p {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
    animation: fadeInRight 0.8s ease 0.4s both;
}

.hero-img-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-img-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.icon-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    animation: float 3s ease-in-out infinite;
}

.icon-item:nth-child(1) { top: 20%; left: 10%; }
.icon-item:nth-child(2) { top: 30%; right: 15%; }
.icon-item:nth-child(3) { bottom: 30%; left: 20%; }
.icon-item:nth-child(4) { bottom: 20%; right: 10%; }

/* Stats Section */
.stats {
    padding: 80px 20px;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--light-blue);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

/* About Preview */
.about-preview {
    padding: 80px 20px;
    background: var(--light-gray);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.about-text > p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-top: 0.25rem;
}

.feature-item h4 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--gray);
    font-size: 0.9rem;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

/* Services Preview */
.services-preview {
    padding: 80px 20px;
    background: var(--white);
}

.services-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.services-preview > p {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--light-blue);
}

.service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-overlay i {
    font-size: 2rem;
    color: var(--white);
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.service-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.service-tags span {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 60px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-blue);
}

.footer-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 10px;
}

.footer-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: var(--primary-blue);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

/* Floating Chat */
.floating-chat {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

/* .chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    margin-bottom: 1rem;
} */

.chat-toggle:hover {
    background: var(--dark-blue);
    transform: scale(1.1);
}

.chat-options {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-options.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 20px;
    background: var(--white);
    color: var(--dark-gray);
    text-decoration: none;
    border-radius: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-blue);
    white-space: nowrap;
}

.chat-option:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-lg);
}

.chat-option.whatsapp:hover {
    background: #25D366;
    color: var(--white);
}

.chat-option.email:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.chat-option.consultation:hover {
    background: #f59e0b;
    color: var(--white);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top:hover {
    background: var(--dark-blue);
    transform: translateY(-3px);
}

.scroll-to-top.show {
    display: flex;
}

/* Service Modal */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.service-modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    z-index: 1;
}

.close-modal:hover {
    color: var(--primary-blue);
}

.modal-body {
    padding: 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* RTL Support */
/* [dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
} */

[dir="rtl"] .hero-content {
    direction: rtl;
}

[dir="rtl"] .floating-chat {
    /* right: auto; */
    left: 20px;
}

[dir="rtl"] .scroll-to-top {
    right: auto;
    left: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-chat {
        right: 10px;
        bottom: 20px;
        top: auto;
        transform: none;
    }
    
    .chat-option span {
        display: none;
    }
    
    .chat-option {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .services-preview h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}