/* =====================================================================
   Oeffentlicher Bereich (nicht angemeldet): Kopfzeile, Landingpage mit
   Login (site/landing.php, site/login.php), Unterseiten und Fusszeile.
   Wird nur fuer Gaeste geladen (index.php).
   ===================================================================== */

.fss-public {
  --pub-red: #f56a6a;
  --pub-red-dark: #d9504f;
  --pub-orange: #ff9a5a;
  --pub-ink: #2b2d34;
  --pub-night-1: #120b10;
  --pub-night-2: #1f1019;
  --pub-text-on-dark: #f7eef0;
  --pub-muted-on-dark: rgba(247, 238, 240, .7);
  --pub-glass: rgba(255, 255, 255, .07);
  --pub-glass-border: rgba(255, 255, 255, .14);
  background: #f7f7fa;
  color: var(--pub-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.fss-public main { flex: 1 0 auto; }

html { scroll-behavior: smooth; }

/* ---------- Buttons ---------- */
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 700; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, background-position .4s ease, color .2s ease;
}
.pub-btn:hover { transform: translateY(-2px); text-decoration: none; }
.pub-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pub-btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.pub-btn-block { width: 100%; }

.pub-btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--pub-red), var(--pub-orange), var(--pub-red));
  background-size: 200% 100%;
  box-shadow: 0 10px 28px rgba(245, 106, 106, .4);
}
.pub-btn-primary:hover { color: #fff; background-position: 100% 0; box-shadow: 0 14px 36px rgba(245, 106, 106, .55); }
.pub-btn-primary i { transition: transform .2s ease; }
.pub-btn-primary:hover .fa-arrow-right { transform: translateX(4px); }

.pub-btn-light { color: var(--pub-red-dark); background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); }
.pub-btn-light:hover { color: var(--pub-red-dark); background: #fff5f0; }

.pub-btn-outline { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .35); }
.pub-btn-outline:hover { color: #fff; background: rgba(255, 255, 255, .14); }

.pub-btn-ghost { color: var(--pub-text-on-dark); background: rgba(255, 255, 255, .06); border-color: var(--pub-glass-border); }
.pub-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---------- Kopfzeile ---------- */
.pub-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  transition: background-color .3s ease, padding .3s ease, box-shadow .3s ease;
}
.pub-header.is-solid {
  padding-top: .65rem; padding-bottom: .65rem;
  background: rgba(18, 11, 16, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.pub-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.pub-brand:hover { text-decoration: none; }
.pub-brand img { height: 34px; width: auto; filter: drop-shadow(0 0 10px rgba(245, 106, 106, .5)); }
.pub-brand span { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.pub-brand span b { font-weight: 400; color: rgba(255, 255, 255, .75); }
.pub-nav { display: flex; align-items: center; gap: .35rem; }
.pub-nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; border-radius: 999px;
  color: rgba(255, 255, 255, .85); font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.pub-nav-link:hover { color: #fff; background: rgba(255, 255, 255, .1); text-decoration: none; }

/* ---------- Hero ---------- */
.pub-hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 7rem clamp(1rem, 4vw, 3rem) 5rem;
  color: var(--pub-text-on-dark);
  background: radial-gradient(ellipse at bottom, var(--pub-night-2) 0%, var(--pub-night-1) 70%);
  border-radius: 0 0 2.5rem 2.5rem;
}
.pub-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.pub-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .4; animation: pub-drift 22s ease-in-out infinite alternate; }
.pub-blob.b1 { width: 55vmax; height: 55vmax; left: -15vmax; bottom: -28vmax; background: var(--pub-red); }
.pub-blob.b2 { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -18vmax; background: var(--pub-orange); opacity: .35; animation-duration: 28s; animation-delay: -6s; }
.pub-blob.b3 { width: 35vmax; height: 35vmax; left: 35vw; top: -24vmax; background: #7a2f5c; opacity: .45; animation-duration: 32s; animation-delay: -12s; }
@keyframes pub-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, -4vh) scale(1.12); }
  100% { transform: translate(-4vw, 3vh) scale(.95); }
}
.pub-plexus { position: absolute; inset: 0; display: block; }

.pub-hero-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.pub-hero-copy { animation: pub-fade-up .9s cubic-bezier(.2, .8, .2, 1) both; }
.pub-hero-login { animation: pub-fade-up .9s .15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pub-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.pub-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .9rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #ffd9d9; background: rgba(245, 106, 106, .16); border: 1px solid rgba(245, 106, 106, .4);
}
.pub-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pub-red); animation: pub-pulse 1.6s ease-out infinite; }
@keyframes pub-pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 106, 106, .7); } 100% { box-shadow: 0 0 0 10px rgba(245, 106, 106, 0); } }

.pub-hero h1 {
  margin: 1.4rem 0 1.2rem; color: #fff;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.03em;
}
.pub-accent {
  background: linear-gradient(90deg, var(--pub-red), var(--pub-orange), #ffd2a8, var(--pub-red));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pub-shine 8s linear infinite;
}
@keyframes pub-shine { to { background-position: 300% 0; } }
.pub-hero-lead { max-width: 36rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.65; color: var(--pub-muted-on-dark); margin: 0; }
.pub-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.pub-hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: 0; margin: 2.2rem 0 0; }
.pub-hero-points li { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--pub-muted-on-dark); }
.pub-hero-points i { color: var(--pub-orange); }

.pub-scroll-hint {
  position: absolute; z-index: 1; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .35);
}
.pub-scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: #fff; animation: pub-scroll 1.8s ease-in-out infinite;
}
@keyframes pub-scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Login-Karte ---------- */
.pub-login {
  position: relative;
  padding: 2.2rem 2rem 2rem;
  border-radius: 1.75rem;
  background: var(--pub-glass);
  border: 1px solid var(--pub-glass-border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  color: var(--pub-text-on-dark);
}
.pub-login::before {
  /* leuchtender Rand */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 154, 90, .7), transparent 35%, transparent 65%, rgba(245, 106, 106, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pub-login-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.pub-login-icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, var(--pub-red), var(--pub-orange));
  box-shadow: 0 8px 22px rgba(245, 106, 106, .45);
}
.pub-login-head h2 { margin: 0; font-size: 1.45rem; font-weight: 800; color: #fff; }
.pub-login-head p { margin: .15rem 0 0; font-size: .92rem; color: var(--pub-muted-on-dark); }

.pub-field { position: relative; margin-bottom: 1rem; }
.pub-field > i {
  position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%);
  color: rgba(255, 255, 255, .5); font-size: .95rem; pointer-events: none; transition: color .2s ease;
}
.pub-field input {
  width: 100%; height: 3.6rem;
  padding: 1.35rem 3rem .45rem 2.9rem;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(0, 0, 0, .25); color: #fff; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.pub-field input:focus { outline: none; border-color: var(--pub-red); background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 4px rgba(245, 106, 106, .22); }
.pub-field input:focus ~ i, .pub-field:focus-within > i { color: var(--pub-orange); }
.pub-field label {
  position: absolute; left: 2.9rem; top: 50%; transform: translateY(-50%);
  margin: 0; color: rgba(255, 255, 255, .6); font-size: 1rem; pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease;
}
.pub-field input:focus + label,
.pub-field input:not(:placeholder-shown) + label,
.pub-field input:-webkit-autofill + label { top: 1.05rem; font-size: .72rem; letter-spacing: .03em; color: var(--pub-orange); }
.pub-field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 100px #2a1820 inset;
  caret-color: #fff;
}
.pub-field-toggle {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  width: 2.4rem; height: 2.4rem; border: 0; border-radius: 10px;
  background: transparent; color: rgba(255, 255, 255, .55); cursor: pointer;
}
.pub-field-toggle:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.pub-login-row { display: flex; justify-content: flex-end; margin: -.2rem 0 1.2rem; font-size: .88rem; }
.pub-login-row a, .pub-login a { color: #ffc2c2; }
.pub-login-row a:hover { color: #fff; }

.pub-divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .45); }
.pub-divider::before, .pub-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .15); }

/* ---------- Inhalte unter dem Hero (site/home.php) ---------- */
.fss-public-landing .home-page { padding-top: 1rem; }
.fss-public-landing #module { scroll-margin-top: 80px; }

/* ---------- Unterseiten (Passwort vergessen, Impressum, ...) ---------- */
.pub-page { padding-top: 7rem; padding-bottom: 3rem; }

/* ---------- Fusszeile ---------- */
.pub-footer {
  flex-shrink: 0; margin-top: 3rem;
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 1.5rem;
  background: var(--pub-night-1); color: var(--pub-muted-on-dark);
}
.pub-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.pub-footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.pub-footer-links a { color: var(--pub-muted-on-dark); font-size: .92rem; }
.pub-footer-links a:hover { color: #fff; }
.pub-footer-social { display: flex; gap: .6rem; }
.pub-footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .08); transition: background-color .2s ease, transform .2s ease;
}
.pub-footer-social a:hover { background: var(--pub-red); transform: translateY(-2px); }
.pub-footer-copy { max-width: 1200px; margin: 1.8rem auto 0; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .pub-hero { min-height: 0; padding-top: 6.5rem; }
  .pub-hero-inner { grid-template-columns: 1fr; }
  .pub-hero-login { max-width: 460px; width: 100%; }
  .pub-scroll-hint { display: none; }
}
@media (max-width: 575.98px) {
  .pub-hero { padding-left: 1rem; padding-right: 1rem; border-radius: 0 0 1.5rem 1.5rem; }
  .pub-login { padding: 1.6rem 1.2rem 1.4rem; border-radius: 1.4rem; }
  .pub-brand span { font-size: 1.05rem; }
  .pub-hero-actions .pub-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .fss-public *, .fss-public *::before, .fss-public *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
