/* ==========================================================================
   MC Red Baron — Site-Theme (TYPO3 14, ohne Bootstrap/jQuery)
   Aufbau angelehnt an phantomstaffel.de, moderner umgesetzt:
   dunkle Sticky-Navbar, diagonaler Hero, schwebende Karten, dunkler Footer.
   Markenfarbe Rot bleibt Leitfarbe (#e30613).
   ========================================================================== */

@font-face {
  font-family: 'Armalite Rifle';
  src: url('../Fonts/armalite.woff2') format('woff2'),
       url('../Fonts/armalite.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  /* Font enthält keine Umlaute — die kommen aus dem Fallback */
  unicode-range: U+0020-007E;
}

@font-face {
  font-family: 'CutOuts FLF';
  src: url('../Fonts/cutoutsflf.woff2') format('woff2'),
       url('../Fonts/cutoutsflf.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --rot: #e30613;
  --rot-dunkel: #a50010;
  --schwarz: #141414;
  --dunkel: #1c1c1e;
  --dunkel-2: #26262a;
  --anthrazit: #2b2b2b;
  --grau-seite: #ececeb;
  --grau-karte: #ffffff;
  --grau-sanft: #f3f2f0;
  --weiss: #ffffff;
  --text: #23242a;
  --text-leise: #6a6b72;
  --schatten: 0 2px 6px rgb(0 0 0 / .10), 0 10px 30px rgb(0 0 0 / .12);
  --schatten-karte: 0 4px 14px rgb(0 0 0 / .10), 0 18px 40px rgb(0 0 0 / .10);
  --schatten-klein: 0 1px 3px rgb(0 0 0 / .18);
  --radius: 12px;
  --radius-klein: 8px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Armalite Rifle', 'Arial Black', sans-serif;
  --inhalt-breite: 1200px;
  --diagonale: 46px;
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--grau-seite);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Sticky Footer: Inhalt füllt mindestens die Viewport-Höhe */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

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

a { color: var(--rot-dunkel); }
a:hover { color: var(--rot); }

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

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--schwarz);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--schwarz);
  color: var(--weiss);
  padding: .6em 1.2em;
}
.skip-link:focus { left: 0; color: var(--weiss); }

/* --------------------------------------------------------------------------
   Sticky-Navbar: Logo links, Menü rechts
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(20 20 20 / .96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 3px solid var(--rot);
  box-shadow: 0 2px 14px rgb(0 0 0 / .35);
}

.header-inner {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: .5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  height: 58px;
  width: auto;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--rot), 0 3px 8px rgb(0 0 0 / .4);
  transition: transform .25s ease;
}
.site-logo:hover img { transform: scale(1.05) rotate(-3deg); }

.site-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-logo .logo-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: #fff;
  text-transform: uppercase;
}
.site-logo .logo-text span {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rot);
}

/* Navigation */
.site-nav { display: flex; }

.nav-l1 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: .15rem;
}

.nav-l1 > li { position: relative; }

.nav-l1 a {
  display: flex;
  align-items: center;
  padding: .7rem 1rem;
  color: #e8e8e8;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: .98rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius-klein);
  transition: color .2s ease, background-color .2s ease;
}

.nav-l1 > li > a::after {
  content: "";
  position: absolute;
  left: 1rem; right: 1rem;
  bottom: .35rem;
  height: 2px;
  background: var(--rot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.nav-l1 > li > a:hover,
.nav-l1 > li.active > a {
  color: #fff;
  background: rgb(255 255 255 / .06);
}
.nav-l1 > li > a:hover::after,
.nav-l1 > li.active > a::after { transform: scaleX(1); }

.nav-l1 > li.has-sub > a { padding-right: 1.9rem; }
.nav-l1 > li.has-sub > a::before {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: .45rem; height: .45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-60%) rotate(45deg);
  opacity: .7;
}

/* Dropdown */
.nav-l2 {
  list-style: none;
  margin: 0;
  padding: .4rem;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 240px;
  background: var(--dunkel-2);
  border-top: 3px solid var(--rot);
  border-radius: 0 0 var(--radius-klein) var(--radius-klein);
  box-shadow: var(--schatten);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}

.nav-l1 li.has-sub:hover > .nav-l2,
.nav-l1 li.has-sub:focus-within > .nav-l2,
.nav-l1 li.has-sub.open > .nav-l2 {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-l2 a {
  font-family: var(--font-body);
  font-size: .95rem;
  letter-spacing: 0;
  text-transform: none;
  padding: .5rem .8rem;
  border-radius: 6px;
}
.nav-l2 a::after, .nav-l2 a::before { display: none; }
.nav-l2 a:hover { background: rgb(255 255 255 / .1); }

.nav-l3 { list-style: none; padding-left: .8rem; margin: 0; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Hero (Startseite) — dunkel mit Patches, diagonaler Abschluss
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(227, 6, 19, .32) 0%, rgba(227, 6, 19, 0) 55%),
    linear-gradient(160deg, #2a2a2e 0%, #1a1a1c 55%, #101012 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, .022) 0,
    rgba(255, 255, 255, .022) 1px,
    transparent 1px,
    transparent 10px
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 6vw, 5rem);
}

.hero-patch { display: flex; align-items: center; gap: 1.5rem; }
.hero-patch .frame { margin: 0; }

.hero-patch img {
  max-height: 120px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6));
  transition: transform .25s ease, filter .25s ease;
}
.hero-center img { max-height: 140px; }

.hero-patch a:hover img,
.hero-patch img:hover {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 8px 18px rgba(227, 6, 19, .55));
}

/* --------------------------------------------------------------------------
   Inhalt & Karten
   -------------------------------------------------------------------------- */

main {
  width: 100%;
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
  /* drückt den Footer bei wenig Inhalt an den unteren Rand */
  flex: 1 0 auto;
}

/* Karten (ehem. „Panel") — helle Karte, dunkler Titelkopf, roter Akzent */
.panel {
  background: var(--grau-karte);
  border-radius: var(--radius);
  box-shadow: var(--schatten-karte);
  margin: 1.5rem 0;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.panel-grid .panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgb(0 0 0 / .14), 0 26px 55px rgb(0 0 0 / .16);
}

.panel-title {
  margin: 0;
  background: linear-gradient(180deg, var(--dunkel-2), var(--schwarz));
  color: var(--weiss);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: .7rem 1rem;
  border-bottom: 3px solid var(--rot);
}

.panel-title a { color: inherit; text-decoration: none; }
.panel-title a:hover { color: #fff; }

.panel-body { padding: 1.5rem; }

.panel-stuff { min-height: 2rem; }
.panel-stuff-menu { max-height: 520px; overflow: auto; }
.panel-login { max-height: none; overflow: visible; }
.panel-stuff-contact, .panel-stuff-anmelde { max-width: 620px; margin: 0 auto; }

/* Karten-Raster (Startseite, Portalseiten) */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  align-items: start;
}
.panel-grid .panel { margin: 0; }

/* Banner über die volle Breite, oben bündig am Menü, ohne Rundung */
.site-banner {
  display: block;
  width: 100%;
  height: clamp(240px, 30vw, 440px);
  object-fit: cover;
  object-position: 62% center;
  background: var(--schwarz);
}

/* „Aktuelles/Kalender"-Karte grenzt bündig an das Banner, oben ohne Rundung */
.panel-aktuell {
  margin-top: -2rem; /* gleicht main padding-top aus → bündig unter dem Banner */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.aktuell-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Die roten Deko-Grafiken passen nicht zum ruhigen, modernen Karten-Look */
.aktuell-grid .aktuell-deko { display: none; }

.panel-stuff-news {
  background: var(--grau-sanft);
  border: 1px solid rgb(0 0 0 / .06);
  border-radius: var(--radius-klein);
  padding: 1.1rem 1.25rem;
  min-height: 9rem;
}

/* Spaltenlayouts */
.cols { display: grid; gap: 1.5rem; }
.cols-2-1 { grid-template-columns: 2fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Vorstand/Ehrentafel: Kachelreihen */
.tile-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.stuff-row { margin: 1.25rem 0; }

/* Routen-Seiten */
.routen-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.tree, .tree ul {
  margin: 0 0 0 1em;
  padding: 0;
  list-style: none;
  position: relative;
}
.tree ul { margin-left: .5em; }
.tree::before, .tree ul::before {
  content: "";
  display: block;
  width: 0;
  position: absolute;
  top: 0; bottom: 0; left: 0;
  border-left: 1px solid rgb(0 0 0 / .25);
}
.tree li {
  margin: 0;
  padding: 0 1.2em;
  line-height: 2em;
  font-weight: 600;
  position: relative;
}
.tree li::before {
  content: "";
  display: block;
  width: 10px;
  height: 0;
  border-top: 1px solid rgb(0 0 0 / .25);
  margin-top: -1px;
  position: absolute;
  top: 1em; left: 0;
}
.tree li.active > a { color: var(--rot); }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

main input[type="text"],
main input[type="email"],
main input[type="password"],
main input[type="tel"],
main input[type="date"],
main input[type="number"],
main select,
main textarea {
  width: 100%;
  max-width: 440px;
  padding: .6rem .8rem;
  border: 1px solid #c4c4c4;
  border-radius: var(--radius-klein);
  background: var(--weiss);
  font: inherit;
  margin-bottom: .7rem;
}

main input:focus,
main select:focus,
main textarea:focus {
  border-color: var(--rot);
  outline: 2px solid var(--rot);
  outline-offset: 0;
}

main label {
  display: inline-block;
  font-weight: 600;
  margin-bottom: .25rem;
}

button, .btn, input[type="submit"] {
  display: inline-block;
  background: var(--rot);
  color: var(--weiss);
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-klein);
  padding: .65rem 1.8rem;
  cursor: pointer;
  box-shadow: var(--schatten-klein);
  text-decoration: none;
  transition: background-color .18s ease, transform .18s ease;
}

button:hover, .btn:hover, input[type="submit"]:hover {
  background: var(--rot-dunkel);
  color: var(--weiss);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Footer — dunkel, kompakt, diagonaler Abschluss oben
   -------------------------------------------------------------------------- */

.site-footer {
  flex-shrink: 0;
  padding: calc(.9rem + var(--diagonale)) 1.25rem .9rem;
  clip-path: polygon(0 var(--diagonale), 100% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(80% 120% at 80% 0%, rgba(227, 6, 19, .18) 0%, rgba(227, 6, 19, 0) 50%),
    linear-gradient(180deg, #1c1c1e 0%, #131315 100%);
  color: #d6d6d8;
}

/* Rechte Footer-Gruppe: Club-Patches + Cartoon-Emblem */
.footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 1.3rem;
}
.footer-patches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
}
.footer-patches div,
.footer-patches figure,
.footer-patches p { display: contents; }
.footer-patches img {
  max-height: 44px;
  width: auto;
  margin: 0;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55));
}

.footer-inner {
  max-width: var(--inhalt-breite);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

/* Cartoon-Emblem rechts (aus dem alten Login-Panel) */
.footer-emblem { flex-shrink: 0; }
.footer-emblem img {
  max-height: 68px;
  width: auto;
  display: block;
}

.footer-brand { display: flex; gap: .8rem; align-items: center; }
.footer-brand img {
  height: 46px; width: auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--rot);
}
.footer-brand .footer-claim strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .06em;
  color: #fff;
  text-transform: uppercase;
}
.footer-brand .footer-claim span { color: var(--rot); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }

/* Rechtliches-Links nebeneinander */
.nav-bottom {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.5rem;
}
.nav-bottom a { color: #d6d6d8; text-decoration: none; }
.nav-bottom a:hover { color: #fff; }

.footer-baseline {
  max-width: var(--inhalt-breite);
  margin: .8rem auto 0;
  padding-top: .7rem;
  border-top: 1px solid rgb(255 255 255 / .1);
  font-size: .78rem;
  color: var(--text-leise);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* --------------------------------------------------------------------------
   Kompatibilität: Bootstrap-Reste in Bestandsinhalten (RTE/HTML-Elemente)
   -------------------------------------------------------------------------- */

.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.row > [class*="col"] { flex: 1 1 0; min-width: 0; }
.row > .col-12 { flex: 1 1 100%; }
.row > .col-8 { flex: 1 1 62%; }
.row > .col-6 { flex: 1 1 46%; }
.row > .col-4 { flex: 1 1 30%; }
.row > .col-3 { flex: 1 1 22%; }

.text-center { text-align: center; }
.d-none { display: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .routen-layout { grid-template-columns: minmax(160px, 220px) 1fr; }
}

@media (max-width: 860px) {
  :root { --diagonale: 30px; }

  .header-inner { padding: .5rem 1rem; }
  .site-logo img { height: 48px; }
  .site-logo .logo-text strong { font-size: 1rem; }

  /* Hamburger-Navigation */
  .nav-toggle {
    display: block;
    background: none;
    border: 0;
    padding: .6rem;
    cursor: pointer;
    box-shadow: none;
  }
  .nav-toggle:hover { background: none; transform: none; }
  .nav-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--weiss);
    border-radius: 2px;
    margin: 5px 0;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dunkel);
    border-bottom: 3px solid var(--rot);
    box-shadow: var(--schatten);
    display: none;
  }
  .site-nav.nav-open { display: block; }

  .nav-l1 {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem;
  }
  .nav-l1 > li > a::after { display: none; }
  .nav-l1 > li.has-sub > a::before { transform: translateY(-60%) rotate(45deg); }

  .nav-l2 {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    border-top: 0;
    box-shadow: none;
    background: rgb(255 255 255 / .04);
    padding-left: 1rem;
  }
  .nav-l1 li.has-sub.open > .nav-l2 { display: block; }

  .cols-2-1, .cols-3 { grid-template-columns: 1fr; }
  .aktuell-grid { grid-template-columns: 1fr; }
  .aktuell-deko { display: none; }
  .routen-layout { grid-template-columns: 1fr; }

  .footer-inner { justify-content: center; text-align: center; }
  .footer-baseline { justify-content: center; text-align: center; }
}

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

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.news-compact { list-style: none; margin: 0; padding: 0; }

.news-compact li {
  display: flex;
  gap: .6rem;
  padding: .45rem .3rem;
  align-items: baseline;
  border-bottom: 1px solid rgb(0 0 0 / .06);
}
.news-compact li:last-child { border-bottom: 0; }

.news-compact .news-datum {
  flex: 0 0 6em;
  font-variant-numeric: tabular-nums;
  color: var(--text-leise);
  font-size: .9rem;
}

.news-compact a {
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-compact a:hover { color: var(--rot); }

.f3-widget-paginator, .pagination {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .6rem 0 0;
  margin: 0;
}

.f3-widget-paginator a, .pagination a, .pagination .page-link {
  display: inline-block;
  padding: .2rem .6rem;
  background: var(--weiss);
  border: 1px solid #bbb;
  border-radius: 6px;
  text-decoration: none;
}

.news-text-wrap { margin-top: .5rem; }
.news-detail .header h1 { font-size: 1.5rem; }

/* --------------------------------------------------------------------------
   Karte (OpenStreetMap) — Termine/Kalender liegen in EXT:bw_cal
   -------------------------------------------------------------------------- */

.mcrb-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-klein);
  box-shadow: var(--schatten-klein);
  margin: .75rem 0;
}

/* --------------------------------------------------------------------------
   Login-Formular (felogin) — einheitlicher vertikaler Rhythmus
   -------------------------------------------------------------------------- */
.panel-login fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: auto;
}
.panel-login legend {
  padding: 0;
  margin: 0 0 .6rem;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-leise);
}
.panel-login fieldset > div { margin: 0 0 1rem; }
.panel-login fieldset > div:last-of-type { margin-bottom: 0; }
.panel-login label {
  display: block;
  margin: 0 0 .35rem;
  font-weight: 600;
}
.panel-login input[type="text"],
.panel-login input[type="password"] {
  width: 100%;
  max-width: none;
  margin: 0;
}
.panel-login .felogin-hidden { display: none; }
