:root {
  --chesed-green: #1f7a68;
  --chesed-green-dark: #145647;
  --chesed-coral: #d86f45;
  --chesed-cream: #fbf7ef;
  --chesed-ink: #18243a;
  --chesed-line: rgba(24, 36, 58, 0.12);
}

.chesed-page {
  background: #fffaf3;
  color: var(--chesed-ink);
}

.chesed-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.94);
  border-bottom: 1px solid var(--chesed-line);
  backdrop-filter: blur(14px);
}

.chesed-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chesed-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--chesed-ink);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.1;
}

.chesed-logo span {
  max-width: 18rem;
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
}

.chesed-logo img {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(24, 36, 58, 0.14);
}

.chesed-nav nav {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chesed-nav nav a {
  color: var(--chesed-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.chesed-nav nav a:hover {
  color: var(--chesed-green);
}

.chesed-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
}

.chesed-lang a {
  padding: 0.25rem 0.45rem;
  color: var(--chesed-ink);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.chesed-lang a.active,
.chesed-lang a:hover {
  background: var(--chesed-green);
  color: #fff;
}

.chesed-hero {
  min-height: calc(100vh - 74px);
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.chesed-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 25, 39, 0.82), rgba(16, 25, 39, 0.35)),
    url("https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.chesed-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.chesed-hero-copy {
  color: #fff;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--chesed-coral);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.chesed-hero-copy .eyebrow {
  color: #ffd8c6;
}

.chesed-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.45rem, 5.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.chesed-hero-copy p:not(.eyebrow) {
  margin: 1.25rem 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.14rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.impact-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.impact-panel div {
  padding: 1.05rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--chesed-line);
}

.impact-panel strong {
  display: block;
  color: var(--chesed-green-dark);
  font-size: 2rem;
  line-height: 1;
}

.impact-panel span {
  display: block;
  margin-top: 0.45rem;
  color: #526070;
  line-height: 1.35;
}

.trust-strip {
  background: #fff;
  border-bottom: 1px solid var(--chesed-line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.trust-grid div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: #39495a;
  font-weight: 700;
  line-height: 1.3;
}

.trust-grid i {
  color: var(--chesed-green);
  flex: 0 0 auto;
}

.campaign-section,
.workflow-section,
.donation-section {
  padding: var(--space-section) 0;
}

.campaign-toolbar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 auto 2rem;
}

.filter-btn,
.amount-btn,
.payment-tab,
.modal-close {
  min-height: 42px;
  border: 1px solid var(--chesed-line);
  background: #fff;
  color: var(--chesed-ink);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.filter-btn {
  padding: 0 1rem;
}

.filter-btn.active,
.amount-btn.active,
.payment-tab.active {
  background: var(--chesed-green);
  color: #fff;
  border-color: var(--chesed-green);
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.campaign-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.campaign-card[hidden] {
  display: none;
}

.campaign-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e8eee9;
  overflow: hidden;
}

.campaign-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.campaign-tag {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  color: var(--chesed-green-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.campaign-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
}

.campaign-body h3 {
  margin: 0;
  color: var(--chesed-ink);
  font-size: 1.1rem;
  line-height: 1.25;
}

.campaign-body p {
  margin: 0;
  color: #536171;
  line-height: 1.5;
}

.meta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.5rem;
  background: var(--chesed-cream);
  border-radius: 8px;
  color: #596170;
  font-size: 0.8rem;
  font-weight: 700;
}

.progress-shell {
  height: 0.62rem;
  overflow: hidden;
  background: #e8ece9;
  border-radius: 999px;
}

.progress-bar {
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--chesed-green), var(--chesed-coral));
  border-radius: inherit;
}

.campaign-stats {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #596170;
  font-size: 0.9rem;
  font-weight: 700;
}

.campaign-card .btn {
  margin-top: auto;
  width: 100%;
}

.workflow-section {
  background: #fff;
  border-top: 1px solid var(--chesed-line);
  border-bottom: 1px solid var(--chesed-line);
}

.workflow-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.workflow-grid h2,
.donation-copy h2 {
  margin: 0;
  color: var(--chesed-ink);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.workflow-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
  background: #fffaf3;
}

.workflow-list span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--chesed-green);
  color: #fff;
  font-weight: 800;
}

.workflow-list h3 {
  margin: 0 0 0.25rem;
  color: var(--chesed-ink);
}

.workflow-list p {
  margin: 0;
  color: #596170;
}

.donation-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.donation-copy {
  position: sticky;
  top: 98px;
}

.donation-copy p:not(.eyebrow) {
  margin: 1rem 0;
  color: #596170;
}

.security-note {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
  font-weight: 800;
}

.security-note i {
  color: var(--chesed-green);
}

.donation-copy .security-note + .security-note {
  margin-top: 0.75rem;
}

.donation-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.form-block {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--chesed-line);
  border-radius: 8px;
}

.form-block legend {
  padding: 0 0.35rem;
  color: var(--chesed-ink);
  font-weight: 800;
}

.selected-case span {
  color: #687486;
  font-size: 0.85rem;
  font-weight: 800;
}

.selected-case strong {
  color: var(--chesed-green-dark);
  font-size: 1.05rem;
}

.amount-options,
.payment-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.payment-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.donation-form label {
  display: grid;
  gap: 0.35rem;
  color: #475467;
  font-weight: 800;
}

.donation-form input {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(24, 36, 58, 0.18);
  border-radius: 8px;
  color: var(--chesed-ink);
  font: inherit;
}

.donation-form input:focus {
  outline: 2px solid rgba(31, 122, 104, 0.28);
  border-color: var(--chesed-green);
}

.field-label {
  margin-top: 0.2rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.checkbox-line {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 0.6rem;
  color: #536171;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.payment-pane {
  display: none;
  gap: 0.75rem;
}

.payment-pane.active {
  display: grid;
}

.payment-pane p {
  margin: 0;
  padding: 0.85rem;
  background: var(--chesed-cream);
  border-radius: 8px;
  color: #536171;
}

.donate-submit {
  width: 100%;
}

.form-footnote {
  margin: 0;
  color: #687486;
  font-size: 0.88rem;
  line-height: 1.45;
}

.receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 14, 25, 0.62);
}

.receipt-modal[hidden] {
  display: none;
}

.receipt-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 42px;
  padding: 0;
}

.receipt-icon {
  color: var(--chesed-green);
  font-size: 2.7rem;
}

.receipt-card h2 {
  margin: 0.75rem 0;
  color: var(--chesed-ink);
}

.receipt-card p {
  color: #536171;
}

.chesed-footer {
  margin-top: 0;
}

@media (max-width: 960px) {
  .chesed-hero-grid,
  .workflow-grid,
  .donation-layout {
    grid-template-columns: 1fr;
  }

  .impact-panel,
  .donation-copy {
    position: static;
  }

  .trust-grid,
  .campaign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .chesed-nav {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
  }

  .chesed-nav nav {
    justify-content: flex-start;
  }

  .chesed-lang {
    align-self: stretch;
    justify-content: center;
  }

  .chesed-hero {
    min-height: auto;
  }

  .chesed-hero-grid {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .trust-grid,
  .campaign-grid,
  .two-col,
  .amount-options,
  .payment-tabs {
    grid-template-columns: 1fr;
  }

  .campaign-stats {
    flex-direction: column;
    gap: 0.25rem;
  }
}

[dir="rtl"] .chesed-page,
[dir="rtl"].chesed-page {
  text-align: right;
}

[dir="rtl"] .chesed-hero-bg {
  transform: scaleX(-1);
}

[dir="rtl"] .chesed-hero-bg {
  background:
    linear-gradient(270deg, rgba(16, 25, 39, 0.82), rgba(16, 25, 39, 0.35)),
    url("https://images.unsplash.com/photo-1582213782179-e0d53f98f2ca?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

[dir="rtl"] .campaign-tag {
  right: 0.85rem;
  left: auto;
}

[dir="rtl"] .modal-close {
  right: auto;
  left: 0.75rem;
}
