/* ============================================================
   Walking Football Club – CMS
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #722F37;
  --green-dark: #4A1E24;
  --pink: #8C2F39;
  --violet: #5E1224;
  --yellow: #ffe600;
  --navy: #0b1a30;
  --text: #22313f;
  --muted: #5b6b7b;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(
    135deg,
    #f4e5e7 0%,
    #ead2d6 40%,
    #f9f1ec 75%,
    #f4e5e7 100%
  );
  background-attachment: fixed;
  line-height: 1.6;
}

/* Übersetzung erfolgt über i18n.js + lang/*.json */

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

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  color: var(--green-dark);
  white-space: nowrap;
}

.brand .dot { color: var(--pink); }

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: var(--green);
  color: #fff;
}

.nav-links a.active {
  background: var(--green);
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: flex;
  background: #eef2f6;
  border-radius: 999px;
  padding: 3px;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--muted);
}

.lang-btn.active {
  background: var(--green);
  color: #fff;
}

.btn-login {
  background: var(--pink);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-login:hover { background: #5E1224; }

/* ── Hero / Banner ──────────────────────────────────────── */
.hero {
  padding: 48px 0 24px;
}

.banner {
  text-align: center;
  padding: 26px 28px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(114, 47, 55, 0.35);
}

.banner .main {
  display: block;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.banner .lang {
  display: block;
  margin-top: 8px;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.banner .lang span { display: block; }

/* ── Sektionen ──────────────────────────────────────────── */
.section {
  padding: 48px 0;
}

.section h2 {
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.section .section-label {
  color: var(--pink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.lead {
  color: var(--muted);
  max-width: 720px;
  margin-top: 8px;
}

/* ── Blog ───────────────────────────────────────────────── */
.posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

.post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.post-card h3 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.post-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}

.post-inline-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 12px 0;
  display: block;
}

.cover-preview {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}

.cover-preview img {
  max-width: 160px;
  border-radius: 8px;
  display: block;
}

.cover-preview .btn {
  position: absolute;
  top: 4px;
  right: 4px;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.post-content {
  white-space: pre-wrap;
  word-wrap: break-word;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  margin: 14px 0 8px;
  color: var(--navy);
}
.post-content p { margin: 0 0 10px; }
.post-content ul, .post-content ol { margin: 0 0 10px 22px; }
.post-content a { color: var(--pink); text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.post-content video { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; display: block; }

.empty {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  color: var(--muted);
  text-align: center;
}

/* ── Galerie ────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.gallery figure {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.gallery figure:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.gallery video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
}

.pick-video {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #f1f5f9;
}

.gallery figcaption {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

/* ── Teams ──────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.team-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.team-card h3 { color: var(--green-dark); margin-bottom: 6px; }

/* ── Kontakt ────────────────────────────────────────────── */
.contact-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.contact-card p { margin-bottom: 6px; }

.contact-card a { color: var(--pink); font-weight: 700; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links a {
  color: #e2e8f0;
  font-weight: 600;
}

.footer-links a:hover { color: var(--yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ── Formulare / Admin ──────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-top: 20px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--navy);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.field textarea { min-height: 140px; resize: vertical; }

.btn {
  border: 0;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger { background: #e11d48; color: #fff; }
.btn-danger:hover { background: #be123c; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 14px;
  font-weight: 600;
}

.alert.ok { background: #dcfce7; color: #166534; }
.alert.err { background: #fee2e2; color: #991b1b; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge.green { background: #dcfce7; color: #166534; }
.badge.gray { background: #e2e8f0; color: #475569; }
.badge.pink { background: #f7e4e7; color: #722F37; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.submenu {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.submenu-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

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

.submenu-btn.active {
  background: var(--green);
  color: #fff;
}

/* Bildauswahl im Blog-Editor */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pick-item {
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.pick-item:hover {
  border-color: var(--green);
}

.pick-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.pick-item .pick-name {
  padding: 4px 8px 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-item .pick-actions {
  display: flex;
  gap: 6px;
  padding: 6px 8px 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

th { color: var(--muted); font-size: 0.85rem; }

.hidden { display: none !important; }

/* Impressum: Zeilenumbrüche des übersetzten Textes erhalten */
.imprint-body {
  white-space: pre-line;
  margin-top: 24px;
  line-height: 1.7;
}

/* ── Bild-Auswahl (Checkbox-Übersicht) ─────────────────────────── */
.pick-item.pick-select {
  cursor: pointer;
  position: relative;
}

.pick-item .pick-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  cursor: pointer;
  z-index: 2;
}

.pick-item:has(.pick-check:checked) {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(114, 47, 55, 0.25);
}

@media (max-width: 700px) {
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-links { justify-content: center; }
  .nav-right { justify-content: center; }
}

/* ── About-Inhalt (Rich-Text, öffentlich) ─────────────────────────── */
.about-content {
  margin-top: 20px;
  line-height: 1.7;
}
.about-content h1, .about-content h2, .about-content h3, .about-content h4 {
  margin: 16px 0 8px;
  color: var(--green-dark);
}
.about-content p { margin: 0 0 12px; }
.about-content ul, .about-content ol { margin: 0 0 12px 22px; }
.about-content a { color: var(--pink); text-decoration: underline; }
.about-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 12px 0;
}
.about-content blockquote {
  border-left: 4px solid var(--green);
  padding-left: 14px;
  color: var(--muted);
  margin: 12px 0;
}

/* ── Rich-Text-Editor (Admin) ─────────────────────────────────────── */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
}
.rte-btn {
  border: 0;
  background: transparent;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.rte-btn:hover { background: var(--green); color: #fff; }
.rte-sep { width: 1px; background: #cbd5e1; margin: 2px 4px; }
.rte-editor {
  min-height: 260px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  line-height: 1.6;
}
.rte-editor:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(114, 47, 55, 0.15); }
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.rte-editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.rte-editor video { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }
.rte-editor h1, .rte-editor h2, .rte-editor h3, .rte-editor h4 { margin: 12px 0 6px; }
.rte-editor ul, .rte-editor ol { margin: 0 0 8px 20px; }
.rte-editor a { color: var(--pink); }

/* Bild-Auswahl als Button (About-Editor) */
button.pick-item, .pick-item.pick-insert {
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 0;
}



/* ── Lightbox (vergrößerte Bildansicht) ─────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 26, 48, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

body.no-scroll {
  overflow: hidden;
}


/* ── Sponsoren-Leisten (links und rechts, je höchstens 6) ───────────── */
:root { --sponsor-w: 190px; }
@media (min-width: 1500px) { :root { --sponsor-w: 285px; } }

.sponsor-wrap { display: none; }
.sponsor-bar { display: none; }

.sponsor-title {
  flex: 0 0 auto;
  padding: 12px 10px 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green-dark);
}

.sponsor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 12px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #ead2d6;
  border-radius: 10px;
  padding: 12px;
  min-height: 110px;
  transition: box-shadow 0.15s, transform 0.15s;
}

a.sponsor-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.sponsor-item img {
  width: 100%;
  max-height: 135px;
  object-fit: contain;
}

/* Breiter Bildschirm: feste Spalten links und rechts, jede scrollt für sich */
@media (min-width: 1200px) {
  .sponsor-wrap { display: contents; }

  body.has-sponsors-left .sponsor-left,
  body.has-sponsors-right .sponsor-right {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h, 64px);
    bottom: 0;
    width: var(--sponsor-w);
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
  }
  .sponsor-left  { left: 0;  border-right: 1px solid #ead2d6; }
  .sponsor-right { right: 0; border-left: 1px solid #ead2d6; }

  body.has-sponsors-left main,
  body.has-sponsors-left .footer { margin-left: var(--sponsor-w); }
  body.has-sponsors-right main,
  body.has-sponsors-right .footer { margin-right: var(--sponsor-w); }
}

/* Schmaler Bildschirm: eine waagerechte Leiste unter dem Menü (erst links, dann rechts) */
@media (max-width: 1199px) {
  body.has-sponsors-left .sponsor-wrap,
  body.has-sponsors-right .sponsor-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #ead2d6;
  }
  .sponsor-bar,
  .sponsor-list { display: contents; }
  .sponsor-title { display: none; }
  .sponsor-item {
    width: 195px;
    min-height: 84px;
  }
  .sponsor-item img { max-height: 84px; }
}

/* ── Sponsoren (Verwaltung) ───────────────────────────────────────── */
.sponsor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.sponsor-row img {
  width: 72px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}
.sponsor-row-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sponsor-row-info span {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sponsor-row-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}
.sponsor-row-actions .btn[disabled] { opacity: 0.35; cursor: default; }
.sponsor-group-title {
  margin: 14px 0 8px;
  font-size: 1rem;
  color: var(--green-dark);
}
