:root {
    --navy: #0B1F3A;
    --steel-blue: #2E5A88;
    --light-blue: #4A90E2;
    --white: #FFFFFF;
    --silver: #C0C7D1;
    --dark-gray: #1A1A1A;
    --light-gray: #F5F7FA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Cairo', sans-serif;
    color: var(--dark-gray);
    background: var(--white);
    line-height: 1.8;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

html[dir="rtl"] body {
    font-family: 'Cairo', 'Poppins', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 31, 58, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--light-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--light-blue);
    transition: width 0.3s;
}

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-switch {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-switch:hover {
    background: var(--light-blue);
    border-color: var(--light-blue);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, var(--steel-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234A90E2" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    width: 180px;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--silver);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
}

.btn-primary {
    background: var(--light-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.btn-primary:hover {
    background: #357ABD;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--navy);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 15px;
}

.section-title .line {
    width: 80px;
    height: 4px;
    background: var(--light-blue);
    margin: 0 auto;
    border-radius: 2px;
}

/* About */
.about {
    background: var(--light-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

html[dir="rtl"] .about-content {
    direction: rtl;
}

.about-text h3 {
    font-size: 32px;
    color: var(--steel-blue);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 18px;
    color: #555;
    margin-bottom: 15px;
}

.about-image {
    position: relative;
    scale: 70%;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(46, 90, 136, 0.2);
    border-color: var(--light-blue);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--steel-blue), var(--light-blue));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
}

.service-card h3 {
    font-size: 22px;
    color: var(--navy);
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    font-size: 16px;
}

/* Projects */
.projects {
    background: var(--light-gray);
}

.project-section {
    margin-bottom: 80px;
}

.project-section:last-child {
    margin-bottom: 0;
}

.project-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--steel-blue);
    margin-bottom: 30px;
    text-align: center;
    padding-top: 30px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-card.hidden-project {
    display: none;
}

.project-image {
    height: 250px;
    background: var(--steel-blue);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 8px;
}

.project-info .tag {
    display: inline-block;
    background: var(--light-blue);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* See More Button */
.see-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

.see-more-btn {
    background: var(--white);
    color: var(--steel-blue);
    border: 2px solid var(--steel-blue);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto !important;
    max-width: 200px;
}

.see-more-btn:hover {
    background: var(--steel-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 90, 136, 0.3);
}

.see-more-btn i {
    transition: transform 0.3s ease;
}

/* Why Us */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--navy), var(--steel-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
}

.feature h3 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 15px;
}

.feature p {
    color: #666;
    font-size: 16px;
}

/* Contact */
.contact {
    background: var(--navy);
    color: var(--white);
}

.contact .section-title h2 {
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 24px;
    fill: none;
    stroke: currentcolor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 3px;
}

/* RTL Fix - الأيقونة يمين */
[dir="rtl"] .contact-info h3 {
    text-align: right;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .contact-item>div {
    text-align: right;
}

/* WhatsApp Link */
.whatsapp-link {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    padding-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

[dir="rtl"] .whatsapp-link {
    flex-direction: row-reverse;
}

.whatsapp-link:hover {
    color: #25D366;
}

.whatsapp-link .fa-whatsapp {
    font-size: 18px;
    color: #25D366;
}

.whatsapp-link:hover .fa-whatsapp {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Email Link */
.email-link {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    padding-bottom: 2px;
}

.email-link:hover {
    color: var(--light-blue);
}

/* Contact Form */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
}

[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--light-blue);
}

/* Footer */
footer {
    background: #061424;
    color: var(--silver);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    width: 100px;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--navy);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: right 0.3s ease;
    }

    html[dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        transition: left 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    html[dir="rtl"] .nav-links.active {
        left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 18px;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .nav-right {
        gap: 10px;
    }

    .lang-switch {
        padding: 6px 12px;
        font-size: 14px;
    }

    .project-section-title {
        font-size: 24px;
    }
}

/* === RTL CONTACT FIX === */
[dir="rtl"] .contact-grid {
    direction: ltr;
    /* نلغي العكس */
}

[dir="rtl"] .contact-info {
    order: 2;
    /* بيانات التواصل تروح يمين */
    text-align: right;
}

[dir="rtl"] .contact-form {
    order: 1;
    /* الفورم يروح شمال */
}

[dir="rtl"] .contact-info h3 {
    text-align: right;
}

[dir="rtl"] .contact-item {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
    gap: 15px;
}

[dir="rtl"] .contact-item>div {
    text-align: right;
    flex: 1;
}

[dir="rtl"] .contact-item i {
    margin-left: 0;
    margin-right: 0;
}