:root {
  /* Google Fonts: Manrope */
}
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');
:root {
  --blue: #0e34a0;
  --blue-dark: #062266;
  --text: #0b1220;
  --muted: #5b667a;
  --bg: #f6f8fc;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(6, 34, 102, 0.08);
  --header-bg: rgba(255,255,255,0.85);
  --footer-bg: linear-gradient(180deg, #0f172a, #0b1323);
  --footer-text: #d0d7e2;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Manrope, Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
body.rtl {
  direction: rtl;
  font-family: Tajawal, "Segoe UI", Tahoma, Arial, sans-serif;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #e9eef7;
  box-shadow: 0 10px 24px rgba(6, 34, 102, 0.06);
}
.site-header .container { width: min(1280px, 95%); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d1dae9;
  background: var(--white);
  color: var(--blue-dark);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; color: var(--blue); text-decoration: none; }
.brand-logo { height: 64px; width: auto; border-radius: 10px; box-shadow: var(--shadow); }
.brand-text { line-height: 1; font-size: 18px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; padding: 12px 16px; border-radius: 10px; transition: background .2s ease, color .2s ease; }
.nav a:hover { color: var(--blue-dark); background: rgba(14, 52, 160, 0.08); }
/* Active link style */
.nav a.active { color: #fff; background: var(--blue); box-shadow: var(--shadow); }
.actions { display: flex; gap: 8px; }
.lang { border: 1px solid #d1dae9; background: var(--white); color: var(--text); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.lang.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(1200px 500px at 10% -10%, #bcd1ff 0%, transparent 60%), linear-gradient(180deg, #eaf0ff, #ffffff);
  z-index: -2;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 72px 0 48px;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; color: var(--blue-dark); }
.hero .subtitle { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.cta { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--blue); border: 1px solid #cfe0ff; }
.hero-image img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }

/* Sections */
.section { padding: 64px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 28px; color: var(--blue-dark); }
.section-head .lead { margin: 10px auto 0; color: var(--muted); max-width: 700px; }

/* Stats (Business metrics) */
.stats-section {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, #0d2ca7 0%, #0b1e74 50%, #071548 100%);
  overflow: hidden;
  isolation: isolate;
}
.stats-section::before {
  content: "";
  position: absolute; inset: -12% -8% -18% -8%;
  background:
    radial-gradient(1200px 520px at 18% -20%, rgba(255,255,255,0.14) 0%, transparent 60%),
    radial-gradient(900px 420px at 82% 120%, rgba(94,136,255,0.18) 0%, transparent 70%),
    radial-gradient(700px 320px at 0% 100%, rgba(255,255,255,0.10) 0%, transparent 60%);
  filter: blur(2px);
  animation: statsBlobShift 14s ease-in-out infinite;
  pointer-events: none;
}
.stats-section::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 30%),
    radial-gradient(420px 140px at 50% 0%, rgba(255,255,255,0.22), transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes statsBlobShift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(0, -10px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.stats-head h2 { color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stat {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(6, 34, 102, 0.15);
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.stat:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(6, 34, 102, 0.22);
  transform: translateY(-4px);
}
.stat-value { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: 0.5px; }
.stat-label { margin-top: 8px; color: #cfe0ff; font-weight: 700; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.grid { display: grid; gap: 18px; }
.features { grid-template-columns: repeat(3, 1fr); }
.services { grid-template-columns: repeat(3, 1fr); }
.gallery { grid-template-columns: repeat(3, 1fr); }
.logos { grid-template-columns: repeat(4, 1fr); align-items: center; justify-items: center; }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; color: var(--blue); }
.card p { margin: 0; color: var(--muted); }
.card ul { margin: 8px 0 0; padding-inline-start: 18px; color: var(--muted); }
.card ul li { margin: 6px 0; }

.thumb img { width: 100%; display: block; border-radius: 16px; box-shadow: var(--shadow); }
.project { position: relative; height: 380px; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; background-size: cover; background-position: center; transform: translateZ(0); transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.project::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.28) 60%, rgba(0,0,0,0.55)); }
.project figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.project-title { margin: 0; font-weight: 700; font-size: clamp(16px, 3vw, 22px); }
.project-subtitle { margin: 4px 0 0; opacity: 0.9; font-size: 14px; }
.project:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(14,52,160,0.18); filter: saturate(1.05); }
.project:hover::before { background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.22) 55%, rgba(0,0,0,0.50)); }
.logo img { max-width: 160px; max-height: 70px; width: 100%; height: auto; object-fit: contain; background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }

/* Carousel (Gallery) */
.carousel { position: relative; }
.slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.slides::-webkit-scrollbar { display: none; }
.slides { scrollbar-width: none; }
.slide { scroll-snap-align: center; }
.slide img { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius); display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.85); color: var(--blue-dark);
  border: 1px solid #d1dae9; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 999px; background: #cfe0ff; }
.carousel-dot.active { background: var(--blue); }

/* Clients Slider */
.clients-carousel { position: relative; }
.client-slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.client-slides::-webkit-scrollbar { display: none; }
.client-slides { scrollbar-width: none; }
.client-slide { scroll-snap-align: center; padding: 8px 0; }
.client-slide .logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: center; justify-items: center; }
.client-slide .logo img { max-width: 160px; max-height: 70px; width: 100%; height: auto; object-fit: contain; background: #fff; border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .client-slide .logos { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .client-slide .logos { grid-template-columns: repeat(2, 1fr); }
}

/* Promo typing bar (before footer) */
.promo-bar {
  background: #ffffff;
  color: #000000;
  padding: 18px 0;
}
.promo-text {
  text-align: center;
  font-size: clamp(16px, 3vw, 22px);
  line-height: 1.8;
}
.promo-static { opacity: 1; color: #000000; }
.promo-dynamic { color: var(--blue); font-weight: 700; position: relative; }
.promo-dynamic::after { content: '|'; margin-left: 2px; color: var(--blue); animation: caretBlink 1s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* Contact */
.contact { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.contact-card h3 { margin: 0 0 12px; color: var(--blue-dark); }
.contact-card ul { list-style: none; padding: 0; margin: 0; }
.contact-card li { margin: 8px 0; color: var(--muted); }
.contact-card a { color: var(--blue); text-decoration: none; }
/* Ensure primary button text stays visible on blue background */
.contact-card .btn-primary { color: #fff; }
/* Contact map */
.contact-map { margin-top: 16px; }
.contact-map h3 { margin: 0 0 10px; color: var(--blue-dark); }
.contact-map iframe { width: 100%; height: 400px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Page Embed */
.page-embed { padding: 28px 0; }
.page-embed .lead { color: var(--muted); }
.page-embed .embed-wrapper { background: #f7f9fc; border: 1px solid #e5eaf2; border-radius: var(--radius); overflow: hidden; }
.page-embed iframe.embed { width: 100%; height: 70vh; min-height: 420px; border: 0; display: block; }

/* Footer */
.site-footer { border-top: 1px solid #e3e8f3; background: var(--footer-bg); color: var(--footer-text); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 24px 0; flex-wrap: wrap; gap: 12px; }
.footer-inner .links { display: flex; gap: 10px; }
.footer-inner a { color: var(--footer-text); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: background .2s ease, color .2s ease; }
.footer-inner a:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Floating actions */
.fab-group { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.fab { display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 999px; box-shadow: var(--shadow); color: #fff; text-decoration: none; font-weight: 700; border: 1px solid rgba(0,0,0,0.06); }
.fab.back-to-top { background: var(--blue-dark); }
.fab.whatsapp { background: #25D366; }
.fab.whatsapp::before { content: ""; width: 20px; height: 20px; display: inline-block; background-repeat: no-repeat; background-position: center; background-size: contain; background-image: url('https://cdn.simpleicons.org/whatsapp/FFFFFF'); }
.fab.hidden { opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.fab .label { display: inline-block; }

/* RTL tweaks */
body.rtl .nav { flex-direction: row-reverse; }
body.rtl .header-inner { direction: rtl; }
body.rtl .hero-inner { direction: rtl; }
body.rtl .contact { direction: rtl; }
body.rtl .brand { flex-direction: row-reverse; }

/* Responsive */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; height: auto; gap: 8px; padding: 10px 0; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid #e9eef7; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .actions { order: 3; }
  .hero-inner { grid-template-columns: 1fr; }
  .features, .services, .gallery, .logos { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
  .slide img { height: 340px; }
  .contact-map iframe { height: 320px; }
  .page-embed iframe.embed { height: 60vh; min-height: 360px; }
  .brand-logo { height: 48px; }
}
@media (max-width: 600px) {
  .features, .services, .gallery, .logos { grid-template-columns: 1fr; }
  .slide img { height: 280px; }
  .contact-map iframe { height: 260px; }
  .page-embed iframe.embed { height: 55vh; min-height: 320px; }
  .brand-logo { height: 40px; }
}

/* Services page modern styles */
.hero.hero-services {
  position: relative;
  padding: 72px 0;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25)), url('../newimg/services.jpg');
  background-size: cover;
  background-position: center;
}
.hero.hero-services .hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero.hero-services .hero-text {
  text-align: center;
  max-width: 900px;
}
.hero.hero-services h1 {
  font-size: 2.2rem;
  margin: 0 0 8px;
}
.hero.hero-services .subtitle {
  font-size: 1.05rem;
  opacity: 0.95;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  position: relative;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.service-cover {
  position: relative;
  height: 230px;
  background-size: cover;
  background-position: center;
  transition: transform .5s ease;
}
.service-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
}
.service-title {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  z-index: 1;
}
.service-card:hover .service-cover { transform: scale(1.05); }

.service-content { padding: 16px 16px 18px; }
.service-content .service-list { margin: 8px 0; }
.service-content .service-list li { line-height: 1.55; }

/* Emphasis helper: hola */
.hola {
  color: #ffffff !important;
  font-weight: 800 !important;
}

/* Store cards */
.product-card .thumb {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface, #fff);
}
.product-card .product-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.product-card .title {
  margin: 10px 0 6px;
}
.product-card .desc {
  color: var(--muted);
  font-size: 0.95rem;
}
.store-error {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Brand cards: modern look, unified image sizes, animated link icon */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; align-items: stretch; }
.brand-card { position: relative; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.35)); backdrop-filter: blur(6px); border: 1px solid rgba(160,160,160,0.4); box-shadow: 0 8px 24px rgba(0,0,0,0.08); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.brand-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 12px 30px rgba(0,0,0,0.12); border-color: rgba(120,120,120,0.5); }
.brand-content { display: block; text-decoration: none; color: inherit; }
.brand-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: #f5f7fa; }
.brand-title { margin: 10px 0 0; text-align: center; font-size: .95rem; font-weight: 600; color: #222; }
.brand-link { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #4f46e5, #06b6d4); color: #fff; box-shadow: 0 6px 14px rgba(79,70,229,.35); transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; animation: floatPulse 3s ease-in-out infinite; }
.brand-link:hover { transform: scale(1.08) rotate(3deg); box-shadow: 0 10px 22px rgba(6,182,212,.35); }
.brand-link svg { width: 20px; height: 20px; }
@keyframes floatPulse { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.06); } 100% { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .brand-link { animation: none; } }