/* Reset & Variables */
:root {
    --primary: #1E88E5;
    --primary-dark: #0A1628;
    --accent: #42A5F5;
    --accent-light: #90CAF9;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(30, 136, 229, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-en);
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    line-height: 1.6;
}

html[dir="rtl"] body {
    font-family: var(--font-ar);
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.fade-in {
    animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.site-header.scrolled .nav-link {
    color: var(--primary-dark);
}

.site-header.scrolled .logo-text {
    color: var(--primary-dark);
}

/* Transparent mode text color */
.site-header:not(.scrolled) .nav-link,
.site-header:not(.scrolled) .logo-text,
.site-header:not(.scrolled) .lang-btn {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.site-header:not(.scrolled).inner-page-header .nav-link,
.site-header:not(.scrolled).inner-page-header .logo-text,
.site-header:not(.scrolled).inner-page-header .lang-btn {
    color: var(--primary-dark);
    text-shadow: none;
}

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

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.lang-switch {
    position: relative;
}
.lang-btn {
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    min-width: 120px;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu.show { display: flex; }
.lang-item {
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-align: start;
}
.lang-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--primary-dark);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 10s ease-out;
}
.hero-slide.active .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.4) 100%);
    z-index: 1;
}
html[dir="rtl"] .hero-overlay {
    background: linear-gradient(to left, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.hero-desc {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255,255,255,0.8);
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease 0.5s;
}

.hero-btn {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease 0.7s;
}

.hero-slide.active .hero-title,
.hero-slide.active .hero-desc,
.hero-slide.active .hero-btn {
    transform: translateY(0);
    opacity: 1;
}

/* Sections */
.section {
    padding: 6rem 0;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-start {
    text-align: start;
}
.section-title.text-start::after {
    left: 0;
    transform: none;
}
html[dir="rtl"] .section-title.text-start::after {
    left: auto;
    right: 0;
    transform: none;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    filter: brightness(0) invert(1);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: var(--transition);
}
.service-desc {
    color: var(--text-muted);
    transition: var(--transition);
}

.service-card:hover .service-title,
.service-card:hover .service-desc {
    color: white;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: white;
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
    position: relative;
    background: white;
    z-index: 2;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stats */
.stats-section {
    background: var(--primary-dark);
    color: white;
    padding: 5rem 0;
    position: relative;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}
.stat-item .stat-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
}

/* Partners */
.partners-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}
.partner-logo {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}
.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Contact */
.contact-section { background: white; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.contact-info-title { font-weight: 700; margin-bottom: 0.25rem; font-size: 1.1rem; }
.contact-info-desc { color: var(--text-muted); }

.contact-form {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1.5rem; }
.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}

/* Footer */
.site-footer {
    background: #060e1a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-text { color: rgba(255,255,255,0.6); margin-bottom: 1.5rem; }

.social-links { display: flex; gap: 1rem; }
.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--accent); padding-inline-start: 5px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }
    html[dir="rtl"] .nav-menu { left: auto; right: -100%; }
    
    .nav-menu.active { left: 0; }
    html[dir="rtl"] .nav-menu.active { right: 0; }
    
    .site-header:not(.scrolled) .nav-link { color: var(--primary-dark); text-shadow: none; }
    
    .mobile-toggle { display: block; }
    
    .hero-title { font-size: 2.5rem; }
    
    .contact-grid, .footer-grid { grid-template-columns: 1fr; }
}

/* Inner Pages Header Spacer */
.inner-page-spacer {
    height: 90px;
    background: var(--bg-light);
}
