:root {
  --bg: #0b1020;
  --bg-soft: #11182d;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-solid: #141c31;
  --text: #f5f7ff;
  --muted: #9aa4bf;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #6ea8fe;
  --accent-2: #8b5cf6;
  --success: #22c55e;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --container: 1180px;
}

html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-soft: #e9eef8;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.08);
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --success: #16a34a;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(110, 168, 254, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

html[lang="ar"] body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.logo-img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn,
.theme-btn,
.menu-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.25s ease;
  font-weight: 800;
}

.lang-btn:hover,
.theme-btn:hover,
.menu-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.menu-btn {
  display: none;
  position: relative;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  border-radius: 99px;
  transition: 0.25s ease;
}

.links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.links a:not(.btn):not(.social-link) {
  color: var(--muted);
  font-weight: 600;
  transition: 0.25s ease;
}

.links a:not(.btn):not(.social-link):hover {
  color: var(--text);
}

.social-link {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel);
  transition: 0.25s ease;
}

.social-link:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  transition: 0.25s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #fff;
}

.btn.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.95rem;
}

.hero {
  padding: 90px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 700px;
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-num {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(14px);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.mini-form,
#contactForm {
  display: grid;
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.96rem;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 90%, transparent);
  color: var(--text);
  padding: 14px 15px;
  border-radius: 14px;
  outline: none;
  transition: 0.25s ease;
}

.input::placeholder {
  color: var(--muted);
}

.input:focus {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

textarea.input {
  resize: vertical;
  min-height: 120px;
}

.section {
  padding: 78px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.section-head.row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  flex-wrap: wrap;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.checks,
.steps,
.list {
  margin: 16px 0 0;
  padding-left: 18px;
}

html[dir="rtl"] .checks,
html[dir="rtl"] .steps,
html[dir="rtl"] .list {
  padding-right: 18px;
  padding-left: 0;
}

.checks li,
.steps li,
.list li {
  margin-bottom: 8px;
}

.note {
  margin-top: 16px;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters .input {
  min-width: 180px;
}

.service-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.service-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  font-size: 0.82rem;
  font-weight: 800;
}

.badge.subtle {
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
}

.link {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 800;
  color: var(--accent);
}

.link:hover {
  text-decoration: underline;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.price {
  position: relative;
}

.price-top {
  margin-bottom: 18px;
}

.price-num {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--accent);
}

.featured {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-6px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--panel-solid)), var(--panel-solid));
}

.direct {
  display: grid;
  gap: 12px;
}

.direct-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  color: var(--text);
  transition: 0.25s ease;
  cursor: pointer;
}

html[dir="rtl"] .direct-item {
  text-align: right;
}

.direct-item:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.to-top {
  font-weight: 800;
  color: var(--accent);
}

.to-top:hover {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden-card {
  display: none !important;
}

#toast {
  min-height: 20px;
  margin-top: 4px;
  color: var(--success);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .hero-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .featured {
    transform: none;
  }
}

@media (max-width: 860px) {
  .menu-btn {
    display: inline-block;
  }

  .links {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
  }

  .links.open {
    display: flex;
  }

  .links a:not(.social-link) {
    padding: 10px 0;
  }

  .social-link {
    width: 100%;
    height: 44px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 60px;
  }

  .logo-text {
    font-size: 1rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  .card {
    padding: 18px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta {
    flex-direction: column;
  }

  .btn,
  .btn.small {
    width: 100%;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}