/* ==========================================================================
   Almadina Kulturverein e.V. – gemeinsames Stylesheet für alle Seiten
   ========================================================================== */

:root {
  --green-900: #0c3b2e;
  --green-700: #136f50;
  --green-600: #17926a;
  --green-100: #e3f4ec;
  --gold-500: #c9a227;
  --gold-300: #e8cf7a;
  --ink: #1d2a26;
  --muted: #5b6b66;
  --surface: #ffffff;
  --surface-alt: #f5f8f6;
  --border: #dbe5e0;
  --danger: #b42318;
  --success: #067647;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgb(12 59 46 / 0.08);
  --shadow-md: 0 10px 30px rgb(12 59 46 / 0.14);
  --container: 1100px;
  --header-h: 68px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Arabic", sans-serif;
  --font-arabic: "Noto Naskh Arabic", "Amiri", "Traditional Arabic", "Arabic Typesetting",
    "Geeza Pro", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-alt);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: var(--green-700);
}

a:hover {
  color: var(--green-900);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--green-900);
}

p {
  margin: 0 0 1em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(120deg, var(--green-900), var(--green-700));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand:hover {
  color: var(--gold-300);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgb(255 255 255 / 0.5);
  color: #fff;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgb(255 255 255 / 0.16);
  color: #fff;
}

.site-nav .flag {
  width: 22px;
  height: auto;
  border-radius: 3px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: currentColor;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    background: var(--green-900);
    border-top: 1px solid rgb(255 255 255 / 0.12);
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav a {
    border-radius: 10px;
    padding: 0.75rem 1rem;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  text-align: center;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
  background: var(--green-900) url("../img/almadina.jpg") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(12 59 46 / 0.55), rgb(12 59 46 / 0.85));
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 0.3em;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
  animation: drop-in 0.8s ease-out both;
}

.hero .lead {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  opacity: 0.92;
  margin-bottom: 1.75rem;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Gebetszeiten
   -------------------------------------------------------------------------- */

.prayer-card {
  margin: 2.25rem auto 0;
  max-width: 820px;
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.prayer-card .date-line {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  opacity: 0.95;
}

.prayer-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prayer-times li {
  background: rgb(255 255 255 / 0.12);
  border-radius: var(--radius);
  padding: 0.7rem 0.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.prayer-times .name {
  display: block;
  font-size: 0.9rem;
  opacity: 0.85;
}

.prayer-times .time {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.prayer-times li.is-next {
  background: var(--gold-500);
  color: var(--green-900);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.25);
}

.prayer-times li.is-next .name {
  opacity: 1;
  font-weight: 600;
}

.prayer-status {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-primary {
  background: var(--green-700);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-gold {
  background: var(--gold-500);
  color: var(--green-900);
}

.btn-gold:hover {
  background: var(--gold-300);
  color: var(--green-900);
}

.btn-outline {
  border-color: currentColor;
  background: transparent;
  color: var(--green-700);
}

.btn-outline:hover {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.hero .btn-outline {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.hero .btn-outline:hover {
  background: #fff;
  border-color: #fff;
  color: var(--green-900);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #8f1c13;
  color: #fff;
}

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green-700);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Sections & cards
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-alt {
  background: var(--surface);
}

.section-dark {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff;
}

.section-dark h2 {
  color: #fff;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 2rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 0.6rem auto 0;
  border-radius: 2px;
  background: var(--gold-500);
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-300);
}

.card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-700);
  margin-bottom: 0.75rem;
}

.card .card-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.card h3 {
  font-size: 1.25rem;
}

.card p {
  color: var(--muted);
}

.card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.notice {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: #fff4e5;
  color: #8a4b00;
  font-weight: 600;
  font-size: 0.95rem;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-700);
  margin: 0.25rem 0 0.5rem;
}

.price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.quote {
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.75rem;
  border-inline-start: 5px solid var(--gold-500);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
}

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

.quote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.95rem;
}

.quran {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  line-height: 2.1;
}

.ayah-number {
  color: #a33000;
}

.center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Carousel (InfoBoard)
   -------------------------------------------------------------------------- */

.carousel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.3);
  scrollbar-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
  background: #fff;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide img.contain {
  object-fit: contain;
}

.carousel-slide .btn {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.9);
  color: var(--green-900);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.carousel-btn.prev {
  inset-inline-start: 0.75rem;
}

.carousel-btn.next {
  inset-inline-end: 0.75rem;
}

[dir="rtl"] .carousel-btn svg {
  transform: scaleX(-1);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgb(255 255 255 / 0.45);
  cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
  background: var(--gold-500);
}

/* --------------------------------------------------------------------------
   Dialog (Spenden etc.)
   -------------------------------------------------------------------------- */

dialog {
  width: min(520px, calc(100vw - 2rem));
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

dialog::backdrop {
  background: rgb(12 59 46 / 0.55);
  backdrop-filter: blur(2px);
}

.dialog-body {
  padding: 1.75rem;
}

.dialog-body h2 {
  font-size: 1.4rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.iban {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  direction: ltr;
  word-break: break-all;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.page-bg {
  background: var(--green-900) url("../img/almadina.jpg") center top / cover no-repeat;
  position: relative;
  isolation: isolate;
}

.page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(12 59 46 / 0.6);
}

.panel {
  max-width: 760px;
  margin: clamp(1.5rem, 6vw, 4rem) auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.panel-narrow {
  max-width: 440px;
}

.panel h1 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.form-grid {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--green-900);
}

.field .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgb(23 146 106 / 0.18);
}

input:user-invalid,
select:user-invalid {
  border-color: var(--danger);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--green-700);
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack .btn {
  width: 100%;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 500;
}

.message.error {
  background: #fef3f2;
  color: var(--danger);
}

.message.success {
  background: #ecfdf3;
  color: var(--success);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  text-decoration: none;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Rechtstexte
   -------------------------------------------------------------------------- */

.legal {
  max-width: 860px;
  overflow-wrap: anywhere;
}

.legal h1 {
  text-align: start;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal .toc {
  columns: 2 260px;
  padding-inline-start: 1.2rem;
}

.placeholder {
  background: #fff4e5;
  color: #8a4b00;
  padding: 0 0.3rem;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Mitgliederbereich
   -------------------------------------------------------------------------- */

.auth-pending main {
  visibility: hidden;
}

.member-user {
  text-align: center;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--green-900);
  color: rgb(255 255 255 / 0.85);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-300);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer address {
  font-style: normal;
}

.site-footer .copyright {
  flex-basis: 100%;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  padding-top: 1rem;
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   RTL (arabische Seite)
   -------------------------------------------------------------------------- */

[dir="rtl"] body {
  font-family: var(--font-arabic), var(--font);
  font-size: 1.15rem;
}

[dir="rtl"] .dialog-actions {
  justify-content: flex-start;
}

/* --------------------------------------------------------------------------
   Bewegung reduzieren
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Social-Icons: auf dem Desktop nur Icon, im Mobil-Menü mit Text */
@media (min-width: 861px) {
  .nav-label-mobile {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}
