:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-glow: rgba(13, 148, 136, 0.2);
  --dark: #0f172a;
  --dark-surface: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-w: 1200px;
  --font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --bg-main: #0b1120;
  --card-bg: #131c31;
  --card-border: #1e293b;
  --primary-light: rgba(13, 148, 136, 0.18);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --bg-main: #0b1120;
    --card-bg: #131c31;
    --card-border: #1e293b;
    --primary-light: rgba(13, 148, 136, 0.18);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: all 0.2s ease;
}

[data-theme="dark"] .site-header,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background-color: rgba(19, 28, 49, 0.85);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.35rem;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name-ar {
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.brand-name-en {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  padding: 6px 4px;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-features-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-feature-item svg {
  color: var(--primary);
}

/* Feature Cards Grid */
.features-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.feature-text {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* Security & Cloud Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: 60px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.highlight-content h3 {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 16px;
}

.highlight-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.badge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.badge-item svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.cloud-graphic {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.cloud-graphic-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 700;
}

.code-snippet {
  direction: ltr;
  text-align: left;
  background-color: #0f172a;
  color: #38bdf8;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin-top: 10px;
}

/* Page Layout for Privacy & Terms */
.legal-page {
  padding: 60px 0 100px;
  flex: 1;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
}

.legal-title {
  font-size: 2.35rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.legal-content {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 44px;
  box-shadow: var(--shadow-sm);
}

.legal-section {
  margin-bottom: 36px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background-color: var(--primary);
  border-radius: 2px;
}

.legal-section p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 14px;
}

.legal-section ul {
  list-style: none;
  margin-right: 8px;
  margin-bottom: 16px;
}

.legal-section ul li {
  position: relative;
  padding-right: 24px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.7;
}

.legal-section ul li::before {
  content: '•';
  position: absolute;
  right: 6px;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
}

.callout-box {
  background-color: var(--primary-light);
  border-right: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px;
  margin: 20px 0;
}

.callout-box p {
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 60px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 14px;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 900px) {
  .highlight-box {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.15rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open {
    display: flex;
  }
  .legal-content {
    padding: 24px 18px;
  }
}
