@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --bg: #0f1217;
  --bg-alt: #171b22;
  --surface: #1f252e;
  --surface-2: #262d38;
  --text: #eef2f7;
  --text-soft: #b3c0cf;
  --primary: #f6b400;
  --primary-strong: #ffcc2e;
  --accent: #3aa6ff;
  --accent-soft: rgba(58, 166, 255, 0.18);
  --border: rgba(238, 242, 247, 0.12);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 26px 60px rgba(0, 0, 0, 0.6);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.35s ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.65;
  background-image: radial-gradient(circle at 10% 10%, rgba(58, 166, 255, 0.2), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(246, 180, 0, 0.18), transparent 40%),
    linear-gradient(180deg, #0f1217, #171b22 100%);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Rajdhani", "IBM Plex Sans Arabic", sans-serif;
  letter-spacing: 0.02em;
}

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

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex: 1;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(15, 18, 23, 0.92);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  padding: 0.9rem 0;
}

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

.brand-logo {
  width: 52px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.nav-link,
.nav-link-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.nav-link:hover,
.nav-link-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  border-color: rgba(246, 180, 0, 0.6);
  color: var(--primary);
  background: rgba(246, 180, 0, 0.12);
}

.nav-item-has-children {
  position: relative;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.nav-submenu-wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.6rem;
  min-width: 560px;
}

.nav-subgroup-title {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
}

.nav-submenu .nav-link {
  display: block;
  width: 100%;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.nav-item-has-children:hover > .nav-submenu,
.nav-item-has-children.open > .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-toggle {
  display: none;
}

.nav-toggle-btn {
  display: none;
  width: 40px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  background: var(--surface);
}

.nav-toggle-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

/* Language */

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.2rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.6;
}

.lang-btn.is-active {
  background: rgba(246, 180, 0, 0.18);
  color: var(--primary);
  opacity: 1;
}

.lang-en .text-ar,
.lang-ar .text-en,
body.lang-en .text-ar,
body.lang-ar .text-en {
  display: none;
}

.lang-en .text-en,
.lang-ar .text-ar,
body.lang-en .text-en,
body.lang-ar .text-ar {
  display: inline;
}

.lang-ar {
  direction: rtl;
}

.lang-ar .header-inner {
  flex-direction: row-reverse;
}

.lang-ar .main-nav {
  margin-right: auto;
  margin-left: 0;
}

.lang-ar .section-title,
.lang-ar .hero,
.lang-ar .about-card,
.lang-ar .service-card,
.lang-ar .solution-body,
.lang-ar .cta-text {
  text-align: right;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform var(--transition-fast), box-shadow var(--transition-med),
    background var(--transition-med), color var(--transition-med), border-color var(--transition-med);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #141821;
  box-shadow: 0 16px 38px rgba(246, 180, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(246, 180, 0, 0.45);
}

.btn-ghost {
  background: #141821;
  color: var(--text);
  border: 2px solid rgba(238, 242, 247, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(58, 166, 255, 0.7);
}

.btn-outline {
  background: rgba(58, 166, 255, 0.16);
  border: 2px solid rgba(58, 166, 255, 0.85);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(58, 166, 255, 0.24);
}

.btn-block {
  width: 100%;
}

/* Sections */

.section {
  padding: 3.4rem 0;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.8rem;
}

.section-title .kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--primary);
}

.kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--primary);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.section-title p {
  margin: 0;
  color: var(--text-soft);
  max-width: 44rem;
}

/* Hero */

.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(58, 166, 255, 0.35), transparent 65%);
  filter: blur(30px);
  opacity: 0.7;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.4rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 3.3vw, 3.4rem);
  margin: 0.6rem 0 1rem;
}

.hero p {
  color: var(--text-soft);
  margin: 0 0 1.2rem;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.hero-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.hero-card-body {
  padding: 1.2rem 1.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.8rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-soft);
}

/* Services */

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

.services-grid--duo {
  grid-template-columns: repeat(2, minmax(280px, 360px));
  justify-content: center;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.service-card h3,
.service-card p {
  margin: 0;
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Stats */

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

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  color: var(--primary);
}

/* Partners */

.partner-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
}

.partner-strip img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(0.2);
}

/* Products */

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

.product-grid--duo {
  grid-template-columns: repeat(2, minmax(280px, 360px));
  justify-content: center;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  box-shadow: var(--shadow-soft);
}

.product-card ul {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: grid;
  gap: 0.4rem;
}

/* Solutions */

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

.solution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.solution-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.solution-body {
  padding: 1.1rem 1.2rem;
}

/* Portfolio */

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

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

/* Resources */

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

.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

/* Contact */

.section-cta {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.8rem;
}

.cta-highlight {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  margin: 0.6rem 0 1.2rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-links a {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.cta-form-wrapper {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
}

input,
select,
textarea {
  font-family: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* Ensure select dropdown options stay readable on dark UI (Windows/Chrome can show light option backgrounds). */
select {
  color-scheme: dark;
}

select option {
  background: var(--surface);
  color: var(--text);
}

select:invalid {
  color: var(--text-soft);
}

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

/* Slider */

.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}

.slider-track {
  display: flex;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
}

.slide img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 18, 23, 0.9);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.slider-prev {
  left: 16px;
}

.slider-next {
  right: 16px;
}

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: none;
}

.dot.is-active {
  width: 20px;
  background: var(--primary);
}

/* Floating CTA */

.floating-cta {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 80;
}

.floating-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #141821;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 16px 36px rgba(246, 180, 0, 0.35);
}

.floating-cta__icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.28);
}

/* Responsive */

@media (max-width: 1024px) {
  .hero-layout,
  .about-grid,
  .cta-inner {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .product-grid,
  .solutions-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-toggle-btn {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    inset: 62px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-med), opacity var(--transition-med);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 1.4rem 1.4rem;
  }

  .nav-link,
  .nav-link-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-submenu,
  .nav-submenu-wide {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    margin-top: 0.35rem;
    padding: 0.4rem;
    grid-template-columns: 1fr;
  }

  .nav-item-has-children .nav-submenu {
    display: none;
  }

  .nav-item-has-children.open > .nav-submenu {
    display: block;
  }

  .nav-toggle:checked ~ .main-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .services-grid,
  .product-grid,
  .solutions-grid,
  .portfolio-grid,
  .stats-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .partner-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slide img {
    height: 260px;
  }
}
