html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad);
}


/* Header */
.site-header{
  background: var(--surface-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;

  color: var(--on-header);
  overflow: visible;
  isolation: isolate;
}

.site-header::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 220px at 10% 0%, var(--brand-tint-3), transparent 60%),
    radial-gradient(900px 240px at 60% 0%, var(--brand-tint-2), transparent 62%),
    radial-gradient(700px 220px at 92% 0%, var(--brand-tint-1), transparent 60%);
  opacity: .9;
}

.site-header::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-blue), var(--brand-green));
  opacity: .55;
}

.header-top{
  position: relative;
  padding: 0;
}

.header-top-row{
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  height: 125px;
  padding: 6px 0;
}

.header-nav{
  position: relative;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.header-nav-row{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Brand */
.brand{
  display:flex;
  align-items: stretch;
  gap: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  height: 100%;
}

.brand-logo{
  height: 100%;
  width: auto;
  max-width: clamp(96px, 12vw, 190px);
  flex: 0 0 auto;
  border-radius: 12px;
  background: transparent;
  display: block;
  object-fit: contain;
}

.brand-text{
  display:flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.12;
  min-width: 0;
}

.brand-title{
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline{
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tablet */
@media (max-width: 980px){
  .brand-logo{
    max-width: clamp(84px, 16vw, 160px);
    border-radius: 10px;
}
  .brand-title{
    font-size: 1.12rem;
  }
  .brand-tagline{
    font-size: 0.88rem;
  }

  .header-top-row{
    min-height: clamp(78px, 10vw, 120px);
    padding: 10px 0;
  }
}

/* Mobile */
@media (max-width: 720px){
  .header-top{
    padding: 0;
}

  /* Mobile: Brand/Logo visually centered (reduces "left-heavy" header). */
  .header-top-row{
    justify-content: center;
    text-align: center;
  }

  .brand{
    justify-content: center;
  }

  .brand-text{
    align-items: center;
  }

  .brand-title,
  .brand-tagline{
    text-align: center;
  }

  /* Allow the brand text to wrap on very small screens instead of hard ellipsis. */
  .brand-title,
  .brand-tagline{
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .header-nav-row{
    justify-content: flex-end;
  }
  .brand{
    gap: 12px;
  }
  .brand-logo{
    max-width: clamp(64px, 18vw, 120px);
    border-radius: 10px;
}
  .brand-title{
    font-size: 1.02rem;
  }
  .brand-tagline{
    font-size: 0.8rem;
  }

  .header-top-row{
    min-height: clamp(68px, 14vw, 96px);
    padding: 8px 0;
    gap: 12px;
  }
}

@media (max-width: 380px){
  .brand-tagline{
    display: none;
  }
}

/* Main */
.content {
  flex: 1 0 auto;
  background: var(--surface-main);
}

/* Footer */
.site-footer {
  flex-shrink: 0;
  background: var(--surface-footer);
}

.footer-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

/* Footer Nav */
.footer-nav{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-nav a{
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible{
  color: var(--link);
  text-decoration: underline;
}

@media (max-width: 600px){
  .footer-row{
    flex-direction: column;
    gap: 6px;
  }

  /* Mobile: footer layout should be centered and stacked */
  .footer-row{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .footer-nav{
    justify-content: center;
    width: 100%;
  }

  .footer-tools{
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

/* =========================
   Buttons (Akzent-System)
   ========================= */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--text);

  cursor: pointer;
  font: inherit;
  line-height: 1;
  text-decoration: none;
}

.btn:hover{
  border-color: var(--accent-border);
}

/* Primary Accent Button */
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-primary);
}

.btn-primary:hover{
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

/* Subtle / Soft Accent */
.btn-soft{
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-soft:hover{
  border-color: var(--accent);
  text-decoration: none;
}


/* =========================================================
   Footer tools area (optional)
   ---------------------------------------------------------
   Use for small controls such as the theme toggle.
   Keep it optional so production projects can remove it.
   ========================================================= */

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}


/* Accessibility: Skip link */
.skip-link{
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-120%);
  padding: 10px 14px;
  background: var(--surface-card);
  color: var(--on-header);
  border: 1px solid var(--dropdown-border);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* Prevent background scroll when mobile nav is open */
body.no-scroll{
  overflow: visible;
}


/* Extra-small devices */
@media (max-width: 420px){
  .brand-title,
  .brand-tagline{
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  /* Keep footer centered even on very small screens */
  .footer-row{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}





/* Gentle, premium interaction instead of underline/color-shift */
.site-header .site-brand a:hover{
  filter: brightness(1.06);
}

.site-header .site-brand a:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--primary, #2a7f7a) 55%, transparent);
  outline-offset: 4px;
  border-radius: 12px;
}

/* Typographic hierarchy */
.site-header .brand-title{
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.site-header .brand-subtitle{
  font-size: 1.02rem;
  line-height: 1.25;
  opacity: 0.9;
}

/* Mobile: keep branding readable but prevent overflow */
@media (max-width: 640px){
  .site-header .brand-title{
    font-size: 1.28rem;
  }
  .site-header .brand-subtitle{
    font-size: 0.95rem;
  }
  /* Allow wrapping and keep it centered/clean */
  .site-header .site-brand{
    max-width: 100%;
  }
  .site-header .brand-title,
  .site-header .brand-subtitle{
    white-space: normal;
  }
}


/* Brand (Logo + Text) – make it feel like branding, not a regular link */
.site-header a.brand,
.site-header a.brand:link,
.site-header a.brand:visited,
.site-header a.brand:hover,
.site-header a.brand:active,
.site-header a.brand:hover *,
.site-header a.brand:active *{
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  text-decoration-thickness: 0 !important;
  text-underline-offset: 0 !important;
}

/* Gentle, premium interaction instead of underline/color-shift */
.site-header a.brand:hover{
  filter: brightness(1.06);
}

.site-header a.brand:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--primary, #2a7f7a) 55%, transparent);
  outline-offset: 4px;
  border-radius: 12px;
}

/* Typographic hierarchy */
.site-header .brand-title{
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.site-header .brand-tagline{
  font-size: 1.02rem;
  line-height: 1.25;
  opacity: 0.9;
}

/* Mobile: keep branding readable but prevent overflow */
@media (max-width: 640px){
  .site-header .brand-title{
    font-size: 1.28rem;
  }
  .site-header .brand-tagline{
    font-size: 0.95rem;
  }
  .site-header .brand-text{
    max-width: 100%;
  }
  .site-header .brand-title,
  .site-header .brand-tagline{
    white-space: normal;
  }
}


/* =========================================================
   LOGIN LINK (Header)
   Desktop: rechts außen im Header-Top
   Mobile: Icon links neben dem Menü-Button (rechts im Header)
   ========================================================= */
.login-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1;
  white-space: nowrap;
}

.login-link:hover{
  text-decoration: none;
  filter: brightness(1.05);
}

.login-link:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 3px;
}

.login-link.is-active{
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}

/* Desktop placement */
.login-link--desktop{
  margin-left: auto;
  align-self: center;
}

/* Mobile placement: icon-only */
.login-link--mobile{
  display: none; /* enabled below */
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

/* Simple user icon */
.login-link--mobile::before,
.login-link--desktop::before{
  content: "👤";
  font-size: 18px;
  line-height: 1;
}

/* Mobile: show logout icon in red when logged in */
.login-link--mobile.is-logout{
  color: #b00020;
  border-color: color-mix(in srgb, #b00020 45%, var(--border));
  background: color-mix(in srgb, #b00020 12%, var(--surface));
}

.login-link--mobile.is-logout::before{
  content: "⎋";
}

/* Desktop label stays visible */
.login-link--desktop{
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* Mobile: show icon link next to menu */
@media (max-width: 720px){
  .login-link--desktop{ display: none; }
  .login-link--mobile{ display: inline-flex; }
}


/* =========================================================
   MOBILE: Hide brand tagline (final & authoritative)
   ========================================================= */
@media (max-width: 720px){
  .site-header .brand-tagline,
  .site-header .brand-subtitle{
    display: none !important;
  }
}




/* =========================================================
   MOBILE HEADER (authoritative)
   - Logo smaller
   - Logo + Vereinsname on one line
   - Tagline hidden
   ========================================================= */
@media (max-width: 720px){
  .header-top-row{
    justify-content: flex-start;
    text-align: left;
  }

  a.brand{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }

  .brand-logo{
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .brand-text{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
  }

  .brand-title{
    white-space: nowrap;
    font-size: 1.18rem;
    line-height: 1.25;
    letter-spacing: 0.02em;
  }

  .brand-tagline,
  .brand-subtitle{
    display: none !important;
  }
}

