:root {
  --primary: #0f766e;        /* strong teal - high visibility */
  --primary-dark: #0d5f59;
  --accent: #f59e0b;         /* warm amber for CTAs */
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
[dir="rtl"] body { font-family: system-ui, "Segoe UI", Tahoma, Arial, sans-serif; }

/* Header */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  text-align: center;
  padding: 2.2rem 1rem 1.8rem;
}
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: 0.4rem; font-weight: 700; }
.hero p { opacity: 0.95; font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.badge {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
  letter-spacing: 0.03em;
}

/* Language + nav */
.top-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.lang-btn {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
}
.lang-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.lang-btn:hover:not(.active) { background: #f1f5f9; color: var(--text); }

.nav-links {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.nav-links a:hover { background: #f1f5f9; color: var(--text); }

/* Layout */
.container { max-width: 820px; margin: 0 auto; padding: 1.4rem 1rem 3rem; }

/* Tool card */
.tool-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}
.tool-card h2 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--muted);
}
textarea, input[type="text"], select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.15);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent {
  background: var(--accent);
  color: #1e293b;
}
.btn-accent:hover { filter: brightness(1.05); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.88rem; }

/* QR preview */
.qr-preview {
  text-align: center;
  margin: 1.2rem 0 0.5rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#qrcode {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
}
#qrcode img, #qrcode canvas { display: block; max-width: 100%; height: auto; }
.qr-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.hint { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }

/* Content sections */
.content-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  padding: 1.6rem;
  margin-bottom: 1.3rem;
}
.content-section h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #ccfbf1;
}
.content-section h3 { font-size: 1.08rem; margin: 1.2rem 0 0.45rem; color: var(--text); }
.content-section p { margin-bottom: 0.8rem; color: #334155; }
.content-section ul, .content-section ol { margin: 0.45rem 0 0.9rem 1.25rem; }
.content-section li { margin-bottom: 0.35rem; }
.content-section a { color: var(--primary); text-decoration: none; }
.content-section a:hover { text-decoration: underline; }

.faq-item { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item h4 { font-size: 1.02rem; margin-bottom: 0.3rem; }

/* Ad slots */
.ad-slot {
  text-align: center;
  padding: 1.1rem;
  margin: 1.1rem 0;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
footer {
  background: #134e4a;
  color: #a7f3d0;
  padding: 2.2rem 1rem 1.4rem;
  margin-top: 1.5rem;
}
.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.3rem;
  margin-bottom: 1.3rem;
}
.footer-inner h4 { color: #fff; font-size: 0.92rem; margin-bottom: 0.55rem; }
.footer-inner a {
  display: block;
  color: #a7f3d0;
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.28rem;
}
.footer-inner a:hover { color: #fff; }
.footer-bottom {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 1.1rem;
  border-top: 1px solid #0f766e;
  text-align: center;
  font-size: 0.82rem;
  color: #5eead4;
}

/* Page pages */
.page-header {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
  padding: 2.2rem 1rem;
  text-align: center;
}
.page-header h1 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.8rem 1rem 3rem;
}
.page-content h2 { font-size: 1.25rem; color: var(--primary); margin: 1.5rem 0 0.55rem; }
.page-content p, .page-content li { margin-bottom: 0.75rem; color: #334155; }
.page-content ul { margin-left: 1.2rem; margin-bottom: 0.9rem; }

/* Icon row */
.icon-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}
.icon-item {
  text-align: center;
  width: 90px;
}
.icon-item svg {
  width: 48px;
  height: 48px;
  margin-bottom: 0.35rem;
}
.icon-item span { font-size: 0.8rem; color: var(--muted); }

/* RTL adjustments */
[dir="rtl"] .content-section ul,
[dir="rtl"] .content-section ol,
[dir="rtl"] .page-content ul { margin-right: 1.25rem; margin-left: 0; }