:root {
  color-scheme: light;
  --bg: #f7f6f4;
  --text: #1f2328;
  --muted: #5d6670;
  --accent: #1d4ed8;
  --accent-dark: #153aa6;
  --surface: #ffffff;
  --border: #e6e4e1;
  --shadow: 0 10px 30px rgba(31, 35, 40, 0.08);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Heebo", "Assistant", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  direction: rtl;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92vw);
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  overflow-x: clip;
  max-width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  min-height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
}

.nav a:hover,
.nav a:focus {
  color: var(--text);
}

.header-cta {
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  min-width: 140px;
  text-align: center;
}

.header-cta:hover,
.header-cta:focus {
  background: var(--accent-dark);
}

.header-cta--placeholder {
  visibility: hidden;
  pointer-events: none;
}

.hero {
  padding: 80px 0 60px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f1ee 100%);
  overflow-x: clip;
  max-width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 32px;
  align-items: center;
  min-width: 0;
}

.hero h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin: 0 0 16px;
  overflow-wrap: break-word;
}

.hero p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 1.05rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  max-width: 100%;
}

.button.secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid rgba(29, 78, 216, 0.2);
}

.button:hover,
.button:focus {
  background: var(--accent-dark);
}

.button.secondary:hover,
.button.secondary:focus {
  background: #f4f6ff;
}

/* Prevent horizontal scroll: constrain direct children of body */
body > * {
  max-width: 100%;
  overflow-x: clip;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

.section {
  padding: 60px 0;
  max-width: 100%;
}

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  overflow-wrap: break-word;
}

.section p.lead {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 760px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 24px;
  min-width: 0;
}

.card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 0;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.card a {
  color: var(--accent);
  font-weight: 600;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 20px;
  min-width: 0;
}

.step {
  padding: 18px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed rgba(29, 78, 216, 0.25);
}

.step strong {
  display: block;
  margin-bottom: 8px;
}

.placeholder-photo {
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e5e7eb 0%, #f5f5f4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b7f85;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 20px;
  min-width: 0;
}

.stat {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.faq {
  display: grid;
  gap: 16px;
}

.faq details {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border);
}

.cta {
  background: var(--accent);
  color: #fff;
  padding: 50px 0;
}

.cta h2 {
  margin-top: 0;
}

.cta .button {
  background: #fff;
  color: var(--accent);
}

.form-section {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}

form {
  display: grid;
  gap: 16px;
}

form .button {
  width: auto;
  align-self: flex-start;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.form-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.form-consent input {
  width: auto;
}

label {
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
  min-width: 0;
}

.form-message {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f1f5ff;
  color: #1e3a8a;
  font-weight: 600;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
}

/* Honeypot: visually hidden without extending document (avoids RTL horizontal scroll) */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
  min-width: 0;
}

.blog-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.blog-card time {
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-card h2,
.blog-card h3 {
  margin: 12px 0;
}

.site-footer {
  padding: 40px 0 20px;
  background: #141821;
  color: #d1d5db;
  overflow-x: clip;
  max-width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px;
  min-width: 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #d1d5db;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--muted);
}

.note {
  background: #fff7ed;
  color: #9a3412;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
    overflow-x: clip;
    min-width: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 40px;
    padding-right: 40px;
    padding-block: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .container .container {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
  }

  /* Header: explicit horizontal padding so logo, menu, CTA are not at edges */
  .site-header {
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
  }

  .site-header .container,
  .site-header .header-inner {
    padding-inline: 0;
    width: 100%;
    max-width: 100%;
  }

  /* allow grid/flex children to shrink below content size */
  * {
    min-width: 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 0 14px;
    width: 100%;
    max-width: 100%;
  }

  .header-brand {
    justify-content: space-between;
    width: 100%;
  }

  .logo {
    max-width: calc(100% - 56px);
    white-space: normal;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    max-width: 100%;
    direction: rtl;
  }

  .nav.is-open {
    display: flex;
  }

  .hero-grid,
  .grid-3,
  .steps,
  .stats,
  .blog-grid,
  .form-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-grid {
    justify-items: stretch;
  }

  main,
  section,
  header,
  footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main .container,
  .section .container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .card,
  .form-section,
  .hero-grid {
    max-width: 100%;
    width: 100%;
  }

  /* RTL: more left padding so project cards / blocks are not at the left edge */
  [dir="rtl"] main .container,
  [dir="rtl"] .section .container {
    padding-left: 56px;
    padding-right: 40px;
  }

  .site-header,
  .hero,
  .section,
  .cta,
  .site-footer {
    overflow-x: hidden;
  }

  .header-cta {
    min-width: 0;
  }

  .header-cta--placeholder {
    display: none;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .hero .button {
    align-self: start;
    width: auto;
    max-width: 100%;
  }

  .section {
    padding: 48px 0;
  }

  .cta {
    padding: 40px 0;
  }

  .card,
  .form-section {
    padding: 20px;
  }
}
