/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0F0F0F;
    --bg-card: #1A1A1A;
    --primary: #8B0000;
    --primary-light: #A52A2A;
    --primary-dark: #6B0000;
    --accent-gold: #C9A227;
    --text-primary: #F5F5F5;
    --text-secondary: #CCCCCC;
    --text-link: #E0E0E0;
    --border: #2A2A2A;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* RTL/LTR Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] .nav-menu a::after {
    right: 0;
    left: auto;
}

[dir="ltr"] .nav-menu a::after {
    left: 0;
    right: auto;
}

[dir="rtl"] .section-title::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

[dir="ltr"] .section-title::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

[dir="rtl"] .service-list li,
[dir="rtl"] .project-features ul {
    padding-right: 2rem;
    padding-left: 0;
}

[dir="ltr"] .service-list li,
[dir="ltr"] .project-features ul {
    padding-left: 2rem;
    padding-right: 0;
}

[dir="rtl"] .service-list li::before,
[dir="rtl"] .project-features li::before,
[dir="rtl"] .modal-description li::before {
    right: -1.75rem;
    left: auto;
}

[dir="ltr"] .service-list li::before,
[dir="ltr"] .project-features li::before,
[dir="ltr"] .modal-description li::before {
    left: -1.75rem;
    right: auto;
}

[dir="rtl"] .modal-description ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="ltr"] .modal-description ul {
    padding-left: 1.5rem;
    padding-right: 0;
}

[dir="rtl"] .modal-close {
    left: 1rem;
    right: auto;
}

[dir="ltr"] .modal-close {
    right: 1rem;
    left: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-link);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent-gold);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

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

.nav-menu a.active {
    color: var(--accent-gold);
}

.nav-menu a.active::after {
    background-color: var(--accent-gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    background-color: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
}

.lang-switcher:hover {
    background-color: rgba(201, 162, 39, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #0F0F0F 0%, #050505 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(139, 0, 0, 0.5);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: rgba(26, 26, 26, 0.8);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    border-radius: 2px;
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 2;
    text-align: center;
    color: var(--text-secondary);
}

/* Workflow Section */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.workflow-step {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
}

.workflow-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-gold), #D4AF37);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-primary);
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.service-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.service-list {
    list-style: none;
    color: var(--text-secondary);
}

.service-list li {
    padding: 0.5rem 0;
    padding-right: 1.5rem;
    position: relative;
}

.service-list li::before {
    content: '▸';
    position: absolute;
    right: 0;
    color: var(--accent-gold);
}

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

.project-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card-featured {
    cursor: pointer;
    position: relative;
}

.project-image {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

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

.project-view-btn {
    display: block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(201, 162, 39, 0.1);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: rgba(201, 162, 39, 0.1);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-link-btn:hover {
    background-color: rgba(201, 162, 39, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.3);
}

.project-card-featured:hover .project-view-btn {
    background-color: rgba(201, 162, 39, 0.2);
    transform: translateY(-2px);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-features {
    margin-bottom: 1.5rem;
}

.project-features h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-features ul {
    list-style: none;
    color: var(--text-secondary);
    padding-right: 2rem;
}

[dir="ltr"] .project-features ul {
    padding-right: 0;
    padding-left: 2rem;
}

.project-features li {
    padding: 0.25rem 0;
    position: relative;
}

.project-features li::before {
    content: '▸';
    position: absolute;
    right: -1.75rem;
    color: var(--accent-gold);
}

[dir="ltr"] .project-features li::before {
    right: auto;
    left: -1.75rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tech-tag {
    background-color: rgba(201, 162, 39, 0.1);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.projects-note {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Tech Stack Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-category {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.tech-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
}

.tech-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tech-category p {
    color: var(--text-secondary);
}

/* Why Us Section */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.why-us-item {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s ease;
}

.why-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
}

.why-us-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.why-us-item p {
    color: var(--text-secondary);
}

/* Contact Section */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    margin-bottom: 3rem;
}

.contact-info p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--bg-card);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.contact-icon {
    font-size: 1.5rem;
}

/* Footer */
.footer {
    background-color: var(--bg-card);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.project-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
    margin-top: 2rem;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.modal-body h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

.modal-media {
    margin: 2rem 0;
    text-align: center;
}

.modal-media img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-description p {
    margin-bottom: 1rem;
}

.modal-description ul {
    list-style: none;
    padding-right: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-description li {
    padding: 0.5rem 0;
    position: relative;
}

.modal-description li::before {
    content: '▸';
    position: absolute;
    right: -1.5rem;
    color: var(--accent-gold);
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.modal-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 8px;
}

.modal-note p {
    margin: 0;
    color: var(--text-secondary);
}

.modal-note strong {
    color: var(--accent-gold);
}

/* Feature Sections */
.feature-section {
    margin: 2.5rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.feature-section:last-of-type {
    border-bottom: none;
}

.feature-section h4 {
    font-size: 1.375rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.feature-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
}

.feature-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .feature-gallery {
        grid-template-columns: 1fr;
    }
    
    .feature-section h4 {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .project-modal.active {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 2rem 1.5rem;
    }
    
    .modal-body h2 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: right;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid var(--border);
    }

    [dir="ltr"] .nav-menu {
        right: auto;
        left: -100%;
        text-align: left;
    }

    .nav-menu.active {
        right: 0;
    }

    [dir="ltr"] .nav-menu.active {
        right: auto;
        left: 0;
    }

    .lang-switcher {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .workflow-steps,
    .services-grid,
    .projects-grid,
    .tech-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 15px;
    }

    .service-card,
    .project-card,
    .workflow-step {
        padding: 1.5rem;
    }
}

