:root {
  --brand-green: #2f7a4f;
  --brand-green-dark: #1f5c39;
  --brand-cream: #fbf7ef;
  --brand-accent: #e8963c;
  --text-main: #26312b;
  --text-muted: #5c6b63;
  --border-soft: #e1ded3;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brand-cream);
  color: var(--text-main);
  font-family: "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  direction: rtl;
  text-align: right;
  line-height: 1.65;
}

.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
  color: #fff;
  border-radius: 0 0 24px 24px;
  margin-bottom: 24px;
}
.site-header h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}
.site-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}
.bsd {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ---------- Home page cards ---------- */
.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .programs-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.program-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text-main);
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.program-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.program-card .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}
.program-card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--brand-green-dark);
}
.program-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Sections / legal text ---------- */
.section {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.section h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--brand-green-dark);
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.section ul {
  margin: 0;
  padding-right: 20px;
}
.section li {
  margin-bottom: 8px;
}
.section li::marker { color: var(--brand-accent); }
.section p { margin: 0 0 10px; }
.highlight {
  background: #fff7e6;
  border-radius: 8px;
  padding: 2px 6px;
}
.legal-note {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Form ---------- */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.94rem;
}
.field .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-right: 6px;
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-main);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--brand-green);
  outline-offset: 1px;
}
.field textarea {
  min-height: 70px;
  resize: vertical;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f5f8f4;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.checkbox-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand-green);
}
.checkbox-field label {
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.required-mark { color: var(--danger); }

.submit-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand-green);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover:not(:disabled) { background: var(--brand-green-dark); }
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-msg {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}
.form-msg.success {
  display: block;
  background: #e7f6ec;
  color: var(--brand-green-dark);
  border: 1px solid #b7e0c4;
}
.form-msg.error {
  display: block;
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c6c0;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--brand-green-dark);
  text-decoration: none;
  font-weight: 600;
}
.back-link:hover { text-decoration: underline; }

.contact-box {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
}
.contact-box strong { color: var(--text-main); }

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 30px;
}
