/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0a1129;
    --secondary: rgba(0, 0, 0, 0.8);
    --accent: #EA7415;
    --accent-light: #ff7b40;
    --text: #ffffff;
    --text-secondary: #b0b7cb;
    --card-bg: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--secondary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="rtl"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
header {
    background-color: rgba(0,0,0,0.5);
    /* backdrop-filter: blur(10px); */
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo i {
    color: var(--accent);
    margin-right: 0.5rem;
}

body[dir="rtl"] .logo i {
    margin-right: 0;
    margin-left: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 2rem;
}

body[dir="rtl"] nav ul li {
    margin-left: 0;
    margin-right: 2rem;
}

nav ul li a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

.lang-switcher {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.lang-switcher:hover {
    background: var(--accent);
}

.lang-switcher i {
    margin-right: 0.5rem;
}

body[dir="rtl"] .lang-switcher i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}


/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Language Switcher */
.lang-switcher {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.lang-switcher:hover {
    background: var(--accent);
}

/* Mars Background */
.mars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../images/r&d.png') center/cover no-repeat;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 20px rgba(255, 77, 0, 0.5);
}

.hero-content h1 span {
    color: var(--accent);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Section Common Styles */
.section {
    padding: 5rem 0;
    position: relative;
    z-index: 2;
    background: var(--secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.section-title h2 span {
    color: var(--accent);
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 77, 0, 0.2);
    border-color: var(--accent);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.project-content .status {
    display: inline-block;
    background: rgba(255, 77, 0, 0.2);
    color: var(--accent-light);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.project-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.project-features li:before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.4rem;
}

/* Gallery Section */
.gallery {
    background-color: var(--secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 77, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 17, 41, 0.9), transparent);
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.modal-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
}

/* Project Detail Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.project-modal-content {
    background: var(--secondary);
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 77, 0, 0.3);
    border: 1px solid var(--accent);
}

.project-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.project-modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.project-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.project-modal-image {
    height: 300px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.project-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-title {
    font-size: 2rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
}

.project-modal-status {
    display: inline-block;
    background: rgba(255, 77, 0, 0.2);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-modal-body {
    padding: 2rem;
}

.project-modal-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.project-modal-section {
    margin-bottom: 2rem;
}

.project-modal-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

.project-modal-features {
    list-style: none;
}

.project-modal-features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.project-modal-features li:before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.4rem;
}

.project-modal-team, .project-modal-timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.project-modal-team div, .project-modal-timeline div {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
}

.project-modal-team h5, .project-modal-timeline h5 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Stats Section */
.stats {
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--text);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--accent);
    cursor: pointer;
}

.btn:hover {
    background-color: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 77, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--text);
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23EA7415" fill-opacity="0.05" d="M0,128L48,117.3C96,107,192,85,288,112C384,139,480,213,576,224C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,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>');
    background-size: cover;
    background-position: center top;
    opacity: 0.7;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.footer-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.footer-logo-text span {
    color: var(--accent);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent);
}
.footer-heading.ar::after {
    right: 0;
}
.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.footer-contact i {
    color: var(--accent);
    margin-right: 12px;
    font-size: 1.1rem;
    margin-top: 4px;
}

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text);
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.newsletter-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover {
    background-color: var(--accent-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-link i {
    font-size: 30px;
}

body[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 25px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .project-modal-team, .project-modal-timeline {
        grid-template-columns: 1fr;
    }
    
    .project-modal-image {
        height: 200px;
    }
    
    .project-modal-title {
        font-size: 1.5rem;
    }
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
}

/* RTL-specific fixes for lists */
body[dir="rtl"] .project-features li {
    padding-left: 0;
    padding-right: 1.5rem;
    text-align: right;
}

body[dir="rtl"] .project-features li:before {
    left: auto;
    right: 0;
}

body[dir="rtl"] .project-modal-features li {
    padding-left: 0;
    padding-right: 1.5rem;
    text-align: right;
}

body[dir="rtl"] .project-modal-features li:before {
    left: auto;
    right: 0;
}

/* Additional RTL alignment fixes */
body[dir="rtl"] .project-content,
body[dir="rtl"] .project-modal-body {
    text-align: right;
}

body[dir="rtl"] .project-modal-section h4 {
    border-left: none;
    border-right: 4px solid var(--accent);
    padding-left: 0;
    padding-right: 1rem;
}