@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Lato:wght@300;400;700&family=Playfair+Display:wght@700&family=Montserrat:wght@400;600;700&family=Oswald:wght@500;700&display=swap');

:root {
    --primary: #2c3e50;
    --accent: #f1c40f;
    --text: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark: #2c3e50;
    --gray: #7f8c8d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    background-color: var(--white);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* Global Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Header & Nav */
header {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 0;
}

.nav-link {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #ecf0f1;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin: 0 20px 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    font-size: 0.95rem;
    display: block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 5px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-inline-end: 10px;
    color: white;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* RTL Support */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .nav-link:hover {
    padding-inline-start: 0;
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
}
/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); background: #128c7e; color: white; }
.whatsapp-float.right { right: 20px; }
.whatsapp-float.left { left: 20px; }
.lang-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
    padding: 6px 14px;
    border-radius: 8px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    transition: 0.3s;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}
.lang-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.lang-btn .flag-icon,
img.flag-icon {
    width: 20px !important;
    height: 14px !important;
    max-width: 20px !important;
    border-radius: 2px;
    object-fit: cover;
    display: inline-block;
}
/* ==================== DARK MODE TOGGLE (Floating) ==================== */
.theme-toggle-float {
    position: fixed;
    top: 100px;
    z-index: 9999;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #f59e0b;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
html[dir="rtl"] .theme-toggle-float { left: 20px; right: auto; }
html[dir="ltr"] .theme-toggle-float { right: 20px; left: auto; }
.theme-toggle-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}
.theme-toggle-float .fa-sun { display: none; }
.theme-toggle-float .fa-moon { display: inline-block; }

/* ==================== DARK MODE ==================== */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}
body.dark-mode header {
    background: #16213e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
body.dark-mode .logo { color: #fff; }
body.dark-mode .nav-link { color: #ccc; }
body.dark-mode .nav-link:hover { color: var(--primary); }
body.dark-mode .mobile-toggle { color: #ccc; }

body.dark-mode .lang-btn {
    background: #2a2a4a;
    border-color: #3a3a5a;
    color: #ccc;
}
body.dark-mode .lang-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

body.dark-mode .theme-toggle-float {
    background: rgba(30, 30, 60, 0.95);
    color: #f59e0b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
body.dark-mode .theme-toggle-float:hover {
    box-shadow: 0 6px 25px rgba(245,158,11,0.3);
}
body.dark-mode .theme-toggle-float .fa-sun { display: inline-block; }
body.dark-mode .theme-toggle-float .fa-moon { display: none; }

body.dark-mode .section-title h2 { color: var(--primary); }
body.dark-mode .section-title p { color: #999; }

body.dark-mode .service-card,
body.dark-mode .contact-info,
body.dark-mode form {
    background: #16213e !important;
    border-color: #2a2a4a !important;
    color: #e0e0e0;
}
body.dark-mode .service-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}
body.dark-mode .service-card h3,
body.dark-mode .contact-info h3 { color: #fff; }
body.dark-mode .service-card p { color: #aaa !important; }

body.dark-mode .about-section,
body.dark-mode #services,
body.dark-mode .section-padding[style*="background"] {
    background: #0f3460 !important;
}
body.dark-mode .about-text p { color: #bbb !important; }

body.dark-mode input,
body.dark-mode textarea {
    background: #1a1a2e !important;
    border-color: #3a3a5a !important;
    color: #e0e0e0 !important;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #777 !important;
}

body.dark-mode footer {
    background: #0a0a1a;
}

body.dark-mode .btn-primary {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 768px) {
    body.dark-mode .nav-menu {
        background: #16213e;
    }
}