
/* =========================================================
   === 1. التنسيقات الأساسية والمتغيرات العامة للموقع ===
========================================================= */
:root {
    --primary-color: #ed1c24;
    --hover-color: #c8161e;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(20px);
    --bg-fallback-color: #f6c86a; 
    --content-max-width: 480px;
}

body {
    margin: 0; padding: 0; font-family: 'Cairo', sans-serif; color: #333;
    display: flex; justify-content: center; align-items: flex-start; 
    min-height: 100vh; overflow-x: hidden; background-color: var(--bg-fallback-color);
}

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; }

.fixed-bg { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background-image: url('../assets/bg.jpg'); 
    background-size: cover; background-position: center; z-index: -1; 
}

.container { 
    width: 100%; max-width: var(--content-max-width); margin: 0 auto; 
    padding: 20px 20px 150px; box-sizing: border-box; 
    display: flex; flex-direction: column; align-items: center; gap: 25px;
}

/* =========================================================
   === 2. تنسيقات الشاشة الافتتاحية (Splash Screen) ===
========================================================= */
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); 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; }

/* =========================================================
   === 3. التنسيقات الاحترافية الحديثة للصفحة الرئيسية ===
========================================================= */
body.modern-layout .main-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 20px 100px; display: flex; flex-direction: column; gap: 40px; box-sizing: border-box; }
.mobile-logo { text-align: center; margin-top: 10px; width: 100%; }
.mobile-logo img { width: 160px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }

.top-navbar { position: fixed; top: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); box-shadow: 0 4px 20px rgba(0,0,0,0.05); z-index: 2000; padding: 10px 0; border-bottom: 2px solid var(--primary-color); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo img { height: 45px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: #111; font-weight: 800; font-size: 15px; transition: 0.3s; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); background: rgba(237, 28, 36, 0.08); }

.primary-btn { background: var(--primary-color); color: #fff; border: none; padding: 12px 24px; border-radius: 12px; font-family: 'Cairo'; font-weight: 800; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(237, 28, 36, 0.3); text-decoration: none; }
.primary-btn:hover { background: var(--hover-color); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(237, 28, 36, 0.4); }
.secondary-btn { background: #fff; color: var(--primary-color); border: 2px solid var(--primary-color); padding: 10px 24px; border-radius: 12px; font-family: 'Cairo'; font-weight: 800; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.secondary-btn:hover { background: var(--primary-color); color: #fff; }
.large-btn { padding: 14px 35px; font-size: 16px; width: 100%; justify-content: center; box-sizing: border-box; }

.hero-section { display: flex; flex-direction: column; gap: 25px; align-items: center; background: rgba(255, 255, 255, 0.6); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: 24px; padding: 30px 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); width: 100%; box-sizing: border-box; }
.hero-content { text-align: center; width: 100%; }
.hero-title { font-size: 26px; font-weight: 900; color: #111; margin-top: 0; margin-bottom: 12px; line-height: 1.4; }
.hero-title .highlight { color: var(--primary-color); }
.hero-subtitle { font-size: 15px; color: #333; font-weight: 700; line-height: 1.6; margin-bottom: 20px; }
.hero-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; width: 100%; }
.hero-visual { width: 100%; }
.modern-video { border-radius: 16px; border: 2px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.15); width: 100%; position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; }
.modern-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; box-sizing: border-box; }
.feature-card { background: rgba(255, 255, 255, 0.7); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); padding: 20px 10px; border-radius: 20px; text-align: center; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.04); text-decoration: none; }
.feature-card:hover { transform: translateY(-5px); background: #fff; border-color: var(--primary-color); }
.icon-circle { width: 55px; height: 55px; background: rgba(237, 28, 36, 0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 12px; color: var(--primary-color); font-size: 22px; transition: 0.3s; }
.feature-card:hover .icon-circle { background: var(--primary-color); color: #fff; }
.feature-card h3 { color: #111; font-weight: 900; font-size: 15px; margin: 0 0 4px; }
.feature-card p { color: #555; font-size: 12px; font-weight: 700; margin: 0; }

.chat-glass-container { display: flex; justify-content: center; width: 100%; }
.chat-glass-btn { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); border: 2px solid rgba(255, 255, 255, 0.8); padding: 12px 20px; border-radius: 50px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #000; font-family: 'Cairo', sans-serif; font-size: 15px; font-weight: 900; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); animation: pulse-glass 2s infinite; width: 100%; justify-content: center; }
@keyframes pulse-glass { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

/* =========================================================
   === 4. التنسيقات الكاملة لصفحات المنيو والفروع الفرعية ===
========================================================= */
body.inner-page { padding-top: 80px; }
body.inner-page .container { padding-top: 10px; }

.page-header { position: fixed; top: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; z-index: 1500; box-shadow: 0 4px 15px rgba(0,0,0,0.08); box-sizing: border-box; border-bottom: 2px solid var(--primary-color); }
.page-header h2 { margin: 0; font-size: 18px; font-weight: 900; color: var(--primary-color); }
.back-btn { color: var(--primary-color); background: rgba(237, 28, 36, 0.1); width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; font-size: 18px; transition: 0.3s; }
.back-btn:hover { background: var(--primary-color); color: #fff; transform: scale(1.1); }

.menu-tabs { display: flex; gap: 10px; margin-bottom: 10px; padding-top: 5px; width: 100%; box-sizing: border-box; }
.menu-tab { flex: 1; padding: 11px; border: none; border-radius: 12px; background: rgba(255,255,255,0.7); color: #444; font-weight: 900; font-family: 'Cairo', sans-serif; cursor: pointer; transition: 0.3s; font-size: 14px; text-align: center; border: 1px solid #ddd; }
.menu-tab.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(237, 28, 36, 0.25); }
.menu-tab-content { display: none; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }
.menu-tab-content.active { display: flex; animation: fadeIn 0.3s; }

.accordion-header { background-color: var(--primary-color); color: white; cursor: pointer; padding: 14px 15px; width: 100%; border: none; text-align: right; outline: none; font-size: 16px; font-weight: 900; border-radius: 12px; margin-top: 8px; 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.2); box-sizing: border-box; }
.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: 10px; padding-top: 8px; width: 100%; box-sizing: border-box; }
.menu-items-grid.active { display: grid; }

.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid #eee; background: #ffffff; border-radius: 15px; transition: transform 0.2s, box-shadow 0.2s; box-sizing: border-box; box-shadow: 0 4px 10px rgba(0,0,0,0.04); }
.menu-item:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(237, 28, 36, 0.1); border-color: var(--primary-color); }
.menu-item-info { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.menu-item-img { width: 55px; height: 55px; border-radius: 10px; object-fit: cover; border: 1px solid #eaeaea; }
.menu-item-name { font-size: 14px; font-weight: 800; color: #111; text-align: right; }
.menu-order-btn { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); padding: 5px 12px; border-radius: 8px; font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 13px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.menu-order-btn:hover { background: var(--primary-color); color: white; }

.branches-directory { width: 100%; display: flex; flex-direction: column; gap: 15px; box-sizing: border-box; }
.city-card { background-color: #ffffff; border-radius: 20px; padding: 18px; border: 1px solid #eee; width: 100%; box-sizing: border-box; box-shadow: 0 6px 15px rgba(0,0,0,0.05); }
.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: 12px 0; border-bottom: 1px dashed #eaeaea; gap: 10px; }
.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: #222; 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: 6px; align-items: center; }
.action-btn { color: #ffffff; text-decoration: none; width: 34px; height: 34px; border-radius: 8px; display: flex; justify-content: center; align-items: center; font-size: 15px; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.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; }

/* =========================================================
   === 5. تنسيقات السلايدر، الفوتر والنوافذ المنبثقة الأساسية ===
========================================================= */
.gallery-section { width: 100%; text-align: center; }
.section-title { font-size: 20px; font-weight: 900; color: #111; margin-bottom: 15px; background: rgba(255,255,255,0.8); display: inline-block; padding: 6px 20px; border-radius: 20px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.5); }
.swiper { width: 100%; padding-bottom: 40px; }
.swiper-slide { width: 230px; height: 230px; border-radius: 15px; overflow: hidden; transition: all 0.4s ease; opacity: 0.5; transform: scale(0.85); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.swiper-slide-active { opacity: 1; transform: scale(1); border: 3px solid #8cc63f; box-shadow: 0 0 25px rgba(140, 198, 63, 0.4); }

.modern-footer { background: #111; padding: 35px 20px 20px; border-radius: 25px 25px 0 0; width: 100%; box-sizing: border-box; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; align-items: center; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 18px; transition: 0.3s; text-decoration: none; }
.footer-social a:hover { background: var(--primary-color); transform: translateY(-3px); }
.footer-links { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #bbb; text-decoration: none; font-size: 13px; font-weight: 700; transition: 0.3s; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: #666; font-size: 12px; text-align: center; }

/* إخفاء النوافذ المنبثقة بشكل قاطع */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; }
.modal-content { background: #ffffff; color: #333; padding: 30px 20px; border-radius: 20px; max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: fadeIn 0.3s; }
.modal-large .modal-content { height: 85vh; max-height: 100%; display: flex; flex-direction: column; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.about-text { text-align: right; line-height: 1.8; color: #444; }
.about-text p { font-size: 14px; font-weight: 600; margin-bottom: 15px;}
.form-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 2px solid #eaeaea; border-radius: 10px; font-size: 14px; font-family: 'Cairo', sans-serif; box-sizing: border-box; background: #fff;}
.form-textarea { width: 100%; border-radius: 12px; padding: 15px; border: 2px solid #eaeaea; font-family: 'Cairo'; box-sizing: border-box; resize: vertical; min-height: 120px; font-size: 14px; }
.form-input:focus, .form-textarea:focus { border-color: var(--primary-color); outline: none; }
.cta-btn, .action-btn-large { background: var(--primary-color); color: #fff; padding: 12px; border-radius: 12px; border: none; font-weight: 900; font-size: 15px; cursor: pointer; transition: all 0.3s; width: 100%; font-family: 'Cairo'; display: flex; justify-content: center; align-items: center; gap: 8px;}
.cta-btn:hover, .action-btn-large:hover { background: var(--hover-color); transform: translateY(-2px); }
.wa-theme { background: #25D366; } .wa-theme:hover { background: #20b858; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); 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.08); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: #666; text-decoration: none; font-size: 12px; font-weight: 900; transition: 0.3s; }
.nav-item i { font-size: 20px; margin-bottom: 2px; }
.nav-item:hover, .nav-item.active { color: var(--primary-color); transform: translateY(-2px); }

.lightbox-overlay { display: none; position: fixed; z-index: 100000; left: 0; top: 0; width: 100vw; height: 100vh; 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 ease; }
.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; border: 2px solid #fff; z-index: 2; }

/* =========================================================
   === 6. التنسيق الفخم الجديد لنافذة الطلب (Order Modal) ===
========================================================= */
.custom-order-modal { padding: 35px 25px !important; border-radius: 24px !important; background: #ffffff !important; }
.popup-close { background: #ffebee !important; color: #ed1c24 !important; top: 20px !important; left: 20px !important; width: 35px !important; height: 35px !important; font-size: 18px !important; box-shadow: none !important; border-radius: 50% !important; }
.popup-close:hover { background: #ed1c24 !important; color: #fff !important; }
.order-header-container { text-align: center; border-bottom: 1px solid #f0f0f0; padding-bottom: 20px; margin-bottom: 20px; }
.top-hint-txt { font-size: 14px; color: #000; font-weight: 900; margin: 0 0 5px 0; display: none; }
.stylish-title { border-bottom: none !important; padding-bottom: 0 !important; margin: 0 !important; font-size: 22px !important; font-weight: 900 !important; }
.stylish-branches h3 { color: #ed1c24; font-size: 15px; font-weight: 900; margin: 20px 0 10px 0; text-align: right; }
.order-link-btn, .review-branch-btn { display: flex !important; justify-content: space-between !important; align-items: center !important; background-color: #fdfdfd !important; border: 1px solid #f0f0f0 !important; color: #111 !important; padding: 14px 20px !important; margin-bottom: 10px !important; border-radius: 14px !important; font-weight: 800 !important; font-size: 15px !important; transition: all 0.3s ease !important; box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important; width: 100%; box-sizing: border-box; }
.order-link-btn i, .review-branch-btn i.fa-whatsapp { color: #25D366 !important; font-size: 20px !important; }
.order-link-btn:hover, .review-branch-btn:hover { border-color: #25D366 !important; background-color: #ffffff !important; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.1) !important; transform: translateY(-2px) !important; }
.review-branch-btn:hover { border-color: #FFD700 !important; box-shadow: 0 5px 15px rgba(255, 215, 0, 0.1) !important; }

/* نظام Gating للتقييم */
.gating-stars-container { display: flex; justify-content: center; gap: 12px; margin: 25px 0; direction: ltr; }
.gating-star { font-size: 32px; color: #ccc; cursor: pointer; transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.gating-star:hover { transform: scale(1.25); }

/* =========================================================
   === 7. التوافق المتقدم مع الشاشات الكبيرة (Desktop) ===
========================================================= */
.desktop-only { display: none; }
.mobile-only { display: block; }

@media (min-width: 768px) {
    .menu-items-grid.active { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

@media (min-width: 1024px) {
    .desktop-only { display: block; }
    .mobile-only { display: none; }
    
    body.modern-layout { padding-top: 80px; }
    body.modern-layout .main-container { padding-bottom: 40px; }
    
    .hero-section { flex-direction: row; padding: 50px 40px; justify-content: space-between; text-align: right; }
    .hero-content { flex: 1; text-align: right; }
    .hero-title { font-size: 40px; }
    .hero-subtitle { font-size: 18px; }
    .hero-buttons { flex-direction: row; width: auto; justify-content: flex-start; }
    .large-btn { width: auto; }
    .chat-glass-container { justify-content: flex-start; width: fit-content; }
    .hero-visual { flex: 1; max-width: 500px; }
    
    .features-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
    .swiper-slide { width: 260px; height: 260px; }
    .section-title { font-size: 26px; }
    
    .footer-container { flex-direction: row; justify-content: space-between; }
    
    body.inner-page .container { max-width: 1100px !important; }
    .menu-items-grid.active { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .page-header { justify-content: center; gap: 40%; }
}