/* ========================================
   GLOBAL CSS - FINAL UNIFIED VERSION
   New Dark Colors, Full Color Logos, All Features
   ======================================== */

/* --- ROOT VARIABLES (Global Colors) --- */
:root {
    /* 1. اللون البرتقالي (لون التمييز) */
    --primary-orange: #F5821F; 
    
    /* 2. الخلفية الرمادية الداكنة */
    --background-dark: #363636; 
    
    /* 3. لون خلفية الهيدر والفوتر (أغمق) */
    --header-bg: #0A0A0A; 
    
    /* 4. خلفية الكروت والأزرار */
    --card-bg: #454545;
    
    /* 5. النصوص */
    --text-light: #FFFFFF; 
    --text-muted: #CCCCCC;
    
    --shadow-dark: rgba(0, 0, 0, 0.7);
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    color: var(--text-light);
    font-size: 2.2rem;
    margin-bottom: 40px;
    font-weight: 900;
    text-transform: uppercase;
}

/* الأزرار العامة */
.btn {
    display: inline-block;
    background-color: var(--primary-orange);
    color: white; 
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: #d66a10; 
    transform: translateY(-2px);
}
.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--header-bg);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-orange);
    position: sticky;
    top: 40px; /* لتبدأ أسفل شريط الأخبار */
    z-index: 1001; 
}

.logo img {
    height: 100px; 
    width: auto;
    /* لا فلاتر هنا */
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    color: var(--text-light); 
}

nav ul li a:hover,
nav ul li a.active {
    border-bottom-color: var(--primary-orange);
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch {
    background: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
}
.lang-switch:hover {
    background: var(--primary-orange);
    color: white;
}

/* --- PRELOADER --- */
#pagePreloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-out;
    background-color: var(--header-bg); 
}
.logo-animation-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}
.logo-animation-container img {
    height: 80px;
    width: auto;
    /* لا فلاتر هنا */
}

/* --- HERO SECTION --- */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 20px;
    position: relative; 
    overflow: hidden; 
}
/* (Slideshow styles remain the same) */

/* --- SECTIONS --- */
.section-with-bg {
    position: relative; 
    overflow: hidden; 
    padding: 60px 20px; 
    margin: 40px auto;
    background-color: var(--card-bg); 
    color: var(--text-light); 
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-dark); 
}
.section-content {
    position: relative;
    z-index: 2;
}

/* --- PARTNERS GRID (HOME) --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 30px;
}
.partner-logo {
    background: #fff; 
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    transition: transform 0.3s ease;
}
.partner-logo:hover {
    transform: scale(1.05);
}
.partner-logo img {
    max-width: 100%;
    max-height: 80px;
    /* لا فلاتر هنا */
}

/* --- ACTION BOXES (EVENTS PAGE) --- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
    gap: 15px; 
    margin-top: 25px; 
    margin-bottom: 50px; 
}

.action-box {
    background: var(--card-bg); 
    border-radius: 6px; 
    padding: 10px 8px; 
    text-align: center;
    border: none;
    transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.3s ease; 
    cursor: pointer;
    
    /* تأثير Bevel ثلاثي الأبعاد */
    box-shadow: 
        inset 0px 2px 0px rgba(255, 255, 255, 0.15), 
        inset 0px -2px 0px rgba(0, 0, 0, 0.4),     
        0px 5px 0px rgba(0, 0, 0, 0.5),            
        0px 6px 10px rgba(0, 0, 0, 0.4);           
}

.action-box:hover {
    background-color: #505050; 
    box-shadow: 
        inset 0px 2px 0px rgba(255, 255, 255, 0.2), 
        inset 0px -2px 0px rgba(0, 0, 0, 0.5),
        0px 5px 0px rgba(0, 0, 0, 0.6),           
        0px 6px 12px rgba(0, 0, 0, 0.5),
        0 0 15px var(--primary-orange); 
    transform: translateY(-1px); 
}

.action-box a {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem; 
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2; 
}
.action-box .icon {
    font-size: 1.8rem; 
    color: var(--primary-orange);
    margin-bottom: 3px; 
    display: block;
}

/* --- LOGOS SECTION (EVENTS PAGE) --- */
.logos-section {
    padding-top: 60px;
    text-align: center;
}
.full-width-white-strip {
    width: 100vw; 
    margin-left: calc(50% - 50vw); 
    background-color: white; 
    padding: 30px 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-top: 30px; 
    margin-bottom: 50px; 
}
.partners-logo-row-inner {
    display: flex;
    justify-content: center;
    gap: 40px; 
    width: 90%; 
    max-width: 1000px; 
}
.partners-logo-row-inner img {
    height: 60px;
}

/* --- PRODUCTS GRID --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}
.product-category h2 {
    color: var(--primary-orange);
    font-size: 2rem;
    border-bottom: 2px solid var(--card-bg);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
}
.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.product-card:hover {
    transform: translateY(-5px);
}
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.product-content {
    padding: 20px;
}
.product-spec {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

/* --- FOOTER --- */
footer {
    background-color: var(--header-bg);
    color: var(--text-muted);
    text-align: center;
    padding: 30px 5%;
    margin-top: 60px;
    border-top: 3px solid var(--primary-orange);
}

/* ========================================
   NEW PAGES STYLES (Alliances & Agents)
   ======================================== */

.partner-card-detailed {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    border-top: 4px solid var(--primary-orange);
}

.partner-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-dark);
}

.partner-header {
    background: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
}

.partner-header img {
    max-height: 100px;
    max-width: 80%;
}

.partner-body {
    padding: 25px;
}

.partner-body h3 {
    color: var(--primary-orange);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.partner-desc {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.partner-products {
    list-style: none;
    margin-bottom: 20px;
}

.partner-products li {
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
    font-size: 0.9rem;
}

.partner-products li::before {
    content: '⚡';
    margin-right: 10px;
    color: var(--primary-orange);
}

.map-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-dark);
    border: 2px solid var(--primary-orange);
    margin-bottom: 40px;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.agent-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-orange);
    transition: transform 0.3s;
}

.agent-card:hover {
    transform: translateX(5px);
    background: #505050;
}

.agent-card h3 {
    color: var(--text-light);
    margin-bottom: 5px;
}

.agent-role {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.agent-details p {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.agent-details strong {
    color: var(--text-light);
}


/* ========================================
   ULTIMATE UPGRADE STYLES (Features)
   ======================================== */

/* --- 1. NEWS TICKER (شريط الأخبار المتحرك) --- */
.news-ticker-wrap {
    width: 100%;
    background-color: var(--primary-orange);
    color: white;
    height: 40px;
    overflow: hidden;
    position: sticky; /* يتم تثبيته في الأعلى */
    top: 0;
    z-index: 1002; 
    border-bottom: 1px solid #c95c1a;
}

.news-ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker 30s linear infinite;
    line-height: 40px;
    font-weight: bold;
    font-size: 0.95rem;
}

.news-ticker-content span {
    margin-right: 50px;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- 2. SOCIAL MEDIA FLOATING SIDEBAR (أزرار التواصل العائمة) --- */
.social-sidebar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column-reverse; 
    gap: 15px;
    z-index: 9999;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

/* ألوان المنصات (استخدمت أيقونات SVG بسيطة بدلاً من الخطوط لضمان التوافق) */
.btn-whatsapp { background-color: #25D366; }
.btn-facebook { background-color: #1877F2; }
.btn-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }


/* --- 3. FAQ SECTION (الأسئلة الشائعة) --- */
.faq-section {
    max-width: 800px;
    margin: 60px auto;
}

.faq-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border-left: 4px solid var(--primary-orange);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-orange);
}

details[open] .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- 5. CTA BUTTON IN MODAL (زر الحجز) --- */
.modal-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary-orange);
    color: white;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.modal-cta-btn:hover {
    background-color: #d66a10;
}


/* --- 6. MEDIA QUERIES --- */
@media (max-width: 600px) {
    /* (تعديلات شريط الأخبار والهيدر للموبايل) */
    header {
        top: 0; /* إلغاء شريط الأخبار كـ sticky في الموبايل ليتم تثبيت الهيدر مباشرة */
    }
    .logos-section img {
        height: 80px !important; 
    }
    .partners-logo-row-inner img {
        height: 40px !important; 
    }
    .action-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    /* (تعديلات الأزرار العائمة للموبايل) */
    .social-sidebar {
        right: 10px;
        bottom: 10px;
        gap: 10px;
    }
    .social-btn {
        width: 45px;
        height: 45px;
    }
}

/* =========================================
   HERO SLIDESHOW ANIMATION
   ========================================= */

/* تنسيق القسم الرئيسي لضمان بقاء الصور داخله */
.hero {
    position: relative;
    height: 80vh; /* ارتفاع الشاشة */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* لمنع خروج الصور عند التكبير */
    background-color: #000; /* لون خلفية احتياطي */
}

/* تنسيق حاوية الخلفية لتكون خلف النصوص */
.slideshow-background-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* مستوى منخفض */
}

/* تنسيق الشرائح الفردية */
.slide-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* مخفية في البداية */
    z-index: 1;
    /* الأنيميشن: الاسم، المدة، التكرار */
    animation: imageAnimation 24s linear infinite; 
}

/* طبقة تعتيم فوق الصور لضمان قراءة النص */
.slide-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* تعتيم بنسبة 50% */
}

/* توقيتات ظهور الصور (تتابع) */
/* الصورة الأولى تبدأ فوراً */
.slide-section:nth-child(1) { 
    animation-delay: 0s; 
}
/* الصورة الثانية تبدأ بعد 6 ثواني */
.slide-section:nth-child(2) { 
    animation-delay: 6s; 
}
/* الصورة الثالثة تبدأ بعد 12 ثانية */
.slide-section:nth-child(3) { 
    animation-delay: 12s; 
}
/* الصورة الرابعة تبدأ بعد 18 ثانية */
.slide-section:nth-child(4) { 
    animation-delay: 18s; 
}

/* تعريف الحركة (Keyframes) */
@keyframes imageAnimation { 
    0% { 
        opacity: 0; 
        transform: scale(1); /* حجم طبيعي */
    }
    4% { 
        opacity: 1; /* ظهور سريع */
    }
    24% { 
        opacity: 1; /* بقاء الظهور */
        transform: scale(1.1); /* تكبير بطيء */
    }
    28% { 
        opacity: 0; /* اختفاء */
        transform: scale(1.1);
    }
    100% { 
        opacity: 0; 
        transform: scale(1);
    }
}

/* تنسيق المحتوى النصي ليكون فوق الصور */
.hero-content {
    position: relative;
    z-index: 10; /* مستوى مرتفع جداً ليظهر فوق الصور */
    text-align: center;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

/* جعل النصوص أصغر قليلاً للموبايل */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1.1rem; }
}

/* =========================================
   RESPONSIVENESS & SMOOTH ADAPTATION
   ========================================= */

/* 1. ضبط الصور والفيديو لتكون مرنة دائماً (تمنع الخروج عن الشاشة) */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. تحسين النصوص لتكون مقروءة */
html {
    font-size: 16px; /* الحجم الأساسي للكمبيوتر */
}

/* 3. شبكة الكروت (تتحول أوتوماتيكياً من صفوف لأعمدة) */
.partners-grid, .product-grid, .action-grid {
    display: grid;
    /* سحر الـ Grid: يحدد عدد الأعمدة بناء على المساحة المتاحة */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px;
    width: 100%;
}

/* --- TABLET (التابلت: شاشات متوسطة) --- */
@media screen and (max-width: 1024px) {
    html {
        font-size: 15px; /* تصغير الخط قليلاً */
    }
    
    .container {
        width: 95%; /* استغلال مساحة أكبر */
    }

    .hero h1 {
        font-size: 2.5rem; /* تصغير عنوان الهيرو */
    }
}

/* --- MOBILE (الموبايل: شاشات صغيرة) --- */
@media screen and (max-width: 768px) {
    
    /* ضبط الهيدر للموبايل */
    header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    /* إخفاء القائمة العادية */
    nav ul {
        display: none; /* يتم التحكم بها عبر JS */
        flex-direction: column;
        width: 100%;
        background-color: var(--header-bg);
        position: absolute;
        top: 100%;
        left: 0;
        text-align: center;
        padding: 20px 0;
        border-top: 2px solid var(--primary-orange);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    /* إظهار القائمة عند الضغط (Class يضاف بالجافاسكربت) */
    nav.active ul {
        display: flex;
        animation: slideDown 0.4s ease;
    }

    /* شكل زر القائمة (Hamburger) */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }
    .bar {
        width: 30px;
        height: 3px;
        background-color: var(--text-light);
        margin: 5px 0;
        transition: 0.3s;
    }

    /* تعديل الهيرو (Hero Section) */
    .hero {
        height: 60vh; /* تقليل الارتفاع في الموبايل */
    }
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    .hero p {
        font-size: 1rem;
    }

    /* الشركاء والكروت */
    .partner-logo-item {
        margin: 0 10px; /* تقليل المسافات */
    }
    
    /* ضبط الحواف */
    .section-with-bg {
        padding: 30px 15px;
    }
}

/* حركة ناعمة للقائمة */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* تنسيق رؤوس الأقسام الفرعية */
.category-header {
    text-align: center;
    margin-bottom: 40px;
}
.category-header img {
    height: 70px;
    margin-bottom: 15px;
}
.sub-category-title {
    color: var(--text-light);
    border-left: 4px solid var(--primary-orange);
    padding-left: 15px; /* In Arabic make it padding-right */
    margin: 30px 0 20px;
    font-size: 1.5rem;
}
/* تعديل الاتجاه للعربي */
html[dir="rtl"] .sub-category-title {
    border-left: none;
    border-right: 4px solid var(--primary-orange);
    padding-left: 0;
    padding-right: 15px;
}

/* شريط "قريباً" */
.badge-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-orange);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* تحسين شكل الجاليري داخل المودال */
.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}
.modal-gallery img {
    width: 100%;
    height: 120px; /* ارتفاع ثابت للصور في الجاليري */
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #555;
    cursor: pointer;
    transition: transform 0.2s;
}
.modal-gallery img:hover {
    transform: scale(1.05);
}

/* خلفية النافذة المنبثقة */
.gallery-modal {
    display: none; /* مخفية افتراضياً */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* خلفية سوداء شفافة */
    justify-content: center;
    align-items: center;
}

/* محتوى الجاليري */
.gallery-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    text-align: center;
}

.gallery-content h3 {
    color: #fff;
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
}

/* حاوية الصورة والأزرار */
.image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* الصورة نفسها */
#galleryImage {
    width: 100%;
    max-height: 80vh; /* لا تتجاوز ارتفاع الشاشة */
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* أزرار التقليب (يمين ويسار) */
.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    user-select: none;
}

.next-btn { right: 10px; }
.prev-btn { left: 10px; }

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(245, 130, 31, 0.8); /* لون برتقالي عند اللمس */
}

/* زر الإغلاق */
.close-gallery {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.close-gallery:hover { color: #ccc; }

/* عداد الصور */
#imageCounter {
    color: #ccc;
    margin-top: 10px;
}





/* حاوية البريلودر */
.inner-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a; /* لون خلفية غامق ليزيد بروز الإضاءة */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}

/* حاوية الشعار للتحكم في العمق */
.logo-container {
    perspective: 1000px;
}
/* أنيميشن الشعار: يقترب فقط بدون إضاءة */
.zoom-glow-logo {
    width: 150px; 
    /* تم حذف سطر filter: drop-shadow من هنا */
    animation: zoomOnly 1.8s ease-out forwards;
}

@keyframes zoomOnly {
    0% {
        transform: scale(0.2) translateZ(-500px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.2) translateZ(0); /* يقرب ويكبر */
        opacity: 1;
    }
}
/* فئة الإخفاء بعد التحميل */
.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}


/* حاوية الأزرار الثلاثة */
.brand-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

/* تحديث شكل أزرار التبويبات لتكون أكبر */
.tab-btn {
    background: #2a2a2a;
    border: 2px solid #444;
    color: #fff;
    padding: 15px 40px; /* زيادة الحجم */
    border-radius: 50px;
    cursor: pointer;
    font-weight: 900; /* خط أعرض */
    font-size: 1.5rem; /* تكبير حجم الخط */
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    text-transform: uppercase;
}

.tab-btn img { 
    height: 45px; /* تكبير شعار الشركة بجانب الاسم */
    filter: grayscale(1); 
    transition: 0.3s; 
}

/* للموبايل: تصغير الخط قليلاً حتى لا يخرج عن الشاشة */
@media (max-width: 768px) {
    .tab-btn {
        font-size: 1.1rem;
        padding: 10px 20px;
    }
    .tab-btn img { height: 30px; }
}

/* إخفاء المحتوى غير النشط */
.brand-content {
    display: none;
    animation: fadeIn 0.6s ease;
}

.brand-content.active-content {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}




function showBrand(brandId, btnElement) {
    // 1. إخفاء كل المحتويات
    const contents = document.querySelectorAll('.brand-content');
    contents.forEach(content => content.classList.remove('active-content'));

    // 2. إلغاء تفعيل كل الأزرار
    const buttons = document.querySelectorAll('.tab-btn');
    buttons.forEach(btn => btn.classList.remove('active'));

    // 3. إظهار المحتوى المطلوب وتفعيل الزر المضغوط
    document.getElementById(brandId).classList.add('active-content');
    btnElement.classList.add('active');

    // إعادة تفعيل تأثير الـ Tilt للكروت الجديدة (إذا كنت تستخدم مكتبة VanillaTilt)
    if(window.VanillaTilt) {
        VanillaTilt.init(document.querySelectorAll(".product-card"));
    }
}


/* =========================================
   تنسيق أداة الترجمة التلقائية (Google Translate)
   ========================================= */

/* إخفاء شريط جوجل العلوي المزعج */
body { top: 0 !important; }
.goog-te-banner-frame { display: none !important; }
.goog-logo-link { display: none !important; }
.goog-te-gadget { font-size: 0 !important; } /* إخفاء كلمة "Powered by Google" */

/* تنسيق حاوية المترجم */
#google_translate_element {
    margin-left: 20px;
    margin-right: 20px;
}

/* تنسيق القائمة المنسدلة */
.goog-te-combo {
    background-color: #222; /* لون الخلفية */
    color: #fff; /* لون النص */
    border: 1px solid #555;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

/* عند مرور الماوس */
.goog-te-combo:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* تعديل للموبايل */
@media (max-width: 768px) {
    #google_translate_element {
        margin: 10px auto; /* توسيط في الموبايل */
    }
}