/*
 * KL17 – Club-Template
 * (C) 2026 Rokka-Brands
 *
 * Warm-dunkler Club-Look aus dem Entwurf kl17_club.html.
 * Rahmen (Kopf, Ticker, Fuss, Tab-Leiste) + Grundlage fuer Beitraege,
 * Systemmeldungen und Fehlerseite. Event- und Location-Ansichten
 * gestaltet com_kl17 selbst.
 */

:root {
  --bg: #141210; --bg2: #1b1713; --card: #221d18; --card2: #2a241e;
  --ink: #f5efe6; --mid: #b8ab9c; --dim: #7d7265;
  --red: #e23b2e; --red2: #ff5a44; --amber: #e8a13c;
  --line: rgba(255, 240, 220, .09); --line2: rgba(255, 240, 220, .16);
  --disp: Anton, "Archivo Black", Impact, sans-serif;
  --body: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --g: 10px; --r: 16px;
  --k-breite: 600px;
  --k-tabs: calc(96px + env(safe-area-inset-bottom));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  padding-bottom: var(--k-tabs);
  background: var(--bg);
  background-image:
    radial-gradient(130% 70% at 50% -10%, rgba(226, 59, 46, .14), transparent 55%),
    radial-gradient(90% 60% at 100% 10%, rgba(232, 161, 60, .07), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Filmkorn */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.k-skip {
  position: absolute; left: 10px; top: -60px; z-index: 1000;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 99px;
  font-weight: 800; text-decoration: none;
}
.k-skip:focus { top: 10px; }

/* ---------- Rahmen ---------- */

.k-rahmen { max-width: var(--k-breite); margin: 0 auto; padding: 0 var(--g); }

.k-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6px 14px;
}
.k-marke { display: inline-flex; align-items: center; text-decoration: none; }
.k-logo { height: 30px; width: auto; }
.k-logo-weiss { filter: brightness(0) invert(1); }
.k-logo-text { font-family: var(--disp); font-size: 1.9rem; letter-spacing: .02em; line-height: 1; }
.k-meta {
  font-family: var(--mono); font-size: .54rem; letter-spacing: .18em;
  color: var(--mid); text-align: right; text-transform: uppercase; line-height: 1.6;
}
.k-meta b { color: var(--red2); font-weight: 700; }

/* Ticker */
.k-tick {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 9px 0; margin-bottom: var(--g);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.k-tick-row { display: flex; width: max-content; white-space: nowrap; animation: k-tick 36s linear infinite; will-change: transform; }
.k-tick-row span {
  font-family: var(--disp); font-size: .95rem; letter-spacing: .04em;
  text-transform: uppercase; padding: 0 0 0 18px; color: var(--mid);
}
.k-tick-row i { color: var(--red2); font-style: normal; }
.k-tick-row em { color: var(--amber); font-style: normal; padding-left: 18px; }
@keyframes k-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.k-oben, .k-unten { margin: var(--g) auto; }

/* Inhalt */
#inhalt { display: block; }
.k-flaeche { width: 100%; }
.k-spalte { max-width: 700px; margin: 0 auto; padding: 8px 16px 0; }

/* com_kl17 bringt eigenes Padding und Hintergrund mit */
.k-flaeche > .kl17 { background: transparent; }

/* ---------- Fuss ---------- */

.k-fuss {
  margin-top: 34px; padding-top: 24px; padding-bottom: 22px;
  border-top: 1px solid var(--line); text-align: center;
}
.k-social { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.k-social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line2); color: var(--mid);
  transition: color .2s, border-color .2s;
}
.k-social a:hover { color: var(--ink); border-color: var(--red); }
.k-fuss nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; }
.k-fuss nav a {
  font-family: var(--mono); font-size: .6rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mid); text-decoration: none; padding: 4px 2px;
}
.k-fuss nav a:hover, .k-fuss nav a[aria-current="page"] { color: var(--red2); }
.k-cr { font-family: var(--mono); font-size: .54rem; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }

/* ---------- Tab-Leiste ---------- */

.k-tabs {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 100;
  width: calc(100% - 20px); max-width: 460px;
  background: rgba(26, 22, 18, .82);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line2); border-radius: 99px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 8px 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.k-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--dim); text-decoration: none; padding: 4px 0; transition: color .2s;
}
.k-tab:hover, .k-tab.an { color: var(--ink); }
.k-tab b { font-size: .56rem; font-weight: 700; letter-spacing: .02em; }
.k-tab-mitte { position: relative; height: 40px; }
.k-tab-events {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--red); color: #fff; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 4px solid var(--bg); box-shadow: 0 6px 20px rgba(226, 59, 46, .5);
  transition: transform .2s;
}
.k-tab-events:hover { transform: translateX(-50%) scale(1.05); }
.k-tab-events.an { background: var(--red2); }
.k-tab-events b { font-size: .46rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.k-tab-dot {
  position: absolute; top: 1px; right: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: #2fd37a; border: 2px solid var(--bg); animation: k-pulse 1.8s infinite;
}
@keyframes k-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Beitraege, Rechtstexte, Kontakt ---------- */

.k-spalte .page-header h1, .k-spalte .page-header h2, .k-spalte > h1 {
  font-family: var(--disp); font-weight: 400;
  font-size: clamp(2rem, 9vw, 3.2rem); line-height: .9;
  letter-spacing: .01em; text-transform: uppercase; margin: 8px 0 20px;
}
.k-spalte .page-header + .page-header { display: none; }
.k-spalte .com-content-article__body,
.k-spalte .item-page,
.k-spalte .blog { font-size: .95rem; line-height: 1.75; color: var(--mid); overflow-wrap: break-word; }
.k-spalte h2, .k-spalte h3, .k-spalte h4 { color: var(--ink); }
.k-spalte .com-content-article__body h2 { font-family: var(--disp); font-weight: 400; font-size: 1.5rem; text-transform: uppercase; margin: 32px 0 10px; }
.k-spalte .com-content-article__body h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.k-spalte .com-content-article__body h4 { font-size: .95rem; margin: 22px 0 8px; }
.k-spalte .com-content-article__body a { color: var(--red2); text-underline-offset: 2px; }
.k-spalte ul, .k-spalte ol { padding-left: 1.3em; margin: 0 0 1.05em; }
.k-spalte li { margin-bottom: .35em; }
.k-spalte hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.k-spalte img { border-radius: 12px; }
.k-spalte table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .86rem; margin: 0 0 1.2em; }
.k-spalte th, .k-spalte td { border: 1px solid var(--line2); padding: 8px 10px; text-align: left; vertical-align: top; }
.k-spalte th { background: var(--card); color: var(--ink); }
.k-spalte .article-info { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 0 0 22px; }
.k-spalte .article-info dd { display: inline; margin: 0 14px 0 0; }
.k-spalte .article-info dt { display: none; }
.k-spalte #itkanzlei_txt_copyright { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .68rem; color: var(--dim); }

/* Formulare (com_contact, Login) */
.k-spalte label { display: block; font-family: var(--mono); font-size: .56rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px; }
.k-spalte input[type="text"], .k-spalte input[type="email"], .k-spalte input[type="password"],
.k-spalte input[type="tel"], .k-spalte textarea, .k-spalte select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: .9rem; padding: 12px 13px; margin-bottom: 12px; outline: none;
}
.k-spalte input:focus, .k-spalte textarea:focus, .k-spalte select:focus { border-color: var(--red); }
.k-spalte .btn, .k-spalte button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; border: 0; border-radius: 12px;
  font-weight: 800; font-size: .86rem; padding: 14px 22px; cursor: pointer; text-decoration: none;
}
.k-spalte .btn:hover, .k-spalte button[type="submit"]:hover { background: var(--red2); }

/* ---------- Systemmeldungen ---------- */

#system-message-container { max-width: var(--k-breite); margin: 0 auto; padding: 0 var(--g); }
#system-message-container .alert {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line2); border-left: 4px solid var(--amber);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: .92rem;
}
#system-message-container .alert-message { flex: 1 1 auto; margin: 0; }
#system-message-container .alert-heading { font-weight: 700; margin: 0 0 4px; }
#system-message-container .alert-success { border-left-color: #2fd37a; }
#system-message-container .alert-danger, #system-message-container .alert-error { border-left-color: var(--red); }
#system-message-container .btn-close, #system-message-container .joomla-alert--close {
  border: 0; background: none; color: var(--mid); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 2px;
}

/* ---------- Fehler- und Wartungsseite ---------- */

body.k-fehlerseite { display: grid; place-items: center; padding: 24px; }
.k-fehler { max-width: 520px; text-align: center; }
.k-fehler-code { font-family: var(--disp); font-size: clamp(4rem, 22vw, 8rem); line-height: .85; color: var(--ink); margin-bottom: 14px; }
.k-fehler-code span { color: var(--red); }
.k-fehler-text { color: var(--mid); margin-bottom: 24px; }
.k-fehler-link {
  display: inline-block; padding: 14px 28px; border-radius: 99px;
  background: var(--red); color: #fff; font-weight: 800; text-decoration: none;
}
.k-fehler-link:hover { background: var(--red2); }

/* ---------- Groessere Bildschirme ---------- */

/* Desktop-Navigation: auf Handy/Tablet versteckt */
.k-nav { display: none; }

/* ---------- Tablet ab 768 px ---------- */
@media (min-width: 768px) {
  :root { --k-breite: 960px; }
  .k-rahmen { padding: 0 24px; }
  .k-top { padding: 20px 0 18px; }
  .k-logo { height: 36px; }
  .k-logo-text { font-size: 2.3rem; }
  .k-meta { font-size: .6rem; }
  .k-tick-row span { font-size: 1.1rem; }
  .k-spalte { max-width: 820px; padding-top: 16px; }
  .k-tabs { max-width: 520px; }
}

/* ---------- Desktop ab 1100 px: Navigation oben, keine Tab-Leiste ---------- */
@media (min-width: 1100px) {
  :root { --k-breite: 1240px; --k-tabs: 0px; }
  .k-rahmen { padding: 0 32px; }
  .k-top { gap: 32px; padding: 24px 0 20px; }
  .k-meta { order: 3; }
  .k-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .k-nav a {
    position: relative; font-weight: 700; font-size: .86rem; color: var(--mid);
    text-decoration: none; padding: 10px 14px; border-radius: 99px; transition: color .2s, background .2s;
  }
  .k-nav a:hover { color: var(--ink); background: rgba(255, 245, 235, .06); }
  .k-nav a.an { color: var(--ink); }
  .k-nav a.an::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--red); border-radius: 2px;
  }
  .k-nav .k-nav-events {
    display: inline-flex; align-items: center; gap: 8px; margin-left: 8px;
    background: var(--red); color: #fff; padding: 11px 20px; box-shadow: 0 6px 20px rgba(226, 59, 46, .35);
  }
  .k-nav .k-nav-events:hover { background: var(--red2); color: #fff; }
  .k-nav .k-nav-events.an::after { display: none; }
  .k-nav .k-tab-dot { position: static; width: 8px; height: 8px; border-color: var(--red); }
  .k-tabs { display: none; }
  .k-fuss { margin-top: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: left; }
  .k-social { margin: 0; justify-content: flex-start; }
  .k-fuss nav { margin: 0; }
  .k-cr { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
body.contentpane { padding-bottom: 16px; }
