/* Extra styles specific to the donation page */

/* ── Hero motto ──────────────────────────────────────────────── */
.hero-motto {
  margin: 0.6rem 0 1.4rem;
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
  background: linear-gradient(90deg, #f9d673 0%, #fff 55%, #f9d673 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: motto-glow 3s ease-in-out infinite alternate;
}

.hero-motto .lang-ar {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
}

@keyframes motto-glow {
  from {
    opacity: 0.85;
  }

  to {
    opacity: 1;
  }
}

/* ── Page hero title override (spende page) ──────────────────── */
.page-hero .page-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-top: 0.25rem;
  margin-bottom: 1.4rem;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 48px rgba(249, 214, 115, 0.55),
    0 2px 12px rgba(0, 0, 0, 0.45);
  position: relative;
}

.page-hero .page-hero__title .lang-ar {
  font-size: clamp(1.75rem, 4.5vw, 2.7rem);
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ornamental full-width divider with star-and-crescent */
.page-hero .page-hero__title::after {
  content: '☪';
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  color: #f9d673;
  margin-top: 1rem;
  opacity: 0.9;
  /* gold lines running to both edges of the container */
  background-image:
    linear-gradient(rgba(249, 214, 115, 0.55), rgba(249, 214, 115, 0.55)),
    linear-gradient(rgba(249, 214, 115, 0.55), rgba(249, 214, 115, 0.55));
  background-size: calc(50% - 1.4rem) 1px, calc(50% - 1.4rem) 1px;
  background-position: left center, right center;
  background-repeat: no-repeat;
}

/* ── Video carousel ─────────────────────────────────────────── */
.vid-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2rem;
}

.vid-carousel__arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-border, #ddd);
  background: var(--color-surface, #fff);
  color: var(--color-text, #333);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 1;
}

.vid-carousel__arrow:hover:not(:disabled) {
  background: var(--color-primary-bg, #f5f0eb);
  border-color: var(--color-primary, #8b6914);
}

.vid-carousel__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.vid-carousel__viewport {
  flex: 1;
  overflow: hidden;
}

.vid-carousel__track {
  display: flex;
  gap: 0;
  will-change: transform;
}

.vid-carousel__item {
  flex-shrink: 0;
  padding: 0 6px;
  box-sizing: border-box;
}

.vid-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 */
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vid-frame-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.25);
}

.vid-frame-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.35) 100%);
  transition: background 0.2s ease;
}

.vid-frame-wrap:hover .vid-frame-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.vid-frame-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.9);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.vid-frame-wrap:hover .vid-frame-play {
  transform: scale(1.1);
  background: rgba(255, 0, 0, 1);
}

.vid-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.vid-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-top: 56.25%;
  position: relative;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  background: var(--color-primary-bg, #f5f0eb);
  border: 2px dashed var(--color-border, #ddd);
}

.vid-placeholder__icon,
.vid-placeholder__text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.vid-placeholder__icon {
  top: calc(50% - 28px);
  font-size: 2.5rem;
  color: var(--color-primary, #8b6914);
  opacity: 0.5;
}

.vid-placeholder__text {
  top: calc(50% + 12px);
  font-size: 0.8rem;
  color: var(--color-text-muted, #888);
  white-space: nowrap;
}

/* Video modal overlay */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.video-modal__card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 95%);
  max-width: 1100px;
  background: transparent;
  outline: none;
}

.video-modal__close {
  position: absolute;
  right: -12px;
  top: -12px;
  z-index: 2;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
}

.video-modal__frame-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}

.video-modal__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* fallback shown when YouTube blocks embedding */
.video-modal__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  font-size: 1rem;
}

/* ── Project carousel ───────────────────────────────────────── */
.project-carousel {
  position: relative;
  width: 100%;
  min-height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.project-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

/* Ensure carousels behave consistently in RTL (Arabic) mode by keeping
   the track direction LTR so translateX calculations remain stable. */
html[data-lang="ar"] .project-carousel__track,
html[data-lang="ar"] .vid-carousel__track,
html[data-lang="ar"] #vid-track {
  direction: ltr;
}

.project-carousel__slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}

.project-carousel__slide--contain {
  object-fit: contain;
  background: #f0ede8;
}

.project-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}

.project-carousel__btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.project-carousel__btn--prev {
  left: 8px;
}

.project-carousel__btn--next {
  right: 8px;
}

.project-carousel__dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.project-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s;
}

.project-carousel__dot.is-active {
  background: #fff;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: rgba(250, 250, 250, 0.1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  color: rgba(250, 250, 250, 0.85);
  border: 1px solid rgba(250, 250, 250, 0.15);
}

.trust-badge__icon {
  font-size: 1rem;
}

.donation-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.donation-amount-btn {
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--color-primary-pale);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  color: var(--color-primary-dark);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.donation-amount-btn:hover,
.donation-amount-btn:focus {
  border-color: var(--color-primary);
  background-color: var(--color-primary-bg);
  outline: none;
}

.donation-amount-btn.is-selected {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-white);
}

.donation-building-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
}

/* Hero layout: full-width progress, then badges + image */
.hero-content-grid {
  margin-top: var(--space-8);
}

.hero-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
  gap: var(--space-8);
  align-items: stretch;
  margin-top: var(--space-6);
}

/* Blockquotes column – matches image height */
.blockquotes-section {
  display: flex;
  flex-direction: column;
  height: fit-content;
}

/* Hadith quote */
.hadith-quote {
  flex: 1;
  margin: 0;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--color-primary-pale) 0%, #fff8ec 100%);
  border-inline-start: 5px solid var(--color-primary-dark);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.blockquotes-section .hadith-quote+.hadith-quote {
  margin-top: var(--space-4);
}

.hadith-quote::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  inset-inline-start: var(--space-3);
  font-size: 6rem;
  line-height: 1;
  color: var(--color-primary-dark);
  opacity: 0.15;
  font-family: Georgia, serif;
  pointer-events: none;
}

.hadith-quote__text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2d2d2d;
  font-style: italic;
  position: relative;
}

html[data-lang="ar"] .hadith-quote {
  border-inline-start: none;
  border-inline-end: 5px solid var(--color-primary-dark);
  text-align: right;
}

html[data-lang="ar"] .hadith-quote::before {
  content: '\201D';
  inset-inline-start: unset;
  inset-inline-end: var(--space-3);
}

.hero-bottom-grid .trust-badges {
  flex-direction: column;
  margin-top: 0;
}

@media (max-width: 900px) {
  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .trust-badges {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Donation progress bar */
.donation-progress {
  margin-top: 0;
  width: 100%;
}

.donation-progress__labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: rgba(250, 250, 250, 0.9);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.donation-progress__hint {
  margin: 0 0 var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.24rem 0.56rem;
  border: 1px solid rgba(250, 250, 250, 0.4);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(58, 40, 8, 0.45) 0%, rgba(239, 68, 68, 0.38) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.3;
  max-width: 100%;
  flex-wrap: nowrap;
}

.donation-progress__hint::before {
  content: 'i';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: #7a1010;
  font-size: 0.64rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.donation-progress__hint-text {
  min-width: 0;
}

.donation-progress__hint .lang-de,
.donation-progress__hint .lang-ar {
  display: none;
}

html[data-lang="de"] .donation-progress__hint .lang-de,
html[data-lang="ar"] .donation-progress__hint .lang-ar {
  display: inline;
}

.donation-progress__labels strong {
  color: #ffffff;
  font-size: var(--text-base);
}

.donation-progress__track {
  width: 100%;
  height: 14px;
  background-color: rgba(250, 250, 250, 0.18);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.donation-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
  border-radius: 999px;
  animation: progressFill 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
  position: relative;
}

.donation-progress__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  border-radius: 999px;
  animation: shimmer 2.5s ease-in-out infinite;
  animation-delay: 2.2s;
}

@keyframes progressFill {
  from {
    width: 0%;
  }

  to {
    width: 28.75%;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(400%);
  }
}

.donation-progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 0.78rem;
  color: rgba(250, 250, 250, 0.65);
}

@media (max-width: 640px) {
  .donation-progress__labels {
    align-items: flex-start;
    gap: 0.6rem;
  }

  .donation-progress__hint {
    display: inline-flex;
    max-width: 100%;
  }
}

.bank-data-grid {
  grid-template-columns: minmax(0, 3fr) minmax(100px, 1fr) !important;
  align-items: start !important;
}

.bank-data-content {
  overflow-x: auto;
}

.bank-data-content>div {
  white-space: nowrap;
}

.bank-data-qr {
  text-align: center;
  justify-self: end;
}

.bank-data-qr img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.donation-gate-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff9ef 0%, #fff2db 52%, #ffffff 100%);
  border: 2px solid #f2c979;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: 0 12px 30px rgba(118, 116, 70, 0.22), 0 3px 8px rgba(0, 0, 0, 0.08);
  max-width: 760px;
  margin-inline: auto;
  animation: donationGatePulse 4.5s ease-in-out infinite;
}

.donation-gate-card::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 209, 52, 0.35) 0%, rgba(248, 209, 52, 0) 70%);
  pointer-events: none;
}

@keyframes donationGatePulse {

  0%,
  100% {
    box-shadow: 0 12px 30px rgba(118, 116, 70, 0.22), 0 3px 8px rgba(0, 0, 0, 0.08);
  }

  50% {
    box-shadow: 0 16px 34px rgba(118, 116, 70, 0.28), 0 4px 10px rgba(0, 0, 0, 0.1);
  }
}

.donation-gate-title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  color: var(--color-primary-dark);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.donation-gate-title__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background-color: rgba(209, 26, 27, 0.12);
  color: #9f1213;
  font-size: 0.72em;
  line-height: 1;
  flex: 0 0 auto;
}

.donation-gate-text {
  margin: 0 0 var(--space-5);
  color: var(--color-gray-dark);
}

.donation-gate-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.donation-gate-amount-label {
  color: var(--color-primary-dark);
  font-weight: 600;
  text-align: center;
}

.donation-gate-amount-value {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background-color: var(--color-primary-bg);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
}

.donation-gate-amount input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: min(100%, 360px);
  background: transparent;
}

.donation-gate-amount input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7dba4 0%, #d11a1b 100%);
}

.donation-gate-amount input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background-color: #d11a1b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 21s-6.715-4.333-9.606-7.236C-1.553 9.81-.923 4.92 2.645 2.793A5.986 5.986 0 0 1 12 4.607a5.986 5.986 0 0 1 9.355-1.814c3.568 2.127 4.198 7.017.251 10.971C18.715 16.667 12 21 12 21z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.donation-gate-amount input[type="range"]::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2c979 0%, #d11a1b 100%);
}

.donation-gate-amount input[type="range"]::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background-color: #d11a1b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 21s-6.715-4.333-9.606-7.236C-1.553 9.81-.923 4.92 2.645 2.793A5.986 5.986 0 0 1 12 4.607a5.986 5.986 0 0 1 9.355-1.814c3.568 2.127 4.198 7.017.251 10.971C18.715 16.667 12 21 12 21z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.donation-gate-options {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.donation-gate-question {
  margin: 0 0 var(--space-3);
  text-align: center;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.donation-gate-card .lang-ar {
  text-align: center;
}

.donation-gate-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.donation-gate-option>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-primary-pale);
  background-color: var(--color-white);
  color: var(--color-primary-dark);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.donation-gate-option input:checked+span {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-white);
}

.trust-proof-card {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.trust-proof-title {
  margin: 0 0 var(--space-4);
  color: rgba(250, 250, 250, 0.95);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
}

.trust-proof-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-proof-list .trust-badge {
  align-items: flex-start;
  line-height: 1.5;
}

.conditional-section:not(#stripe-section) {
  display: none;
}

.conditional-section.is-visible {
  display: block;
  animation: conditionalReveal 280ms ease-out;
}

@keyframes conditionalReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .bank-data-grid {
    grid-template-columns: 1fr !important;
  }

  .bank-data-qr {
    justify-self: center;
  }

  .donation-gate-card {
    padding: var(--space-5);
  }

  .donation-gate-option>span {
    min-width: 96px;
  }
}

/* =====================================================================
   SPENDE-PAGE-REDESIGN — modern hero + amount selector + channel grid
   ===================================================================== */

:root {
  /* Mapped onto the site design system (styles.css) */
  --rd-radius: var(--radius-lg);
  --rd-radius-sm: var(--radius-md);
  --rd-gap: 1rem;
  --rd-gap-lg: 1.5rem;
  --rd-olive: var(--color-primary);
  --rd-olive-dark: var(--color-primary-dark);
  --rd-gold: var(--color-accent);
  --rd-bg-card: var(--color-white);
  --rd-bg-soft: var(--color-primary-bg);
  --rd-text: var(--color-black);
  --rd-text-mid: var(--color-gray-dark);
  --rd-text-light: var(--color-gray-mid);
  --rd-border: var(--color-border);
  --rd-success: var(--color-primary-dark);
  --rd-error: var(--color-danger);
}

[dir="rtl"] .spende-redesign {
  direction: rtl;
}

.spende-redesign {
  max-width: 720px;
  margin-inline: auto;
  padding: 2rem 1rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rd-gap-lg);
}

/* ---------------- Hero progress card ---------------- */
.hero-progress-card {
  background: linear-gradient(135deg, var(--rd-bg-card) 0%, var(--rd-bg-soft) 100%);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(118, 116, 70, 0.08);
}

.hero-progress-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--rd-olive-dark);
}

.hero-progress-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hero-progress-headline .raised {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rd-olive-dark);
}

.hero-progress-headline .goal {
  font-size: 1.1rem;
  color: var(--rd-text-mid);
}

.hero-progress-percent {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--rd-success);
  margin-bottom: 0.5rem;
}

.hero-progress-bar {
  height: 12px;
  background: #ecead8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.hero-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rd-gold) 0%, var(--rd-olive) 100%);
  border-radius: 6px;
  transition: width 600ms ease-out;
}

[dir="rtl"] .hero-progress-bar-fill {
  background: linear-gradient(90deg, var(--rd-olive) 0%, var(--rd-gold) 100%);
}

.hero-progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.stat-box {
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--rd-radius-sm);
  padding: 0.75rem 0.5rem;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rd-gold);
  unicode-bidi: isolate;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--rd-text-mid);
}

.m2-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin: 1rem 0;
}

.m2-grid--mini {
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  max-width: 280px;
  margin: 0.5rem auto 0;
}

.m2-square {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #ecead8;
}

.m2-square.is-filled {
  background: var(--rd-gold);
}

.m2-compact {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--rd-olive-dark);
  text-align: center;
  padding: 1rem 0;
  unicode-bidi: isolate;
}

.hero-progress-donors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .hero-progress-donors {
    grid-template-columns: 1fr 1fr;
  }
}

.top-donor-row,
.recent-donor-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--rd-radius-sm);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.top-donor-ribbon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  background: var(--rd-text-light);
}

.top-donor-ribbon.gold {
  background: var(--rd-gold);
  color: #fff;
}

.top-donor-ribbon.silver {
  background: #b8b8b8;
  color: #fff;
}

.top-donor-ribbon.bronze {
  background: #cd7f32;
  color: #fff;
}

.top-donor-name,
.recent-donor-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-donor-time {
  font-size: 0.8rem;
  color: var(--rd-text-light);
  direction: ltr;
  unicode-bidi: isolate;
}

.top-donor-amount,
.recent-donor-amount {
  font-weight: 600;
  color: var(--rd-olive-dark);
  unicode-bidi: isolate;
}

.empty-state {
  text-align: center;
  padding: 1rem;
  color: var(--rd-text-light);
  font-style: italic;
}

.skeleton {
  height: 1.5rem;
  background: linear-gradient(90deg, #ecead8 0%, #f7f5e8 50%, #ecead8 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: var(--rd-radius-sm);
  margin-bottom: 0.4rem;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ---------------- Amount selector ---------------- */
.amount-selector-card {
  background: var(--rd-bg-card);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(118, 116, 70, 0.08);
}

.amount-selector-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  color: var(--rd-olive-dark);
}

.m2-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.m2-preset {
  padding: 0.9rem 0.5rem;
  border: 2px solid var(--rd-border);
  background: var(--rd-bg-soft);
  border-radius: var(--rd-radius-sm);
  cursor: pointer;
  transition: all 160ms;
  text-align: center;
  font: inherit;
  color: var(--rd-text);
}

.m2-preset:hover {
  border-color: var(--rd-olive);
  background: #fff;
}

.m2-preset.is-selected {
  border-color: var(--rd-olive);
  background: var(--rd-olive);
  color: #fff;
}

.m2-preset strong {
  display: block;
  font-size: 1.1rem;
}

.m2-preset small {
  display: block;
  font-size: 0.8rem;
  opacity: 0.85;
  unicode-bidi: isolate;
}

.freeform-amount {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--rd-text-light);
  font-size: 0.9rem;
}

.freeform-amount input {
  width: 100%;
  max-width: 280px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);
  font: inherit;
  font-size: 1rem;
  margin-top: 0.4rem;
}

.frequency-selector {
  margin: 1rem 0;
}

.frequency-selector>label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.frequency-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.freq-tab {
  padding: 0.6rem;
  border: 1px solid var(--rd-border);
  background: var(--rd-bg-soft);
  border-radius: var(--rd-radius-sm);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  transition: all 160ms;
}

.freq-tab.is-selected {
  border-color: var(--rd-olive);
  background: var(--rd-olive);
  color: #fff;
}

#freq-installment-line {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--rd-text-mid);
  text-align: center;
  unicode-bidi: isolate;
}

.donor-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 1rem 0;
}

.donor-info input[type="text"],
.donor-info input[type="email"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);
  font: inherit;
  font-size: 1rem;
}

.donor-info input[aria-invalid="true"] {
  border-color: var(--rd-error);
  background: #fdf3f2;
}

.opt-in-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
}

#dedication-wrap {
  margin-top: 0.5rem;
}

.amount-summary {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rd-olive-dark);
  margin: 1rem 0;
  unicode-bidi: isolate;
}

.amount-summary.has-error {
  color: var(--rd-error);
}

/* ---------------- Payment channel grid ---------------- */
.channel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .channel-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.channel-tile {
  background: var(--rd-bg-card);
  border: 2px solid var(--rd-border);
  border-radius: var(--rd-radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 200ms;
}

.channel-tile h3 {
  margin: 0 0 0.5rem;
  color: var(--rd-olive-dark);
  font-size: 1.15rem;
}

.channel-tile p {
  margin: 0 0 1rem;
  color: var(--rd-text-mid);
  font-size: 0.9rem;
}

.channel-tile button {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: var(--rd-radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms;
}

.channel-tile button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.channel-tile--stripe button {
  background: var(--rd-olive);
  color: #fff;
}

.channel-tile--stripe button:hover:not(:disabled) {
  background: var(--rd-olive-dark);
}

.channel-tile--sepa button {
  background: #fff;
  color: var(--rd-olive);
  border: 2px solid var(--rd-olive);
}

.channel-tile--sepa button:hover:not(:disabled) {
  background: var(--rd-olive);
  color: #fff;
}

.channel-error {
  margin-top: 0.5rem;
  color: var(--rd-error);
  font-size: 0.9rem;
}

/* ---------------- Trust badges ---------------- */
.trust-badges {
  text-align: center;
  padding: 1rem;
  color: var(--rd-text-mid);
  font-size: 0.9rem;
}

.trust-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.trust-badge {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius-sm);
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--rd-text);
}

.trust-microcopy {
  color: var(--rd-success);
  font-weight: 600;
}

/* =====================================================================
   ZUWENDUNG & RÜCKFRAGEN (alahibba-style: bank details + QR code)
   ===================================================================== */

.rd-zuwendung {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-bottom: var(--space-12);
}

.rd-zuwendung-card {
  background: var(--color-primary-bg);
  border: 1px solid var(--rd-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
}

.rd-zuwendung-icon {
  width: 60px;
  height: 60px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.rd-zuwendung-card h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.rd-zuwendung-desc {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--rd-text);
}

.rd-zuwendung-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--color-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}

@media (min-width: 600px) {
  .rd-zuwendung-grid {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }
}

.rd-zuwendung-bank dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0 0 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.4;
}

.rd-zuwendung-bank dt {
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.rd-zuwendung-bank dd {
  margin: 0;
  color: var(--rd-text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rd-zuwendung-bank dd .copy-value {
  white-space: nowrap;
}

@media (max-width: 599px) {

  .rd-zuwendung-bank dd,
  .rd-zuwendung-bank dd .copy-value {
    white-space: normal;
    word-break: break-word;
  }
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--rd-olive);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, color 0.15s;
}

.copy-btn:hover {
  background: rgba(118, 116, 70, 0.1);
}

.copy-btn--copied {
  color: var(--rd-success);
  font-weight: 700;
}

.rd-zuwendung-mail {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--rd-text);
  border-top: 1px dashed var(--rd-border);
  padding-top: 0.6rem;
}

.rd-zuwendung-mail a {
  color: var(--color-primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.rd-zuwendung-mail a:hover {
  text-decoration: underline;
}

.rd-zuwendung-qr {
  text-align: center;
}

.rd-zuwendung-qr img {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto;
  border: 2px solid var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.rd-zuwendung-qr-hint {
  font-size: 0.8rem;
  color: var(--rd-text-mid);
  margin: 0.5rem 0 0;
}

.rd-narrative {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.rd-narrative h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rd-text);
  margin: 0 0 1rem;
  text-align: center;
}

.rd-narrative article {
  background: var(--color-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.rd-narrative p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rd-text);
  margin: 0 0 0.75rem;
}

.rd-narrative p:last-child {
  margin-bottom: 0;
}

.rd-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 600px) {
  .rd-video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rd-video-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rd-video-card figcaption {
  font-size: 0.85rem;
  color: var(--rd-text-mid);
  text-align: center;
}

.rd-video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--color-black);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
}

.rd-narrative-note {
  font-size: 0.8rem !important;
  color: var(--rd-text-mid) !important;
  text-align: center;
  margin-top: 0.75rem !important;
  font-style: italic;
}

.rd-stage-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rd-stage {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rd-stage-marker {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--rd-olive);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.rd-stage h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rd-text);
}

.rd-stage p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--rd-text-mid);
}

/* ---------------- Language toggle ---------------- */
.lang-toggle {
  background: var(--rd-olive);
  color: #fff;
  border: none;
  border-radius: var(--rd-radius-sm);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.lang-toggle:hover {
  background: var(--rd-olive-dark);
}

[dir="rtl"] .bi-icon-flip {
  transform: scaleX(-1);
}

/* ---------------- Twingle iframe container ---------------- */
#twingle-iframe-container {
  margin-top: 1.5rem;
}

#twingle-iframe-container iframe {
  width: 100%;
  min-height: 700px;
  border: 0;
}

/* ---------------- Mobile tap target enforcement ---------------- */
@media (max-width: 767px) {

  .m2-preset,
  .freq-tab,
  .channel-tile button,
  .lang-toggle {
    min-height: 44px;
  }
}

/* =====================================================================
   SPENDE REDESIGN — alahibba-style (German only, rd-*)
   Single column: hero title → form (frequency + amount chips + form + privacy + CTA) → progress bar → donor lists
   ===================================================================== */

:root {
  /* Mapped onto the site design system (styles.css) */
  --rd-green: var(--color-primary);
  --rd-green-dark: var(--color-primary-dark);
  --rd-cream: var(--color-primary-bg);
}

.spende-redesign {
  max-width: 720px;
  margin-inline: auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== Hero title ===== */
.rd-hero {
  text-align: center;
  padding: 0 0 0.5rem;
}

.rd-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--rd-text);
  line-height: 1.2;
}

/* ===== Form ===== */
.rd-form {
  background: var(--color-white);
  border: 1px solid var(--rd-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rd-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rd-fieldset legend {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--rd-text);
  padding: 0;
  margin: 0 0 0.25rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.rd-fieldset legend .req {
  color: var(--rd-error);
}

.rd-fieldset legend .ccy {
  font-size: 0.8rem;
  color: var(--rd-text-mid);
  font-weight: 500;
}

/* Frequency tabs */
.rd-freq-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  overflow: hidden;
}

.rd-freq-tab {
  padding: 0.65rem 0.5rem;
  border: 0;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  color: var(--rd-text);
  border-right: 1px solid var(--rd-border);
  transition: background 160ms;
}

.rd-freq-tab:last-child {
  border-right: 0;
}

.rd-freq-tab:hover:not(:disabled) {
  background: var(--rd-cream);
}

.rd-freq-tab.is-selected {
  background: var(--rd-green);
  color: #fff;
}

.rd-freq-tab:disabled {
  background: #f4f4f0;
  color: #b8b8a8;
  cursor: not-allowed;
}

/* Quick amount chips (full-width rows) */
.rd-chips {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rd-chip {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--rd-text);
  text-align: center;
  transition: all 160ms;
}

.rd-chip:hover {
  border-color: var(--rd-green);
  background: var(--rd-cream);
}

.rd-chip.is-selected {
  border-color: var(--rd-green);
  background: var(--rd-green);
  color: #fff;
}

/* Custom amount */
.rd-fieldset input[type="text"],
.rd-fieldset input[type="email"],
.rd-fieldset input[type="number"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rd-border);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  color: var(--rd-text);
  background: #fff;
}

.rd-fieldset input[aria-invalid="true"] {
  border-color: var(--rd-error);
  background: #fdf3f2;
}

.rd-fieldset input::placeholder {
  color: #999;
}

/* Privacy notice */
.rd-privacy {
  text-align: center;
  font-size: 0.85rem;
  color: var(--rd-text-mid);
  margin: 0;
  padding: 0 0.5rem;
}

/* Primary CTA → Stripe */
.rd-cta-primary {
  width: 100%;
  padding: 1rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  background: var(--rd-green);
  color: #fff;
  cursor: pointer;
  transition: background 160ms;
}

.rd-cta-primary:hover:not(:disabled) {
  background: var(--rd-green-dark);
}

.rd-cta-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary CTA → SEPA */
.rd-cta-secondary {
  width: 100%;
  padding: 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--rd-green);
  border-radius: 8px;
  background: #fff;
  color: var(--rd-green);
  cursor: pointer;
  transition: all 160ms;
}

.rd-cta-secondary:hover:not(:disabled) {
  background: var(--rd-green);
  color: #fff;
}

.rd-cta-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rd-error {
  color: var(--rd-error);
  font-size: 0.95rem;
  text-align: center;
}

/* Trust microcopy */
.rd-trust-microcopy {
  text-align: center;
  font-size: 0.9rem;
  color: var(--rd-green);
  font-weight: 600;
  margin: 0;
}

/* Trust badges row */
.rd-trust-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0.5rem 0 0;
  max-width: 100%;
}

.rd-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  flex-shrink: 0;
}

.rd-trust-badge img {
  height: 18px;
  width: auto;
  max-width: 64px;
  display: block;
}

/* ===== Progress card (alahibba pattern: simple bar) ===== */
.rd-progress {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  position: relative;
}

.rd-progress-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.rd-progress-line .raised {
  font-weight: 700;
  color: var(--rd-green-dark);
  font-size: 1.4rem;
}

.rd-progress-line .of {
  color: var(--rd-text-mid);
}

.rd-progress-line .goal {
  font-weight: 600;
  color: var(--rd-text);
}

.rd-progress-percent {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rd-green);
  margin-bottom: 0.5rem;
}

.rd-progress-bar {
  height: 10px;
  background: var(--rd-cream);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.rd-progress-bar-fill {
  height: 100%;
  background: var(--rd-green);
  border-radius: 5px;
  transition: width 600ms ease-out;
}

.rd-progress-remaining {
  font-size: 0.85rem;
  color: var(--rd-text-mid);
  margin-bottom: 0.75rem;
}

.rd-progress-remaining #rd-remaining {
  font-weight: 700;
  color: var(--rd-text);
  direction: ltr;
  unicode-bidi: isolate;
}

.rd-m2-caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--rd-text-mid);
  margin: 0.5rem 0 0.25rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.rd-m2-caption #rd-m2-raised,
.rd-m2-caption #rd-m2-goal {
  font-weight: 700;
  color: var(--rd-text);
  margin: 0 0.15rem;
}

.rd-hero-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--rd-text-mid);
  margin: 0.5rem 0 0;
}

.rd-hero-caption strong {
  color: var(--rd-green-dark);
}

.rd-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  padding: 0.7rem 0.5rem;
  border: 1px solid var(--rd-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--rd-text);
  text-align: center;
  transition: all 160ms;
}

.rd-chip:hover {
  border-color: var(--rd-green);
  background: var(--rd-cream);
}

.rd-chip.is-selected {
  border-color: var(--rd-green);
  background: var(--rd-green);
  color: #fff;
}

.rd-chip-m2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.rd-chip-price {
  font-size: 0.85rem;
  opacity: 0.85;
  direction: ltr;
  unicode-bidi: isolate;
}

.rd-optin {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

.rd-optin input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

#rd-dedication {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rd-border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.rd-skeleton-block {
  height: 80px;
  background: linear-gradient(90deg, var(--rd-cream) 0%, #f4f1e0 50%, var(--rd-cream) 100%);
  background-size: 200% 100%;
  animation: rd-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes rd-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ===== Donor lists (alahibba layout) ===== */
.rd-donors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .rd-donors {
    grid-template-columns: 1fr 1fr;
  }
}

.rd-donors-block {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.rd-donors-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rd-donors-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rd-green-dark);
}

.rd-donors-more {
  font-size: 0.78rem;
  color: var(--rd-text-mid);
  text-decoration: none;
  border: 1px solid var(--rd-border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}

.rd-donors-more:hover {
  border-color: var(--rd-green);
  color: var(--rd-green);
}

.rd-donor-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rd-donor {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f0edd5;
  font-size: 0.95rem;
}

.rd-donor:last-child {
  border-bottom: 0;
}

.rd-donor-avatar {
  position: relative;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--rd-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--rd-green-dark);
  font-size: 0.9rem;
}

.rd-donor-avatar .initial {
  line-height: 1;
}

.rd-donor-rank {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  background: var(--rd-text-mid);
  border: 1.5px solid #fff;
}

.rd-donor-rank--gold {
  background: var(--rd-gold);
}

.rd-donor-rank--silver {
  background: #b8b8b8;
}

.rd-donor-rank--bronze {
  background: #cd7f32;
}

.rd-donor-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.rd-donor-time {
  font-size: 0.78rem;
  color: var(--rd-text-mid);
  direction: ltr;
  unicode-bidi: isolate;
}

.rd-donor-amount {
  font-weight: 600;
  color: var(--rd-green-dark);
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.rd-donor-tier {
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: var(--rd-text-mid);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.rd-donor-tier:nth-of-type(1),
.rd-donor-tier:has(+ .rd-donor-amount) {
  /* no-op selector, keep generic */
}

.rd-empty {
  text-align: center;
  color: var(--rd-text-mid);
  font-style: italic;
  padding: 1.5rem 0;
  list-style: none;
}

.rd-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--rd-green-dark);
}

/* Mobile tap targets */
@media (max-width: 720px) {

  .rd-chip,
  .rd-freq-tab,
  .rd-cta-primary,
  .rd-cta-secondary {
    min-height: 44px;
  }
}

/* ============================================================
   DESIGN HANDOFF SECTIONS — new progress + configurator + grid
   ============================================================ */

/* ---------- Design Tokens (mapped onto the site design system) ---------- */
:root {
  --sp-green: var(--color-primary);
  --sp-green-dark: var(--color-primary-dark);
  --sp-green-tint: var(--color-primary-bg);
  --sp-green-partial: var(--color-primary-pale);
  --sp-yellow: var(--color-accent);
  --sp-text: var(--color-black);
  --sp-text-sec: var(--color-gray-dark);
  --sp-text-muted: var(--color-gray-mid);
  --sp-text-faint: var(--color-gray-mid);
  --sp-bg-white: var(--color-white);
  --sp-bg-band: var(--color-primary-bg);
  --sp-bg-open: var(--color-gray-light);
  --sp-border: var(--color-border);
  --sp-shadow-card: var(--shadow-md);
  --r-pill: 999px;
  --r-card: var(--radius-lg);
  --r-strip: var(--radius-md);
  --r-ctrl: var(--radius-md);
  --r-step: var(--radius-sm);
}

/* ---------- Layout helpers ---------- */
.spende-inner {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
  box-sizing: border-box;
}

/* ---------- Progress section ---------- */
.donation-progress-new {
  background: var(--sp-bg-white);
  color: var(--sp-text);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--sp-shadow-card);
  margin-bottom: 24px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.progress-label-text {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sp-text-muted);
  margin-bottom: 2px;
}

.progress-amount {
  font-size: 26px;
  font-weight: 600;
  color: var(--sp-text);
}

.progress-amount.green {
  color: var(--sp-green);
}

.progress-track {
  height: 12px;
  background: var(--sp-bg-open);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sp-green);
  border-radius: var(--r-pill);
  width: 0%;
  transition: width 0.6s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sp-text-sec);
  margin-top: 6px;
}

.iban-strip {
  margin-top: 24px;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-strip);
  background: var(--sp-bg-band);
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 12px;
  color: var(--sp-text);
}

.iban-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.iban-label {
  color: var(--sp-text-faint);
}

.iban-value {
  font-weight: 500;
}

.iban-value.mono {
  font-family: 'Courier New', monospace;
}

/* ---------- Main two-column ---------- */
.spende-content {
  display: grid;
  grid-template-columns: 1fr 460px;
  grid-template-rows: auto 1fr;
  gap: 40px;
  align-items: start;
  padding-top: 36px;
  padding-bottom: 64px;
  background: var(--sp-bg-white);
}

.donation-progress-new {
  grid-column: 1 / -1;
  grid-row: 1;
}

.spende-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.spende-right {
  grid-column: 2;
  grid-row: 2;
}

.sp-card {
  border: 1px solid var(--sp-border);
  border-radius: var(--r-card);
  padding: 24px;
  background: var(--sp-bg-white);
}

/* Grid tracker */
.grid-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.label-caps {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sp-text-faint);
}

.label-faint {
  font-size: 12px;
  color: var(--sp-text-muted);
}

.grid-m2-headline {
  margin-bottom: 14px;
  line-height: 1;
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .grid-m2-headline {
  text-align: right;
}

#raised-m2 {
  font-size: 40px;
  font-weight: 600;
  color: var(--sp-green-dark);
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.of-total-m2 {
  font-size: 13px;
  color: var(--sp-text-muted);
  margin-left: 6px;
  margin-right: 6px;
}

#grid-map {
  display: grid;
  grid-template-columns: repeat(50, 1fr);
  gap: 2px;
  margin-bottom: 10px;
}

#grid-map.is-collapsed {
  position: relative;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.grid-cell {
  aspect-ratio: 1;
  border-radius: 1px;
  background: var(--sp-bg-open);
}

.grid-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--sp-text-muted);
  margin-top: 8px;
  flex-wrap: wrap;
}

.grid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--sp-green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.grid-toggle:hover {
  color: var(--sp-green-dark);
}

.grid-toggle:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: 2px;
  border-radius: 2px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-strip);
  padding: 14px 16px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 3px;
}

.stat-label {
  font-size: 11px;
  color: var(--sp-text-muted);
}

/* Quote card */
.quote-card {
  background: var(--sp-green-tint);
  border: 1px solid var(--sp-green);
  border-radius: var(--r-card);
  padding: 22px 26px;
}

.quote-text {
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--sp-green-dark);
  margin: 0 0 8px;
}

.quote-attribution {
  font-size: 11px;
  color: rgba(15, 110, 86, 0.70);
  margin: 0;
}

/* How it works */
.how-it-works {
  border: 1px solid var(--sp-border);
  border-radius: var(--r-card);
  padding: 28px 28px;
  background: linear-gradient(180deg, #fff 0%, #FBFAF6 100%);
  position: relative;
  overflow: hidden;
}

.how-it-works__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 6px;
}

.how-it-works__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--sp-text);
  margin: 0;
}

.how-it-works__badge {
  font-size: 13px;
  color: var(--sp-green-dark);
  font-weight: 600;
}

.how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

@media (max-width: 640px) {
  .how-it-works__steps {
    grid-template-columns: 1fr;
  }
}

.how-step {
  position: relative;
  padding: 0 24px;
}

.how-step:not(:last-child) {
  border-right: 1px dashed var(--sp-border);
}

.how-step__number {
  width: 44px;
  height: 44px;
  border-radius: var(--r-card);
  background: var(--sp-green-dark);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}

.how-step__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sp-text);
  margin-bottom: 6px;
}

.how-step__text {
  font-size: 13.5px;
  color: var(--sp-text-sec);
  line-height: 1.6;
}

/* Donor lists */
.donor-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.donor-card {
  border: 1px solid var(--sp-border);
  border-radius: var(--r-card);
  padding: 18px 20px;
  background: var(--sp-bg-white);
}

.donor-card-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sp-text-faint);
  margin-bottom: 10px;
}

.donor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sp-bg-open);
}

.donor-row:last-child {
  border-bottom: none;
}

/* "Mehr anzeigen (n)" / "Weniger anzeigen" toggle under the donor lists. */
.recent-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-green-dark);
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.recent-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition-fast);
}

.recent-toggle[aria-expanded="true"]::after {
  transform: translateY(1px) rotate(-135deg);
}

.recent-toggle:hover {
  background: var(--color-primary-bg);
  border-color: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

.recent-toggle:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: 2px;
}

.donor-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.top-avatar {
  background: var(--sp-bg-open);
  color: var(--sp-text-sec);
}

.recent-avatar {
  background: var(--sp-green-tint);
  color: var(--sp-green-dark);
}

.donor-name {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donor-amount {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-green-dark);
  white-space: nowrap;
}

.donor-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.donor-time {
  font-size: 11px;
  color: var(--sp-text-faint);
  white-space: nowrap;
}

.donor-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 12px;
  gap: 8px;
}

.donor-empty__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed var(--color-primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 22px;
}

.donor-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-text);
}

.donor-empty__text {
  font-size: 13px;
  color: #888;
  max-width: 28ch;
}

/* ---------- Right: Donation card ---------- */
.spende-right {
  position: sticky;
  top: 20px;
}

.donation-card {
  border: 1px solid var(--sp-border);
  border-radius: var(--r-card);
  box-shadow: var(--sp-shadow-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--sp-bg-white);
}

.donation-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-text);
  margin: 0 0 5px;
  word-break: break-word;
}

@media (max-width: 640px) {
  .donation-card-title {
    font-size: 14px;
  }
}

.donation-card-sub {
  font-size: 12px;
  color: var(--sp-text-muted);
  margin: 0;
}

.donation-card-sub strong {
  color: var(--sp-green);
  font-weight: 600;
}

/* Segmented control */
.seg-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  overflow: hidden;
}

.seg-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 9px 0;
  border: none;
  cursor: pointer;
  background: var(--sp-bg-white);
  color: var(--sp-text-sec);
  transition: background 0.15s, color 0.15s;
}

.seg-btn.active {
  background: var(--sp-green);
  color: #fff;
}

.seg-btn:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: -2px;
}

/* Package buttons */
.pkg-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 8px;
}

/* Bold label above "oder individueller Beitrag (€)" */
.beitrag-label-row {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  margin-bottom: 8px;
}

.pkg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pkg-btn {
  font-family: inherit;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  padding: 12px 8px;
  cursor: pointer;
  background: var(--sp-bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: border-color 0.15s, background 0.15s;
}

.pkg-btn:hover {
  border-color: var(--sp-green);
}

.pkg-btn.active {
  border-color: var(--sp-green);
  background: var(--sp-green-tint);
  box-shadow: 0 0 0 2px var(--sp-green), 0 4px 12px rgba(29, 158, 117, 0.25);
}

.pkg-m2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--sp-text);
}

.pkg-btn.active .pkg-m2 {
  color: var(--sp-green-dark);
}

.pkg-btn {
  position: relative;
}

.pkg-price {
  font-size: 11px;
  color: var(--sp-text-muted);
}

.pkg-btn:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: 2px;
}

}

/* Qty stepper */
.stepper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  padding: 8px 12px;
}

.stepper-label {
  font-size: 12px;
  color: var(--sp-text-sec);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper-btn {
  font-family: inherit;
  width: 30px;
  height: 30px;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-step);
  background: var(--sp-bg-white);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--sp-text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.stepper-btn:hover {
  border-color: var(--sp-green);
  color: var(--sp-green-dark);
}

.stepper-btn:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: 2px;
}

.stepper-display {
  font-size: 14px;
  font-weight: 600;
  min-width: 80px;
  text-align: center;
  color: var(--sp-text);
}

/* Custom amount */
.custom-input {
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  background: var(--sp-bg-white);
  color: var(--sp-text);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.custom-input:focus {
  border-color: var(--sp-green);
}

.custom-input::placeholder {
  color: var(--sp-text-faint);
}

.custom-amount-wrap {
  margin-top: 12px;
}

.custom-amount-label {
  display: block;
  font-size: 12px;
  color: var(--sp-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.custom-amount-hint {
  text-align: center;
  font-size: 13px;
  color: #D4A017;
  background: rgba(212, 160, 23, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 8px 0 0;
  font-weight: 600;
}

.custom-amount-hint--warn {
  color: #C53030;
  background: rgba(197, 48, 48, 0.08);
}

.donation-error {
  color: #C53030;
  background: rgba(197, 48, 48, 0.08);
  border: 1px solid rgba(197, 48, 48, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* CTA button */
.cta-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--r-ctrl);
  background: var(--sp-green);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.cta-btn:hover {
  background: var(--sp-green-dark);
}

.cta-btn:disabled,
.cta-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--sp-green);
}

.cta-btn:focus-visible {
  outline: 2px solid var(--sp-green-dark);
  outline-offset: 2px;
}

.cta-btn__text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-btn__amount {
  font-weight: 700;
  margin: 0 2px;
}

.cta-btn__arrow {
  margin-left: 6px;
  transition: transform 0.15s;
}

.cta-btn:hover .cta-btn__arrow {
  transform: translateX(2px);
}

/* Datenschutzerklärung modal */
.datenschutz-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.datenschutz-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.datenschutz-modal__card {
  position: relative;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--r-card);
  padding: 24px 22px 20px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.5;
}

.datenschutz-modal__card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.datenschutz-modal__card dl {
  margin: 12px 0;
}

.datenschutz-modal__card dt {
  font-weight: 700;
  margin-top: 8px;
}

.datenschutz-modal__card dd {
  margin: 0 0 6px 12px;
}

.datenschutz-modal__close {
  margin-top: 16px;
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.datenschutz-modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

#open-datenschutz {
  color: var(--sp-green);
  text-decoration: underline;
  margin-left: 4px;
  cursor: pointer;
}

#open-datenschutz:hover {
  color: var(--sp-green-dark);
}

.cta-hint {
  text-align: center;
  font-size: 12px;
  color: var(--sp-text-sec);
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  padding: 8px 12px;
  margin: 8px 0 0 0;
}

/* Donor form */
.donor-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.certificate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 26px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.donor-form-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--sp-text);
  margin: 0 0 4px;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.name-field {
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .name-row {
    grid-template-columns: 1fr;
  }
}

/* Individual € amount in meter card (overrides meter amount when > 0) */
.individual-amount-wrap {
  margin-top: 4px;
  margin-bottom: 16px;
}

.individual-amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  background: var(--sp-bg-white);
  padding: 0 12px;
  transition: border-color 0.15s;
}

.individual-amount-input-wrap .custom-input {
  border: none;
  padding: 11px 0;
  flex: 1;
}

.individual-amount-input-wrap:focus-within {
  border-color: var(--sp-green);
}

.individual-amount-prefix {
  font-size: 16px;
  font-weight: 600;
  color: var(--sp-text-sec);
  margin-right: 8px;
}

/* Hide the up/down spinner arrows on number inputs (cleaner mobile UX) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]:hover,
input[type="number"]:focus {
  -moz-appearance: none;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--sp-text-sec);
  margin-top: 4px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--sp-text);
  cursor: pointer;
  line-height: 1.4;
  margin-top: 2px;
}

.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--sp-green);
  flex-shrink: 0;
}

.check-text {
  color: var(--sp-text);
}

.check-hint {
  color: var(--sp-text-muted);
}

.privacy-note {
  font-size: 11px;
  color: var(--sp-text-muted);
  text-align: center;
  margin: 6px 0 0;
}

/* SEPA direct debit button */
.sepa-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  background: #fff;
  color: var(--sp-text-sec);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.sepa-btn:hover {
  background: var(--sp-bg-band);
  border-color: var(--sp-green);
  color: var(--sp-green-dark);
}

.sepa-btn:focus-visible {
  outline: 2px solid var(--sp-green);
  outline-offset: 2px;
}

/* Trust footer */
.trust-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.trust-secure {
  font-size: 11px;
  color: var(--sp-text-muted);
}

.payment-methods-label {
  font-size: 11px;
  color: var(--sp-text-muted);
  margin: 0;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.payment-logos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  direction: ltr;
  padding: 0 4px;
}

.pay-logo {
  flex: 0 0 auto;
  height: 16px;
  width: auto;
  max-width: none;
  opacity: 0.9;
  direction: ltr;
  unicode-bidi: embed;
}

.pay-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  padding-top: 10px;
}

.pay-logo-wrap--recommended .pay-logo {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(29, 158, 117, 0.3));
}

.pay-logo-badge {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  background: var(--sp-green);
  border-radius: var(--r-step);
  padding: 1px 5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.trust-privacy {
  font-size: 10px;
  color: var(--sp-text-faint);
  text-align: center;
}

/* Footer strip */
.spende-footer-strip {
  border-top: 1px solid var(--sp-border);
  background: var(--sp-bg-band);
  padding: 18px 24px;
  text-align: center;
  font-size: 11px;
  color: var(--sp-text-muted);
}

/* Responsive: stack columns on narrow viewports */
@media (max-width: 900px) {
  .spende-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .donation-progress-new {
    grid-column: 1 / -1;
  }

  .spende-left,
  .spende-right {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .spende-right {
    position: static;
  }

  .donation-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }

  .donor-lists {
    grid-template-columns: 1fr;
  }
}

/* ---------- Iteration 2 additions ---------- */

/* Mode switch (4 buttons: Einmalig / 3 Monate / 6 Monate / 8 Monate) */
.mode-switch-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  margin: 16px 0 8px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 0;
  margin-bottom: 14px;
}

.mode-switch .seg-btn {
  flex: none;
  font-size: 12px;
  padding: 10px 4px;
  white-space: nowrap;
}

/* Cover fees breakdown (shown when "Transaktionskosten übernehmen" is checked) */
.cover-fees-breakdown {
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-strip);
  font-size: 13px;
}

.cover-fees-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--sp-text-sec);
}

.cover-fees-row--total {
  border-top: 1px solid var(--sp-border);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.mode-switch .seg-btn span {
  display: block;
  line-height: 1.2;
}

/* Installment preview */
.installment-preview {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--sp-border);
  border-radius: var(--r-strip);
  background: var(--sp-bg-band);
}

.installment-preview-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sp-text-sec);
  margin-bottom: 10px;
}

.installment-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.installment-preview-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--sp-text-sec);
  padding: 8px 10px;
  background: var(--sp-bg-white);
  border-radius: var(--r-step);
  border: 1px solid var(--sp-border);
}

.installment-preview-more {
  font-size: 12px;
  color: var(--sp-text-sec);
  text-align: center;
  font-style: italic;
  min-height: 1em;
}

.installment-preview-footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--sp-border);
  font-size: 12px;
  color: var(--sp-text-sec);
  line-height: 1.5;
}

.installment-preview-footer .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sp-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  flex: 0 0 18px;
  line-height: 1;
}

.installment-preview-footer .info-text {
  font-style: italic;
}

/* Required field marker */
.required-mark {
  color: #C53030;
  margin-left: 2px;
  font-weight: 700;
}

/* Field errors */
.field-error {
  display: none;
  color: #C53030;
  font-size: 12px;
  margin: -8px 0 12px 0;
  padding-left: 2px;
}

.field-error.is-visible {
  display: block;
}

.field-hint {
  color: var(--sp-text-sec);
  font-size: 12px;
  margin: -6px 0 12px 28px;
  padding-left: 4px;
  font-style: italic;
}

/* Summary footnote (info icon) */
.summary-footnote {
  display: none;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--sp-text-sec);
  margin: 8px 0 16px 0;
  line-height: 1.5;
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-ctrl);
  padding: 10px 12px;
}

.summary-footnote .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sp-green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  flex: 0 0 18px;
}

.summary-footnote .info-text {
  font-style: italic;
}

/* Tax consent note */
.tax-consent-note {
  font-size: 12px;
  color: var(--sp-text-sec);
  font-style: italic;
  margin: -8px 0 12px 28px;
  line-height: 1.4;
}

/* Consent row */
.consent-row .check-text {
  font-weight: 500;
  color: var(--sp-text-sec);
}

html[data-lang="ar"] .consent-row .check-text {
  text-align: right;
  direction: rtl;
}

.consent-row+.field-error {
  margin: 4px 0 12px 28px;
}

/* Bottom SEPA button */
.sepa-bottom-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-green);
  background: var(--sp-bg-white);
  border: 1px solid var(--sp-green);
  border-radius: var(--r-ctrl);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.sepa-bottom-btn:hover,
.sepa-bottom-btn:focus-visible {
  background: var(--sp-green-tint);
  color: var(--sp-green-dark);
}

/* CTA disabled state */
.cta-btn.is-disabled {
  background: var(--color-gray-mid);
  cursor: not-allowed;
}

.cta-btn:disabled {
  background: var(--color-gray-mid);
  cursor: not-allowed;
}

/* Summary bar layout */
.summary-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--sp-bg-band);
  border: 1px solid var(--sp-border);
  border-radius: var(--r-strip);
}

.summary-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.summary-label {
  font-size: 13px;
  color: var(--sp-text-sec);
}

.summary-amount {
  font-size: 20px;
  font-weight: 600;
  color: var(--sp-green-dark);
  text-align: right;
}

.summary-total {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 6px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px dashed var(--sp-border);
  font-size: 13px;
  color: var(--sp-text-sec);
}

.summary-total-sep {
  margin: 0 2px;
}

#summary-total-amount {
  margin-left: auto;
  font-weight: 500;
  color: var(--sp-text-sec);
}

#summary-total-m2 {
  font-weight: 500;
  color: var(--sp-text-sec);
}

/* Quick-donate mode selector (anonymous / named) */
.mode-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  gap: 8px;
  margin: 0 0 4px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  padding: 15px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--sp-bg-soft, #f6f7e9);
  color: var(--sp-muted, #545454);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.mode-tab:hover:not(.is-disabled):not(.is-active) {
  background: #d3d4ab;
  color: var(--sp-text, #0a0a0a);
}

.mode-tab:active:not(.is-disabled):not(.is-active) {
  transform: translateY(1px);
}

.mode-tab.is-active {
  background: var(--sp-primary, #767446);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(118, 116, 70, 0.35);
}

.mode-tab.is-active .mode-tab-icon {
  color: #fff;
}

.mode-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mode-tab-icon {
  flex: 0 0 auto;
  color: currentColor;
  opacity: 0.85;
}

.mode-tab-title {
  font-size: inherit;
  font-weight: inherit;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.mode-tab-sub {
  display: none;
}

.mode-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f6f7e9;
  border: 1px solid #d3d4ab;
  color: #0a0a0a;
  font-size: 13px;
  line-height: 1.4;
}

.mode-notice-icon {
  font-size: 16px;
  line-height: 1;
}

[hidden] {
  display: none !important;
}

@media (max-width: 540px) {
  .mode-selector {
    gap: 6px;
  }

  .mode-tab {
    padding: 10px 8px;
    font-size: 12px;
    gap: 5px;
    border-radius: 10px;
  }

  .mode-tab-icon {
    width: 14px;
    height: 14px;
  }

  .mode-tab-title {
    font-size: 12px;
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  /* Very narrow phones — stack vertically and use full width per tab */
  .mode-selector {
    flex-direction: column;
  }

  .mode-tab {
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    justify-content: flex-start;
    gap: 10px;
  }

  .mode-tab-title {
    font-size: 13px;
    text-align: left;
  }
}