/* ==============================================
   Modernes, responsives CSS – Stand 2026
   Für Vereins-Webseite mit Side-Menu
============================================== */

:root {
  font-size: clamp(15px, 0.95rem + 0.35vw, 18px);

  --line-height-body:    1.62;
  --line-height-heading: 1.25;

  --color-primary:       #0066ff;
  --color-primary-dark:  #004ccc;
  --color-accent:        #dc2626;       /* für auffällige Link-Symbole */
  --color-text:          #0f172a;
  --color-text-light:    #6b7280;
  --bg:                  #ffffff;
  --bg-alt:              #f9fafb;
  --radius:              12px;
  --shadow-sm:           0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:           0 8px 24px rgba(0,0,0,0.12);
  --transition:          all 0.22s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:              #0f172a;
    --bg-alt:          #1e293b;
    --color-text:      #e2e8f0;
    --color-text-light:#94a3b8;
    --color-accent:    #f87171;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: var(--line-height-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--bg);
}

/* ==============================================
   TYPOGRAFIE & FLIESSTEXT
============================================== */

h1, .h1 { font-size: clamp(2.2rem, 5vw + 1rem, 4rem);    line-height: var(--line-height-heading); font-weight: 700; margin: 1.4em 0 0.7em; }
h2, .h2 { font-size: clamp(1.8rem, 4vw + 0.9rem, 3.2rem);  line-height: var(--line-height-heading); font-weight: 700; margin: 1.6em 0 0.8em; }
h3, .h3 { font-size: clamp(1.5rem, 3.2vw + 0.8rem, 2.4rem); line-height: 1.3; font-weight: 600; margin: 1.8em 0 0.9em; }
h4, .h4 { font-size: clamp(1.25rem, 2.4vw + 0.7rem, 1.8rem); font-weight: 600; margin: 2em 0 1em; }

p, li, dd, blockquote, .text, article p {
  max-width: 75ch;
  margin: 1.4em 0;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  text-align: justify;
  text-justify: inter-word;
  hyphenate-limit-chars: 2 3 2;
  hyphenate-limit-lines: 2;
  hyphenate-limit-last: 3;
  hanging-punctuation: first last;
}

p:last-child,
li:last-child,
article p:last-of-type,
.text p:last-of-type {
  text-align: start;
}

/* ==============================================
   INHALTSBREITE & SEITENABSTÄNDE
============================================== */

main,
article,
.content,
.flow,
section.content-area,
.container > main,
.container > article,
.container > .flow {
  max-width: 75ch;
  min-width: 320px;
  margin: 0 auto;
  width: 100%;
  padding-left:  clamp(1.5rem, 5vw, 3.5rem);
  padding-right: clamp(1.5rem, 5vw, 3.5rem);
}

/* Mobile: exakt 20 px Abstand links + rechts */
@media (max-width: 768px) {
  main,
  article,
  .content,
  .flow,
  section.content-area,
  .container > main,
  .container > article,
  .container > .flow {
    max-width: none;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ==============================================
   LINKS IM INHALT (nur mit href) + Anker ohne href ausschließen
============================================== */

main a[href],
article a[href],
section:not(.sideMenu) a[href],
.help-box a[href],
.container a[href]:not(.sideMenu a),
.text a[href],
.prose a[href] {
  color: var(--color-text) !important;
  text-decoration: none !important;
  transition: var(--transition);
}

main a[href]::after,
article a[href]::after,
section:not(.sideMenu) a[href]::after,
.help-box a[href]::after,
.container a[href]:not(.sideMenu a)::after,
.text a[href]::after,
.prose a[href]::after {
  content: "↗";
  font-size: 0.82em;
  font-weight: bold;
  color: var(--color-accent);
  opacity: 1;
  margin-left: 0.26em;
  top: -0.28em;
  position: relative;
  vertical-align: baseline;
  transition: var(--transition);
}

main a[href]:hover::after,
article a[href]:hover::after,
.help-box a[href]:hover::after,
.text a[href]:hover::after {
  transform: translateY(-2px) scale(1.2);
  color: var(--color-primary);
}

/* === Anker ohne href → KEIN Pfeilsymbol === */
main a:not([href])::after,
article a:not([href])::after,
.help-box a:not([href])::after,
.container a:not([href])::after,
.text a:not([href])::after,
.prose a:not([href])::after {
  content: none !important;
}

/* Menü-Links: weiß + ohne Symbol */
.sideMenu a,
.sideMenu span,
.topbar a {
  color: white !important;
  text-decoration: none;
}

.sideMenu a::after,
.topbar a::after {
  content: none !important;
}

/* ==============================================
   LAYOUT & CONTAINER
============================================== */

.container {
  width: min(90%, 1200px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.flow > * + * {
  margin-top: var(--flow-space, 1.6em);
}

.card,
section:not(.topbar, .sideMenu, .help-layer, .help-box) {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.8rem, 4vw, 2.5rem);
  border: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
  transition: var(--transition);
}

.card:hover,
section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 12px 32px rgba(0,0,0,0.1);
}

img, picture {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.aspect-16-9  { aspect-ratio: 16 / 9;  }
.aspect-4-3   { aspect-ratio: 4 / 3;   }
.aspect-square { aspect-ratio: 1 / 1;  }

img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ==============================================
   TOPBAR + MENU + HELP
============================================== */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;

    position:sticky;
    top:0;

    height:72px;

    padding:0 22px;

    background:rgba(255,255,255,.72);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);

    border-bottom:1px solid rgba(255,255,255,.3);

    z-index:1000;
}

@media(prefers-color-scheme:dark){

.topbar{

    background:rgba(18,18,18,.72);

}

}

.logo img{

    height:46px;

}

.right-area{

    display:flex;

    align-items:center;

    gap:14px;

}

/* Burger */

.menuButton{

    width:48px;

    height:48px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:50%;

    cursor:pointer;

    transition:.25s;

}

.menuButton:hover{

    background:rgba(0,0,0,.08);

}

.burger{

    width:24px;

    height:18px;

    position:relative;

}

.burger span{

    position:absolute;

    width:100%;

    height:3px;

    border-radius:10px;

    background:#222;

    transition:.3s;

}

@media(prefers-color-scheme:dark){

.burger span{

    background:white;

}

}

.burger span:nth-child(1){top:0;}
.burger span:nth-child(2){top:7px;}
.burger span:nth-child(3){top:14px;}

.menuButton.active span:nth-child(1){

    top:7px;
    transform:rotate(45deg);

}

.menuButton.active span:nth-child(2){

    opacity:0;

}

.menuButton.active span:nth-child(3){

    top:7px;
    transform:rotate(-45deg);

}

/* Hilfe */

.help{

    width:44px;

    height:44px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#3b82f6;

    color:white;

    font-size:22px;

    cursor:pointer;

    transition:.25s;

}

.help:hover{

    transform:scale(1.08);

}

/* Overlay */

.menuOverlay,
.menuOverlayRight{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.10);

    backdrop-filter:blur(8px);

    -webkit-backdrop-filter:blur(8px);

    opacity:0;

    visibility:hidden;

    transition:.3s;

    z-index:900;

}

.menuOverlay.show,
.menuOverlayRight.show{

    opacity:1;

    visibility:visible;

}

/* Beide Menüs */

.sideMenu,
.sideMenuRight{

    position:fixed;

    top:16px;

    bottom:16px;

    width:min(270px,82vw);

    background:rgba(255,255,255,.62);

    backdrop-filter:blur(24px);

    -webkit-backdrop-filter:blur(24px);

    border:1px solid rgba(255,255,255,.4);

    border-radius:26px;

    box-shadow:0 18px 50px rgba(0,0,0,.18);

    padding-top:90px;

    z-index:950;

    overflow:auto;

    transition:transform .35s cubic-bezier(.2,.9,.3,1);

}

.sideMenu{

    left:16px;

    transform:translateX(calc(-100% - 30px));

}

.sideMenu.open{

    transform:translateX(0);

}

.sideMenuRight{

    right:16px;

    transform:translateX(calc(100% + 30px));

}

.sideMenuRight.open{

    transform:translateX(0);

}

@media(prefers-color-scheme:dark){

.sideMenu,
.sideMenuRight{

    background:rgba(20,20,20,.72);

    border:1px solid rgba(255,255,255,.08);

}

}

/* Listen */

.sideMenu ul,
.sideMenuRight ul{

    list-style:none;

    margin:0;

    padding:18px;

    display:flex;

    flex-direction:column;

    gap:12px;

}

.sideMenu li,
.sideMenuRight li{

    margin:0;

}

/* Menüpunkte */

.sideMenu a,
.sideMenu span,
.sideMenuRight a,
.sideMenuRight span{

    display:block;

    padding:15px 18px;

    border-radius:14px;

    background:rgba(255,255,255,.45);

    color:#222 !important;

    text-decoration:none;

    transition:.25s;

}

@media(prefers-color-scheme:dark){

.sideMenu a,
.sideMenu span,
.sideMenuRight a,
.sideMenuRight span{

    background:rgba(255,255,255,.08);

    color:white !important;

}

}

.sideMenu a:hover,
.sideMenu span:hover,
.sideMenuRight a:hover,
.sideMenuRight span:hover{

    transform:translateX(6px);

    background:white;

    box-shadow:0 8px 20px rgba(0,0,0,.12);

}

@media(prefers-color-scheme:dark){

.sideMenu a:hover,
.sideMenu span:hover,
.sideMenuRight a:hover,
.sideMenuRight span:hover{

    background:rgba(255,255,255,.15);

}

}

.sideMenu .active a{

    background:#3b82f6;

    color:white !important;

}

/* Untermenüs */

.submenu ul{

    display:none;

    padding:8px 0 0 14px;

    gap:8px;

}

.submenu.open ul{

    display:flex;

}

.submenu ul a{

    font-size:.95rem;

}

/* X */

.closeMenu,
.closeMenuRight{

    position:absolute;

    top:24px;

    right:20px;

    width:38px;

    height:38px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:24px;

    cursor:pointer;

    color:#666;

    transition:.2s;

}

.closeMenu:hover,
.closeMenuRight:hover{

    background:rgba(0,0,0,.08);

}

@media(prefers-color-scheme:dark){

.closeMenu,
.closeMenuRight{

    color:white;

}

}

/* Hilfe-Fenster */

.help-layer{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.25);

    backdrop-filter:blur(6px);

    z-index:980;

}

.help-box{

    width:min(500px,92vw);

    margin:80px auto;

    background:white;

    border-radius:22px;

    padding:30px;

    box-shadow:0 20px 50px rgba(0,0,0,.25);

}

.closeHelp{

    position:absolute;

    top:18px;

    right:18px;

    cursor:pointer;

    font-size:28px;

}

/* Accessibility */

:focus-visible{

    outline:3px solid #3b82f6;

    outline-offset:3px;

}

@media(prefers-reduced-motion:reduce){

*{

    animation:none !important;

    transition:none !important;

}

}
