/* Reset and Variables */
:root {
    --primary-red: #C8102E;
    --primary-blue: #0A1628;
    --secondary-blue: #1C335A;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f6f8;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.en {
    font-family: 'Montserrat', sans-serif;
}

/* Hide EN by default if AR is active */
html[lang="ar"] .en { display: none; }
html[lang="en"] .ar { display: none; }
html[lang="en"] { direction: ltr; }

/* ---------------- Navbar ---------------- */
.navbar {
    background-color: var(--primary-blue);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 70px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding-left: 320px; /* Make room for the absolutely-positioned logo */
}

.nav-logo {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: white;
    padding: 0 40px 0 20px;
    border-radius: 0 0 50px 0;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
}

.nav-logo img {
    height: 55px;
    width: 55px;
    border-radius: 50%;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text .ar {
    font-weight: 800;
    font-size: 1.1rem;
    color: #1a2938;
}

.logo-text .en {
    font-size: 0.75rem;
    color: var(--primary-red);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin: 0 auto;
}

.nav-item {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-red);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-red);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Lang & Theme Toggles */
.lang-switch {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.lang-btn.active, .lang-btn:hover {
    background: #c8102e; /* Exact red */
    border-color: #c8102e;
    color: white;
}

.theme-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.theme-btn:hover {
    color: var(--primary-red);
}

.menu-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------------- Hero Section ---------------- */
.hero {
    position: relative;
    height: 600px;
    background-image: url('./images/WhatsApp Image 2026-06-22 at 4.44.32 PM.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.4) 100%);
}

html[lang="en"] .hero-overlay {
    background: linear-gradient(to right, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.4) 100%);
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Pushes content to the Left side in RTL */
    position: relative;
    z-index: 2;
    color: white; /* Restored white text */
}

.hero-content {
    max-width: 650px;
    text-align: right; /* Aligns text to the right within its left-positioned box */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-red);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-blue);
}

.btn-outline-white {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 20px;
    font-size: 0.9rem;
    border-radius: 20px;
}

.btn-outline-white:hover {
    background-color: white;
    color: var(--primary-blue);
}

/* Stats Bar */
.stats-bar {
    position: absolute;
    bottom: 40px;
    left: 40px; /* Positioned at bottom left */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px 30px;
    z-index: 3;
    width: auto;
}

.stats-container {
    display: flex;
    gap: 30px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 20px;
    color: white;
}
.stat-item:last-child {
    border-left: none;
    padding-left: 0;
}

.stat-icon {
    font-size: 2rem;
    color: #fff;
    opacity: 0.8;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-label small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    opacity: 0.7;
}

/* ---------------- Services Section ---------------- */
.services {
    padding: 100px 0 60px;
    background-color: white;
}

.text-center {
    text-align: center;
}

.text-red {
    color: var(--primary-red);
}

.section-header h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.en-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: #666;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-img {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
    border-radius: 50%;
    padding: 5px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.service-icon-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-red);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.service-info h3 {
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
    min-height: 50px;
}

.service-info .en-title {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 15px;
    min-height: 40px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-red);
}

/* ---------------- Projects Section ---------------- */
.projects {
    padding: 60px 0;
}

.projects-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.projects-info-box {
    background: var(--secondary-blue);
    color: white;
    padding: 40px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.projects-info-box .tag {
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 10px;
}

.projects-info-box h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.projects-info-box p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-details {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.project-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.project-details p {
    font-size: 0.8rem;
    color: #ddd;
}

/* ---------------- Footer ---------------- */
.footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    font-size: 0.95rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-info a {
    transition: var(--transition);
}

.footer-info a:hover {
    color: var(--primary-red);
}

.footer-info i {
    margin-right: 5px;
    color: var(--primary-red);
}

.footer-divider {
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

/* ---------------- Mobile Menu ---------------- */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
    width: 100%;
}

.close-menu-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-menu-btn:hover {
    color: var(--primary-red);
    transform: rotate(90deg);
}

.mobile-link {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    transition: var(--transition);
}

.mobile-link:hover, .mobile-link.text-red {
    color: var(--primary-red);
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-container { grid-template-columns: 1fr; }
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .hero-right-logo { display: none; }
    .hero-buttons { justify-content: center; }
    .nav-links { display: none; }
    
    /* Perfect Mobile Navbar */
    .navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        direction: ltr !important; /* Always: logo LEFT, buttons RIGHT */
        padding: 0 15px;
        height: 70px;
    }
    .nav-logo {
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        height: 100%;
        display: flex;
        align-items: center;
        order: -1; /* Logo always first (left) */
    }
    .nav-logo img {
        height: 45px;
        width: 45px;
        background: white;
        border-radius: 50%;
        padding: 2px;
    }
    .logo-text { display: none !important; }
    
    .nav-container {
        width: auto;
        padding: 0;
        margin: 0;
        min-height: auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px; /* Tighter gap */
    }
    .lang-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    .theme-btn {
        font-size: 1.1rem;
    }
    .menu-btn {
        display: block;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        height: 100svh;
        min-height: 500px;
        padding: 80px 15px 40px;
        background-position: center center;
        background-size: cover;
    }
    .hero-overlay {
        background: rgba(10, 22, 40, 0.55) !important; /* Uniform dark overlay on mobile */
    }
    .hero-content {
        text-align: center;
    }
    .menu-btn {
        font-size: 1.8rem;
    }
    .nav-logo img {
        height: 45px;
        width: 45px;
    }
    .logo-text .ar {
        font-size: 0.95rem;
    }
    .hero-title {
        font-size: 2.2rem;
        margin-top: 50px;
    }
    .hero-desc {
        font-size: 1rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Compact Stats Grid for Mobile */
    .stats-bar {
        position: relative;
        bottom: auto;
        left: auto;
        margin: 30px auto 0;
        width: 100%;
        padding: 15px;
    }
    .stats-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        text-align: center;
    }
    .stat-item {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 10px 0;
        gap: 5px;
    }
    .stat-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .projects-info-box h2 {
        font-size: 1.5rem;
    }
    
    /* Footer Mobile Polish */
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-info {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }
    .footer-divider {
        display: none; /* Hide dividers on mobile since items are stacked */
    }
    .footer-social {
        justify-content: center;
    }
}

/* =========================================================================
   LANGUAGE TOGGLE STRICT RULES
   ========================================================================= */
[lang="ar"] .en { display: none !important; }
[lang="en"] .ar { display: none !important; }

/* =========================================================================
   LIGHT MODE (PROFESSIONAL THEME OVERRIDES)
   ========================================================================= */
[data-theme="light"] {
    --primary-blue: #ffffff;
    --secondary-blue: #f4f6f8;
    --text-light: #111111;
}

[data-theme="light"] body {
    background-color: #f4f6f8;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

[data-theme="light"] .nav-item {
    color: #333333;
}
[data-theme="light"] .nav-item:hover, [data-theme="light"] .nav-item.active {
    color: var(--primary-red);
}

[data-theme="light"] #theme-toggle-btn {
    color: #333333 !important;
}

[data-theme="light"] .menu-btn {
    color: #333333;
}

[data-theme="light"] .logo-text {
    color: #111111;
}

/* Keep hero text white because of the dark background image */
[data-theme="light"] .hero-title, [data-theme="light"] .hero-desc {
    color: #ffffff;
}

[data-theme="light"] .stats-bar {
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

[data-theme="light"] .stat-icon {
    color: #0a1628;
}

[data-theme="light"] .stat-num {
    color: var(--primary-red);
}

[data-theme="light"] .stat-label {
    color: #333333;
}

[data-theme="light"] .section-header h2 {
    color: #111111;
}

[data-theme="light"] .service-card {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

[data-theme="light"] .service-card h3 {
    color: #111111;
}

[data-theme="light"] .service-card p {
    color: #555555;
}

[data-theme="light"] .projects-info-box {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

[data-theme="light"] .projects-info-box h2 {
    color: #111111;
}

[data-theme="light"] .projects-info-box p {
    color: #555555;
}

[data-theme="light"] .btn-outline-white {
    border-color: var(--primary-red);
    color: var(--primary-red);
}
[data-theme="light"] .btn-outline-white:hover {
    background: var(--primary-red);
    color: white;
}

[data-theme="light"] .project-card {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

[data-theme="light"] .project-card h4 {
    color: #111111;
}

[data-theme="light"] .project-card p {
    color: #555555;
}

[data-theme="light"] .mobile-menu {
    background: #ffffff;
}

[data-theme="light"] .mobile-link {
    color: #333333;
}

[data-theme="light"] .close-menu-btn {
    color: #333333;
}

[data-theme="light"] .footer {
    background: #ffffff;
    border-top: 1px solid #eee;
    color: #333333;
}

[data-theme="light"] .footer-info a, 
[data-theme="light"] .footer-info span,
[data-theme="light"] .footer-bottom p {
    color: #333333;
}

[data-theme="light"] .footer-divider {
    color: #cccccc;
}

[data-theme="light"] .footer-social a {
    color: #333333;
    border-color: #ddd;
}
[data-theme="light"] .footer-social a:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* =========================================================================
   PROJECT MODAL (ALBUM) STYLES
   ========================================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: var(--text-main);
}
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        border-radius: 10px;
    }
    .modal { padding: 10px; }
}

[data-theme="light"] .modal-content {
    background: #ffffff;
    color: #111111;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}
.close-modal:hover {
    color: var(--primary-red);
}

.thumbnail-img {
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    border: 2px solid transparent;
}
.thumbnail-img:hover, .thumbnail-img.active {
    opacity: 1;
    border-color: var(--primary-red);
}

