/* --- CLEAN INTELLIGENCE (LIGHT THEME) - FINAL VERSION --- */
:root {
    /* Color Palette */
    --bg: #f8f9fa;             /* Light Grey/White Background */
    --card-bg: #ffffff;        /* Pure White Cards */
    --text: #1a202c;           /* Dark Grey Text (Main) */
    --text-sec: #4a5568;       /* Softer Grey Text */
    --accent: #2563eb;         /* Royal Blue (Primary Brand) */
    --accent-glow: rgba(37, 99, 235, 0.2); /* Soft Blue Glow */
    --border: #e2e8f0;         /* Light Borders */
    
    /* Fonts */
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Reset */
* { box-sizing: border-box; }

body {
    background-color: var(--bg);
    /* Subtle mesh texture */
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- CUSTOM CURSOR EFFECT --- */
.cursor-dot {
    width: 6px; height: 6px; 
    background-color: var(--accent);
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9999; pointer-events: none;
}
.cursor-outline {
    width: 30px; height: 30px;
    border: 1px solid var(--text-sec);
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    border-radius: 50%; z-index: 9998; pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* --- PRELOADER --- */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #ffffff; z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.loader-text { 
    font-family: var(--font-display); 
    font-size: 2em; 
    font-weight: bold; 
    letter-spacing: 5px; 
    color: var(--text);
}

/* --- NAVBAR --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; /* Side padding prevents edge touching */
    position: fixed; width: 100%; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo { 
    font-family: 'Orbitron', sans-serif; 
    font-weight: 900; 
    font-size: 1.6em; 
    letter-spacing: 2px;
    color: var(--text);
    display: flex; align-items: center; gap: 10px;
}
.logo i { color: var(--accent); font-size: 1.2em; }
.logo span { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { 
    font-size: 0.9em; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--text-sec);
    font-weight: 600;
    position: relative; 
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px; 
    background: var(--accent); transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }

/* --- LANGUAGE SELECTOR (Flags + Text + Hide Active) --- */
.lang-selector {
    display: flex; 
    gap: 20px; 
    margin-left: 20px; 
    padding-left: 20px; 
    border-left: 1px solid rgba(0,0,0,0.1); 
    align-items: center;
}

.lang-selector a { 
    display: flex;
    align-items: center;
    gap: 6px; 
    font-size: 0.9em; 
    font-weight: 700;       
    color: var(--text-sec); 
    transition: 0.3s; 
    text-decoration: none;
    letter-spacing: 0.5px;
}

.lang-selector a:hover { 
    color: var(--accent);   
    transform: translateY(-2px); 
    cursor: pointer;
}

/* HIDE THE CURRENT LANGUAGE */
.lang-selector a.active {
    display: none;
}

.lang-selector a span { font-size: 0.9em; }

/* --- MAIN CONTAINER --- */
.container { 
    flex: 1; 
    padding: 120px 5% 60px 5%; /* 5% side padding */
    max-width: 1400px; 
    margin: 0 auto; 
    width: 100%; 
    box-sizing: border-box; 
}

/* --- HERO SECTION --- */
.hero {
    min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    position: relative;
}
.big-text {
    font-family: var(--font-display); font-size: 7vw; line-height: 1;
    font-weight: 800; text-transform: uppercase; margin: 0;
    background: linear-gradient(to right, #1a202c, #718096);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.highlight {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}
.hero-desc {
    font-size: 1.2em; max-width: 600px; margin-top: 30px; 
    color: var(--text-sec); line-height: 1.6; font-weight: 400;
}

/* --- LEAD FORM --- */
.lead-form-minimal {
    margin-top: 40px; display: flex; 
    border-bottom: 2px solid var(--text);
    width: 100%; max-width: 450px;
    transition: 0.3s;
}
.lead-form-minimal:focus-within { border-color: var(--accent); }

.lead-form-minimal input {
    background: transparent; border: none; 
    color: var(--text); padding: 15px 0; width: 100%; 
    outline: none; font-size: 1.1em;
}
.lead-form-minimal input::placeholder { color: #a0aec0; }

.lead-form-minimal button {
    background: transparent; border: none; 
    color: var(--accent); font-weight: 800; 
    cursor: pointer; text-transform: uppercase; font-size: 0.9em;
}
.lead-form-minimal button:hover { color: #1d4ed8; }

/* --- SERVICES GRID --- */
.services-section { padding-top: 60px; }
.section-header { 
    font-family: var(--font-display); font-size: 3em; 
    margin-bottom: 60px; text-transform: uppercase; color: var(--text);
}

.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px;
}
.service-card {
    background: var(--card-bg); 
    padding: 50px 30px; 
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: var(--accent-glow);
    border-color: var(--accent);
}
.service-card h3 { 
    font-family: var(--font-display); 
    font-size: 1.5em; margin-bottom: 10px; color: var(--text);
}
.service-card p { color: var(--text-sec); }
.icon { font-size: 2em; margin-bottom: 20px; color: var(--accent); }

/* --- PORTFOLIO --- */
.portfolio-grid { display: flex; justify-content: center; margin-top: 40px; }
.project-card { 
    position: relative; width: 100%; max-width: 900px;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    background: white; border: 1px solid var(--border);
}

/* Fixed Image Styling (70% Size) */
.project-image {
    width: 100%; 
    height: 400px;         /* Fixed container height */
    background: #f1f5f9;   /* Light grey background */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    padding: 20px;         /* Adds breathing room around the image */
}
.project-image img { 
    width: auto;           /* Let width adjust automatically */
    height: auto;          /* Let height adjust automatically */
    max-width: 80%;        /* Limit max width to 80% of container */
    max-height: 80%;       /* Limit max height to 80% of container */
    
    object-fit: contain;   /* Ensures the WHOLE image is visible */
    
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.5s ease; 
}
.project-card:hover .project-image img { 
    transform: scale(1.10); /* Gentle zoom on hover */
}

.project-info { padding: 40px; text-align: center; }
.project-info h3 { font-family: var(--font-display); font-size: 1.8em; margin-bottom: 10px; }
.project-info p { color: var(--text-sec); margin-bottom: 20px; }

.project-btn {
    display: inline-block; padding: 12px 30px;
    background: var(--accent); color: white;
    border-radius: 30px; font-weight: bold; text-transform: uppercase;
    font-size: 0.9em; transition: 0.3s;
}
.project-btn:hover { background: #1d4ed8; box-shadow: 0 5px 15px var(--accent-glow); }

/* --- CONTACT FORM --- */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 40px; }
.contact-card, .info-box, .wa-box {
    background: white; padding: 40px; border-radius: 12px; border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--text); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid #cbd5e0;
    border-radius: 6px; font-family: var(--font-body); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }

.submit-btn {
    background: var(--accent); color: white; padding: 15px 30px; border: none;
    border-radius: 6px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.3s;
}
.submit-btn:hover { background: #1d4ed8; }

.wa-btn {
    display: inline-block; background: #25D366; color: white;
    padding: 15px 30px; border-radius: 30px; font-weight: bold;
    margin-top: 15px; transition: 0.3s; width: 100%; text-align: center;
}
.wa-btn:hover { background: #1ebc57; transform: translateY(-2px); }

/* --- FOOTER --- */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: white;
    padding: 60px 20px 80px 20px; 
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer-marquee {
    overflow: hidden; white-space: nowrap; padding: 40px 0; border-bottom: 1px solid var(--border); margin-bottom: 40px;
}
.track { 
    display: inline-block; animation: marquee 30s linear infinite; 
    font-family: var(--font-display); font-size: 4em; font-weight: bold; 
    color: var(--text); opacity: 0.1;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.footer p {
    color: var(--text-sec); font-weight: 600; font-size: 0.9em;
    letter-spacing: 1px; margin-bottom: 25px;
}

.social-links {
    display: flex; justify-content: center; gap: 30px; align-items: center; margin-bottom: 30px;
}
.social-links a {
    color: var(--text-sec); font-size: 1.6em; transition: all 0.3s ease;
    display: inline-block; padding: 10px; border-radius: 50%;
}
.social-links a:hover {
    color: var(--accent); background: rgba(37, 99, 235, 0.05); transform: translateY(-5px);
}

.legal-links {
    display: flex; justify-content: center; gap: 20px; font-size: 0.85em; color: var(--text-sec);
    border-top: 1px solid var(--border); padding-top: 20px; width: 100%; max-width: 600px; margin: 0 auto;
}
.legal-links a:hover { color: var(--accent); text-decoration: underline; }

/* --- RESPONSIVE & RTL FIXES --- */
@media (max-width: 768px) {
    .hero .big-text { font-size: 12vw; }
    .contact-container { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

/* RTL Support (Arabic) */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .hero { align-items: flex-end; }
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] .lead-form-minimal button { margin-right: 10px; margin-left: 0; }
[dir="rtl"] .service-card { text-align: right; }

[dir="rtl"] .lang-selector {
    border-left: none; border-right: 1px solid rgba(0,0,0,0.1);
    margin-left: 0; margin-right: 20px;
    padding-left: 0; padding-right: 20px;
}

[dir="rtl"] .contact-container { direction: rtl; }
[dir="rtl"] .form-group label { text-align: right; float: right; width: 100%; }
[dir="rtl"] .form-group input, [dir="rtl"] .form-group textarea { text-align: right; direction: rtl; }
[dir="rtl"] .submit-btn { font-family: 'Tahoma', 'Arial', sans-serif; font-weight: bold; }