/* === إصلاح مشكلة اختفاء الأيقونات بالإجبار === */
i.fa-solid, i.fas { font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important; font-style: normal !important; }
i.fa-brands, i.fab { font-family: "Font Awesome 6 Brands" !important; font-weight: 400 !important; font-style: normal !important; }

/* --- المتغيرات العامة --- */
:root {
    --primary-color: #ed1c24;
    --hover-color: #c8161e;
    --main-gap: 45px; 
    --content-max-width: 480px; 
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(15px);
    --bg-fallback-color: #f6c86a; 
}

body {
    margin: 0; padding: 0; font-family: 'Cairo', sans-serif; color: #fff;
    display: flex; justify-content: center; align-items: flex-start; 
    min-height: 100vh; overflow-x: hidden; background-color: var(--bg-fallback-color);
}

/* =========================================
    الشاشة الافتتاحية الجديدة
========================================= */
body.splash-active { overflow: hidden; }
.splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #e01f26; 
    z-index: 999999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-screen.hidden { opacity: 0; visibility: hidden; }

.splash-header {
    position: absolute; top: 40px; z-index: 1000000;
    display: flex; gap: 15px; opacity: 0; 
    transform: translateY(-20px); transition: all 0.5s ease;
}
.splash-header.show { opacity: 1; transform: translateY(0); }

.splash-btn {
    background-color: rgba(255,255,255,0.2); color: white; border: 2px solid white;
    padding: 8px 25px; border-radius: 50px; font-size: 1rem; font-family: 'Cairo', sans-serif;
    font-weight: 800; cursor: pointer; transition: 0.3s;
    backdrop-filter: blur(10px); display: flex; align-items: center; gap: 10px;
}
.splash-btn:hover { background-color: white; color: #e01f26; }

.splash-scene { width: 100vw; height: 100vh; perspective: 2000px; display: flex; justify-content: center; align-items: center; }
.splash-spiral { position: relative; transform-style: preserve-3d; transform: rotateX(-25deg) rotateZ(-5deg); }
.splash-spiral.rotate-star { animation: starRotate 20s infinite linear; }
@keyframes starRotate {
    from { transform: rotateX(-25deg) rotateZ(-5deg) rotateY(0deg); }
    to { transform: rotateX(-25deg) rotateZ(-5deg) rotateY(360deg); }
}

.splash-card {
    position: absolute; width: 150px; height: 150px; border-radius: 12px;
    overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #fff; left: 50%; top: 50%; margin-left: -75px; margin-top: -75px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    opacity: 0; transform: translate3d(50vw, 50vh, -1000px) scale(0.1); 
}
.splash-card img { width: 100%; height: 100%; object-fit: cover; }

/* --- حاوية الموقع الأساسي --- */
#main-interface {
    opacity: 0; visibility: hidden; transition: opacity 1s ease; width: 100%; display: flex; flex-direction: column; align-items: center;
}

/* --- الخلفية الثابتة --- */
.fixed-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-image: url('bg.jpg'); background-size: cover; background-position: center; z-index: -1; }

/* --- الحاوية المركزية --- */
.container { 
    width: 100%; max-width: var(--content-max-width); margin: 0 auto; 
    padding: 10vh 20px 140px; 
    box-sizing: border-box; display: flex; flex-direction: column; 
    align-items: center; gap: 30px;
}

.logo { width: 100%; max-width: 200px; height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)); }

/* --- مستطيل عرض الفيديو --- */
.video-wrapper {
    width: 100%; position: relative; padding-bottom: 56.25%; height: 0;
    border-radius: 15px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 2px solid var(--glass-border); background-color: #000;
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* --- المستطيلات العلوية --- */
.stories-container { 
    display: flex; justify-content: center; flex-wrap: nowrap; gap: 6px; 
    width: 100%; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; -ms-overflow-style: none; 
}
.stories-container::-webkit-scrollbar { display: none; }

.story-box { 
    flex: 1 1 auto; 
    background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); 
    border: 1px solid var(--glass-border); border-radius: 12px; 
    padding: 8px 6px; display: flex; align-items: center; justify-content: center; gap: 4px; 
    cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}
.story-box:hover { background: var(--primary-color); transform: translateY(-3px); border-color: var(--primary-color); }
.story-box i { font-size: 12px; color: var(--primary-color); transition: 0.3s; }
.story-box span { font-size: 11px; font-weight: 800; color: var(--primary-color); transition: 0.3s; white-space: nowrap; }
.story-box:hover span, .story-box:hover i { color: #fff; }

/* --- أزرار اطلب والمنيو --- */
.cta-container { display: flex; width: 100%; gap: 15px; }
.cta-half-btn { 
    flex: 1; background: var(--primary-color); color: #fff; padding: 12px; border-radius: 12px; 
    font-size: 16px; font-family: 'Cairo', sans-serif; font-weight: 900; display: flex; 
    justify-content: center; align-items: center; gap: 8px; cursor: pointer; border: none; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.2); transition: transform 0.2s, background-color 0.2s; 
}
.cta-half-btn:hover { transform: scale(1.03); background: var(--hover-color); }

/* --- زر الفروع --- */
.cta-full-btn { 
    width: 100%; background: var(--primary-color); color: #fff; padding: 12px; border-radius: 12px; 
    font-size: 16px; font-family: 'Cairo', sans-serif; font-weight: 900; display: flex; 
    justify-content: center; align-items: center; gap: 8px; cursor: pointer; border: none; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.2); transition: transform 0.2s; margin-top: 5px; 
}
.cta-full-btn:hover { transform: scale(1.03); background: var(--hover-color); }

/* --- شبكة مواقع التواصل --- */
.grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.grid-btn { 
    background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); 
    color: #000; padding: 12px; border-radius: 12px; font-size: 13px; font-weight: 800; 
    display: flex; justify-content: space-between; align-items: center; text-decoration: none; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: 0.2s; 
}
.grid-btn:hover { transform: scale(1.03); background: rgba(255, 255, 255, 0.5); }
.grid-btn i { font-size: 16px; color: #000; }

/* --- النوافذ المنبثقة --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; backdrop-filter: blur(5px); }
.modal-content { background: #ffffff; color: #333; padding: 25px 20px; border-radius: 20px; max-width: var(--content-max-width); width: 100%; max-height: 85vh; overflow-y: auto; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: fadeIn 0.3s; }
.modal-large .modal-content { height: 85vh; max-height: 100%; border-radius: 25px 25px 0 0; margin-top: 15vh; display: flex; flex-direction: column; }
.modal-content::-webkit-scrollbar { width: 5px; }
.modal-content::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 10px; } 
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-content h2 { color: #000; margin-top: 5px; border-bottom: 2px solid #eee; padding-bottom: 15px; text-align: center; font-weight: 900; }
.close-btn { position: absolute; top: 15px; left: 15px; background: rgba(237, 28, 36, 0.1); color: var(--primary-color); border: none; width: 35px; height: 35px; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s; z-index: 1001; }
.close-btn:hover { background: var(--primary-color); color: #fff; transform: scale(1.1); }

/* --- تنسيقات احنا مين والامتياز التجاري --- */
.about-text { text-align: right; line-height: 1.9; color: #444; margin-top: 10px;}
.about-text h3 { color: var(--primary-color); margin: 20px 0 10px 0; font-size: 1.3rem; font-weight: 900; border-right: 4px solid var(--primary-color); padding-right: 10px;}
.about-text p { font-size: 1rem; margin-bottom: 15px; font-weight: 600;}
.about-text ul { padding-right: 20px; margin-bottom: 20px; font-size: 1rem; font-weight: 600;}
.about-text ul li { margin-bottom: 8px; }

.franchise-layout { display: flex; flex-direction: column; gap: 20px; text-align: right; margin-top: 10px;}
.franchise-info p { font-weight: bold; color: var(--primary-color); font-size: 1.1rem; line-height: 1.6; margin-bottom: 15px;}
.franchise-info ul { padding-right: 20px; font-size: 1rem; font-weight: 600;}
.franchise-form-box { background: #f9f9f9; padding: 20px; border-radius: 15px; border: 1px solid #eee; margin-top: 10px;}
.franchise-form-box h3 { text-align: center; color: #000; margin-bottom: 20px; font-weight: 900;}
.form-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 2px solid #eaeaea; border-radius: 10px; font-size: 1rem; font-family: 'Cairo', sans-serif; box-sizing: border-box; background: #fff;}
.form-input:focus { border-color: var(--primary-color); outline: none; }
.cta-btn { background-color: var(--primary-color); color: #fff; padding: 12px; border-radius: 10px; border: none; font-weight: 900; font-size: 1.1rem; cursor: pointer; transition: all 0.3s; width: 100%; font-family: 'Cairo';}
.cta-btn:hover { background-color: var(--hover-color); transform: translateY(-2px); }

.recaptcha-wrapper { display: flex; justify-content: flex-start; margin-bottom: 15px; }
.recaptcha-box { background-color: #fff; border: 1px solid #ccc; border-radius: 8px; padding: 10px; display: flex; align-items: center; width: 100%; }
.recaptcha-checkbox { width: 24px; height: 24px; border: 2px solid #aaa; border-radius: 4px; cursor: pointer; margin-left: 15px; display: flex; justify-content: center; align-items: center; background: #fafafa;}
.recaptcha-text { font-size: 1rem; color: #333; flex-grow: 1; text-align: right; font-weight: bold; }

/* --- تنسيقات المنيو التفاعلي --- */
.menu-tabs { display: flex; gap: 10px; margin-bottom: 15px; padding-top: 10px; }
.menu-tab { flex: 1; padding: 10px; border: none; border-radius: 10px; background: #f1f1f1; color: #555; font-weight: 900; font-family: 'Cairo', sans-serif; cursor: pointer; transition: 0.3s; font-size: 14px; text-align: center; }
.menu-tab.active { background: var(--primary-color); color: #fff; box-shadow: 0 4px 8px rgba(237, 28, 36, 0.3); }
.menu-tab-content { display: none; flex-direction: column; gap: 5px; overflow-y: auto; padding-right: 5px; padding-bottom: 20px; }
.menu-tab-content.active { display: flex; animation: fadeIn 0.3s; }

.accordion-header {
    background-color: var(--primary-color); color: white; cursor: pointer; padding: 12px 15px; width: 100%;
    border: none; text-align: right; outline: none; font-size: 16px; font-weight: 900;
    border-radius: 8px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center;
    font-family: 'Cairo', sans-serif; transition: 0.3s; box-shadow: 0 4px 10px rgba(237, 28, 36, 0.3);
}
.accordion-header:hover, .accordion-header.active { background-color: var(--hover-color); }
.accordion-header i { transition: transform 0.3s ease; }
.accordion-header.active i { transform: rotate(180deg); }

.menu-items-grid { display: none; grid-template-columns: 1fr; gap: 8px; padding-top: 10px; animation: fadeIn 0.3s; }
.menu-items-grid.active { display: grid; }

.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #eee; background: #fcfcfc; border-radius: 12px; transition: transform 0.2s, box-shadow 0.2s; }
.menu-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.menu-item-info { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.menu-item-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; border: 1px solid #eaeaea; }

.menu-item-name { font-size: 15px; font-weight: 900; color: #222; }
.menu-order-btn { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); padding: 4px 8px; border-radius: 8px; font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 12px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 4px; }
.menu-order-btn:hover { background: var(--primary-color); color: white; }

/* --- تنسيقات الفروع والطلب --- */
.city-card { background-color: #f8f9fa; border-radius: 15px; padding: 15px; margin-bottom: 15px; border: 1px solid #eee; }
.city-title { font-size: 16px; font-weight: 900; color: #000; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; border-bottom: 2px solid #eee; padding-bottom: 8px; }
.city-title i { color: var(--primary-color); } 
.branch-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed #cccccc; }
.branch-item:last-child { border-bottom: none; padding-bottom: 0; }
.branch-info { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.branch-name { font-size: 14px; color: #333; font-weight: 800; }
.branch-number { font-size: 13px; color: #666; font-weight: 700; direction: ltr; text-align: right; }
.coming-soon { color: var(--primary-color); font-weight: 800; font-size: 13px; text-align: right; } 

.branch-actions { display: flex; gap: 8px; align-items: center; }
.action-btn { color: #ffffff; text-decoration: none; width: 35px; height: 35px; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 16px; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.action-btn:hover { transform: scale(1.1); }
.map-btn { background-color: var(--primary-color); } 
.wa-btn { background-color: #25D366; } 
.call-btn { background-color: #007bff; } 
.review-btn { background-color: #ffc107 !important; color: #fff !important; }

.order-link-btn { display: flex; justify-content: space-between; align-items: center; background-color: #f8f9fa; border: 1px solid #dee2e6; color: #333; text-decoration: none; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; font-weight: 800; font-size: 14px; transition: all 0.2s ease; cursor: pointer; width: 100%; font-family: 'Cairo';}
.order-link-btn:hover:not(.disabled) { background-color: var(--primary-color); color: #ffffff; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(237, 28, 36, 0.2); border-color: var(--primary-color);}

.form-textarea { width: 100%; border-radius: 12px; padding: 15px; border: 1px solid #ccc; margin-top: 10px; font-family: 'Cairo', sans-serif; box-sizing: border-box; resize: vertical; min-height: 120px; font-size: 14px; }
.form-textarea:focus { outline: none; border-color: var(--primary-color); }
.action-btn-large { background: var(--primary-color); color: #fff; padding: 12px; border-radius: 12px; border: none; width: 100%; margin-top: 10px; font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 15px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.2s; }
.action-btn-large.wa-theme { background: #25D366; }
.action-btn-large.wa-theme:hover { background: #20b858; }

/* --- الشريط الإخباري --- */
.ticker-wrap { width: 100%; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; padding: 10px 0; white-space: nowrap; }
.ticker { display: inline-block; white-space: nowrap; padding-right: 100%; animation: ticker 25s linear infinite; }
.ticker-item { display: inline-block; padding: 0 25px; font-size: 16px; font-weight: 900; color: #fff; text-shadow: 1px 1px 4px rgba(0,0,0,0.8); }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(100%, 0, 0); } }

/* =========================================================
    --- معرض الصور 3D الفراغي الجديد والتفاعلي بالكامل ---
========================================================= */
.gallery-wrapper { width: 100%; height: 350px; position: relative; perspective: 1200px; display: flex; justify-content: center; align-items: center; margin-top: 15px; overflow: hidden; background: rgba(0, 0, 0, 0.15); border-radius: 15px; cursor: grab; }
.gallery-wrapper:active { cursor: grabbing; }
.gallery-scene { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.1s ease-out;  }
.gallery-item { position: absolute; top: 50%; left: 50%; width: 130px; height: 180px; margin-left: -65px; margin-top: -90px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.6); border: 2px solid rgba(255,255,255,0.3); backface-visibility: visible; user-select: none; -webkit-user-drag: none; cursor: pointer; transition: border-color 0.3s; }
.gallery-item:hover { border-color: var(--primary-color); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

/* --- تنسيقات نافذة التكبير (Lightbox) --- */
.lightbox-overlay { display: none; position: fixed; z-index: 100000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.92); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(8px); }
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-content { position: relative; max-width: 90%; max-height: 85%; }
.lightbox-img { max-width: 100%; max-height: 85vh; border-radius: 15px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); border: 3px solid #fff; transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.lightbox-overlay.active .lightbox-img { transform: scale(1); }
.lightbox-close-icon { position: absolute; top: -15px; right: -15px; background: var(--primary-color); color: #fff; width: 40px; height: 40px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.5); transition: 0.2s; border: 2px solid #fff; }
.lightbox-close-icon:hover { transform: scale(1.1); background: var(--hover-color); }

/* --- زر قناة الواتساب السفلي --- */
.bottom-action-icons { display: flex; justify-content: center; align-items: center; width: 100%; margin-top: 20px; margin-bottom: 10px; }
.wa-channel-btn { background: #25D366; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid #25D366; padding: 12px 25px; border-radius: 15px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 800; font-family: 'Cairo', sans-serif; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3); }
.wa-channel-btn:hover { transform: translateY(-3px); background: #20b858; border-color: #20b858; }
.wa-channel-btn i { color: #fff; font-size: 24px; transition: 0.3s; } 

/* --- شريط التنقل السفلي --- */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--content-max-width); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-top: 2px solid var(--primary-color); display: flex; justify-content: space-around; align-items: center; padding: 10px 0; z-index: 999; box-shadow: 0 -4px 15px rgba(0,0,0,0.2); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: #666; text-decoration: none; font-size: 12px; font-weight: 900; transition: 0.3s; cursor: pointer; }
.nav-item i { font-size: 20px; margin-bottom: 2px; }
.nav-item:hover, .nav-item.active { color: var(--primary-color); transform: translateY(-2px); } 

footer { text-align: center; font-size: 14px; font-weight: bold; color: #fff; padding: 10px 0 0; width: 100%; opacity: 0.9;}

@media (min-width: 1025px) { .container { max-width: 480px; } .modal-large .modal-content { max-width: 480px; height: 85vh; border-radius: 20px; margin-top: 0; border-bottom: 2px solid var(--primary-color); } }

/* --- تنسيقات زر المساعد الذكي الجديد --- */
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(237, 28, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0); }
}

.chat-fab-extended {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: #ed1c24;
    color: white;
    border: none;
    padding: 10px 20px; 
    border-radius: 50px; 
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(237, 28, 36, 0.4);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; 
    animation: pulse-animation 2s infinite; 
}

.chat-fab-extended:hover {
    transform: translateY(-5px) scale(1.05);
    background: #c8161e;
}

.chat-fab-text {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 900;
}

.chat-fab-icon {
    font-size: 22px;
}