/* Al-Rahma e.V. Design 1 "Classic": emerald, gold & cream, Islamic geometry.
   Uses logical properties so it works in RTL (Arabic) and LTR (German). */

:root {
  --emerald: #0E4D3C;
  --emerald-2: #14614C;
  --emerald-dark: #08332A;
  --gold: #C8A04A;
  --gold-light: #E6CF8F;
  --gold-dark: #9C7A2E;
  --cream: #FBF8F1;
  --sand: #F3EBDA;
  --ink: #1D2622;
  --muted: #56655D;
  --line: #E2D7BF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 51, 42, .08);
  --font-body: 'Noto Naskh Arabic', 'Source Sans 3', system-ui, sans-serif;
  --font-head: 'Amiri', 'Noto Naskh Arabic', Georgia, serif;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cg fill='none' stroke='%23C8A04A' stroke-width='1' opacity='.35'%3E%3Cpath d='M11 11h18v18H11z'/%3E%3Cpath d='M20 7.3 32.7 20 20 32.7 7.3 20z'/%3E%3Cpath d='M0 20h7.3M32.7 20H40M20 0v7.3M20 32.7V40'/%3E%3C/g%3E%3C/svg%3E");
}
html[lang="de"] {
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-head: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
}
html[lang="de"] body { line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .5em; color: inherit; }
h1, h2, h3, .stats dd, .fee__amount, .tiers b { font-variant-numeric: lining-nums; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
html[lang="de"] h1, html[lang="de"] h2 { letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- buttons, labels ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.6em; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; transition: transform .2s, background .2s, color .2s;
  font-family: var(--font-body); line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--emerald-dark); }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--emerald { background: var(--emerald); color: #fff; }
.btn--emerald:hover { background: var(--emerald-2); }
.btn--sm { padding: .55em 1.2em; font-size: .95rem; }

.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .9rem; font-weight: 600; color: var(--gold-dark); margin-bottom: .8em;
}
html[lang="de"] .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.kicker::before { content: ""; width: 12px; height: 12px; background: currentColor; transform: rotate(45deg); }
.kicker--light { color: var(--gold-light); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.link { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

/* ---------- topbar & header ---------- */
.topbar { background: var(--emerald-dark); color: var(--gold-light); font-size: .9rem; }
.topbar__in { display: flex; justify-content: space-between; gap: 16px; padding-block: 8px; flex-wrap: wrap; }
.topbar__verse { font-family: var(--font-head); font-size: 1.05rem; }
.topbar__contact { display: flex; gap: 20px; }
.topbar a { color: inherit; text-decoration: none; opacity: .9; }
.topbar a:hover { opacity: 1; text-decoration: underline; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 241, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; object-fit: contain; background: var(--emerald); border-radius: 50%; padding: 6px; box-shadow: 0 0 0 2px var(--gold); }
.brand strong { display: block; font-family: var(--font-head); font-size: 1.35rem; line-height: 1.1; color: var(--emerald); }
.brand small { display: block; font-size: .8rem; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; padding: .45em .75em; border-radius: 8px; font-weight: 500; font-size: .98rem;
}
.nav a:not(.btn):hover { background: var(--sand); color: var(--emerald); }
.nav .nav__lang { border: 1px solid var(--line); margin-inline: 6px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 90% at 80% 10%, var(--emerald-2) 0%, var(--emerald) 45%, var(--emerald-dark) 100%);
}
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--star); opacity: .5; }
.hero__in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 72px 0; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: .4em; }
.hero__lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 28px 40px; }
.hero__art { margin: 0; align-self: end; }
.hero__art img { width: 100%; max-width: 460px; margin-inline: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.25)); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 72px; background: rgba(230,207,143,.25); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(230,207,143,.3); }
.stats div { background: rgba(8,51,42,.55); padding: 16px 18px; }
.stats dt { font-size: .85rem; color: rgba(255,255,255,.7); }
.stats dd { margin: 0; font-family: var(--font-head); font-size: 1.7rem; color: var(--gold-light); font-weight: 700; line-height: 1.3; }

/* ---------- verse band ---------- */
.verse { background: var(--gold); color: var(--emerald-dark); text-align: center; padding-block: 26px; }
.verse__text { font-family: 'Amiri', serif; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0; line-height: 1.6; }
.verse__ref { margin: 0; font-size: .9rem; opacity: .8; }

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 110px); }
.section--sand { background: var(--sand); }
.section--dark { position: relative; background: var(--emerald-dark); color: #fff; }
.section--dark::before { content: ""; position: absolute; inset: 0; background-image: var(--star); opacity: .35; pointer-events: none; }
.section--dark > .wrap { position: relative; }
.section--dark .lead { color: rgba(255,255,255,.78); }
.section__head { text-align: center; margin-bottom: 48px; }
.section__head .lead { margin-inline: auto; }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.split__art { margin: 0; }
.goals__title { margin-top: 1.5em; color: var(--emerald); }
.goals { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.goals li { position: relative; padding-inline-start: 26px; color: var(--muted); font-size: 1rem; }
.goals li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(230,207,143,.28);
  border-radius: var(--radius); padding: 32px 28px; transition: transform .25s, background .25s;
}
.card:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.card__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: var(--emerald-dark); margin-bottom: 18px; }
.card__icon svg { width: 34px; height: 34px; }
.card h3 { color: var(--gold-light); }
.card p { color: rgba(255,255,255,.8); margin: 0; }
/* Thank-you / light card-body: restore readable dark text */
.card .card-body.text-dark p,
.card .card-body.text-dark { color: #1D2622; }

/* fees */
.fees { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fee {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 20px 24px; text-align: center; box-shadow: var(--shadow); overflow: hidden;
}
.fee::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.fee__age { display: block; font-weight: 600; color: var(--emerald); }
.fee__amount { display: block; font-family: var(--font-head); font-size: 3.2rem; font-weight: 700; line-height: 1.2; color: var(--ink); margin-block: 6px; }
.fee__amount small { font-size: 1.6rem; color: var(--gold-dark); }
.fee__per { color: var(--muted); font-size: .95rem; }
.note { color: var(--muted); font-size: .98rem; max-width: 80ch; }
.note--star { color: var(--emerald); font-weight: 600; }
.note--star::before { content: "✦ "; color: var(--gold); }
.note--center { text-align: center; margin-inline: auto; margin-top: 24px; font-weight: 600; color: var(--emerald); }

.benefits { margin-top: 64px; background: #fff; border-radius: calc(var(--radius) * 1.5); padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow); display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: end; }
.benefits .note { grid-column: 1 / -1; margin: 0; }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; height: 260px; }
.tiers li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.tiers__bar { display: block; height: calc(var(--h) * .62); min-height: 30px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--emerald-2), var(--emerald)); position: relative; margin-bottom: 10px; }
.tiers li:last-child .tiers__bar { background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.tiers b { font-family: var(--font-head); font-size: 1.3rem; color: var(--emerald-dark); line-height: 1.2; }
.tiers b small { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--muted); font-weight: 500; }
.tiers li > span:last-child { font-size: .85rem; color: var(--muted); line-height: 1.35; margin-top: 4px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 64px 22px 24px; }
.steps li::before {
  content: ""; position: absolute; top: 18px; inset-inline-start: 22px;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--emerald); color: var(--gold-light); font-weight: 700; border-radius: 8px; transform: rotate(45deg);
}
.steps li::after { content: counter(step); position: absolute; top: 18px; inset-inline-start: 22px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--gold-light); font-weight: 700; }
.steps h3 { color: var(--emerald); font-size: 1.2rem; }
.steps p { color: var(--muted); margin: 0; font-size: .98rem; }

.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.panel { background: var(--sand); border-radius: var(--radius); padding: 32px; }
.panel h3 { color: var(--emerald); }
.panel--forms { background: var(--emerald); color: #fff; background-image: var(--star); }
.panel--forms h3 { color: var(--gold-light); }
.checks, .forms { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-inline-start: 32px; margin-bottom: 12px; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--emerald); color: #fff; font-size: .8rem; margin-top: .3em; }
.forms li { border-bottom: 1px solid rgba(230,207,143,.25); }
.forms a { display: flex; justify-content: space-between; align-items: center; color: #fff; text-decoration: none; padding: 10px 2px; }
.forms a::after { content: "→"; color: var(--gold-light); }
[dir="rtl"] .forms a::after { content: "←"; }
.forms a:hover { color: var(--gold-light); }
.panel--forms .btn { margin-top: 12px; background: var(--gold); color: var(--emerald-dark); }

/* faq */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 24px; font-weight: 600; color: var(--emerald); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--gold-dark); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--muted); }

/* contact */
.contact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact__item { border: 1px solid rgba(230,207,143,.3); border-radius: var(--radius); padding: 22px; background: rgba(255,255,255,.05); }
.contact__item span { display: block; color: var(--gold-light); font-size: .85rem; margin-bottom: 4px; }
.contact__item p { margin: 0; font-size: 1.05rem; word-break: break-word; }
[dir="rtl"] .contact__item p[dir="ltr"] { text-align: end; }
.contact__item a { color: #fff; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* footer */
.footer { background: #061F1A; color: rgba(255,255,255,.75); padding-block: 32px; font-size: .92rem; }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.brand--footer { color: #fff; }
.brand--footer img { width: 44px; height: 44px; background: var(--emerald); padding: 5px; }
.brand--footer strong { color: var(--gold-light); font-size: 1.15rem; }
.brand--footer small { color: rgba(255,255,255,.6); }
.footer__links { display: flex; gap: 18px; }
.footer a { color: inherit; }
.footer a:hover { color: var(--gold-light); }
.footer__copy { margin: 0; width: 100%; text-align: center; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0 11px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--emerald); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
    display: none; box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav .nav__lang { margin: 6px 0; text-align: center; }
  .hero__in { grid-template-columns: 1fr; padding-top: 48px; }
  .hero__art { max-width: 340px; margin-inline: auto; }
  .stats { margin-bottom: 40px; }
  .split, .benefits, .join-grid { grid-template-columns: 1fr; }
  .split__art { max-width: 440px; margin-inline: auto; }
  .cards { grid-template-columns: 1fr; }
  .fees, .steps, .contact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .topbar__verse { display: none; }
  .topbar__in { justify-content: center; }
  .brand small { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .goals { grid-template-columns: 1fr; }
  .fees, .steps, .contact { grid-template-columns: 1fr; }
  .tiers { height: 220px; gap: 8px; }
  .tiers b { font-size: 1.05rem; }
  .hero__cta .btn { flex: 1 1 100%; }
  .footer__in { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.design-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.design-switch img {
    display: block;
    width: 30px;
    height: 30px;
}

/* ---------- article pages ---------- */
.article-page {
  min-height: 50vh;
  padding-block: clamp(32px, 6vw, 72px);
  background: var(--cream);
}
.article-content {
  direction: inherit;
}
.article-main {
  min-width: 0;
}
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  color: var(--muted);
}
.article-breadcrumb li + li::before {
  content: "‹";
  margin-inline-end: 8px;
  color: var(--gold-dark);
}
[dir="rtl"] .article-breadcrumb li + li::before {
  content: "›";
}
.article-breadcrumb a {
  text-decoration: none;
  color: var(--emerald);
}
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
  overflow-wrap: anywhere;
}
.article-card h1 {
  color: var(--emerald);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: .55em;
}
.article-card img {
  max-width: 300px;
  float: inline-end;
  margin-inline-start: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sand);
}
.article-lead {
  color: var(--muted);
  font-size: 1.12rem;
}
.article-body {
  color: var(--ink);
  min-width: 0;
}
.article-body h1,
.article-body h2,
.article-body h3 {
  color: var(--emerald);
  margin-top: 1.2em;
}
.article-body a {
  color: var(--emerald);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.article-body iframe,
.article-body table,
.article-body img {
  max-width: 100%;
}
.article-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 32px;
}
.article-children-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  text-align: center;
}
.article-child {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  background: var(--cream);
}
.article-child img {
  float: none;
  margin: 0 auto 16px;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
}
.article-child h2 {
  color: var(--emerald);
  font-size: 1.35rem;
}
.article-more {
  display: inline-block;
  border: 1px solid var(--emerald);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
}
@media (max-width: 700px) {
  .article-card img {
    float: none;
    width: 100%;
    max-width: 240px;
    margin-inline: auto 0;
  }
  .article-children-grid {
    grid-template-columns: 1fr;
  }
}
html[lang="ar"] .article-card #plugins_div,
html[lang="ar"] .article-card #register_form {
  direction: rtl;
  text-align: right;
}
html[lang="ar"] .article-card > h1 {
  text-align: right;
}
html[lang="ar"] .article-card #register_form .col-form-label,
html[lang="ar"] .article-card #register_form .form-group > div {
  text-align: right;
}
html[lang="ar"] .article-card #register_form .form-control {
  direction: rtl;
  text-align: right;
}
html[lang="ar"] .article-card #register_form input[type="date"],
html[lang="ar"] .article-card #register_form input[type="email"],
html[lang="ar"] .article-card #register_form input[type="number"],
html[lang="ar"] .article-card #register_form input[type="tel"],
html[lang="ar"] .article-card #register_form [name="iban"] {
  direction: ltr;
  text-align: left;
}