/* الألوان الرسمية */
:root {
    --primary-color: #0A2540; 
    --secondary-color: #D4AF37; 
    --bg-light: #F8FAFC;
    --bg-card: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #475569;
    --border-color: #E2E8F0;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.1);
}

body.dark-mode {
    --primary-color: #0f172a; 
    --secondary-color: #D4AF37; 
    --bg-light: #020617;
    --bg-card: #1e293b;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.5);
}

body { font-family: 'Tajawal', sans-serif; margin: 0; padding: 0; background-color: var(--bg-light); color: var(--text-dark); line-height: 1.7; overflow-x: hidden; font-size: 15px; transition: background-color 0.3s ease; }
h1, h2, h3, h4 { color: var(--primary-color); margin-top: 0; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { color: #ffffff; }
a { text-decoration: none; }

/* الأنيميشن الجديد لدخول الصفحات */
.page-section { display: none; animation: slideFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.page-section.active { display: block; }
@keyframes slideFadeUp { 
    0% { opacity: 0; transform: translateY(30px) scale(0.98); } 
    100% { opacity: 1; transform: translateY(0) scale(1); } 
}

/* شاشة التحميل */
#preloader { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: var(--primary-color); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* لوحة الإعلانات الرسمية */
.official-alert { background-color: rgba(212, 175, 55, 0.15); border-bottom: 1px solid var(--secondary-color); color: var(--primary-color); font-weight: 700; font-size: 13px; padding: 12px 5%; text-align: center; z-index: 1001; position: relative;}
body.dark-mode .official-alert { color: #D4AF37; }
.official-alert i { margin-left: 8px; animation: ring 2.5s infinite; }
@keyframes ring { 0% { transform: rotate(0); } 10% { transform: rotate(15deg); } 20% { transform: rotate(-15deg); } 30% { transform: rotate(15deg); } 40% { transform: rotate(-15deg); } 50% { transform: rotate(0); } }

/* الهيدر والقائمة الجانبية */
header { background-color: var(--bg-card); padding: 15px 5%; box-shadow: var(--shadow-sm); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--border-color); backdrop-filter: blur(10px); }
.header-controls { display: flex; gap: 12px; }
.menu-icon, .dark-mode-toggle { font-size: 18px; color: var(--primary-color); cursor: pointer; background: var(--bg-light); width: 42px; height: 42px; border-radius: 10px; display: flex; justify-content: center; align-items: center; border: 1px solid var(--border-color); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);}
.menu-icon:hover, .dark-mode-toggle:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
body.dark-mode .menu-icon, body.dark-mode .dark-mode-toggle { color: var(--secondary-color); border-color: var(--border-color); }

.sidebar { height: 100%; width: 0; position: fixed; z-index: 2000; top: 0; right: 0; background-color: #0A2540; overflow-x: hidden; overflow-y: auto; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding-top: 30px; padding-bottom: 30px; box-shadow: -5px 0 25px rgba(0,0,0,0.5); }
.sidebar a { padding: 16px 25px; text-decoration: none; font-size: 16px; color: #E2E8F0; display: block; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: 0.3s; font-weight: 500;}
.sidebar a:hover { color: var(--secondary-color); background: rgba(255,255,255,0.08); padding-right: 32px; border-right: 4px solid var(--secondary-color); }
.sidebar a i { width: 30px; color: var(--secondary-color); font-size: 18px; text-align: center;}
.sidebar .closebtn { position: absolute; top: 10px; right: 20px; font-size: 35px; color: white; border: none; background: none; cursor: pointer; transition: 0.3s;}
.sidebar .closebtn:hover { color: var(--secondary-color); transform: rotate(90deg); }
.overlay { height: 100%; width: 100%; position: fixed; z-index: 1500; top: 0; left: 0; background-color: rgba(0,0,0,0.7); display: none; backdrop-filter: blur(5px); animation: fadeInOverlay 0.4s;}
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }

/* الغلاف الرئيسي */
.hero { background: linear-gradient(135deg, var(--primary-color) 0%, #17375e 100%); color: white; text-align: center; padding: 60px 5% 80px 5%; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; position: relative; overflow: hidden; }
body.dark-mode .hero { background: #0f172a; border-bottom: 1px solid var(--border-color); }
.hero h1 { font-size: 32px; font-weight: 900; margin-bottom: 15px; color: white; line-height: 1.4; animation: slideFadeUp 0.8s ease-out;}
.hero p { font-size: 17px; color: #cbd5e1; max-width: 700px; margin: 0 auto; line-height: 1.6; animation: slideFadeUp 1s ease-out;}
.hero img { width: 130px; margin-bottom: 25px; border-radius: 15px; background: white; padding: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

.section { padding: 50px 5%; max-width: 1100px; margin: auto; }
.section-title { text-align: center; font-size: 26px; font-weight: 900; margin-bottom: 40px; color: var(--primary-color); }
.section-title::after { content: ''; width: 60px; height: 4px; background-color: var(--secondary-color); display: block; margin: 12px auto 0; border-radius: 2px;}

/* 🚀 البطاقات المطورة (Cards Upgrade) 🚀 */
.gateway-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.gateway-card { background: var(--bg-card); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); cursor: pointer; transition: all 0.4s ease; display: flex; flex-direction: column;}
.gateway-card:hover { transform: translateY(-12px); border-color: var(--secondary-color); box-shadow: 0 20px 40px rgba(0,0,0,0.12);}
.card-img-wrapper { height: 180px; position: relative; overflow: hidden; background: #E2E8F0; display: flex; justify-content: center; align-items: center; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gateway-card:hover .card-img-wrapper img { transform: scale(1.1); }
.gateway-content { padding: 25px; text-align: center; display: flex; flex-direction: column; flex-grow: 1; }
.gateway-content h3 { font-size: 20px; margin-bottom: 10px; font-weight: 900; color: var(--primary-color);}
.gateway-content p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; flex-grow: 1; }
/* الزرار الجديد جوا البطاقات */
.card-action-btn { background-color: rgba(10, 37, 64, 0.05); color: var(--primary-color); padding: 12px; border-radius: 10px; font-weight: 800; font-size: 15px; display: flex; justify-content: center; align-items: center; gap: 8px; transition: all 0.3s ease; border: 1px solid var(--border-color); }
.gateway-card:hover .card-action-btn { background-color: var(--primary-color); color: white; border-color: var(--primary-color); transform: scale(1.03); }
body.dark-mode .card-action-btn { background-color: rgba(255,255,255,0.05); color: white; border-color: var(--border-color); }
body.dark-mode .gateway-card:hover .card-action-btn { background-color: var(--secondary-color); color: var(--primary-color); border-color: var(--secondary-color); }

/* الجهات المعتمدة */
.trust-badges { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; background: var(--bg-card); padding: 25px; border-radius: 15px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);}
.trust-badges img { height: 55px; object-fit: contain; filter: grayscale(100%); opacity: 0.6; transition: all 0.4s ease;}
.trust-badges img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05);}

/* الجداول والأكورديون */
.table-responsive { overflow-x: auto; width: 100%; border-radius: 12px; border: 1px solid var(--border-color); margin-top: 25px; box-shadow: var(--shadow-sm);}
.fees-table { width: 100%; border-collapse: collapse; min-width: 600px; text-align: center; font-size: 14px; background: var(--bg-card);}
.fees-table th { background-color: var(--primary-color); color: white; padding: 15px 10px; font-weight: 800; border-bottom: 4px solid var(--secondary-color);}
.fees-table td { padding: 15px 10px; border-bottom: 1px solid var(--border-color); color: var(--text-dark);}
.fees-table tr:nth-child(even) td { background-color: rgba(0,0,0,0.02); }
.highlight-col { background-color: rgba(212, 175, 55, 0.08); font-weight: 900; color: #16a34a;}

.accordion { background-color: var(--bg-card); color: var(--primary-color); cursor: pointer; padding: 20px; width: 100%; border: 1px solid var(--border-color); text-align: right; outline: none; font-size: 16px; font-weight: 900; transition: all 0.3s; border-radius: 12px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; font-family: inherit; box-shadow: var(--shadow-sm);}
.accordion.active, .accordion:hover { border-color: var(--secondary-color); transform: translateX(-5px); }
.accordion i.fa-chevron-down { transition: transform 0.4s ease; }
.accordion.active i.fa-chevron-down { transform: rotate(180deg); color: var(--secondary-color); }
.panel { padding: 0 25px; background-color: var(--bg-light); max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0, 1, 0, 1); border-radius: 0 0 12px 12px; margin-top: -15px; margin-bottom: 20px; border: 1px solid var(--border-color); border-top: none; }
.panel-content { padding: 25px 0; }

.numbered-list { list-style: none; padding: 0; margin: 0; }
.numbered-list li { margin-bottom: 15px; padding-right: 35px; position: relative; font-size: 15px; color: var(--text-dark); font-weight: 500;}
.numbered-list li::before { content: '\f00c'; font-family: 'FontAwesome'; position: absolute; right: 0; color: var(--secondary-color); background: rgba(212, 175, 55, 0.1); width: 24px; height: 24px; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-size: 12px;}

/* باقات الخدمات */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.pack-card { background: var(--bg-card); border-radius: 20px; padding: 30px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); border-top: 5px solid var(--primary-color); position: relative; transition: all 0.4s ease; }
.pack-card.vip { border-top-color: var(--secondary-color); }
.pack-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.price { font-size: 40px; color: var(--primary-color); font-weight: 900; text-align: center; margin: 20px 0; border-bottom: 1px dashed var(--border-color); padding-bottom: 20px;}
body.dark-mode .price { color: var(--secondary-color); }
.price span { font-size: 18px; color: var(--text-muted); font-weight: normal; }

/* الأزرار والفورم */
.back-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-card); color: var(--primary-color); padding: 10px 20px; border-radius: 8px; font-weight: 800; font-size: 15px; border: 1px solid var(--border-color); cursor: pointer; margin-bottom: 30px; transition: all 0.3s; box-shadow: var(--shadow-sm);}
.back-btn:hover { background: var(--primary-color); color: white; transform: translateX(5px); }
.form-container { background: var(--bg-card); padding: 40px; border-radius: 20px; border: 1px solid var(--border-color); max-width: 700px; margin: 40px auto 0 auto; box-shadow: var(--shadow-lg);}
.form-control { width: 100%; padding: 15px 20px; border: 1px solid var(--border-color); border-radius: 10px; font-family: inherit; font-size: 15px; margin-bottom: 20px; background: var(--bg-light); color: var(--text-dark); box-sizing: border-box; transition: all 0.3s; font-weight: 500;}
.form-control:focus { outline: none; border-color: var(--secondary-color); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2); }
.delivery-checkbox-container { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 25px; padding: 18px; background: rgba(212, 175, 55, 0.05); border: 1px dashed var(--secondary-color); border-radius: 12px; transition: 0.3s;}
.delivery-checkbox-container input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; margin-top: 2px; accent-color: var(--secondary-color);}
.delivery-checkbox-container label { font-size: 14px; font-weight: 800; cursor: pointer; color: var(--primary-color); line-height: 1.6; }
body.dark-mode .delivery-checkbox-container label { color: var(--secondary-color); }
.submit-btn { width: 100%; background: var(--primary-color); color: white; border: none; padding: 16px; border-radius: 10px; font-size: 18px; font-weight: 900; cursor: pointer; font-family: inherit; transition: all 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px;}
.submit-btn:hover { background: var(--secondary-color); color: var(--primary-color); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1);}

/* الأزرار العائمة */
.floating-whatsapp { position: fixed; bottom: 30px; left: 30px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; z-index: 999; box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); transition: 0.3s; animation: float 3s ease-in-out infinite;}
.floating-whatsapp:hover { transform: scale(1.1); }
.floating-fb { position: fixed; bottom: 105px; left: 38px; background-color: #1877F2; color: white; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 22px; z-index: 999; box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4); transition: 0.3s;}
.floating-fb:hover { transform: scale(1.1); }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }

/* قسم روابط المجتمع */
.community-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 40px; margin-top: 50px; text-align: center; box-shadow: var(--shadow-lg); }
.community-box h3 { color: var(--primary-color); font-size: 24px; margin-bottom: 30px; font-weight: 900; }
body.dark-mode .community-box h3 { color: white; }
.community-links-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.community-item { display: flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; color: var(--primary-color); background: var(--bg-light); padding: 16px; border-radius: 12px; font-weight: 800; font-size: 15px; transition: all 0.3s; border: 1px solid var(--border-color); }
body.dark-mode .community-item { color: white; border-color: var(--border-color); }
.community-item i { color: var(--secondary-color); font-size: 22px; }
.community-item:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.community-item:hover i { color: white; }
.community-item.whatsapp:hover { background-color: #25D366; border-color: #25D366; }
.community-item.facebook:hover { background-color: #1877F2; border-color: #1877F2; }

/* الفوتر */
footer { background: var(--primary-color); color: white; text-align: center; padding: 60px 5% 40px 5%; margin-top: 50px; border-top-left-radius: 30px; border-top-right-radius: 30px;}
.footer-terms { margin-top: 35px; padding: 30px; background: rgba(255,255,255,0.04); border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); font-size: 14px; color: #cbd5e1; text-align: right; line-height: 1.8; max-width: 900px; margin-left: auto; margin-right: auto;}
