/* ==================================================
   ULTIMATE MODERN CORPORATE THEME (Elegant & Soft)
   ================================================== */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

:root {
    --brand-primary: #5b9365;      /* Logo Green */
    --brand-secondary: #0f172a;    /* Deep Trustworthy Slate/Blue */
    --brand-accent: #22c55e;       /* Bright Green for tiny highlights */
    
    --bg-main: #f8fafc;            /* Off-white background */
    --bg-white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #ffffff;
    
    /* Soft, expensive-looking shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.03);
    --shadow-xl: 0 20px 40px -5px rgba(15, 23, 42, 0.08);
    --shadow-green: 0 15px 35px -5px rgba(91, 147, 101, 0.25);
    
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    
    --font-main: 'Almarai', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

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

/* Base Utility Classes */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; position: relative; z-index: 1; }
.text-center { text-align: center; }

/* Background decorative blurs */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background-image: url('images/logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 350px; /* حجم هادئ وفخم للحاسبة */
    opacity: 0.02; /* شفافية خفيفة جداً حتى لا يزعج العين */
    z-index: 0;
    pointer-events: none;
}

/* تعديل العلامة المائية للموبايل */
@media (max-width: 768px) {
    .watermark { background-size: 200px; opacity: 0.03; }
}

.bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
}
.bg-blur-1 { top: -10%; left: -5%; width: 400px; height: 400px; background: var(--brand-primary); }
.bg-blur-2 { bottom: 10%; right: -5%; width: 300px; height: 300px; background: var(--brand-secondary); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: none;
    gap: 10px;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #4a7a53;
    transform: translateY(-3px);
    box-shadow: var(--shadow-green);
    color: var(--text-light);
}

.btn-dark {
    background-color: var(--brand-secondary);
    color: var(--text-light);
}

.btn-dark:hover {
    background-color: #1e293b;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--brand-secondary);
}

/* Titles */
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(91, 147, 101, 0.1);
    color: var(--brand-primary);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--brand-secondary);
    margin-bottom: 25px;
    line-height: 1.3;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 50px;
}

/* --- Top Bar (Ultra Professional) --- */
.top-bar {
    background: var(--brand-secondary);
    color: var(--text-light);
    padding: 10px 0;
    font-size: 0.85rem;
    font-weight: 700;
    position: relative;
    z-index: 1001;
}
.top-bar-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tb-info { display: flex; gap: 20px; flex-wrap: wrap; }
.tb-info i { color: var(--brand-primary); margin-inline-end: 8px; }
.tb-social { display: flex; gap: 15px; }
.tb-social a { color: rgba(255,255,255,0.7); font-size: 1rem; transition: var(--transition); }
.tb-social a:hover { color: var(--brand-primary); transform: translateY(-2px); }

/* Navbar */
.navbar {
    position: sticky;
    top: 0; left: 0; width: 100%;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

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

.logo-link {
    display: flex; align-items: center; text-decoration: none;
}

.logo-img { height: 55px; }
.logo-text { font-size: 1.5rem; font-weight: 800; color: var(--brand-secondary); }

.nav-links {
    list-style: none; display: flex; gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--brand-primary); }

.nav-links a::after {
    content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 0; height: 3px; background-color: var(--brand-primary);
    border-radius: 3px; transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-buttons { display: flex; gap: 15px; align-items: center; }
.hamburger { display: none; font-size: 1.6rem; color: var(--brand-secondary); cursor: pointer; }

/* Super Premium Hero Section */
.hero {
    position: relative;
    padding: 180px 0 140px;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #1e293b 100%);
    color: var(--text-light);
    overflow: hidden;
    z-index: 1;
}

/* Outstanding Animated Luminous Orb */
.hero::after {
    content: '';
    position: absolute;
    top: -30%; right: -20%; width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(91,147,101,0.15) 0%, rgba(255,255,255,0) 65%);
    border-radius: 50%;
    z-index: -1;
    animation: pulseOrb 8s infinite alternate ease-in-out;
}
@keyframes pulseOrb {
    0% { transform: scale(1) translate(0, 0); opacity: 0.6; }
    100% { transform: scale(1.1) translate(-50px, 50px); opacity: 1; }
}

/* Beautiful SVG Mesh Background representation */
.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 10% 90%, rgba(255,255,255,0.02) 0%, transparent 40%);
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-text h1 span.highlight { 
    background: linear-gradient(135deg, var(--brand-primary) 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-text p { font-size: 1.25rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; max-width: 550px; }
.hero-buttons { display: flex; gap: 15px; }

.hero-visual { position: relative; }
.hero-visual-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
    animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* About Section (The one that was ugly before) */
.about { background: var(--bg-main); }
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }

/* The beautiful floating stats card design instead of broken border */
.about-visual { position: relative; padding: 30px; display: flex; justify-content: center; }

.about-circle-bg {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 350px; height: 350px;
    background: linear-gradient(135deg, rgba(91,147,101,0.2) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    z-index: 0;
}

.about-logo-card {
    position: relative; z-index: 1;
    background: var(--bg-white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
}

.about-logo-card img { max-width: 200px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.05)); }

.floating-stat {
    position: absolute;
    background: var(--brand-secondary);
    color: var(--text-light);
    padding: 15px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    bottom: 10px; right: 0px;
    z-index: 2;
    animation: float 4s ease-in-out infinite;
}

.floating-stat h3 { font-size: 2rem; color: var(--brand-primary); margin-bottom: 0; line-height: 1; }
.floating-stat p { margin:0; font-size: 0.9rem; font-weight: 700; opacity: 0.9;}

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.about-text .section-tag { margin-bottom: 15px; }

.about-features { margin-top: 35px; display: flex; flex-direction: column; gap: 20px; }
.feat-item { display: flex; gap: 20px; align-items: flex-start; }
.feat-icon { 
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(91,147,101,0.1); color: var(--brand-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.feat-text h4 { font-size: 1.2rem; color: var(--brand-secondary); margin-bottom: 5px; }
.feat-text p { color: var(--text-muted); font-size: 0.95rem; }

/* Services Section */
.services { background: var(--bg-white); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.service-card {
    background: var(--bg-main);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.02);
    transition: var(--transition);
    text-align: right;
}

.service-card:hover {
    background: var(--bg-white);
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.svc-icon-wrap {
    width: 60px; height: 60px; background: var(--bg-white);
    border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--brand-primary); margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .svc-icon-wrap { background: var(--brand-primary); color: var(--text-light); }

.service-card h3 { font-size: 1.4rem; color: var(--brand-secondary); margin-bottom: 15px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Projects Section */
.projects { background: var(--bg-main); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.project-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex; flex-direction: column;
}

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

.proj-icon-area {
    height: 180px; background: rgba(15,23,42,0.03);
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; color: var(--text-muted); opacity: 0.3;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.project-card:hover .proj-icon-area { color: var(--brand-primary); opacity: 0.8; }

.proj-content { padding: 30px; flex-grow: 1; }
.proj-cat { color: var(--brand-primary); font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; display: block; }
.proj-content h3 { font-size: 1.3rem; color: var(--brand-secondary); margin-bottom: 10px; }
.proj-content p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}
.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}
.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.g-img-wrap {
    width: 100%;
    height: 350px;
    position: relative;
}
.g-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover .g-img {
    transform: scale(1.08);
}
.g-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.95) 0%, transparent 100%);
    padding: 40px 20px 20px;
    color: var(--text-light);
    font-weight: 800;
    font-size: 1.3rem;
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-end;
}
.gallery-item:hover .g-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Contact Section */
.contact { background: var(--brand-secondary); color: var(--text-light); }
.contact .section-title { color: var(--text-light); }
.contact .section-desc { color: rgba(255,255,255,0.7); }

.contact-wrap {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 60px;
}

.contact-info-list { list-style: none; margin-top: 30px; }
.contact-info-list li { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; }
.c-icon { width: 50px; height: 50px; background: rgba(91,147,101,0.2); color: var(--brand-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.c-text h4 { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-light); }
.c-text p { color: rgba(255,255,255,0.6); margin: 0; }

.contact-form { background: var(--bg-white); padding: 40px; border-radius: var(--radius-lg); color: var(--text-dark); }
.contact-form h3 { font-size: 1.5rem; color: var(--brand-secondary); margin-bottom: 20px; }

.form-group { margin-bottom: 20px; }
.form-control { width: 100%; padding: 14px 20px; border: 1px solid #e2e8f0; border-radius: var(--radius-md); font-family: var(--font-main); font-size: 1rem; background: var(--bg-main); transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--brand-primary); background: var(--bg-white); box-shadow: 0 0 0 3px rgba(91,147,101,0.1); }

/* Footer */
.footer { background: var(--bg-main); padding: 60px 0 20px; border-top: 1px solid rgba(0,0,0,0.05); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 30px; }
.footer-logo { height: 50px; }
.footer-links { display: flex; gap: 25px; list-style: none; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-weight: 700; transition: var(--transition); }
.footer-links a:hover { color: var(--brand-primary); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.05); color: var(--text-muted); font-size: 0.9rem; }

/* Animations */
.reveal-up { opacity: 0; transform: translateY(30px); transition: var(--transition); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: var(--transition); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: var(--transition); }
.reveal-up.active, .reveal-left.active, .reveal-right.active { opacity: 1; transform: translate(0); }
.fade-in-up { animation: fadeInUp 0.8s ease forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-container, .about-grid, .contact-wrap { grid-template-columns: 1fr; }
    .hero-text { text-align: center; }
    .hero-text p { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .hero-visual-card { margin-top: 40px; transform: none; }
    .hero-visual-card:hover { transform: translateY(-10px); }
    .about-visual { order: -1; }
    .footer-grid { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .nav-buttons { display: none; }
    .hamburger { display: block; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--bg-white); flex-direction: column; padding: 20px 0;
        box-shadow: var(--shadow-sm); border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .nav-links.active { display: flex; align-items: center; }
    .nav-links a::after { display: none; }
    .hero { padding: 130px 0 80px; }
    .hero-text h1 { font-size: 2.6rem; }
    .contact-wrap { padding: 30px; }
}

/* ==================================================
   THEMES & FLOATING CONTROLS (AR/EN & Styles)
   ================================================== */
   
.floating-controls {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}
html[dir="ltr"] .floating-controls {
    left: auto;
    right: 30px;
}
.ctrl-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-white);
    color: var(--brand-secondary);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: var(--shadow-xl);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-weight: bold;
}
.ctrl-btn:hover { background: var(--brand-primary); color: var(--text-light); }
.theme-menu { position: relative; }
.theme-options {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--bg-white);
    padding: 10px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}
html[dir="ltr"] .theme-options { left: auto; right: 0; }
.theme-menu:hover .theme-options { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-dot {
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: var(--transition);
}
.theme-dot:hover { transform: scale(1.1); }

/* --- THEMES (CSS Variables Override) --- */

/* Theme: Dark Mode */
body.theme-dark {
    --bg-main: #0b1120;
    --bg-white: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.5);
}
body.theme-dark .navbar {
    background-color: rgba(30,41,59,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
body.theme-dark .watermark { opacity: 0.02; }

/* Theme: Gold / Luxury Elite */
body.theme-gold {
    --brand-primary: #d4af37;     /* Luxury Gold */
    --brand-secondary: #0a0a0a;   /* Pure Dark Black */
}
body.theme-gold .watermark { opacity: 0.04; filter: grayscale(100%); }
body.theme-gold .bg-blur-1 { background: var(--brand-primary); }

/* --- RESPONSIVE DESIGN (Mobile & Tablet) --- */

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--brand-secondary);
    cursor: pointer;
}

@media (max-width: 992px) {
    .nav-links {
        display: none; /* Desktop menu hidden */
    }
    
    .nav-toggle { display: block; }
    
    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--bg-white);
        padding: 20px;
        box-shadow: var(--shadow-xl);
        border-bottom: 2px solid var(--brand-primary);
        z-index: 999;
        text-align: center;
        animation: slideDown 0.4s ease forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-text p { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .hero-visual { display: none; } /* Simplify mobile view */
    
    .about-grid { grid-template-columns: 1fr; }
    .contact-wrap { grid-template-columns: 1fr; padding: 30px; }
}

@media (max-width: 768px) {
    .top-bar { display: none; } /* Save space on mobile */
    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }
    
    .gallery-grid { grid-template-columns: 1fr; }
    .g-img-wrap { height: 250px; }
    
    .floating-controls { bottom: 20px; right: 20px; }
    html[dir="ltr"] .floating-controls { left: 20px; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 1.8rem; }
    .btn { width: 100%; }
    .hero-buttons { flex-direction: column; }
}
