/* ==========================================
   1. Variables & Base Reset
   ========================================== */
:root {
    --primary: #800020;         /* العنابي القطري */
    --primary-dark: #580016;   
    --secondary: #C5A059;       /* ذهبي دافئ */
    --secondary-hover: #A37F3E; 
    --dark: #2B2B2B;           /* نص داكن */
    --light: #F9F9FB;          
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--white);
    font-family: 'Tajawal', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: clip !important;
}

/* إزاحة المحتوى تحت القائمة الثابتة */
body {
    padding-top: 90px !important; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================
   2. Sticky Header Structure (Top Bar + Main Header)
   ========================================== */

/* 1. الشريط الأسود العلوي الثابت */
.top-bar {
    background: #111111 !important;
    color: var(--white);
    font-size: 0.72rem;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 30px !important;
    z-index: 10002 !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.top-bar-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    width: 90% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.top-left-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-left-info a {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.top-left-info i {
    color: var(--secondary);
}

.top-right-info .lang-btn {
    color: var(--secondary);
    font-weight: bold;
    white-space: nowrap;
}

/* 2. الهيدر الأبيض الثابت أسفل الشريط الأسود مباشرة */
header, .main-header {
    background-color: #ffffff !important;
    position: fixed !important;
    top: 30px !important; /* يلتصق أسفل الأسود تماماً */
    left: 0 !important;
    width: 100% !important;
    height: 60px !important;
    z-index: 10001 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 90% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* ==========================================
   3. Logo & Navigation
   ========================================== */
.logo-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    min-height: 40px !important;
}

.site-logo {
    height: 65px !important;
    width: auto !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10003 !important;
}

.logo-text {
    margin-right: 80px !important;
    display: flex !important;
    flex-direction: column !important;
}

[dir="ltr"] .logo-text {
    margin-right: 0 !important;
    margin-left: 80px !important;
}

.brand-ar {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
    line-height: 1.1;
    white-space: nowrap;
}

.brand-en {
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: bold;
}

.navbar ul {
    display: flex;
    gap: 20px;
}

.navbar a {
    font-weight: 700;
    color: var(--dark);
    transition: var(--transition);
    padding: 5px 0;
}

.navbar a:hover, .navbar a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* ==========================================
   4. Hero Section & Main Content
   ========================================== */
.hero-section {
    position: relative;
    min-height: 450px;
    background: url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?q=80&w=1600&auto=format&fit=crop') no-repeat center center/cover;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(88, 0, 22, 0.88), rgba(26, 26, 26, 0.85));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
}

.hero-subtitle {
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #DDD;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--dark);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* ==========================================
   5. Sections & Components
   ========================================== */
.stats-bar {
    background: var(--dark);
    color: var(--white);
    padding: 30px 0;
    border-bottom: 3px solid var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item h3 {
    font-size: 2.2rem;
    color: var(--secondary);
}

.section-padding {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    color: var(--secondary);
    font-weight: bold;
    text-transform: uppercase;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-top: 5px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    border-top-color: var(--secondary);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.sector-card {
    background: var(--light);
    padding: 25px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #EEE;
}

.sector-card i {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.project-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    border-right: 5px solid var(--secondary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.badge {
    background: rgba(128, 0, 32, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.step-card {
    background: var(--light);
    padding: 25px;
    position: relative;
    border-radius: 6px;
}

.step-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.contact-section {
    background: var(--dark);
    color: var(--white);
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h2 {
    color: var(--secondary);
}

.contact-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.c-info-card {
    background: rgba(255,255,255,0.05);
    padding: 25px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.c-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.footer {
    background: #111;
    color: #AAA;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #333;
}

/* ==========================================
   6. Floating WhatsApp & Gallery
   ========================================== */
.whatsapp-float {
    position: fixed;
    width: 55px;
    height: 55px;
    bottom: 25px;
    left: 25px;
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.gallery-section {
    padding: 60px 0;
    background-color: #f9f9f9;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    height: 220px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 0, 32, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ==========================================
   7. Responsive Styles (Mobile & Tablets)
   ========================================== */
@media (max-width: 992px) {
    .services-grid, .projects-grid, .sectors-grid, .steps-grid, .contact-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 82px !important;
    }

    .top-bar {
        height: 28px !important;
        font-size: 0.65rem;
    }

    header, .main-header {
        top: 28px !important;
        height: 54px !important;
    }

    .site-logo {
        height: 50px !important;
    }

    .menu-toggle {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        padding: 20px;
    }

    .stats-grid, .services-grid, .projects-grid, .sectors-grid, .steps-grid, .contact-details-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .whatsapp-float {
        width: 48px;
        height: 48px;
        bottom: 20px;
        left: 20px;
        font-size: 26px;
    }
}