/* ============ المتغيرات ============ */
:root {
  --primary: #0f3d5e;      /* كحلي */
  --primary-2: #145a87;
  --accent: #f2a516;       /* ذهبي/برتقالي */
  --text: #1f2a37;
  --muted: #5b6776;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 61, 94, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', 'Tajawal', sans-serif; color: var(--text); background: var(--bg); line-height: 1.8; }
a { color: inherit; text-decoration: none; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* Arabic font + slightly larger line height in RTL */
html[lang="ar"] body { font-family: 'Tajawal', sans-serif; }
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] .hero h1 { letter-spacing: -.5px; }

/* ============ Buttons ============ */
.btn { display: inline-block; background: var(--accent); color: #1a1a1a; font-weight: 700;
  padding: 12px 26px; border-radius: 50px; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(242, 165, 22, .35); }
.btn-sm { padding: 6px 18px; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-wa { background: #25d366; color: #fff; margin-top: 20px; }

/* ============ الهيدر ============ */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.header.scrolled { background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: #fff; line-height: 1.2; }
.logo small { display: block; font-size: .75rem; font-weight: 500; opacity: .8; }
.logo-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px;
  background: var(--accent); color: var(--primary); font-size: 1.4rem; }
.links { display: flex; align-items: center; gap: 26px; color: #fff; font-weight: 500; }
.links a:not(.btn):hover { color: var(--accent); }
.header.scrolled .logo, .header.scrolled .links { color: var(--primary); }
.nav-end { display: flex; align-items: center; gap: 12px; order: 3; }
.lang-switch { padding: 5px 14px; border-radius: 50px; border: 1.5px solid currentColor; color: #fff;
  font-size: .9rem; font-weight: 700; transition: background .2s, color .2s; }
.lang-switch[lang="ar"] { font-family: 'Tajawal', sans-serif; }
.lang-switch[lang="en"] { font-family: 'Inter', sans-serif; }
.lang-switch:hover { background: var(--accent); border-color: var(--accent); color: var(--primary); }
.header.scrolled .lang-switch { color: var(--primary); }
.links { margin-inline-start: auto; margin-inline-end: 24px; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.7rem; color: #fff; cursor: pointer; }
.header.scrolled .menu-btn { color: var(--primary); }

/* ============ الواجهة ============ */
.hero { min-height: 92vh; display: flex; align-items: center; color: #fff; text-align: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(242,165,22,.18), transparent 40%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%); }
.hero-inner { max-width: 780px; padding-top: 72px; }
.badge { display: inline-block; padding: 6px 16px; border-radius: 50px; background: rgba(255,255,255,.12);
  font-size: .9rem; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.35; font-weight: 800; margin-bottom: 18px; }
.hero p { font-size: 1.15rem; opacity: .92; margin-bottom: 32px; }
.hero strong { color: var(--accent); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ الأقسام ============ */
.section { padding: 90px 0; }
.section.alt { background: var(--bg-alt); }
.title { font-size: 2rem; color: var(--primary); margin-bottom: 14px; position: relative; padding-bottom: 10px; }
.title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 60px; height: 4px; border-radius: 4px; background: var(--accent); }
.title.center { text-align: center; }
.title.center::after { inset-inline-start: auto; left: 50%; transform: translateX(-50%); }
.subtitle { text-align: center; color: var(--muted); margin-bottom: 46px; }

/* من نحن */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: start; }
.about p { color: var(--muted); margin-bottom: 14px; }
.vm { display: grid; gap: 16px; }
.vm-card { background: var(--bg-alt); border-inline-start: 4px solid var(--accent); padding: 18px 22px; border-radius: var(--radius); }
.vm-card h3 { color: var(--primary); margin-bottom: 4px; }
.vm-card p { margin: 0; }

/* البطاقات */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); transition: transform .25s; }
.card:hover { transform: translateY(-6px); }
.card.featured { border-top: 4px solid var(--accent); }
.icon { font-size: 2.2rem; width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--bg-alt); border-radius: 16px; margin-bottom: 16px; }
.card h3 { color: var(--primary); margin-bottom: 12px; }
.card ul { list-style: none; color: var(--muted); }
.card li { padding: 4px 0; padding-inline-start: 20px; position: relative; }
.card li::before { content: "•"; color: var(--accent); position: absolute; inset-inline-start: 0; font-weight: 800; }

/* المميزات */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { text-align: center; padding: 26px 18px; border: 1px solid #e6ebf0; border-radius: var(--radius); }
.feature span { font-size: 1.8rem; }
.feature h4 { color: var(--primary); margin: 8px 0 4px; font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: .95rem; }

/* الخطوات */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { background: #fff; padding: 28px 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.steps b { width: 46px; height: 46px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 1.2rem; }
.steps h4 { color: var(--primary); }
.steps p { color: var(--muted); font-size: .95rem; }

/* التواصل */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
.contact-info p { color: var(--muted); margin-bottom: 20px; }
.contact-info ul { list-style: none; display: grid; gap: 12px; }
.contact-info li { display: flex; gap: 10px; align-items: center; }
.contact-info a:hover { color: var(--primary-2); }
.form { background: var(--bg-alt); padding: 30px; border-radius: var(--radius); display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
.form input, .form select, .form textarea { font: inherit; padding: 11px 14px; border: 1px solid #d5dde5;
  border-radius: 10px; background: #fff; outline: none; transition: border-color .2s; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary-2); }
.form .btn { justify-self: start; }
.hp { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.alert { padding: 12px 16px; border-radius: 10px; font-weight: 500; }
.alert.ok { background: #e3f7ea; color: #17663a; }
.alert.err { background: #fde8e8; color: #9b1c1c; }

/* الفوتر */
.footer { background: var(--primary); color: rgba(255,255,255,.85); text-align: center; padding: 28px 0; font-size: .95rem; }

.to-top { position: fixed; inset-inline-end: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; display: grid;
  place-items: center; background: var(--accent); color: var(--primary); font-weight: 800;
  opacity: 0; pointer-events: none; transition: opacity .3s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* حركة الظهور */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ الجوال ============ */
@media (max-width: 900px) {
  .cards, .features, .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .links { margin: 0; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; gap: 0; background: #fff;
    color: var(--primary); box-shadow: var(--shadow); max-height: 0; overflow: hidden; transition: max-height .3s; }
  .links.open { max-height: 400px; }
  .links a { padding: 14px; width: 100%; text-align: center; }
  .links .btn { width: auto; margin: 10px 0 16px; }
  .cards, .features, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
