/* ─────────────────────────────────────────────────────────────────────────
   Iman Verein Wädenswil – Design System
   Basiert auf der Markaz App: Navy + Beige, Poppins, ruhig und würdevoll
   ───────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--beige);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Design Tokens ──────────────────────────────────────────────────── */
:root {
  /* Farben – wie Markaz App */
  --navy: #0C1C3E;
  --navy-light: #1A2F5E;
  --navy-muted: #3D5080;
  --navy-soft: rgba(12, 28, 62, 0.08);

  --beige: #F5EBE3;
  --beige-soft: #FAF4EF;
  --beige-deep: #EDD9C8;
  --beige-card: #FFFFFF;

  --text-primary: #0C1C3E;
  --text-secondary: #5A6A8A;
  --text-muted: #9AA5BB;

  --divider: #EDE4DC;

  --success: #2D7A4F;
  --success-soft: rgba(45, 122, 79, 0.12);
  --warning: #B67220;
  --warning-soft: rgba(232, 158, 63, 0.15);
  --error: #D94040;
  --error-soft: rgba(217, 64, 64, 0.12);

  /* Layout */
  --container-max: 1180px;
  --container-padding: 24px;
  --header-height: 72px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(12, 28, 62, 0.05);
  --shadow-md: 0 4px 16px rgba(12, 28, 62, 0.08);
  --shadow-lg: 0 8px 28px rgba(12, 28, 62, 0.12);
  --shadow-hero: 0 16px 48px rgba(12, 28, 62, 0.18);

  /* Transitions */
  --transition: 200ms ease;
}

/* ── Typografie ──────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.5px;
}

h2 {
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: -0.3px;
}

h3 {
  font-size: clamp(18px, 3vw, 22px);
}

h4 {
  font-size: 16px;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ── Container ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--navy);
  color: var(--beige);
}

.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--beige);
}

.btn-ghost {
  background: var(--beige-card);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  background: var(--beige-soft);
  box-shadow: var(--shadow-md);
}

.btn-on-dark {
  background: var(--beige);
  color: var(--navy);
}

.btn-on-dark:hover {
  background: white;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 15px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ── Header / Navigation ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 235, 227, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--navy-muted);
}

.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--beige-card);
  color: var(--navy);
  align-items: center;
  justify-content: center;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--beige-soft) 0%, var(--beige) 100%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--navy-soft);
  color: var(--navy);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
  font-weight: 700;
}

.hero .lead {
  max-width: 580px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Dezenter Hintergrund-Akzent im Hero */
.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(circle at 20% 20%, var(--navy) 1px, transparent 1px),
                    radial-gradient(circle at 80% 80%, var(--navy) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Sections ────────────────────────────────────────────────── */
.section {
  padding: 80px 0;
}

.section-tight {
  padding: 48px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header .eyebrow {
  display: block;
  margin-bottom: 12px;
}

.section-header h2 {
  max-width: 680px;
  margin: 0 auto 12px;
}

.section-header p {
  max-width: 580px;
  margin: 0 auto;
  font-size: 15px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--beige-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--beige-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 22px;
}

.card h3 {
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

/* ── 4-Bereiche-Grid (Ilm/Ummah/Rahma/Markaz) ──────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pillar {
  background: var(--beige-card);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.pillar:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}

.pillar h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.pillar-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.pillar p {
  font-size: 13px;
  line-height: 1.5;
}

/* ── Feature-Section (alternierend Bild/Text) ──────────────────── */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 96px;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature-reverse {
  direction: rtl;
}

.feature-reverse > * {
  direction: ltr;
}

.feature-content .eyebrow {
  display: block;
  margin-bottom: 12px;
}

.feature-content h2 {
  margin-bottom: 16px;
}

.feature-content p {
  margin-bottom: 24px;
}

.feature-visual {
  position: relative;
}

.feature-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-list {
  list-style: none;
  margin: 0 0 24px 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.feature-list li::before {
  content: "✓";
  color: var(--navy);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── CTA-Banner ────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  color: var(--beige);
  text-align: center;
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: var(--beige);
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(245, 235, 227, 0.8);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 15px;
}

.cta-banner-decor {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, var(--beige) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ── App-Preview Section ───────────────────────────────────────── */
.app-preview {
  background: var(--beige-soft);
  padding: 80px 0;
}

.app-preview-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.app-preview-content .eyebrow {
  display: block;
  margin-bottom: 12px;
}

.app-preview h2 {
  margin-bottom: 16px;
}

.app-preview p {
  margin-bottom: 24px;
  max-width: 480px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.app-screens {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.app-screen {
  width: 240px;
  aspect-ratio: 9/19;
  background: var(--navy);
  border-radius: 28px;
  padding: 6px;
  box-shadow: var(--shadow-hero);
}

.app-screen-content {
  background: var(--beige);
  height: 100%;
  width: 100%;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
}

/* ── Donation Section (Moschee-Spenden) ─────────────────────────── */
.donation-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-xl);
  padding: 48px;
  color: var(--beige);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
}

.donation-card .eyebrow {
  color: var(--beige-deep);
  display: block;
  margin-bottom: 12px;
}

.donation-card h2 {
  color: var(--beige);
  margin-bottom: 16px;
}

.donation-card p {
  color: rgba(245, 235, 227, 0.8);
  margin-bottom: 24px;
}

.donation-progress {
  background: var(--beige-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--text-primary);
}

.donation-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1;
}

.donation-goal {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.progress-bar {
  height: 8px;
  background: var(--beige-deep);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-pill);
  transition: width 600ms ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(245, 235, 227, 0.7);
  padding: 64px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(245, 235, 227, 0.7);
  font-size: 13px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--beige);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(245, 235, 227, 0.7);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--beige);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 235, 227, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(245, 235, 227, 0.5);
}

.footer-bottom a {
  color: rgba(245, 235, 227, 0.7);
}

/* ── Status-Pills (wiederverwendbar) ───────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
}

.pill-info {
  background: var(--navy-soft);
  color: var(--navy);
}

.pill-success {
  background: var(--success-soft);
  color: var(--success);
}

.pill-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ── Utilities ─────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 24px; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .feature,
  .app-preview-inner,
  .donation-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-reverse {
    direction: ltr;
  }

  .feature-image {
    aspect-ratio: 16/10;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .donation-card {
    padding: 32px;
  }
}

@media (max-width: 720px) {
  :root {
    --container-padding: 20px;
  }

  .nav-links {
    display: none;
  }

  /* Mobile-Menü wenn offen */
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--beige);
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--shadow-md);
    z-index: 99;
  }

  .nav-links.is-open li {
    width: 100%;
  }

  .nav-links.is-open a {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: background var(--transition);
  }

  .nav-links.is-open a:hover,
  .nav-links.is-open a.active {
    background: var(--beige-card);
    color: var(--navy);
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-logo img {
    height: 36px;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .section {
    padding: 56px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .cta-banner,
  .donation-card {
    padding: 32px 24px;
  }

  .app-screens {
    gap: 12px;
  }

  .app-screen {
    width: calc(44vw - 16px);
    max-width: 180px;
  }
}

/* Header Schatten beim Scrollen */
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* Header-Platz auf sehr kleinen Mobiles: Login-Link aus Header ausblenden
     (ist im Burger-Menü erreichbar).
     Logged-in-State: nur Avatar + kurzen Text zeigen. */
  .nav-login-link {
    display: none !important;
  }
  .nav-account-link {
    padding: 4px !important;
    gap: 0 !important;
    font-size: 0 !important;
  }
  .nav-account-link span {
    font-size: 11px !important;
  }
}

/* "Anmelden" im Burger-Menü: Desktop unsichtbar, Mobile sichtbar */
.nav-mobile-login {
  display: none;
}
@media (max-width: 720px) {
  .nav-mobile-login {
    display: block;
  }
}

/* Auf mittleren Mobiles (480–720px): Mitglied-werden-Button kompakter */
@media (max-width: 720px) {
  .nav-cta {
    gap: 8px;
  }
  .nav-cta .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  .nav-login-link {
    font-size: 12px;
    margin-right: 4px !important;
  }
}
