:root { --primary: #D31A1A; --dark: #111; --white: #fff; --gray: #f4f4f4; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

/* قواعد الأمان لمنع خروج العناصر عن الشاشة */
html, body { width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body { background: #fff; position: relative; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; }
.section-padding { padding: 60px 0; }
.section-header h2 { font-size: 32px; font-weight: 900; margin-bottom: 30px; border-right: 5px solid var(--primary); padding-right: 15px; }
.section-header span { color: var(--primary); }

/* Preloader */
#preloader { position: fixed; inset: 0; background: #fff; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: 0.5s; }
.spinner { width: 45px; height: 45px; border: 4px solid #f3f3f3; border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-text { font-size: 30px; font-weight: 900; margin-top: 15px; } .logo-text span { color: var(--primary); }

/* Navbar */
.navbar { position: fixed; top: 0; width: 100%; z-index: 1000; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 26px; font-weight: 900; color: var(--dark); text-decoration: none; } .logo span { color: var(--primary); }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 700; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }
.nav-btn { background: var(--primary); color: #fff !important; padding: 8px 20px; border-radius: 5px; }
.menu-icon { display: none; font-size: 24px; cursor: pointer; }

/* Hero Slider */
.hero { height: 75vh; position: relative; overflow: hidden; margin-top: 65px; background: #000; }
.slide { position: absolute; inset: 0; opacity: 0; transition: 1s ease; display: flex; align-items: center; }
.slide.active { opacity: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.4); }
.hero-text { position: relative; z-index: 2; color: #fff; text-align: center; width: 100%; }
.hero-text h1 { font-size: 40px; margin-bottom: 10px; font-weight: 900; } .hero-text span { color: var(--primary); }
.hero-nav { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 15px; }
.hero-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #fff; background: rgba(255,255,255,0.1); color: #fff; cursor: pointer; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.tag { color: var(--primary); font-weight: 900; }

/* Sliders */
.slider-outer { position: relative; overflow: hidden; width: 100%; padding: 20px 0; }
.slider-track { display: flex; gap: 20px; transition: 0.5s ease; }
.card { flex: 0 0 calc(33.33% - 14px); background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); cursor: pointer; transition: 0.3s; }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 20px; margin-bottom: 5px; color: var(--dark); }

.s-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 5; cursor: pointer; }
.s-btn.nxt { left: 0; } .s-btn.prv { right: 0; }

/* Contact Section */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; align-items: start; }
.c-box { display: flex; gap: 15px; align-items: center; background: var(--gray); padding: 15px; border-radius: 8px; margin-bottom: 15px; border-right: 4px solid var(--primary); }
.c-box i { font-size: 24px; color: var(--primary); }
.c-form form { display: flex; flex-direction: column; gap: 15px; }
.c-form input, .c-form textarea { padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-family: inherit; }
.main-btn { background: var(--primary); color: #fff; padding: 12px; border: none; border-radius: 5px; cursor: pointer; font-weight: 700; transition: 0.3s; }
.main-btn:hover { background: #b31414; }

/* Modal (نافذة الأخبار) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px; }
.modal-box { background: #fff; max-width: 600px; width: 100%; padding: 25px; border-radius: 10px; position: relative; text-align: right; }
.modal-box img { width: 100%; border-radius: 8px; margin-bottom: 15px; }
.close-btn { position: absolute; top: 10px; left: 15px; font-size: 30px; cursor: pointer; color: var(--dark); }

.footer { background: var(--dark); color: #fff; text-align: center; padding: 30px 0; }

/* الجوال */
@media (max-width: 992px) { .card { flex: 0 0 calc(50% - 10px); } .contact-grid { grid-template-columns: 1fr; } .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { 
    .menu-icon { display: block; } 
    .nav-links { display: none; position: absolute; top: 60px; right: 0; width: 100%; background: #fff; flex-direction: column; padding: 20px; border-top: 1px solid #ddd; }
    .nav-links.active { display: flex; }
    .card { flex: 0 0 100%; } .s-btn { display: none; }
}