/* ============================================================
   MASJID AR RASHEED – STYLESHEET (CSS)
   ============================================================
   Diese Datei bestimmt das Aussehen der ganzen Webseite:
   Farben, Abstände, Schriftgrößen, Layout usw.

   AUFBAU DIESER DATEI (von oben nach unten):
   1. Grundfarben & Variablen (:root)
   2. Grundeinstellungen (body, container)
   3. Obere Leiste / Navigation
   4. Hero-Bereich (Startbildschirm)
   5. Buttons
   6. Abschnitte allgemein
   7. Kurskarten
   8. Detailbereich & Kontaktbox
   9. Rechtliche Seiten (Impressum/Datenschutz) – NEU
   10. Fußzeile
   11. Responsive Design (Handy/Tablet)
   ============================================================ */


/* ------------------------------------------------------------
   1) FARB- UND ABSTANDS-VARIABLEN
   ------------------------------------------------------------
   Mit "--name" definiert man eine CSS-Variable. Der Vorteil:
   Wenn ihr z.B. die Hauptfarbe (--primary) ändern wollt, reicht
   EINE Änderung hier oben – sie wirkt sich überall aus, wo
   var(--primary) benutzt wird.
   ------------------------------------------------------------ */
:root {
  --bg: #f4f7fb;              /* Hintergrundfarbe der ganzen Seite */
  --surface: #ffffff;         /* Hintergrund für Karten/Boxen */
  --surface-2: #eef4f7;       /* etwas dunklerer Karten-Hintergrund */
  --text: #172033;            /* normale Textfarbe */
  --muted: #667085;           /* gedämpfte/graue Textfarbe */
  --primary: #0f766e;         /* Hauptfarbe (Grün/Türkis) */
  --primary-dark: #115e59;    /* dunklere Variante der Hauptfarbe */
  --accent: #d97706;          /* Akzentfarbe (Orange) */
  --border: #e5e7eb;          /* Farbe für dünne Rahmenlinien */
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);       /* normaler Schatten */
  --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.14); /* stärkerer Schatten bei Hover */
  --radius: 20px;             /* Standard-Eckenrundung */
}

/* box-sizing: border-box sorgt dafür, dass Padding und Rahmen
   NICHT zur angegebenen Breite/Höhe dazugerechnet werden.
   Das macht Layouts deutlich vorhersehbarer. */
* {
  box-sizing: border-box;
}

/* Sanftes Scrollen, wenn man auf einen Anker-Link (#angebote etc.) klickt */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.08), transparent 26%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* .container zentriert den Inhalt und begrenzt die maximale Breite,
   damit Textzeilen auf großen Bildschirmen nicht unlesbar lang werden */
.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

/* ------------------------------------------------------------
   3) OBERE LEISTE (Header/Navigation)
   ------------------------------------------------------------
   position: sticky + top: 0 => bleibt beim Scrollen oben kleben.
   backdrop-filter: blur(...) => "Milchglas"-Effekt hinter der Leiste.
   ------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50; /* sorgt dafür, dass die Leiste über anderem Inhalt liegt */
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo links, Navigation rechts */
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--text);
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center; /* zentriert den Buchstaben "M" perfekt */
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: var(--shadow);
}

.brand__text {
  font-size: 1.02rem;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap; /* bricht auf kleinen Bildschirmen automatisch um */
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--primary-dark);
}

/* ------------------------------------------------------------
   4) HERO-BEREICH (großer Startbildschirm oben)
   ------------------------------------------------------------ */
.hero {
  padding: 84px 0 72px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 110, 0.9));
  color: white;
}

.hero__content {
  max-width: 760px;
}

.hero__label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px; /* sehr hoher Wert => komplett abgerundet (Pill-Form) */
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  /* clamp(min, bevorzugt, max) => Schrift wächst mit der Bildschirmbreite,
     aber nie kleiner als 2.4rem und nie größer als 4.4rem */
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
}

.hero__text {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero__buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ------------------------------------------------------------
   5) BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px); /* leichtes "Anheben" bei Hover */
}

.btn--primary {
  background: linear-gradient(135deg, #22c55e, var(--primary));
  color: white;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.3);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* ------------------------------------------------------------
   6) ABSCHNITTE (allgemeine Section-Abstände)
   ------------------------------------------------------------ */
.section {
  padding: 56px 0;
}

.section--alt {
  background: rgba(255, 255, 255, 0.45); /* leicht abgesetzter Hintergrund */
}

.section__head {
  margin-bottom: 20px;
}

.section__head h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
}

.section__head p {
  margin: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------
   7) KURSKARTEN (Angebote-Übersicht)
   ------------------------------------------------------------
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))
   => so viele Spalten wie Platz vorhanden ist, jede Karte
   mindestens 250px breit. Passt sich automatisch an, ohne
   Media-Queries schreiben zu müssen.
   ------------------------------------------------------------ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.course-card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* :focus wird zusätzlich zu :hover gestylt, damit Tastatur-Nutzer
   (Tab-Taste) auch sehen, welche Karte gerade ausgewählt ist */
.course-card:hover,
.course-card:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 118, 110, 0.35);
  outline: none;
}

.course-card h3 {
  margin: 0 0 10px;
  color: var(--primary-dark);
}

.course-card p {
  margin: 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2f1;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ------------------------------------------------------------
   8) DETAILBEREICH & KONTAKTBOX
   ------------------------------------------------------------ */
.detail-card,
.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.detail-placeholder {
  margin: 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.detail-item {
  background: var(--surface-2);
  border: 1px solid #e8eef5;
  padding: 10px 12px;
  border-radius: 16px;
}

.detail-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.contact-box h2 {
  margin-top: 0;
  color: var(--primary-dark);
}

.contact-box p {
  margin-bottom: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------
   9) RECHTLICHE SEITEN – Impressum & Datenschutz (NEU)
   ------------------------------------------------------------
   Einheitliche Box für die Textinhalte auf impressum.html und
   datenschutz.html, damit lange Textabschnitte gut lesbar sind
   (nicht zu breite Zeilen, klare Abschnitte mit Überschriften).
   ------------------------------------------------------------ */
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px clamp(20px, 5vw, 40px);
  box-shadow: var(--shadow);
  max-width: 800px; /* verhindert zu lange, schwer lesbare Textzeilen */
}

.legal-card h3 {
  margin: 28px 0 8px;
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.legal-card h3:first-child {
  margin-top: 0;
}

.legal-card p {
  margin: 0 0 4px;
  color: var(--text);
}

.legal-card a {
  color: var(--primary-dark);
}

/* ------------------------------------------------------------
   10) FUSSZEILE
   ------------------------------------------------------------ */
.footer {
  padding: 22px 0 38px;
  color: var(--muted);
  text-align: center;
}

.footer__legal {
  margin-top: 8px;
  font-size: 0.9rem;
}

.footer__legal a {
  color: var(--muted);
  text-decoration: underline;
}

.footer__legal a:hover {
  color: var(--primary-dark);
}

.hidden {
  display: none;
}

/* ------------------------------------------------------------
   11) RESPONSIVE DESIGN
   ------------------------------------------------------------
   Ab einer Bildschirmbreite von 700px oder weniger (Handys,
   kleine Tablets) werden diese Regeln zusätzlich angewendet.
   ------------------------------------------------------------ */
@media (max-width: 700px) {
  .topbar__inner {
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    justify-content: center;
  }

  .hero {
    padding: 64px 0 58px;
  }

  .btn {
    width: 100%;
  }
}