/* Al-Rahma e.V. Design 2 "Modern": midnight blue, warm sand, sage & amber.
   Uses logical properties so it works in RTL (Arabic) and LTR (German). */

:root {
  --navy: #1B2B48;
  --navy-2: #263B5E;
  --sand: #F4EEE4;
  --sand-2: #EADFCB;
  --sage: #7FA48E;
  --sage-light: #DCE8DF;
  --amber: #E0A458;
  --amber-light: #F6C77D;
  --ink: #18202E;
  --muted: #5A6475;
  --line: #E4E0D8;
  --bg: #FFFFFF;
  --r: 22px;
  --font: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
}
html[lang="de"] { --font: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.05rem; line-height: 1.7; color: var(--ink); background: var(--bg); }
html[lang="de"] body { line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
html[lang="de"] h1, html[lang="de"] h2 { letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 3.3vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* buttons & labels */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 14px; font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--amber { background: var(--amber); color: var(--navy); }
.btn--amber:hover { background: var(--amber-light); }
.btn--line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--line:hover { background: var(--sand); }
.btn--sm { padding: .6em 1.1em; font-size: .95rem; border-radius: 12px; }
.pill { display: inline-block; background: #fff; border: 1px solid var(--sand-2); color: var(--muted); padding: .35em 1em; border-radius: 999px; font-size: .88rem; margin-bottom: 1.2em; }
.eyebrow { color: var(--sage); font-weight: 700; font-size: .9rem; margin-bottom: .6em; }
html[lang="de"] .eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.eyebrow--light { color: var(--amber-light); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.small { color: var(--muted); font-size: .92rem; }
.small--light { color: rgba(255,255,255,.7); text-align: center; margin-top: 32px; }

/* header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 48px; height: 48px; object-fit: contain; background: var(--navy); border-radius: 14px; padding: 6px; }
.brand strong { display: block; font-size: 1.15rem; line-height: 1.15; color: var(--navy); }
.brand small { display: block; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: .5em .45em; border-radius: 10px; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.btn, .lang, .brand strong { white-space: nowrap; }
.nav a:hover { background: var(--sand); }
.header__actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .95rem; padding: .5em .9em; border-radius: 12px; background: var(--sand); }
.lang svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* hero */
.hero { background: linear-gradient(180deg, var(--sand) 0%, var(--sand) 78%, #fff 78%); padding-top: 56px; }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); color: var(--navy); line-height: 1.15; }
html[lang="ar"] .hero h1 { line-height: 1.35; }
.hero__lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__art { margin: 0; }
.hero__art img { width: 100%; max-width: 520px; margin-inline: auto; }

.strip { display: grid; grid-template-columns: 1fr 1.4fr; background: var(--navy); color: #fff; border-radius: var(--r); overflow: hidden; margin-top: 32px; box-shadow: 0 24px 50px rgba(27,43,72,.18); }
.strip__verse { padding: 28px 32px; background: var(--navy-2); display: flex; flex-direction: column; justify-content: center; }
.strip__verse p { margin: 0; font-size: 1.35rem; font-weight: 500; color: var(--amber-light); }
.strip__verse small { color: rgba(255,255,255,.6); }
.strip__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.strip__stats div { padding: 26px 28px; border-inline-start: 1px solid rgba(255,255,255,.1); }
.strip__stats dd { margin: 0; font-size: 1.9rem; font-weight: 700; line-height: 1.2; }
.strip__stats dt { color: rgba(255,255,255,.65); font-size: .9rem; }

/* sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tint { background: var(--sand); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy .lead { color: rgba(255,255,255,.72); }
.head { text-align: center; margin-bottom: 48px; }
.head .lead { margin-inline: auto; }

/* about bento */
.bento { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; }
.bento__main { background: var(--navy); color: #fff; border-radius: var(--r); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; }
.bento__main p { color: rgba(255,255,255,.8); }
.arrow-link { margin-top: auto; color: var(--amber-light); font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " →"; }
[dir="rtl"] .arrow-link::after { content: " ←"; }
.bento__goals { background: var(--sage-light); border-radius: var(--r); padding: clamp(28px, 4vw, 40px); }
.bento__goals h3 { color: var(--navy); font-size: 1.25rem; }
.goals { list-style: none; counter-reset: g; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.goals li { counter-increment: g; background: #fff; border-radius: 16px; padding: 16px 18px; font-size: .95rem; color: var(--muted); line-height: 1.55; }
.goals li::before { content: counter(g, decimal-leading-zero); display: block; font-weight: 700; color: var(--sage); font-size: .85rem; margin-bottom: 4px; }

/* fund */
.fund { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.fund__art { margin: 0; }
.fund h2 { color: var(--navy); }
.services { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.services li { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: 18px; padding: 18px 20px; }
.services h3 { margin: 0 0 .2em; color: var(--navy); }
.services p { margin: 0; color: var(--muted); font-size: .97rem; }
.ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--amber-light); color: var(--navy); }
.ico svg { width: 24px; height: 24px; }

/* fees + calculator */
.fees { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.fees__table table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.fees__table th, .fees__table td { background: var(--sand); padding: 20px 24px; text-align: start; }
.fees__table th { border-start-start-radius: 16px; border-end-start-radius: 16px; font-weight: 600; color: var(--navy); }
.fees__table td { border-start-end-radius: 16px; border-end-end-radius: 16px; text-align: end; color: var(--muted); }
.fees__table td b { font-size: 1.7rem; color: var(--navy); margin-inline-end: 6px; }
.fees__table tr:hover th, .fees__table tr:hover td { background: var(--sand-2); }
.callout { background: var(--sage-light); border-inline-start: 4px solid var(--sage); padding: 14px 18px; border-radius: 12px; color: var(--navy); font-weight: 500; }
.calc { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: 0 20px 40px rgba(27,43,72,.07); position: sticky; top: 100px; }
.calc h3 { color: var(--navy); font-size: 1.3rem; }
.calc__rows { display: grid; gap: 10px; margin-block: 16px; }
.calc__row { display: flex; align-items: center; gap: 10px; }
.calc__row label { font-size: .9rem; color: var(--muted); min-width: 80px; }
.calc__row input { flex: 1; min-width: 0; font: inherit; padding: .6em .9em; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sand); color: var(--ink); }
.calc__row input:focus { outline: none; border-color: var(--amber); background: #fff; }
.calc__row .fee { min-width: 54px; text-align: end; font-weight: 700; color: var(--navy); }
.calc__row button { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--sand); color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.calc__row button:hover { background: #F3D9D5; color: #8C2F24; }
.calc__total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: var(--navy); color: #fff; }
.calc__total output { font-size: 2rem; font-weight: 700; color: var(--amber-light); }
.calc .small { margin: 12px 0 0; }

/* benefits timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 11px; inset-inline: 12.5%; height: 3px; background: linear-gradient(90deg, var(--sage), var(--amber)); border-radius: 3px; }
[dir="rtl"] .timeline::before { background: linear-gradient(-90deg, var(--sage), var(--amber)); }
.timeline li { position: relative; text-align: center; padding-top: 44px; display: flex; flex-direction: column; align-items: center; }
.timeline__dot { position: absolute; top: 0; width: 25px; height: 25px; border-radius: 50%; background: var(--navy); border: 4px solid var(--sage); }
.timeline .is-top .timeline__dot { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 0 8px rgba(224,164,88,.2); }
.timeline small { color: rgba(255,255,255,.6); }
.timeline b { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; }
.timeline .is-top b { color: var(--amber-light); }
.timeline li > span:last-child { color: rgba(255,255,255,.75); font-size: .95rem; }

/* steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { counter-increment: s; border: 1.5px solid var(--line); border-radius: var(--r); padding: 24px; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--sage-light); color: var(--navy); font-weight: 700; font-size: 1.15rem; margin-bottom: 16px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 46px; inset-inline-end: -17px; width: 18px; height: 1.5px; background: var(--line); }
.steps h3 { color: var(--navy); }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.box { border: 1.5px solid var(--line); border-radius: var(--r); padding: 28px; }
.box h3 { color: var(--navy); }
.box--sand { background: var(--sand); border-color: var(--sand); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-inline-start: 30px; margin-bottom: 10px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 18px; height: 18px; border-radius: 6px; background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.docs { display: flex; flex-wrap: wrap; gap: 10px; }
.docs a { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--navy); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .6em 1em; border-radius: 12px; border: 1px solid var(--sand-2); }
.docs a::before { content: ""; width: 14px; height: 17px; border-radius: 3px; border: 1.8px solid var(--amber); }
.docs a:hover { border-color: var(--amber); }

/* faq */
.faq { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; align-items: start; }
.faq h2 { color: var(--navy); }
.faq details { background: #fff; border-radius: 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M9 12l5 5 5-5' fill='none' stroke='%231B2B48' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--muted); }

/* contact cta */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--navy); color: #fff; border-radius: 32px; padding: clamp(32px, 5vw, 64px); position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: var(--navy-2); inset-inline-end: -100px; top: -120px; }
.cta > * { position: relative; z-index: 1; }
.cta__text p { color: rgba(255,255,255,.75); }
.cta__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cta__list li { background: rgba(255,255,255,.07); border-radius: 16px; padding: 14px 18px; }
.cta__list span { display: block; font-size: .82rem; color: var(--amber-light); }
.cta__list a, .cta__list b { color: #fff; font-weight: 600; text-decoration: none; word-break: break-word; }
[dir="rtl"] .cta__list [dir="ltr"] { display: block; text-align: end; }
.cta__list a:hover { text-decoration: underline; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: .92rem; color: var(--muted); }
.footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand img { width: 40px; height: 40px; border-radius: 12px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--navy); }
.footer p { margin: 0; }

/* responsive */
@media (max-width: 1220px) {
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--navy); cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .header__actions { margin-inline-start: auto; }
  .nav { position: absolute; top: 100%; inset-inline: 0; margin: 0; flex-direction: column; background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(27,43,72,.08); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8em 1em; }
}
@media (max-width: 1240px) {
  .hero__in, .fund, .fees, .faq, .cta, .bento { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; margin-inline: auto; }
  .strip { grid-template-columns: 1fr; }
  .calc { position: static; }
  .fund__art { max-width: 460px; margin-inline: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hide-sm, .brand small { display: none; }
  .hero { padding-top: 32px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .strip__stats { grid-template-columns: 1fr; }
  .strip__stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.1); padding: 16px 22px; }
  .strip__stats dd { font-size: 1.5rem; order: 2; }
  .strip__verse { padding: 22px; text-align: center; }
  .goals, .steps, .duo { grid-template-columns: 1fr; }
  .fees__table th, .fees__table td { padding: 16px; }
  .fees__table td b { font-size: 1.35rem; }
  .fees__table td span { display: block; font-size: .85rem; }
  .calc { padding: 20px; }
  .calc__row label { min-width: 0; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { top: 12px; bottom: 12px; inset-inline-start: 11px; inset-inline-end: auto; width: 3px; height: auto; background: linear-gradient(180deg, var(--sage), var(--amber)) !important; }
  .timeline li { text-align: start; align-items: flex-start; padding: 0 0 26px; padding-inline-start: 48px; }
  .timeline__dot { inset-inline-start: 0; }
  .footer__in { flex-direction: column; 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(--sand);
}
.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(--sage);
}
.article-breadcrumb a {
  text-decoration: none;
  color: var(--navy);
}
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 20px 50px rgba(27,43,72,.08);
  padding: clamp(24px, 5vw, 56px);
  overflow-wrap: anywhere;
}
.article-card h1 {
  color: var(--navy);
  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-radius: 16px;
  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(--navy);
  margin-top: 1.2em;
}
.article-body a {
  color: var(--navy);
  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: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 24px 18px;
  background: var(--sand);
}
.article-child img {
  float: none;
  margin: 0 auto 16px;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
}
.article-child h2 {
  color: var(--navy);
  font-size: 1.35rem;
}
.article-more {
  display: inline-block;
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  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;
}