/* =========================================
   1. المتغيرات وإعدادات الألوان (CSS Variables)
   ========================================= */
:root {
    /* الألوان الأساسية */
    --primary-color: #00454f;
    /* بترولي غامق */
    --primary-light: #005f6b;
    /* بترولي فاتح */
    --secondary-color: #a88c45;
    /* ذهبي مطفي */
    --gold-gradient: linear-gradient(135deg, #a88c45 0%, #cbb16f 50%, #a88c45 100%);
    /* تدرج ذهبي */

    /* ألوان النصوص والخلفيات */
    --text-dark: #1f2937;
    --text-gray: #555555;
    --text-light: #f9fafb;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;

    /* المسافات والخطوط */
    --section-padding: 100px 0;
    --border-radius: 12px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px rgba(0, 69, 79, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تخصيص شريط التمرير (Scrollbar) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* تنسيق التحديد (Selection) */
::selection {
    background-color: var(--secondary-color);
    color: white;
}

/* =========================================
   2. التنسيقات العامة (Global Styles)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.8;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* العناوين العامة */
.section-padding {
    padding: var(--section-padding);
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.text-body {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    text-align: justify;
}

/* الأزرار (Buttons) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gold-gradient);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 10px 20px rgba(168, 140, 69, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(168, 140, 69, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* =========================================
   3. القائمة العلوية (Navbar)
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo-img {
    height: 50px;
}

/* تحكم في حجم الشعار */

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--primary-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
}

/* =========================================
   4. القسم الرئيسي (Hero Section)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop');
    /* صورة خلفية مؤقتة */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0, 69, 79, 0.9) 0%, rgba(0, 69, 79, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
}

.hero-content .subtitle {
    display: block;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.main-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
}

.main-title .highlight {
    color: var(--secondary-color);
    /* يمكن استخدام تدرج لوني للنص هنا لو أردت */
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* زر التمرير للأسفل */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* =========================================
   5. قسم من نحن (About Section)
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.image-box img {
    border-radius: 20px;
    /* تأثير الظل الصلب الذهبي */
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: var(--primary-color);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.experience-badge .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary-color);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 700;
}

.about-text-content .section-title {
    text-align: right;
}

.about-text-content .section-title::after {
    right: 0;
    transform: none;
}

.signature-block {
    margin-top: 30px;
    border-right: 4px solid var(--secondary-color);
    padding-right: 20px;
}

.ceo-name strong {
    display: block;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ceo-name span {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* =========================================
   6. الرؤية والرسالة (Vision & Mission)
   ========================================= */
.vision-mission-section {
    padding-bottom: 80px;
}

.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.vm-card {
    background: white;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border-right: 5px solid transparent;
}

.vm-card:first-child {
    border-color: var(--primary-color);
}

.vm-card.highlight-card {
    border-color: var(--secondary-color);
}

.vm-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.vm-card .icon-box {
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.vm-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* =========================================
   7. قسم القيم (Core Values)
   ========================================= */
.values-section {
    background-color: var(--bg-light);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.value-item {
    background: white;
    padding: 40px 25px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid transparent;
}

.value-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(0, 69, 79, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.value-item:hover .value-icon {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.value-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.value-item p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* =========================================
   8. قسم القطاعات (Sectors - Timeline Style)
   ========================================= */
.sectors-section {
    background-color: white;
}

.sectors-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 أعمدة بجانب بعض */
    gap: 20px;
    position: relative;
    padding-top: 40px;
}

/* خط يربط بينهم */
.sectors-timeline::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
    display: none;
    /* يمكن تفعيله لو أردت خط واصل */
}

.sector-card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 20px;
    border-top: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    z-index: 1;
}

.sector-card:nth-child(even) {
    border-top-color: var(--primary-color);
    transform: translateY(30px);
}

/* لجعل الكروت متموجة */
.sector-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: var(--shadow-hover);
}

.sector-number {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(168, 140, 69, 0.15);
    /* لون شفاف */
    margin-bottom: -20px;
    position: relative;
    z-index: -1;
}

.sector-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sector-details h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 700;
}

.sector-details p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
}

/* =========================================
   9. محفظة الشركات (Portfolio)
   ========================================= */
.portfolio-section {
    background: var(--bg-light);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-image {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* تأثير طبقة الأوفرلاي عند الهوفر */
.portfolio-image .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 69, 79, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-image .overlay .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transform: scale(0);
    transition: var(--transition);
}

.portfolio-item:hover .overlay .icon {
    transform: scale(1);
}

.portfolio-info {
    padding: 25px;
    text-align: center;
}

.portfolio-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* =========================================
   10. مميزات القوة (Strengths)
   ========================================= */
.strengths-section {
    background: white;
}

.features-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.feature-box {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 15px;
    position: relative;
    transition: var(--transition);
}

.feature-box:hover {
    border-color: var(--secondary-color);
    background: #fafafa;
}

.feature-number {
    font-size: 4rem;
    font-weight: 900;
    color: #f3f4f6;
    position: absolute;
    top: 10px;
    left: 20px;
    z-index: 0;
}

.feature-box h3,
.feature-box p {
    position: relative;
    z-index: 1;
}

.feature-box h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* =========================================
   11. الأهداف المستقبلية (Future Goals)
   ========================================= */
.future-goals-section {
    background-color: var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.goals-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.goals-content {
    flex: 1;
}

.goal-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.goal-row:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
}

.goal-icon {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    opacity: 0.5;
}

.goal-text h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.goal-text p {
    color: #d1d5db;
    font-size: 0.95rem;
}

.goals-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   12. الفوتر (Footer)
   ========================================= */
.main-footer {
    background-color: #0d1b1e;
    /* أسود مائل للبترولي الغامق جداً */
    color: #9ca3af;
    padding: 80px 0 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
    display: inline-block;
}

.links-col ul li {
    margin-bottom: 12px;
}

.links-col ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-list i {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* شاشة التحميل (Loader) */
#loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo-img {
    width: 120px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loader-bar {
    width: 150px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 50%;
    height: 100%;
    background: var(--secondary-color);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}

/* =========================================
   13. التجاوب مع الشاشات (Responsive)
   ========================================= */
@media (max-width: 1024px) {
    .main-title {
        font-size: 3.5rem;
    }

    .sectors-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .vm-grid,
    .goals-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-wrapper {
        order: -1;
    }

    /* الصورة أولاً في الموبايل */
    .goals-image {
        display: none;
    }
}

@media (max-width: 768px) {

    .header-actions .btn {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        z-index: 1001;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.5s ease-out forwards;
        justify-content: center;
    }

    @keyframes slideUp {
        from {
            transform: translate(-50%, 100%);
            opacity: 0;
        }

        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }

    /* إخفاء القائمة مؤقتاً */
    .mobile-menu-btn {
        display: block;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .about-grid {
        display: flex;
        flex-direction: column-reverse;
    }

    .sectors-timeline {
        grid-template-columns: 1fr;
    }

    /* قطاع واحد تحت بعض */
    .sector-card:nth-child(even) {
        transform: none;
    }

    .footer-top {
        flex-direction: column;
    }
}

/* =========================================
   14. قسم شركاء النجاح (Partners Section)
   ========================================= */
.partners-section {
    background-color: white;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    align-items: center;
    justify-items: center;
}

.partner-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    transition: var(--transition);
    filter: grayscale(100%);
    opacity: 0.7;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.partner-item img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

/* =========================================
   15. زر العودة للأعلى (Back to Top)
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition);
}

.back-to-top.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(168, 140, 69, 0.4);
}

/* =========================================
   إضافات الجافا سكربت (JS Helper Classes)
   ========================================= */

/* 1. تنسيقات الهيدر عند السكرول */
.main-header.scrolled {
    height: 70px;
    box-shadow: 0 5px 20px rgba(0, 69, 79, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

/* 2. أنيميشن الظهور (Scroll Reveal Styles) */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأخير ظهور العناصر المتتالية (Staggered Effect) */
.sector-card.visible:nth-child(1) {
    transition-delay: 0.1s;
}

.sector-card.visible:nth-child(2) {
    transition-delay: 0.2s;
}

.sector-card.visible:nth-child(3) {
    transition-delay: 0.3s;
}

.sector-card.visible:nth-child(4) {
    transition-delay: 0.4s;
}

.sector-card.visible:nth-child(5) {
    transition-delay: 0.5s;
}

/* 3. قائمة الموبايل (Responsive Menu Styling) */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        /* تحت الهيدر مباشرة */
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        /* الإخفاء الافتراضي */
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: all !important;
        display: flex !important;
        /* Force flex display when active */
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}