/* ============================================================
   main.css — الأنماط الرئيسية للموقع
   ============================================================ */

:root {
  --primary:       #1a56db;
  --primary-dark:  #1341b0;
  --primary-light: #e8f0fe;
  --secondary:     #0f172a;
  --accent:        #f59e0b;
  --text-main:     #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --bg-white:      #ffffff;
  --bg-light:      #f8fafc;
  --bg-section:    #f1f5f9;
  --border:        #e2e8f0;
  --border-dark:   #cbd5e1;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;
  --transition:    0.3s ease;
  --font-ar:       'Tajawal', 'Cairo', sans-serif;
  --header-h:      72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ar);
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }

h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.3; color: var(--secondary); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-md);
  font-family: var(--font-ar); font-size: 1rem; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,86,219,.35); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--primary); font-weight: 700; }
.btn-white:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 8px 18px; font-size: .9rem; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: .85rem; font-weight: 700; padding: 6px 16px; border-radius: 50px;
  margin-bottom: 14px; letter-spacing: .5px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p  { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.divider { width: 56px; height: 4px; background: var(--primary); border-radius: 4px; margin: 16px auto 0; }

.card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 32px; transition: all var(--transition);
}
.card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }

.badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: .8rem; font-weight: 600; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent  { background: #fef3c7; color: #92400e; }

/* ============================================================ HEADER ============================================================ */
.site-header {
  position: fixed; top: 0; right: 0; left: 0; height: var(--header-h);
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); z-index: 1000; transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 800; color: var(--secondary); }
.logo-icon { width: 40px; height: 40px; background: var(--primary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.logo-icon svg { width: 22px; height: 22px; fill: #fff; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 16px; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; color: var(--text-muted); transition: all var(--transition); }
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }
.nav-cta { margin-right: 16px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border-radius: var(--radius-sm); background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--secondary); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; position: fixed; top: var(--header-h); right: 0; left: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 20px 24px; flex-direction: column; gap: 4px; box-shadow: var(--shadow-md); z-index: 999; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; color: var(--text-muted); transition: all var(--transition); }
.mobile-menu a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-menu .btn { margin-top: 8px; justify-content: center; }

/* ============================================================ FOOTER ============================================================ */
.site-footer { background: var(--secondary); color: #94a3b8; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p    { font-size: .9rem; line-height: 1.8; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: .9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; margin-bottom: 12px; }
.footer-contact .icon { width: 32px; height: 32px; background: rgba(255,255,255,.08); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links a { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; transition: all var(--transition); font-size: 1rem; }
.social-links a:hover { background: var(--primary); color: #fff; }
.footer-bottom { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: .85rem; }
.footer-bottom a:hover { color: var(--primary); }

/* ============================================================ PAGE HERO ============================================================ */
.page-hero { padding: calc(var(--header-h) + 72px) 0 72px; background: linear-gradient(135deg, #f0f6ff 0%, #e8f0fe 100%); text-align: center; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero p  { font-size: 1.1rem; max-width: 560px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .9rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span    { color: var(--text-light); }

/* ============================================================ HOME — HERO ============================================================ */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #f0f6ff 0%, #fff 50%, #fef9ee 100%); z-index: 0; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.hero-blob-1 { width: 500px; height: 500px; background: #c7d9fd; top: -100px; left: -100px; }
.hero-blob-2 { width: 400px; height: 400px; background: #fde68a; bottom: -80px; right: -60px; }
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hero-text .section-tag { margin-bottom: 20px; }
.hero-text h1 { margin-bottom: 20px; line-height: 1.2; }
.hero-text h1 span { color: var(--primary); }
.hero-text p  { font-size: 1.1rem; margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--border); }
.stat-item strong { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-item span { font-size: .85rem; color: var(--text-muted); }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-image-wrap { width: 480px; height: 480px; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-float-card { position: absolute; background: #fff; border-radius: var(--radius-md); padding: 14px 18px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; }
.hero-float-card.card-1 { bottom: -20px; right: -20px; }
.hero-float-card.card-2 { top: -20px; left: -20px; }
.float-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.float-icon.green { background: #dcfce7; color: #16a34a; }
.float-icon.blue  { background: var(--primary-light); color: var(--primary); }

/* ============================================================ SERVICES PREVIEW ============================================================ */
.services-preview { padding: 96px 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.service-card { text-align: center; padding: 40px 28px; }
.service-icon { width: 72px; height: 72px; background: var(--primary-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 2rem; transition: all var(--transition); }
.service-card:hover .service-icon { background: var(--primary); color: #fff; transform: scale(1.1); }
.service-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.service-card p  { font-size: .9rem; margin-bottom: 20px; }

/* ============================================================ WHY US ============================================================ */
.why-us { padding: 96px 0; background: var(--bg-section); }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.why-text h2 { margin-bottom: 16px; }
.why-text p  { margin-bottom: 36px; }
.feature-list { display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; align-items: flex-start; gap: 16px; }
.feature-check { width: 44px; height: 44px; background: var(--primary-light); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); font-size: 1.2rem; font-weight: 700; }
.feature-item h4 { margin-bottom: 4px; }
.feature-item p  { font-size: .9rem; }
.why-visual img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ============================================================ PROJECTS PREVIEW ============================================================ */
.projects-preview { padding: 96px 0; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.project-card { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); transition: all var(--transition); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-thumb { height: 220px; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-info { padding: 24px; }
.project-info .badge { margin-bottom: 10px; }
.project-info h3 { margin-bottom: 8px; font-size: 1.1rem; }
.project-info p  { font-size: .9rem; margin-bottom: 16px; }
.project-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: .9rem; font-weight: 600; }
.project-link:hover { gap: 10px; }

/* ============================================================ TESTIMONIALS ============================================================ */
.testimonials { padding: 96px 0; background: var(--bg-section); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.testimonial-card { padding: 32px; }
.stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 16px; }
.testimonial-card p { font-size: .95rem; margin-bottom: 24px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.author-name { font-weight: 600; font-size: .9rem; }
.author-title { font-size: .8rem; color: var(--text-muted); }

/* ============================================================ CTA BANNER ============================================================ */
.cta-banner { padding: 96px 0; background: var(--primary); text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%; background: rgba(255,255,255,.06); top: -200px; right: -100px; }
.cta-banner h2 { color: #fff; margin-bottom: 16px; }
.cta-banner p  { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================ CONTACT PAGE ============================================================ */
.contact-section { padding: 96px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; }
.contact-info h3 { margin-bottom: 8px; }
.contact-info > p { margin-bottom: 32px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; }
.contact-item-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.contact-item-text strong { display: block; font-size: .9rem; color: var(--text-muted); margin-bottom: 2px; }
.contact-item-text span  { font-size: .95rem; font-weight: 600; }
.contact-social { margin-top: 32px; }
.contact-social h4 { margin-bottom: 14px; }

.contact-form-wrap .card { padding: 40px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .9rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.form-group label .req { color: #ef4444; }
.form-control { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-ar); font-size: .95rem; color: var(--text-main); background: var(--bg-white); transition: border-color var(--transition), box-shadow var(--transition); direction: rtl; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.form-control::placeholder { color: var(--text-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-error { color: #ef4444; font-size: .8rem; margin-top: 4px; display: none; }
.form-error.visible { display: block; }
.form-success { background: #dcfce7; border: 1px solid #86efac; color: #15803d; padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; display: none; }
.form-success.visible { display: block; }

/* ============================================================ FAQ PAGE ============================================================ */
.faq-section { padding: 96px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden; transition: border-color var(--transition); }
.faq-item.open { border-color: var(--primary); }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; cursor: pointer; gap: 16px; background: #fff; user-select: none; }
.faq-question h4 { font-size: 1rem; font-weight: 600; }
.faq-toggle { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg-section); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); font-size: 1.2rem; color: var(--primary); }
.faq-item.open .faq-toggle { background: var(--primary); color: #fff; transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-answer-inner { padding: 0 24px 20px; color: var(--text-muted); font-size: .95rem; line-height: 1.8; border-top: 1px solid var(--border); padding-top: 16px; }

/* ============================================================ PRIVACY PAGE ============================================================ */
.privacy-section { padding: 96px 0; }
.privacy-content { max-width: 800px; margin: 0 auto; color: var(--text-muted); }
.privacy-content h2 { font-size: 1.3rem; margin: 36px 0 12px; color: var(--secondary); padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.privacy-content p  { margin-bottom: 16px; line-height: 1.9; }
.privacy-content ul { padding-right: 20px; margin-bottom: 16px; }
.privacy-content ul li { list-style: disc; margin-bottom: 8px; font-size: .95rem; }
.privacy-meta { background: var(--bg-section); padding: 14px 20px; border-radius: var(--radius-sm); font-size: .85rem; color: var(--text-muted); margin-bottom: 36px; }

/* ============================================================ ABOUT PAGE ============================================================ */
.about-intro { padding: 96px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-text h2 { margin-bottom: 16px; }
.about-text p  { margin-bottom: 20px; }
.about-values { padding: 96px 0; background: var(--bg-section); }
.values-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.value-card   { text-align: center; padding: 36px 24px; }
.value-icon   { width: 64px; height: 64px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.8rem; }
.team-section { padding: 96px 0; }
.team-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.team-card    { text-align: center; padding: 32px 20px; }
.team-avatar  { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; border: 3px solid var(--primary-light); }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h4 { margin-bottom: 4px; }
.team-card span { font-size: .85rem; color: var(--text-muted); }

/* ============================================================ UTILITIES ============================================================ */
.text-center { text-align: center; }
.mt-4  { margin-top: 1rem; }
.mb-4  { margin-bottom: 1rem; }
.py-16 { padding: 96px 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
  .hero-content   { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-actions   { justify-content: center; }
  .hero-stats     { justify-content: center; }
  .hero-visual    { display: none; }
  .why-grid       { grid-template-columns: 1fr; }
  .why-visual     { display: none; }
  .about-grid     { grid-template-columns: 1fr; }
  .about-img      { display: none; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .cta-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn-lg { padding: 14px 24px; }
  .card { padding: 24px 18px; }
}
