/* --- Global Reset and Base Styles --- */
:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-red: #f41313;
    --color-light-gray: #e0e0e0;
    --color-dark-gray: #5c5c5c;
    --max-content-width: 1200px;
    --usp-grid-max-width: 850px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-black);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Default English Font */
    font-family: 'DM Sans', sans-serif;
    color: var(--color-white);
}

/* FIX: Arabic Specific Font Application - Highest Specificity (Stable) */
html[lang="ar"] body, body[dir="rtl"] {
    font-family: 'Beiruti', sans-serif !important; 
}

/* FIX: Custom Scrollbars (Stable) */
#snap-container::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#snap-container::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: var(--color-black); /* Black Track */
}

#snap-container::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background-color: var(--color-red); /* Red Thumb */
    border-radius: 4px; /* Slightly rounded edges */
}


/* Content Width Container */
.container {
    max-width: var(--max-content-width);
    width: 90%; 
    margin: 0 auto;
    padding: 0 20px;
}

/* Helper Classes */
.red-text { color: var(--color-red) !important; }
.white-text { color: var(--color-white) !important; }
.red-bg { background-color: var(--color-red) !important; }
.black-bg { background-color: var(--color-black) !important; }
.white-bg { background-color: var(--color-white) !important; }

/* --- Desktop Snap-Scrolling and Full-Screen Sections --- */

@media (min-width: 1025px) {
    #snap-container {
        scroll-snap-type: y mandatory;
        height: 100vh;
        overflow-y: scroll;
        scroll-behavior: smooth;
    }

    .section {
        height: 100vh;
        scroll-snap-align: start;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }
}

.section {
    padding-top: var(--header-height);
    /* CRITICAL FIX: Guaranteed minimum height for section visibility */
    min-height: 100vh; 
    padding-bottom: 50px; 
    display: flex; 
    flex-direction: column;
    align-items: center;
}

/* ------------------------------------------------ */
/* ----------- HEADER STYLING (FINAL) ------------- */
/* ------------------------------------------------ */

#main-header {
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-black);
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-placeholder {
    display: block; /* Make it a block element to control its alignment */
    /* Align image within the anchor (default LTR) */
    text-align: left; 
    transition: text-align 0.3s; /* Optional: smooth transition for alignment */
    line-height: 0; /* Important for removing unwanted vertical space under the image */
}

.logo-placeholder img {
    /* Ensure the image is contained within its specified dimensions */
    display: inline-block; 
    max-width: 100%;
    height: auto;
}

/* Add an explicit RTL rule for the logo placeholder to ensure alignment consistency */
body[dir="rtl"] .logo-placeholder {
    text-align: right !important; 
}

.nav-menu {
    display: flex !important; 
    list-style: none;
    gap: 30px;
    align-items: center;
    padding: 0;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-white); /* Default color for inactive links */
    font-size: 16px;
    transition: color 0.3s;
    display: block;
}

/* Active link style */
.nav-menu a.active {
    color: var(--color-red) !important;
    font-weight: 700;
}

.language-switch button {
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    font-size: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

@media (min-width: 1025px) {
    #main-header {
        position: fixed;
        top: 0;
    }
}

body[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

/* --- Section Content Styling --- */

/* Hero Section (Video Background) */
#hero {
    position: relative; /* Essential for containing the video and overlay */
    overflow: hidden; /* Prevent video overflow */
    /* Removed black-bg class, handled by gradient overlay */
}

/* NEW: Hero Video Styles */
#hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Below content */
    pointer-events: none;
    background-color: var(--color-black); /* Fallback BG in case video fails */
}

#hero-video-wrapper video {
    min-width: 100%; 
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Ensures video covers the entire container */
}

/* NEW: Hero Content Wrapper and Directional Gradient Overlay */
#hero-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Above video */
    display: flex; /* Centers content vertically */
    align-items: center; 
    
    /* 1. Default LTR Gradient (Left to Right Fade) */
    background: linear-gradient(
        to right, 
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.7) 30%,
		rgba(0, 0, 0, 0.4) 60%,
        rgba(0, 0, 0, 0.0) 100%
    );
}

/* 2. RTL Gradient (Right to Left Fade) */
html[lang="ar"] body  #hero-content-wrapper {
    background: linear-gradient(
        to right, /* Direction is reversed */
        rgba(0, 0, 0, 0.0),  /* Fade to full transparency at 100% (left) */
		rgba(0, 0, 0, 0.4) 30%, /* Still 50% opacity at mid */
		rgba(0, 0, 0, 0.7) 60%, /* Still 50% opacity at mid */
		rgba(0, 0, 0, 0.85) 100% /* Black 50% opacity at 0% (right) */
    );
}

#hero-content-wrapper .container {
    width: 100%;
}


/* Hero Content Alignment */
.hero-content {
    /* Set max width as before */
    max-width: 800px;
    
    /* Default LTR: Aligned Left, pushed to the left side of the content wrapper */
    margin: 0; 
    text-align: left; 
}

/* RTL: Aligned Right, pushed to the right side of the content wrapper */
body[dir="rtl"] .hero-content {
    margin: 0 0 0 auto; /* Push content to the right edge */
    text-align: right; 
}

.title-1 {
	margin-top: 60px;
}

.title-1, .title-2 {
    font-size: clamp(1.4rem, 2.59vw, 2.8rem); /* clamp(1.7rem, 4vw, 2.8rem); */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
	text-shadow: 5px 5px 12px rgba(0,0,0,0.4);
}

.title-2 {
    font-size: clamp(1.8rem, 4vw, 2.9rem); /* clamp(1.8rem, 4.2vw, 3.0rem); */
    margin-bottom: 35px;
}
html[lang="ar"] body .title-1 {
	margin-bottom: 15px;
	text-align:right;
}
html[lang="ar"] body .title-2 {
	text-align:right;
}

/* The inner description text needs its custom alignment fixed again for the new layout */
.hero-content .description {
    font-size: 17px;
    color: var(--color-light-gray);
    text-align: left; /* Default LTR */
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: 0; /* Align left */
    margin-right: auto;
	text-shadow: 4px 4px 8px rgba(0,0,0,0.4);
}

html[lang="ar"] body .description,
body[dir="rtl"] .hero-content .description {
    text-align: right !important; /* Force RTL for description */
    margin-left: auto; /* Push description to the right */
    margin-right: 0;
	font-size: 18px;
}
html[lang="ar"] body .usp-description {
    text-align: right !important;
	font-size: 17px;
    color: var(--color-dark-gray);
    margin-top: 0;
    line-height: 1.4; 
    padding-right: 30px; 
}

/* CTA Button Styling */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    color: var(--color-white);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: opacity 0.3s;
    font-size: 16px;
    flex-wrap: nowrap;
}
html[lang="ar"] body .cta-button {
	float: right;
}
.cta-button:hover {
    opacity: 0.9;
}

/* FIX: LinkedIn Icon Positioning */
.linkedin-link i {
    font-size: 1em; 
    margin: 0 2px; 
    display: inline-block !important; 
}

body[dir="rtl"] .linkedin-link i {
    margin: 0 2px; 
}

#our-edge {
    color: var(--color-black);
	background: 
		url('../img/bkg_2_1.png') top right no-repeat,
		url('../img/bkg_2_2.png') bottom left no-repeat;
	background-size: 285px;
    background-color: var(--color-white); 
}

.content-standard {
    padding-top: 50px;
    padding-bottom: 50px;
    width: 100%;
}

#our-edge .section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    text-align: center;
    margin-top: 10px;
    font-weight: 700;
	color: #f41313;
}
html[lang="ar"] body .section-title {
	font-size: clamp(2rem, 4vw, 2.8rem) !important;
}

.section-description {
    font-size: 16px;
    color: var(--color-dark-gray);
    text-align: center;
    margin-bottom: 50px;
}
html[lang="ar"] body .section-description {
    font-size: 20px;
}


.usp-grid-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.usp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: var(--usp-grid-max-width);
    width: 100%;
}

.usp-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.usp-item {
    /* Ensures LTR alignment for content */
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    text-align: left;
}

body[dir="rtl"] .usp-item {
    /* Ensures RTL alignment for content wrapper */
    align-items: flex-end;
    text-align: right;
}

.usp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0px; 
}

body[dir="rtl"] .usp-header {
    flex-direction: row-reverse;
	 margin-bottom: 5px; 
}

.usp-item .red-icon {
    font-size: 18px;
    color: var(--color-red);
}

.usp-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}
html[lang="ar"] body .usp-title {
	font-size: 20px;
}
.usp-description {
    font-size: 14px;
    color: var(--color-dark-gray);
    margin-top: 0;
    line-height: 1.4; 
    padding-left: 30px; 
    text-align: left; 
}

/* CRITICAL FIX: Our Edge USPs Description Texts Arabic Alignment - MAX Specificity */
body[dir="rtl"] #our-edge .usp-description {
    padding-left: 0 !important;
    padding-right: 30px !important;
    text-align: right !important; /* Forced Right Alignment */
}


/* Contact Us Section (Stable) */
#contact-us {
    color: var(--color-white);
	background-image: url('../img/bkg.png');
	background-repeat: repeat-x;
    background-position: center;
}

.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#contact-us .section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    margin-bottom: 20px;
}

.contact-text {
    font-size: 16px;
    color: var(--color-light-gray);
    margin-bottom: 50px;
    text-align: left;
}

footer {
    width: 100%;
    background-color: var(--color-black);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 14px;
    color: var(--color-light-gray);
}


/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    
    /* Mobile Header Adjustments */
    #main-header {
        position: fixed; /* NEW: Make header fixed */
        top: 0;
        left: 0;
        width: 100%;
        height: var(--header-height); /* Keep fixed height */
        padding: 0; /* Use container padding only */
    }

    .header-content {
        justify-content: center; /* NEW: Center the logo/nav combo */
        align-items: center;
        position: relative; /* For absolute positioning of the button */
    }
    
    /* Show main navigation container but position it absolutely to the edge */
    #main-nav { 
        display: block;
        position: absolute;
        top: 0;
        height: 100%;
        
        /* LTR/English: Button on the right */
        right: 20px; 
        left: auto;
    }
    
    /* RTL/Arabic: Button on the left */
    body[dir="rtl"] #main-nav {
        right: auto;
        left: 20px;
    }
    
    /* Ensure the language button is vertically centered */
    .nav-menu {
        display: flex !important; 
        align-items: center;
        height: 100%;
        gap: 0; /* Remove gap from menu items */
    }
    
    /* Hide all li elements inside nav-menu EXCEPT the language-switch */
    .nav-menu li:not(.language-switch) {
        display: none;
    }

    /* Reset USP alignment and padding */
    .usp-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
        max-width: 100%;
    }
    
    .usp-item {
        align-items: flex-start;
        text-align: left;
    }

    /* Override mobile alignment for RTL to ensure right-align */
    body[dir="rtl"] .usp-item {
        align-items: flex-end;
        text-align: right;
    }

    .usp-description {
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }

    body[dir="rtl"] .usp-description {
        text-align: right !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .contact-content {
        justify-content: flex-start;
        padding: 0 10px;
    }
}