/* ==========================================================================
   مساند - Masaned Landing Page
   Custom styles on top of Bootstrap 5 (RTL/LTR bilingual)
   ========================================================================== */

:root {
  --primary: #2065BD;
  --primary-dark: #1B57A6;
  --primary-darker: #123C8C;
  --footer-bg: #103B8E;
  --green: #42B72B;
  --green-dark: #38a124;
  --gold: #F5B921;
  --heading: #1F2A44;
  --text: #5A6478;
  --muted: #8A93A6;
  --bg-light: #F8F9FB;
  --border: #ECEEF2;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(31, 42, 68, 0.06);
  --shadow-md: 0 16px 40px rgba(31, 42, 68, 0.10);
  --radius: 14px;
  --font: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  margin: 0;
  line-height: 1.9;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 800; }
a { text-decoration: none; }
img { max-width: 100%; height: auto; }
.text-primary-blue { color: var(--primary) !important; }
.text-green { color: var(--green) !important; }

/* ---------- Buttons ---------- */
.btn {
  font-weight: 700;
  border-radius: 8px;
  padding: 0.65rem 1.6rem;
  transition: all .2s ease;
}
.btn-green {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
}
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-blue {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}
.btn-blue:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline-green {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-outline-green:hover { background: var(--green); color: #fff; }
.btn-outline-blue {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline-blue:hover { background: var(--primary); color: #fff; }

/* ---------- Navbar ---------- */
.navbar {
  background: #fff;
  padding: 0.5rem 0;
  box-shadow: 0 2px 14px rgba(31, 42, 68, 0.05);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar .brand-logo { font-size: 1.9rem; font-weight: 900; color: var(--gold); letter-spacing: 1px; line-height: 1; }
.navbar .brand-sub { font-size: .62rem; color: var(--muted); display: block; font-weight: 600; }
.navbar .navbar-brand { display: flex; flex-direction: column; align-items: flex-end; }
.navbar .nav-link {
  color: var(--heading);
  font-weight: 700;
  font-size: .98rem;
  padding: .5rem 1rem !important;
  position: relative;
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary); }
.navbar .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1rem; right: 1rem;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

/* language + user controls */
.lang-switch {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .7rem;
  background: #fff;
  color: var(--heading);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.lang-switch .flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; }
.user-btn {
  width: 46px; height: 46px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.menu-bars { color: var(--primary); font-size: 1.4rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-start: 0;
  width: 32%;
  background: var(--primary);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { padding: 3.5rem 0; }
.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1.4rem;
}
.hero p.lead-text {
  color: var(--text);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-img-wrap { text-align: center; padding: 2rem 0; position: relative; z-index: 2; }

/* hero badges */
.hero-badges { margin-top: 3rem; }
.badge-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1rem;
  text-align: center;
  height: 100%;
}
.badge-card .badge-ico {
  width: 64px; height: 64px;
  margin: 0 auto .9rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
}
.badge-card .free-circle {
  width: 64px; height: 64px; margin: 0 auto .9rem;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.badge-card span.t { font-weight: 800; color: var(--heading); display: block; }

/* hero side dots */
.hero-dots {
  position: absolute;
  inset-inline-end: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
  z-index: 3;
}
.hero-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); }
.hero-dots span.active { background: var(--gold); width: 12px; height: 12px; }

/* social floating */
.hero-social {
  position: absolute;
  inset-inline-end: 30px;
  bottom: 18px;
  display: flex; gap: 12px;
  z-index: 3;
}
.hero-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.hero-social a:hover { background: #fff; color: var(--primary); }

/* ---------- Section common ---------- */
.section { padding: 5rem 0; }
.section-eyebrow {
  color: var(--primary);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: .6rem;
}
.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 1rem;
}
.section-sub { color: var(--text); font-weight: 700; font-size: 1.05rem; }

/* dotted bg */
.dotted-bg {
  background-image: radial-gradient(var(--border) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
}

/* ---------- Apps cards ---------- */
.apps-section { background: var(--bg-light); position: relative; }
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 1.6rem;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-card .svc-ico {
  width: 78px; height: 78px;
  margin: 0 auto 1.3rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--primary);
}
.service-card h4 { font-size: 1.25rem; margin-bottom: .9rem; }
.service-card p { font-size: .95rem; margin-bottom: 1.5rem; }

/* bracket frame around cards (thick, rounded outer corner) */
.cards-frame { position: relative; }
.cards-frame::before, .cards-frame::after {
  content: "";
  position: absolute;
  width: 74px; height: 74px;
  top: -26px;
  z-index: 0;
}
.cards-frame::before {
  inset-inline-start: -22px;
  border-top: 16px solid var(--primary);
  border-inline-start: 16px solid var(--primary);
  border-start-start-radius: 28px;
}
.cards-frame::after {
  inset-inline-end: -22px;
  border-top: 16px solid var(--primary);
  border-inline-end: 16px solid var(--primary);
  border-start-end-radius: 28px;
}

/* ---------- Customize (blue) section ---------- */
.customize-section {
  background: var(--primary);
  color: #fff;
}
.customize-section h2 { color: #fff; }
.customize-section p { color: rgba(255,255,255,.85); }
.dashboard-img { filter: drop-shadow(0 30px 50px rgba(0,0,0,.25)); }

/* ---------- Sales features ---------- */
.feature-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease;
}
.feature-box:hover { transform: translateY(-4px); }
.feature-box .fb-ico {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--primary);
}
.feature-box h5 { color: var(--primary); font-weight: 800; font-size: 1.05rem; margin-bottom: .4rem; }
.feature-box p { font-size: .9rem; margin: 0; }
.carousel-arrows { display: flex; gap: 12px; margin-top: 1.5rem; }
.carousel-arrows button {
  width: 50px; height: 50px;
  background: var(--primary);
  border: 0; color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background .2s;
}
.carousel-arrows button:hover { background: var(--primary-dark); }

/* dashboard tilt image bleeding off edge */
.dashboard-bleed { position: relative; }
.dashboard-bleed img { border-radius: 12px; box-shadow: var(--shadow-md); }

/* ---------- Clients ---------- */
.clients-section { background: #fff; position: relative; }
.client-logo {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.client-logo img { max-height: 90px; object-fit: contain; }
.clients-dots { display: flex; gap: 6px; justify-content: center; margin-top: 2.2rem; }
.clients-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.clients-dots span.active { background: var(--primary); width: 26px; border-radius: 5px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,.78);
  border-radius: 60px 60px 0 0;
  margin-top: 0;
  position: relative;
}
.footer-cta { padding: 3rem 0 1rem; }
.footer-cta h3 { color: #fff; font-weight: 800; margin: 0; }
.site-footer h6 {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .9rem; }
.footer-links a {
  color: rgba(255,255,255,.78);
  display: flex; align-items: center; gap: .5rem;
  font-size: .95rem;
}
.footer-links a:hover { color: #fff; }
.footer-contact-item {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: 1.1rem;
  justify-content: flex-end;
}
.footer-contact-item .fc-ico {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.footer-contact-item span { font-size: .92rem; }
.footer-paragraph { color: rgba(255,255,255,.72); font-size: .95rem; }
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 1rem; }
.payment-icons span {
  background: #fff;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: .65rem;
  font-weight: 800;
  color: #333;
  display: inline-flex;
  align-items: center;
}
.footer-bottom { background: rgba(0,0,0,.12); padding: 1rem 0; text-align: center; font-size: .85rem; }

/* ---------- Contact page ---------- */
.contact-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-darker));
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.contact-hero h1 { color: #fff; font-weight: 900; }
.contact-wrap { padding: 5rem 0; }
.contact-form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}
.contact-form-card .form-control,
.contact-form-card .form-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: 1.2rem;
}
.contact-form-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(32,101,189,.12); }
.contact-side {
  background-image: url('../assets/img/contact-bg.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  min-height: 100%;
  position: relative;
  overflow: hidden;
}
.contact-side .overlay {
  position: absolute; inset: 0;
  background: rgba(16, 59, 142, .82);
  padding: 2.5rem;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.contact-side .overlay h3 { color: #fff; }
.contact-side .overlay .ci { display: flex; align-items: center; gap: .9rem; margin-top: 1.4rem; }
.contact-side .overlay .ci .ic {
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero::before { width: 100%; opacity: .04; clip-path: none; }
  .hero h1 { font-size: 2.2rem; text-align: center; }
  .hero p.lead-text { margin-inline: auto; text-align: center; }
  .hero-content { text-align: center; }
  .hero-content .d-flex { justify-content: center; }
  .section-title { font-size: 1.9rem; }
  .hero-dots, .hero-social { display: none; }
  .cards-frame::before, .cards-frame::after { display: none; }
  .site-footer { border-radius: 36px 36px 0 0; }
}

@media (max-width: 575.98px) {
  .section { padding: 3rem 0; }
  .hero h1 { font-size: 1.8rem; }
  .navbar .brand-logo { font-size: 1.5rem; }

  /* فجوات بوتستراب الكبيرة (g-5 وما فوق) تعطي الصف هوامش سالبة 24px لكل جهة
     بينما حشوة .container ثابتة 12px، فينتج تمرير أفقي 24px على الجوال.
     تصغير الفجوة يزيل التجاوز ويعطي تباعداً مناسباً للشاشة الصغيرة. */
  .row.g-5, .row.g-6, .row.g-7 { --bs-gutter-x: 1.5rem; }
}

/* LTR adjustments */
html[dir="ltr"] .navbar .navbar-brand { align-items: flex-start; }
html[dir="ltr"] .hero p.lead-text { text-align: start; }
html[dir="ltr"] .footer-contact-item { justify-content: flex-start; }
html[dir="ltr"] .footer-links a { justify-content: flex-start; }
