/* ============================================================
   CastleErp Pro — Premium Landing Page Design System
   Dark SaaS theme inspired by Linear / Vercel / Stripe
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #07071A;
  --bg-2:        #0D0D2B;
  --bg-3:        #111133;
  --surface:     rgba(255,255,255,.04);
  --surface-2:   rgba(255,255,255,.07);
  --border:      rgba(255,255,255,.09);
  --border-2:    rgba(255,255,255,.15);

  --indigo:      #6366F1;
  --indigo-light:#818CF8;
  --violet:      #8B5CF6;
  --cyan:        #22D3EE;
  --green:       #22C55E;
  --amber:       #F59E0B;
  --red:         #EF4444;

  --text:        #F8FAFC;
  --text-2:      #CBD5E1;
  --text-3:      #94A3B8;
  --text-4:      #64748B;

  --radius-sm:   .5rem;
  --radius:      .875rem;
  --radius-lg:   1.25rem;
  --radius-xl:   1.75rem;
  --radius-full: 100px;

  --shadow-glow: 0 0 60px rgba(99,102,241,.25);
  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.5);

  --ease:        cubic-bezier(.4,0,.2,1);
  --duration:    .25s;
}

/* Landing page body — uses --site-font set by admin customization */
body { background: var(--bg); color: var(--text); font-family: var(--site-font, 'Cairo', ui-sans-serif, system-ui, sans-serif); }

/* --- Typography -------------------------------------------- */
.pro-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--indigo-light);
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius-full);
  padding: .35rem 1rem;
  margin-bottom: 1.25rem;
}

.pro-h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -.04em;
  color: var(--text);
}
.pro-h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.03em;
  color: var(--text);
}
.pro-sub {
  font-size: 1.0625rem; line-height: 1.75; color: var(--text-3);
  max-width: 600px;
}
.pro-gradient-text {
  background: linear-gradient(135deg, var(--indigo-light) 0%, var(--violet) 50%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons ----------------------------------------------- */
.pro-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: var(--radius-full);
  font-size: .9375rem; font-weight: 700; text-decoration: none;
  transition: all var(--duration) var(--ease);
  cursor: pointer; border: none; white-space: nowrap;
}
.pro-btn-primary {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(99,102,241,.3), 0 4px 20px rgba(99,102,241,.35);
}
.pro-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(99,102,241,.5), 0 8px 30px rgba(99,102,241,.5);
  color: #fff;
}
.pro-btn-ghost {
  background: rgba(255,255,255,.05);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.pro-btn-ghost:hover {
  background: rgba(255,255,255,.1);
  color: var(--text);
  transform: translateY(-2px);
}
.pro-btn-sm { padding: .5rem 1.25rem; font-size: .875rem; }

/* --- Cards ------------------------------------------------- */
.pro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--duration) var(--ease);
}
.pro-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.pro-card-highlight {
  background: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(139,92,246,.08) 100%);
  border-color: rgba(99,102,241,.3);
}

/* --- Sections ---------------------------------------------- */
.pro-section { padding: 6rem 0; position: relative; }
.pro-section-dark { background: var(--bg); }
.pro-section-alt  { background: var(--bg-2); }

/* Orb decorations */
.pro-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none; z-index: 0;
}
.pro-orb-1 { width: 600px; height: 600px; background: rgba(99,102,241,.15); top: -200px; left: -200px; }
.pro-orb-2 { width: 500px; height: 500px; background: rgba(139,92,246,.12); top: -100px; right: -150px; }
.pro-orb-3 { width: 400px; height: 400px; background: rgba(34,211,238,.08); bottom: -100px; left: 50%; transform: translateX(-50%); }

/* --- Navbar ------------------------------------------------ */
.pro-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 68px;
  display: flex; align-items: center;
  padding: 0 2rem;
  transition: all .35s var(--ease);
  background: transparent;
}
.pro-nav.scrolled {
  background: rgba(7,7,26,.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.pro-nav-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.pro-nav-links {
  display: flex; align-items: center; gap: .25rem; list-style: none;
}
.pro-nav-links a {
  font-size: .875rem; font-weight: 500; color: var(--text-3);
  text-decoration: none; padding: .5rem .875rem; border-radius: var(--radius-sm);
  transition: all var(--duration);
}
.pro-nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.pro-nav-cta { display: flex; align-items: center; gap: .75rem; }

/* --- Hero -------------------------------------------------- */
.pro-hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 8rem 0 5rem;
  background: var(--bg);
}
.pro-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99,102,241,.18) 0%, transparent 70%);
  pointer-events: none;
}
.pro-hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius-full); padding: .4rem 1rem;
  font-size: .8125rem; font-weight: 600; color: var(--indigo-light);
  margin-bottom: 1.75rem; cursor: default;
}
.pro-hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }

/* Stat chips */
.pro-stat {
  display: inline-flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.5rem;
  min-width: 100px;
}
.pro-stat-num { font-size: 1.5rem; font-weight: 900; color: var(--text); line-height: 1; }
.pro-stat-lbl { font-size: .75rem; color: var(--text-3); margin-top: .25rem; font-weight: 500; }

/* Dashboard mockup */
.pro-mock {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.05);
}
.pro-mock-bar {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
}
.pro-mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.pro-mock-dot-r { background: #EF4444; }
.pro-mock-dot-y { background: #F59E0B; }
.pro-mock-dot-g { background: #22C55E; }
.pro-mock-address { flex: 1; height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; margin-left: .5rem; }

/* Float badges */
.pro-float {
  position: absolute; background: rgba(255,255,255,.95);
  border-radius: var(--radius); padding: .75rem 1rem;
  display: flex; align-items: center; gap: .625rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.2);
  animation: float 4s ease-in-out infinite;
  min-width: 160px;
}
.pro-float-left  { bottom: -1.5rem; left: -1.5rem; animation-delay: 0s; }
.pro-float-right { top: 2rem; right: -2rem; animation-delay: 1.5s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.pro-float-icon { width: 36px; height: 36px; border-radius: .625rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pro-float-label { font-size: .7rem; color: #64748B; font-weight: 500; }
.pro-float-value { font-size: .9375rem; font-weight: 800; color: #0F172A; line-height: 1; }

/* --- Logos strip ------------------------------------------- */
.pro-logos { display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.pro-logo-pill {
  font-size: .875rem; font-weight: 700; color: var(--text-4);
  padding: .5rem 1.25rem; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  letter-spacing: .02em;
}

/* --- Feature cards ----------------------------------------- */
.pro-feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem; margin-bottom: 1rem; flex-shrink: 0;
}

/* --- Pricing ----------------------------------------------- */
.pro-plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex; flex-direction: column;
  height: 100%;
  transition: all var(--duration) var(--ease);
}
.pro-plan:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.pro-plan-popular {
  background: linear-gradient(135deg, rgba(99,102,241,.12) 0%, rgba(139,92,246,.08) 100%);
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 0 40px rgba(99,102,241,.15);
}
.pro-toggle {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: .3rem;
  display: inline-flex; gap: .25rem;
}
.pro-toggle-btn {
  border: none; background: transparent; border-radius: var(--radius-full);
  padding: .45rem 1.25rem; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all var(--duration);
  color: var(--text-3);
}
.pro-toggle-btn.active {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.4);
}
.pro-check-item {
  display: flex; align-items: center; gap: .625rem;
  font-size: .875rem; color: var(--text-2); padding: .3rem 0;
}
.pro-check-item.off { color: var(--text-4); }
.pro-check-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; flex-shrink: 0;
}
.pro-check-icon.on  { background: rgba(34,197,94,.15); color: var(--green); }
.pro-check-icon.off { background: rgba(255,255,255,.06); color: var(--text-4); }

/* --- Testimonials ------------------------------------------ */
.pro-testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; flex-direction: column;
  height: 100%;
  transition: all var(--duration) var(--ease);
}
.pro-testimonial:hover { border-color: var(--border-2); }
.pro-quote-mark { font-size: 3rem; line-height: .7; color: var(--indigo); margin-bottom: .75rem; font-family: Georgia, serif; }
.pro-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800; color: #fff; flex-shrink: 0;
}

/* --- FAQ --------------------------------------------------- */
.pro-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--duration);
}
.pro-faq-item.open { border-color: rgba(99,102,241,.35); }
.pro-faq-btn {
  width: 100%; background: none; border: none;
  padding: 1.25rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
  cursor: pointer; text-align: left; color: var(--text);
  font-size: .9375rem; font-weight: 700;
}
.pro-faq-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; transition: all var(--duration);
}
.pro-faq-body {
  padding: .25rem 1.5rem 1.25rem;
  font-size: .9rem; color: var(--text-3); line-height: 1.8;
  border-top: 1px solid rgba(99,102,241,.12);
}

/* --- Blog cards -------------------------------------------- */
.pro-blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  height: 100%; transition: all var(--duration) var(--ease);
}
.pro-blog-card:hover { border-color: var(--border-2); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.pro-blog-thumb { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 2.75rem; }
.pro-blog-body { padding: 1.375rem; flex: 1; display: flex; flex-direction: column; }
.pro-blog-tag {
  font-size: .72rem; font-weight: 600; color: var(--indigo-light);
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  padding: .25rem .625rem; border-radius: var(--radius-full);
}

/* --- Contact form ------------------------------------------ */
.pro-input {
  width: 100%; padding: .75rem 1rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .9rem; color: var(--text);
  outline: none; transition: border-color var(--duration);
  font-family: inherit;
}
.pro-input:focus { border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.06); }
.pro-input::placeholder { color: var(--text-4); }
.pro-label-text { font-size: .8125rem; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; display: block; }

/* --- Footer ------------------------------------------------ */
.pro-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.pro-footer-title { font-size: .8125rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.25rem; }
.pro-footer a { color: var(--text-3); text-decoration: none; font-size: .9rem; transition: color var(--duration); }
.pro-footer a:hover { color: var(--text); }
.pro-footer-links { list-style: none; display: flex; flex-direction: column; gap: .625rem; }

/* Social icons */
.pro-social {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-3); font-size: .875rem; text-decoration: none;
  transition: all var(--duration);
}
.pro-social:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }

/* Store badge */
.pro-store-badge {
  display: flex; align-items: center; gap: .625rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem .875rem;
  color: var(--text-2); font-size: .8rem; text-decoration: none;
  transition: all var(--duration);
}
.pro-store-badge:hover { border-color: var(--border-2); color: var(--text); }

/* --- CTA Banner -------------------------------------------- */
.pro-cta-banner {
  background: linear-gradient(135deg, #0D0D2B 0%, #1a1a4e 50%, #1f1860 100%);
  padding: 5rem 0; position: relative; overflow: hidden;
}
.pro-cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(99,102,241,.2) 0%, transparent 70%);
}

/* --- Category cards ---------------------------------------- */
.pro-cat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem 1rem;
  text-align: center; transition: all var(--duration) var(--ease);
  cursor: default;
}
.pro-cat-card:hover {
  background: var(--surface-2); border-color: var(--border-2);
  transform: translateY(-4px); box-shadow: var(--shadow-card);
}
.pro-cat-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1rem;
}

/* --- Compare columns --------------------------------------- */
.pro-compare {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.pro-compare-after { border-color: rgba(99,102,241,.3); background: rgba(99,102,241,.06); }
.pro-compare-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem 0; font-size: .9rem; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.pro-compare-item:last-child { border-bottom: none; }
.pro-compare-emoji { font-size: 1.1rem; }

/* --- Divider ----------------------------------------------- */
.pro-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* --- Animations -------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pro-animate { animation: fadeUp .6s var(--ease) both; }
.pro-delay-1 { animation-delay: .1s; }
.pro-delay-2 { animation-delay: .2s; }
.pro-delay-3 { animation-delay: .3s; }
.pro-delay-4 { animation-delay: .4s; }

/* --- Responsive -------------------------------------------- */
@media (max-width: 991px) {
  .pro-nav-links, .pro-nav-links-desktop { display: none !important; }
  .pro-hero { padding: 7rem 0 4rem; min-height: auto; }
  .pro-section { padding: 4rem 0; }
}
@media (max-width: 768px) {
  .pro-float { display: none; }
}

/* --- Scrollbar --------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.4); border-radius: 3px; }

/* ============================================================
   RTL — Arabic language support
   ============================================================ */
[dir="rtl"] { font-family: var(--site-font, 'Cairo', ui-sans-serif, system-ui, sans-serif); }
/* In an RTL container, flex `row` already mirrors automatically.
   `row-reverse` would double-reverse it back to LTR — so keep `row`. */
[dir="rtl"] .pro-nav-inner { flex-direction: row; }
[dir="rtl"] .pro-nav-links { flex-direction: row; }
[dir="rtl"] .pro-hero { text-align: right; }
[dir="rtl"] .pro-hero-badge { flex-direction: row; }
[dir="rtl"] .pro-stat { text-align: right; }
[dir="rtl"] .pro-float-left { left: auto; right: -1.5rem; }
[dir="rtl"] .pro-float-right { right: auto; left: -2rem; }
[dir="rtl"] .pro-check-item { flex-direction: row; text-align: right; }
[dir="rtl"] .pro-compare-item { flex-direction: row; }
[dir="rtl"] .pro-faq-btn { flex-direction: row; }
[dir="rtl"] .pro-blog-body { text-align: right; }
[dir="rtl"] .pro-footer-links { text-align: right; }
[dir="rtl"] .pro-footer-title { text-align: right; }
[dir="rtl"] .pro-label { direction: rtl; }
[dir="rtl"] .pro-sub { text-align: right; }
[dir="rtl"] .pro-h1, [dir="rtl"] .pro-h2 { text-align: right; }
[dir="rtl"] .row { direction: rtl; }
[dir="rtl"] .text-center .pro-sub { text-align: center; }
[dir="rtl"] .text-center .pro-h1, [dir="rtl"] .text-center .pro-h2 { text-align: center; }

/* Language toggle button */
.lang-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full); padding: .35rem .875rem;
  font-size: .8125rem; font-weight: 700; color: var(--text-2);
  cursor: pointer; transition: all .25s; font-family: inherit;
}
.lang-btn:hover { background: rgba(255,255,255,.12); color: var(--text); border-color: rgba(255,255,255,.22); }
.lang-btn .lang-flag { font-size: 1rem; line-height: 1; }
