/* =========================
   Global
========================= */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #333;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html[dir="rtl"] header { direction: rtl; }
html[dir="rtl"] .lang-menu { flex-direction: row-reverse; }
html[dir="rtl"] #mainTitleArea,
html[dir="rtl"] footer { text-align: right; }

html[dir="rtl"] .nav-links {
  flex-direction: row;
  direction: rtl;
}

/* =========================
   Fonts
========================= */
@font-face {
  font-family: 'Cairo';
  src: url('/static/fonts/Cairo-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('/static/fonts/Cairo-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cairo';
  src: url('/static/fonts/Cairo-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =========================
   Header
========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.logo img { width: 170px; height: 55px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  padding: 0;
  margin: 0;
}

.nav-links li {
  font-weight: 700;
  font-size: 14px;
  position: relative;
}

.nav-links li a {
  text-decoration: none;
  color: #333;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

.nav-links li a:hover {
  background-color: #d4af3710;
  color: #d4af37;
}

.nav-links li.current a { color: #d4af37; }

.lang-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 10px;
  font-size: 13px;
  padding: 0;
  margin: 0;
}

.lang-menu a {
  text-decoration: none;
  color: #333;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #eee;
  transition: 0.2s;
  display: inline-block;
  font-weight: 700;
}
.lang-menu a:hover {
  background: #d4af3710;
  color: #d4af37;
  border-color: #d4af3710;
}
.lang-menu a.active {
  color: #d4af37;
  border-color: #d4af37;
}

.menu-toggle { display: none; font-size: 24px; cursor: pointer; }

/* spacer for fixed header */
body::before { content: ''; display: block; height: 80px; }

/* =========================
   Main Title Area
========================= */
#mainTitleArea {
  text-align: center;
  /* Extra top room so the mascot never touches the fixed header. */
  padding: 130px 20px 48px;
  max-width: 760px;
  margin: 0 auto;
}
#mainTitleArea h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
}
#mainTitleArea .subTxt {
  font-size: 18px;
  color: #555;
  line-height: 1.6;
}

/* =========================
   Promo (Final like screenshot)
========================= */
.promo-section {
  padding: 100px 20px 80px;
  background-color: #fff;
}

/* ✅ Desktop: two columns, no wrap, bigger gap */
.promo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: auto;
  gap: 56px;
  position: relative;
  flex-wrap: nowrap; /* مهم */
}

/* Text */
.promo-text {
  flex: 1;
  min-width: 320px;
  max-width: 520px;
}
.promo-text h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #222;
}
.promo-text h3 {
  font-size: 20px;
  color: #d4af37;
  margin-bottom: 20px;
}
.promo-text p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.promo-icon img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.store-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.store-buttons img { height: 45px; cursor: pointer; transition: transform 0.3s ease; }
.store-buttons img:hover { transform: scale(1.05); }

/* Image */
.promo-image {
  flex: 1;
  min-width: 360px;
  max-width: 680px;
  text-align: center;
}
.promo-image img {
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
}

/* ✅ Divider: dots + dashed line (like screenshot) */
.promo-divider{
  flex: 0 0 70px;          /* مساحة للخط */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 420px;           /* عدّلها حسب ارتفاع الصورة */
  position: relative;
}

.promo-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #cfcfcf;
  background: #fff;
  display: inline-block;
}

.promo-dotline{
  width: 2px;
  flex: 1;
  margin: 12px 0;
  background: repeating-linear-gradient(
    to bottom,
    #cfcfcf,
    #cfcfcf 6px,
    transparent 6px,
    transparent 14px
  );
  border-radius: 2px;
}

/* ✅ RTL: اقلب ترتيب السكشن */
html[dir="rtl"] .promo-container{
  flex-direction: row-reverse;
}

.promo-section-alt {
  padding-top: 24px;
}

/* Second promo: exact visual reverse of the first section.
   Screenshots stay on the LEFT and text/logos stay on the RIGHT. */
.promo-container.is-reversed {
  flex-direction: row;
}

.promo-container.is-reversed .promo-image {
  order: 1;
}

.promo-container.is-reversed .promo-divider {
  order: 2;
}

.promo-container.is-reversed .promo-text {
  order: 3;
}

/* Arabic mirrors the English layout for the second promo:
   text/logos move to the LEFT, screenshots move to the RIGHT. */
html[dir="rtl"] .promo-container.is-reversed {
  flex-direction: row;
}

html[dir="rtl"] .promo-container.is-reversed .promo-text {
  order: 1;
}

html[dir="rtl"] .promo-container.is-reversed .promo-divider {
  order: 2;
}

html[dir="rtl"] .promo-container.is-reversed .promo-image {
  order: 3;
}

/* Connect the two promo timelines with one continuous dashed thread.
   80px bottom padding of the first section + 24px top padding of the second = 104px. */
.promo-section-alt .promo-divider::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -104px;
  width: 2px;
  height: 104px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    #cfcfcf,
    #cfcfcf 6px,
    transparent 6px,
    transparent 14px
  );
  border-radius: 2px;
  z-index: 0;
}

.promo-section-alt .promo-divider > * {
  position: relative;
  z-index: 1;
}

/* =========================
   Messenger
========================= */
.messenger-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #f7f7f7;
}
.messenger-section h2 { font-size: 36px; margin-bottom: 10px; }
.messenger-section p {
  font-size: 16px;
  color: #666;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 60px 40px;
  max-width: 1200px;
  margin: auto;
  box-sizing: border-box;
}

.feature { text-align: center; padding: 10px; }
.feature img { width: 350px; height: auto; margin-bottom: 0; max-width: 100%; }
.feature h4 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.feature h5 { font-size: 16px; font-weight: 400; margin-bottom: 8px; color: #888; }
.feature p { font-size: 14px; line-height: 1.6; color: #555; margin: 0 auto; max-width: 300px; }

/* =========================
   Footer
========================= */
.site-footer {
  background-color: #f9f9f9;
  padding: 40px 20px;
  margin-top: 60px;
  border-top: 1px solid #eee;
}

.footer-wrap {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-col { flex: 1; min-width: 200px; }
.footer-logo { width: 100px; margin-bottom: 10px; }
.footer-rights { color: #777; font-size: 14px; }

.footer-stores { display: flex; gap: 12px; }
.footer-stores img { height: 40px; }

.footer-links { list-style: none; padding: 0; margin: 0; color: #555; font-size: 14px; }
.footer-links a { text-decoration: none; color: #555; }

.footer-social { display: flex; gap: 16px; font-size: 22px; }
.footer-social a { color: #d4af37; text-decoration: none; }

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  header { z-index: 9999; }
  .menu-toggle { z-index: 10001; position: relative; }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #fff;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    padding: 20px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
    z-index: 10000;
  }

  html[dir="rtl"] .nav-links {
    flex-direction: column;
    direction: rtl;
    text-align: right;
    left: 0;
    right: 0;
    width: 100%;
  }

  .nav-links.active { display: flex; }
  .menu-toggle { display: block; }

  /* Promo mobile */
  .promo-container {
    flex-direction: column;
    flex-wrap: wrap;
  }
  .promo-container.is-reversed {
    flex-direction: column;
  }
  .promo-container.is-reversed .promo-text { order: 1; }
  .promo-container.is-reversed .promo-image { order: 2; }
  .promo-container.is-reversed .promo-divider { order: 3; }
  .promo-divider { display: none; }
  .promo-text, .promo-image { max-width: 100%; text-align: center; }
  .promo-image { min-width: unset; max-width: 100%; }

  /* Features */
  .feature img { width: 180px; }
  .feature h4 { font-size: 18px; }
  .feature h5 { font-size: 15px; }
  .feature p { font-size: 13px; }
}

/* =========================
   Soon Badge (language-based)
========================= */
.soon-link {
  position: relative;
  display: inline-block;
  color: #999;
  pointer-events: none;
  text-decoration: none;
}

html[lang="ar"] .soon-link::after {
  content: "قريبًا";
  position: absolute;
  top: -10px;
  right: -5px;
  background: orange;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 6px;
}

html[lang="en"] .soon-link::after {
  content: "Soon";
  position: absolute;
  top: -10px;
  right: -5px;
  background: orange;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 6px;
}

.elite-feature{ position:relative; }

.elite-badge{
  position:absolute;
  top:12px;
  inset-inline-end:12px; /* يشتغل RTL/LTR */
  background:#d4af37;
  color:#111;
  font-weight:800;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  box-shadow:0 6px 14px rgba(0,0,0,0.10);
  z-index:2;
  line-height:1;
  user-select:none;
}

.elite-section{
  padding: 40px 16px;
  background: #fff;
}

.elite-head{
  text-align: center;
  margin-bottom: 18px;
}

.elite-head h2{
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
}

.elite-head p{
  margin: 0;
  opacity: .85;
}

.elite-grid{
  margin-top: 18px;
}

.elite-feature{
  position: relative;
  border: 1px solid #f0f0f0;
}

.elite-badge{
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: #d4af37;
  color: #111;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.silver-elite-badge{
  background:#e8eef7;
  color:#1f3a5f;
  border:1px solid #c7d2e5;
}

/* =====================================================
   Lexo Office mascot — rises from BEHIND the title only
   ===================================================== */
.lexo-title-stage {
  position: relative;
  display: inline-block;
  isolation: isolate;
  overflow: visible;
  margin: 0 auto 16px;
}

#mainTitleArea .lexo-title-stage h2 {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 2px 10px 4px;
  background: #fff;
  line-height: 1.2;
}

/*
 * This fixed clipping window is the key: its bottom edge sits exactly at the
 * top edge of the title. The mascot can move only ABOVE that line, so while
 * going down it disappears behind “Lexo Office” and can never show underneath.
 */
.lexo-mascot-window {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(100% - 3px);
  width: 230px;
  height: 150px;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
}

.lexo-mascot {
  position: absolute;
  left: 50%;
  bottom: -112px;
  width: 116px;
  height: 104px;
  pointer-events: none;
  transform: translate3d(-50%, 8px, 0) rotate(3deg) scale(.92);
  transform-origin: 50% 100%;
  animation: lexoMascotPeek 12s cubic-bezier(.22,.72,.2,1) 1.15s infinite;
  will-change: transform;
}

.lexo-mascot-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 7px 8px rgba(26, 35, 55, .08));
}

.lexo-cat-fill { fill: #fbfbfb; }
.lexo-cat-gray { fill: #aeb4bc; }
.lexo-ear-inner { fill: #d6d9de; }
.lexo-bandana { fill: #d9b54a; }
.lexo-face-ink { fill: #1f232b; }
.lexo-cat-stroke,
.lexo-face-line {
  stroke: #1f232b;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lexo-cat-stroke { stroke-width: 5.2; }
.lexo-face-line { fill: none; stroke-width: 4; }

.lexo-wave-paw {
  transform-box: fill-box;
  transform-origin: 20% 84%;
  animation: lexoMascotWave 12s ease-in-out 1.15s infinite;
}

.lexo-mascot-bubble {
  position: absolute;
  z-index: 5;
  top: -12px;
  right: -40px;
  padding: 7px 12px;
  border: 1px solid rgba(25, 31, 43, .08);
  border-radius: 15px 15px 15px 4px;
  background: rgba(255, 255, 255, .98);
  color: #252a33;
  box-shadow: 0 8px 24px rgba(22, 29, 42, .09);
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px) scale(.92);
  animation: lexoMascotBubble 12s ease 1.15s infinite;
  transform-origin: 18% 100%;
}

.lexo-mascot-bubble::after {
  content: '';
  position: absolute;
  left: 12px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-right: 1px solid rgba(25, 31, 43, .08);
  border-bottom: 1px solid rgba(25, 31, 43, .08);
  transform: rotate(45deg);
}

/* No opacity fade on the cat itself: it physically rises out of / sinks behind the title. */
@keyframes lexoMascotPeek {
  0%, 7% {
    transform: translate3d(-50%, 8px, 0) rotate(3deg) scale(.92);
  }
  18%, 48% {
    transform: translate3d(-50%, -101px, 0) rotate(-2deg) scale(1);
  }
  28% {
    transform: translate3d(-50%, -104px, 0) rotate(2deg) scale(1);
  }
  54% {
    transform: translate3d(-50%, -98px, 0) rotate(1deg) scale(.98);
  }
  64%, 100% {
    transform: translate3d(-50%, 8px, 0) rotate(3deg) scale(.92);
  }
}

@keyframes lexoMascotWave {
  0%, 16%, 43%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-18deg); }
  24% { transform: rotate(9deg); }
  28% { transform: rotate(-20deg); }
  32% { transform: rotate(8deg); }
  36% { transform: rotate(-14deg); }
  40% { transform: rotate(0deg); }
}

@keyframes lexoMascotBubble {
  0%, 18% {
    opacity: 0;
    transform: translateY(6px) scale(.92);
  }
  23%, 43% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  49%, 100% {
    opacity: 0;
    transform: translateY(4px) scale(.96);
  }
}

html[dir="rtl"] .lexo-mascot-bubble {
  font-family: 'Cairo', sans-serif;
}

@media (max-width: 768px) {
  #mainTitleArea {
    padding-top: 92px;
  }

  .lexo-mascot-window {
    width: 200px;
    height: 132px;
    bottom: calc(100% - 2px);
  }

  .lexo-mascot {
    width: 92px;
    height: 83px;
    bottom: -94px;
  }

  .lexo-mascot-bubble {
    top: -15px;
    right: -35px;
    padding: 6px 10px;
    font-size: 10px;
  }

  @keyframes lexoMascotPeek {
    0%, 7% { transform: translate3d(-50%, 8px, 0) rotate(3deg) scale(.92); }
    18%, 48% { transform: translate3d(-50%, -84px, 0) rotate(-2deg) scale(1); }
    28% { transform: translate3d(-50%, -87px, 0) rotate(2deg) scale(1); }
    54% { transform: translate3d(-50%, -81px, 0) rotate(1deg) scale(.98); }
    64%, 100% { transform: translate3d(-50%, 8px, 0) rotate(3deg) scale(.92); }
  }
}

@media (max-width: 430px) {
  #mainTitleArea .lexo-title-stage h2 {
    font-size: 34px;
  }

  .lexo-mascot-window {
    width: 180px;
    height: 116px;
  }

  .lexo-mascot {
    width: 78px;
    height: 71px;
    bottom: -81px;
  }

  .lexo-mascot-bubble {
    right: -28px;
    top: -17px;
    font-size: 9px;
    padding: 5px 8px;
  }

  @keyframes lexoMascotPeek {
    0%, 7% { transform: translate3d(-50%, 7px, 0) rotate(3deg) scale(.92); }
    18%, 48% { transform: translate3d(-50%, -73px, 0) rotate(-2deg) scale(1); }
    28% { transform: translate3d(-50%, -76px, 0) rotate(2deg) scale(1); }
    54% { transform: translate3d(-50%, -70px, 0) rotate(1deg) scale(.98); }
    64%, 100% { transform: translate3d(-50%, 7px, 0) rotate(3deg) scale(.92); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .lexo-mascot,
  .lexo-wave-paw,
  .lexo-mascot-bubble {
    animation: none !important;
  }
  .lexo-mascot { transform: translate3d(-50%, 8px, 0) !important; }
  .lexo-mascot-bubble { opacity: 0 !important; }
}

