:root {
  --primary: #0b9f4a;       /* الأخضر */
  --primary-soft: #e6f6ec;
  --accent: #b48c2c;        /* الذهبي */
  --text-main: #163020;
  --text-muted: #6b7280;
  --bg: #f7faf9;
  --card-bg: #ffffff;
  --border-soft: rgba(148, 163, 184, 0.35);
  --radius-xl: 1.5rem;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --transition: 0.25s ease;
}

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

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Cairo", sans-serif;
  background: radial-gradient(circle at top left, #e0f5e9 0, #f9fafb 40%, #ffffff 100%);
  color: var(--text-main);
  line-height: 1.7;
}

/* لتغيير الاتجاه حسب اللغة (نفعّله من JS) */
body.lang-ar {
  direction: rtl;
  text-align: right;
}

body.lang-en {
  direction: ltr;
  text-align: left;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ========== HEADER / NAVBAR ========== */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #ffffff, #0b9f4a);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(11, 159, 74, 0.4);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #374151;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 159, 74, 0.25);
  background: linear-gradient(135deg, #0b9f4a, #1f7a3a);
  font-size: 0.86rem;
  cursor: pointer;
  color: #ffffff;
  box-shadow: 0 12px 35px rgba(11, 159, 74, 0.5);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(11, 159, 74, 0.6);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.1rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.lang-switch button {
  border: none;
  background: transparent;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lang-switch button.active {
  background: var(--primary);
  color: #ffffff;
}

/* ========== HERO ========== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.8fr);
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.hero-text-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.hero-title {
  font-size: 2.2rem;
  line-height: 1.3;
  margin: 0.75rem 0;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
  align-items: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0b7d3a);
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(11, 159, 74, 0.5);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(11, 159, 74, 0.55);
}

.btn-ghost {
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  cursor: pointer;
  color: #111827;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition), border-color var(--transition);
}

.btn-ghost:hover {
  background: #ffffff;
  border-color: var(--primary);
}

.hero-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-meta strong {
  color: var(--primary);
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: radial-gradient(circle at top left, #e8f8ef, #ffffff);
  border-radius: 2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(209, 213, 219, 0.7);
}

.hero-badge {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(11, 159, 74, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
}

.hero-image-main {
  border-radius: 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(156, 163, 175, 0.5);
}

.hero-image-main img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-strip {
  margin-top: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
}

/* ========== GENERIC SECTIONS ========== */

.section {
  margin-top: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-kicker {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 32rem;
}

/* خدمات / كروت */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}

.card-tag {
  font-size: 0.77rem;
  color: var(--primary);
  background: var(--primary-soft);
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* لماذا نحن */

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.badge-soft {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4b5563;
}

/* أرقام / إحصاءات */

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.stat {
  min-width: 130px;
}

.stat-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* المشاريع */

.grid-2-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.project-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-image {
  height: 160px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  padding: 0.95rem 1.1rem 1.1rem;
}

.project-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* فورم التواصل */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: flex-start;
}

.form-card {
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.form-row {
  display: flex;
  gap: 0.9rem;
}

.form-group {
  margin-bottom: 0.9rem;
  width: 100%;
}

label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  color: #374151;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
  background: #f9fafb;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(11, 159, 74, 0.25);
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  font-size: 0.9rem;
}

.contact-list {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.contact-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* FOOTER */

.footer {
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .grid-3,
  .grid-2-3,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .form-row {
    flex-direction: column;
  }
}
