/* ===== CSS Variables ===== */
:root {
  --primary: #1a56db;
  --primary-dark: #1e429f;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --dark: #111827;
  --gray-900: #1f2937;
  --gray-800: #374151;
  --gray-700: #4b5563;
  --gray-600: #6b7280;
  --gray-500: #9ca3af;
  --gray-400: #d1d5db;
  --gray-300: #e5e7eb;
  --gray-200: #f3f4f6;
  --gray-100: #f9fafb;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  padding: 15px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 24px;
  font-weight: 800;
}

.logo-icon {
  background: var(--primary);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 6px;
}

.logo-text {
  color: var(--dark);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--gray-700);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero-description {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
}

.stat-label {
  font-size: 14px;
  color: var(--gray-500);
}

/* Code Preview */
.code-preview {
  background: var(--gray-900);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--gray-800);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-title {
  margin-left: auto;
  font-size: 13px;
  color: var(--gray-500);
}

.code-content {
  padding: 24px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

.code-content code {
  color: var(--gray-300);
}

.keyword { color: #c792ea; }
.function { color: #82aaff; }
.property { color: #f07178; }
.string { color: #c3e88d; }
.number { color: #f78c6c; }
.comment { color: #546e7a; }

/* Invoice Preview */
.invoice-preview {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
}

.invoice-preview-header {
  padding: 12px 16px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.invoice-lang-tabs {
  display: flex;
  gap: 8px;
}

.invoice-lang-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}

.invoice-lang-tab:hover {
  background: var(--gray-200);
}

.invoice-lang-tab.active {
  background: var(--primary);
  color: var(--white);
}

.invoice-sample {
  display: none;
  padding: 20px;
}

.invoice-sample.active {
  display: block;
}

.invoice-document {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  padding: 20px;
  font-size: 11px;
}

.invoice-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.invoice-qr {
  text-align: center;
}

.qr-placeholder {
  background: var(--white);
  padding: 5px;
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  display: inline-block;
}

.qr-label {
  display: block;
  font-size: 8px;
  color: #166534;
  font-weight: 600;
  margin-top: 3px;
}

.invoice-company {
  flex: 1;
  padding: 0 15px;
}

.invoice-company .company-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 3px;
}

.invoice-company .company-address {
  font-size: 10px;
  color: var(--gray-500);
}

.invoice-title-box {
  text-align: right;
}

.invoice-title-box .invoice-type {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.invoice-title-box .invoice-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-700);
}

.invoice-client-box {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  padding: 10px 12px;
  margin-bottom: 15px;
  border-radius: 0 5px 5px 0;
}

.client-label {
  font-size: 8px;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}

.client-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
}

.client-address {
  font-size: 10px;
  color: var(--gray-500);
}

.invoice-table {
  margin-bottom: 15px;
}

.invoice-table .table-header {
  display: grid;
  grid-template-columns: 2fr 0.5fr 1fr 1fr;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 8px 10px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 5px 5px 0 0;
}

.invoice-table .table-row {
  display: grid;
  grid-template-columns: 2fr 0.5fr 1fr 1fr;
  gap: 8px;
  padding: 8px 10px;
  font-size: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.invoice-table .table-row:nth-child(even) {
  background: var(--gray-50);
}

.invoice-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 15px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  width: 200px;
  padding: 5px 10px;
  font-size: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.total-line.total-ttc {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  font-size: 11px;
  border-radius: 5px;
  border: none;
}

.invoice-ttn-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 10px;
  color: #166534;
}

.ttn-check {
  background: #22c55e;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.ttn-ref {
  font-family: 'Consolas', monospace;
  background: var(--white);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
}

/* RTL Invoice */
.rtl-invoice {
  direction: rtl;
  text-align: right;
}

.rtl-invoice .invoice-doc-header {
  flex-direction: row-reverse;
}

.rtl-invoice .invoice-title-box {
  text-align: left;
}

.rtl-invoice .invoice-client-box {
  border-left: none;
  border-right: 3px solid #22c55e;
  border-radius: 5px 0 0 5px;
}

.rtl-invoice .invoice-table .table-header,
.rtl-invoice .invoice-table .table-row {
  grid-template-columns: 1fr 1fr 0.5fr 2fr;
}

.rtl-invoice .invoice-totals {
  align-items: flex-start;
}

.rtl-invoice .invoice-ttn-badge {
  flex-direction: row-reverse;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
  z-index: -1;
  border-radius: 0 0 0 100px;
}

/* ===== Trust Section ===== */
.trust-section {
  padding: 60px 0;
  background: var(--gray-100);
}

.trust-label {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.trust-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-400);
}

/* ===== Section Header ===== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--gray-600);
}

/* ===== Compliance Section ===== */
.compliance-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--gray-100) 0%, var(--white) 100%);
}

.compliance-header {
  text-align: center;
  margin-bottom: 50px;
}

.compliance-badge-main {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 24px 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.compliance-badge-main svg {
  flex-shrink: 0;
  color: var(--secondary);
}

.compliance-badge-main h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.compliance-badge-main p {
  font-size: 14px;
  opacity: 0.9;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}

.compliance-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.compliance-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.compliance-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.compliance-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.compliance-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

.compliance-partners {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--gray-200);
}

.compliance-partners > span {
  display: block;
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 20px;
  font-weight: 500;
}

.partner-logos {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.partner-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.partner-logo:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.partner-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.partner-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  background: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ===== Security Section ===== */
.security-section {
  padding: 100px 0;
  background: var(--gray-900);
  color: var(--white);
}

.security-section .section-header {
  margin-bottom: 60px;
}

.security-section .section-header h2 {
  color: var(--white);
}

.security-section .section-header p {
  color: var(--gray-400);
}

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.security-badge svg {
  width: 18px;
  height: 18px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.security-card {
  background: var(--gray-800);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-700);
  transition: var(--transition);
}

.security-card:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
}

.security-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: var(--white);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.security-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.security-card p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== Features Section ===== */
.features-section {
  padding: 100px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ===== How it Works ===== */
.how-it-works {
  padding: 100px 0;
  background: var(--gray-900);
  color: var(--white);
}

.how-it-works .section-header h2 {
  color: var(--white);
}

.how-it-works .section-header p {
  color: var(--gray-400);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  font-size: 32px;
  font-weight: 800;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-content p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===== API Section ===== */
.api-section {
  padding: 100px 0;
}

.api-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.api-info h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.api-info > p {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 32px;
}

.api-features {
  margin-bottom: 32px;
}

.api-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 16px;
  color: var(--gray-700);
}

.api-features li svg {
  color: var(--secondary);
  flex-shrink: 0;
}

.api-endpoints {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.endpoint-card {
  background: var(--gray-100);
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-200);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.method {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.method.get { background: var(--secondary); color: var(--white); }
.method.post { background: var(--primary); color: var(--white); }
.method.put { background: var(--accent); color: var(--white); }
.method.delete { background: var(--danger); color: var(--white); }

.endpoint-card code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  color: var(--dark);
}

.endpoint-card p {
  font-size: 14px;
  color: var(--gray-600);
}

/* ===== Pricing Section ===== */
.pricing-section {
  padding: 100px 0;
  background: var(--gray-100);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  border: 2px solid var(--gray-200);
  position: relative;
  transition: var(--transition);
}

.pricing-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.pricing-description {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.pricing-price {
  margin-bottom: 32px;
}

.pricing-price .price {
  font-size: 48px;
  font-weight: 800;
  color: var(--dark);
}

.pricing-price .currency {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-600);
}

.pricing-price .period {
  font-size: 16px;
  color: var(--gray-500);
}

.pricing-features {
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 15px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
}

.cta-content h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-content > p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 40px;
}

.cta-form {
  display: flex;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto 20px;
}

.cta-input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  border: none;
  border-radius: var(--border-radius);
  outline: none;
}

.cta-note {
  font-size: 13px;
  opacity: 0.7;
}

/* ===== Contact Section ===== */
.contact-section {
  padding: 100px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-info h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 40px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-method svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}

.contact-method strong {
  display: block;
  color: var(--dark);
  margin-bottom: 4px;
}

.contact-method p {
  color: var(--gray-600);
}

.contact-form {
  background: var(--gray-100);
  padding: 40px;
  border-radius: var(--border-radius-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  outline: none;
  transition: var(--transition);
  font-family: var(--font-family);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* ===== Legal Pages ===== */
.legal-header {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: var(--white);
  text-align: center;
}

.legal-header h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
}

.legal-update {
  font-size: 14px;
  color: var(--gray-400);
}

.legal-content {
  padding: 80px 0;
}

.legal-document {
  max-width: 800px;
  margin: 0 auto;
}

.legal-section {
  margin-bottom: 48px;
}

.legal-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.legal-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 24px 0 12px;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.legal-section a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-section a:hover {
  color: var(--primary-dark);
}

.legal-list {
  margin: 16px 0 24px 24px;
}

.legal-list li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.legal-list li strong {
  color: var(--dark);
}

.contact-info-box {
  background: var(--gray-100);
  padding: 24px;
  border-radius: var(--border-radius);
  margin: 20px 0;
  border-left: 4px solid var(--primary);
}

.contact-info-box p {
  margin-bottom: 8px;
  font-size: 15px;
}

.contact-info-box p:last-child {
  margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-800);
  border-radius: var(--border-radius);
  color: var(--gray-400);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-links h4 {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gray-400);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--gray-800);
  text-align: center;
  font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .compliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 60px;
  }

  .steps::before {
    display: none;
  }

  .api-content {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-card.popular {
    transform: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-links,
  .nav-actions {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    margin-top: 15px;
  }

  .nav-links.show,
  .nav-actions.show {
    display: flex;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-links a:hover {
    background: var(--gray-50);
  }

  .nav-actions {
    gap: 12px;
    padding: 20px;
    border-top: none;
    margin-top: 0;
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-menu-btn {
    display: flex;
    z-index: 10;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .code-preview {
    font-size: 12px;
  }

  .code-content {
    padding: 15px;
    overflow-x: auto;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .section-header p {
    font-size: 15px;
  }

  /* Compliance section responsive */
  .compliance-section {
    padding: 50px 0;
  }

  .compliance-badge-main {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 15px;
  }

  .compliance-badge-main h2 {
    font-size: 22px;
  }

  .compliance-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .compliance-card {
    padding: 24px;
  }

  .partner-logos {
    flex-direction: column;
    gap: 12px;
  }

  .partner-logo {
    justify-content: center;
  }

  /* Security section responsive */
  .security-section {
    padding: 60px 0;
  }

  .security-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .security-card {
    padding: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 24px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    text-align: center;
  }

  .step-number {
    margin-bottom: 15px;
  }

  .api-endpoints {
    grid-template-columns: 1fr;
  }

  .endpoint-card {
    padding: 16px;
  }

  .endpoint-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .endpoint-header code {
    font-size: 13px;
    word-break: break-all;
  }

  .cta-form {
    flex-direction: column;
  }

  .cta-input {
    width: 100%;
  }

  .cta-section h2 {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  /* Legal pages responsive */
  .legal-header {
    padding: 100px 0 40px;
  }

  .legal-header h1 {
    font-size: 28px;
  }

  .legal-content {
    padding: 40px 0;
  }

  .legal-section h2 {
    font-size: 20px;
  }

  .legal-section h3 {
    font-size: 16px;
  }

  .legal-list {
    margin-left: 16px;
  }
}

/* ===== Small Mobile (480px) ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 100px 0 40px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-badge {
    font-size: 12px;
    padding: 6px 12px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 15px;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .pricing-card {
    padding: 24px;
  }

  .pricing-price .price {
    font-size: 36px;
  }
}

/* ===== Language Selector ===== */
.lang-selector {
  position: relative;
  margin-left: 16px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.lang-toggle:hover {
  background: var(--primary);
  color: var(--white);
}

.lang-flag {
  font-size: 18px;
}

.lang-code {
  font-weight: 600;
}

.lang-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  color: var(--gray-700);
}

.lang-option:first-child {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.lang-option:hover {
  background: var(--gray-100);
}

.lang-option.active {
  background: var(--primary);
  color: var(--white);
}

.lang-option .lang-flag {
  font-size: 18px;
}

.lang-option .lang-name {
  flex: 1;
}

/* ===== RTL Support ===== */
html[dir="rtl"] {
  direction: rtl;
}

body.rtl {
  text-align: right;
}

/* RTL - Navigation */
.rtl .nav-links {
  flex-direction: row-reverse;
}

.rtl .nav-actions {
  flex-direction: row-reverse;
}

.rtl .lang-selector {
  margin-left: 0;
  margin-right: 16px;
}

.rtl .lang-dropdown {
  right: auto;
  left: 0;
}

/* RTL - Hero */
.rtl .hero .container {
  direction: rtl;
}

.rtl .hero-cta {
  flex-direction: row-reverse;
}

.rtl .btn svg {
  transform: scaleX(-1);
}

.rtl .hero-stats {
  flex-direction: row-reverse;
}

/* RTL - Code Preview */
.rtl .code-preview {
  direction: ltr;
  text-align: left;
}

.rtl .code-title {
  margin-left: 0;
  margin-right: auto;
}

/* RTL - Features */
.rtl .feature-card {
  text-align: right;
}

/* RTL - Steps */
.rtl .steps {
  direction: rtl;
}

.rtl .step {
  text-align: center;
}

/* RTL - API Section */
.rtl .api-features li {
  flex-direction: row-reverse;
}

.rtl .api-features li svg {
  margin-left: 12px;
  margin-right: 0;
}

.rtl .endpoint-header {
  flex-direction: row-reverse;
}

.rtl .endpoint-card code {
  direction: ltr;
}

/* RTL - Pricing */
.rtl .pricing-card {
  text-align: right;
}

.rtl .pricing-features li {
  text-align: right;
}

/* RTL - Contact */
.rtl .contact-grid {
  direction: rtl;
}

.rtl .contact-method {
  flex-direction: row-reverse;
  text-align: right;
}

.rtl .contact-method svg {
  margin-left: 16px;
  margin-right: 0;
}

.rtl .contact-form {
  text-align: right;
}

.rtl .form-group label {
  text-align: right;
}

/* RTL - Footer */
.rtl .footer-grid {
  direction: rtl;
}

.rtl .footer-brand {
  text-align: right;
}

.rtl .social-links {
  justify-content: flex-start;
}

.rtl .footer-links {
  text-align: right;
}

/* RTL - Mobile */
@media (max-width: 768px) {
  .rtl .nav-links,
  .rtl .nav-actions {
    flex-direction: column;
  }

  .rtl .hero-cta {
    flex-direction: column;
  }

  .rtl .contact-method {
    flex-direction: column;
    text-align: center;
  }

  .rtl .footer-grid {
    text-align: center;
  }

  .rtl .footer-brand {
    text-align: center;
  }

  .rtl .social-links {
    justify-content: center;
    flex-direction: row;
  }
}

/* Arabic Font Support */
.rtl {
  font-family: 'Inter', 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}
