/* ===== CSS Variables ===== */
:root {
    --primary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow: 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);
    --transition: all 0.3s ease;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.lang-switcher {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-switcher:hover {
    background: var(--accent-color);
}

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    background-image: url('../client/src/assets/Images/project1/Screenshot 2025-12-27 221623.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.85) 0%, rgba(59, 130, 246, 0.75) 100%);
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 4rem 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

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

.btn-block {
    width: 100%;
    text-align: center;
}

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

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-text {
    display: flex;
    align-items: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-features {
    display: grid;
    gap: 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

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

.service-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-item h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.capabilities {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.capabilities-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.capabilities-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.capabilities-list li {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 5px;
    position: relative;
    padding-left: 2rem;
}

.capabilities-list li::before {
    content: '✓';
    position: absolute;
    left: 0.5rem;
    color: var(--accent-color);
    font-weight: bold;
}

[dir="rtl"] .capabilities-list li {
    padding-right: 2rem;
    padding-left: 1rem;
}

[dir="rtl"] .capabilities-list li::before {
    left: auto;
    right: 0.5rem;
}

/* ===== Products Section ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.product-card.clickable-card {
    cursor: pointer;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-light);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--accent-color);
}

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

.project-card.clickable-card {
    cursor: pointer;
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-light);
}

.project-content {
    padding: 1.5rem;
}

.project-type {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-detail {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.project-detail-icon {
    color: var(--accent-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.project-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.project-detail-value {
    color: var(--text-primary);
}

.project-result {
    background: #d1fae5;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #a7f3d0;
    margin-top: 1rem;
}

.project-result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #065f46;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.project-result-value {
    color: #047857;
    font-weight: 500;
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.dir-ltr {
    direction: ltr;
    text-align: left;
}

.contact-form-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-message {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
}

.footer-section h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

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

/* ===== Detail Modal ===== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.detail-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.detail-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

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

.detail-modal-body {
    padding: 0;
}

.detail-modal-image-container {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: var(--bg-light);
    border-radius: 15px 15px 0 0;
}

.detail-modal-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.detail-modal-image-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.detail-modal-info {
    padding: 2rem;
}

.detail-modal-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.detail-modal-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.detail-modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-modal-detail-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

[dir="rtl"] .detail-modal-detail-item {
    border-left: none;
    border-right: 4px solid var(--accent-color);
}

.detail-modal-detail-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.detail-modal-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.detail-modal-detail-value {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
}

.detail-modal-result {
    background: #d1fae5;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #a7f3d0;
    margin-top: 1rem;
}

.detail-modal-result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #065f46;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.detail-modal-result-value {
    color: #047857;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
}

.clickable-card {
    transition: var(--transition);
}

.clickable-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.clickable-card:active {
    transform: translateY(-5px) !important;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .detail-modal {
        padding: 1rem;
    }
    
    .detail-modal-content {
        max-height: 95vh;
    }
    
    .detail-modal-image-container {
        max-height: 250px;
    }
    
    .detail-modal-image {
        max-height: 250px;
    }
    
    .detail-modal-info {
        padding: 1.5rem;
    }
    
    .detail-modal-title {
        font-size: 1.5rem;
    }
    
    .detail-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    [dir="rtl"] .detail-modal-close {
        right: auto;
        left: 0.5rem;
    }
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        gap: 1rem;
    }

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

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .products-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 50px;
    }

    .brand-name {
        font-size: 1.2rem;
    }

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

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

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

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

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

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

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

[dir="rtl"] .contact-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

[dir="rtl"] .feature-card {
    border-left: none;
    border-right: 4px solid var(--accent-color);
}

[dir="rtl"] .project-card {
    border-top: 4px solid var(--accent-color);
}

