/* =========================================================
   Fundkiste – styles.css (einheitlich für alle Seiten)
   ========================================================= */

/* ---------- Variablen ---------- */
:root{
  --bg: #D6C4A9;            /* Seitenhintergrund (hell) */
  --ink: #023344;           /* Akzentfarbe (Rahmen, Pfeile, Navi-Hover) */
  --panel: transparent;
  --panel-border: transparent;
  --text: #111111;          /* dunkle Schrift auf hellem BG */
  --muted: #5f6b77;         /* dezentes Grau */
  --primary: #0a7cff;
  --primary-ink: #ffffff;
  --ring: rgba(10,124,255,.35);
  --shadow: none;
  --maxw: 1200px;
}

/* ---------- Reset / Baseline ---------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }
html, body{ background: var(--bg); }
body{
  margin:0;
  font-family: "Courier New", Courier, monospace !important;
  font-weight: 700 !important;
  color:var(--text);
  line-height:1.55;
  text-align:center !important;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

img{
  max-width:100%;
  height:auto;
  display:block;
  margin-left:auto;
  margin-right:auto;
  border: 5px solid var(--ink);
}
/* Ausnahmen: Logo & Kachel-Innenbild ohne Rahmen */
.logo img, .logo .logo-img{ border:0 !important; }
.square > img.tile-img{ border:0 !important; }

a{ color:var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }
:focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- Layout & Abstände ---------- */
.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px;
  text-align:center;
  background: transparent;
}
@media (min-width: 768px){  .container{ padding: 40px 32px; } }
@media (min-width: 1280px){ .container{ padding: 48px 40px; } }

.card{
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 24px;
  text-align:center;
}
.notice{ color: var(--muted); }
.meta{ color: var(--muted); font-size: .92rem; }

/* ---------- Buttons (einheitlich) ---------- */
.btn, .button{
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #000;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 12px 16px;
  border-radius: 0;
  font-weight: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s ease, transform .02s ease;
}
.btn--ghost{ background: #fff; color: #000; }
.btn:hover, .button:hover{ filter: brightness(1.05); text-decoration: none; }
.btn:active, .button:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.6; cursor:not-allowed; }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 1200;
  background: #ffffff !important;
  color: #111 !important;
  border-bottom: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.site-header a{ color:#111; }
.header-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo{ display:inline-flex; align-items:center; gap:10px; color:inherit; text-decoration:none; }
.logo img, .logo .logo-img, .logo svg{
  height: clamp(40px, 6vw, 64px) !important;
  width: auto !important;
  display:block;
  max-height:64px;
}

/* Auth-Links (kompakter) */
.auth-inline{ display:inline-flex; gap:8px; margin-left: 8px; }
.auth-inline a{
  display:inline-block;
  padding: 2px 6px;
  border:2px solid #000;
  border-radius:0;
  background:#fff;
  color:#000;
  text-decoration:none;
  font-size: 14px;
}
.auth-inline a:hover{ background:#000; color:#fff; text-decoration:none; }

/* ---------- Hamburger ---------- */
.hamburger{
  width: 48px;
  height: 48px;
  background: #d61d1d;
  border: 2px solid #000;
  border-radius: 10px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.hamburger span{
  position: absolute;
  left: 50%;
  width: 28px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: transform .18s ease, opacity .18s ease;
  transform: translate(-50%, 0);
}
.hamburger span:nth-child(1){ transform: translate(-50%, -10px); }
.hamburger span:nth-child(2){ transform: translate(-50%,   0px); }
.hamburger span:nth-child(3){ transform: translate(-50%,  10px); }
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translate(-50%, 0) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translate(-50%, 0) rotate(-45deg); }

/* ---------- Navigation ---------- */
.top-nav[hidden]{ display:none !important; }
.top-nav{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:calc(100% + 8px);
  background:#fff;
  border:0; box-shadow:none; border-radius:0;
  padding:16px;
  text-align:center;
  z-index:1100;
}
.top-nav ul{
  list-style:none; margin:0; padding:0;
  display:flex; flex-direction:column; gap:12px;
  min-width:260px; align-items:center; justify-content:center;
}
.top-nav a{
  display:block;
  padding:10px 14px;
  background:#fff;
  color:#000;
  text-decoration:none;
  border:0;
  transition: background-color .15s ease, color .15s ease, filter .15s ease;
}
.top-nav a:hover,
.top-nav a:focus-visible{
  background:var(--ink);
  color:#fff;
  text-decoration:none;
  outline:none;
}
.top-nav a[aria-current="page"],
.top-nav li.active > a{
  background:var(--ink);
  color:#fff;
}

/* ---------- Beiträge / Listen ---------- */
.beitraege{ display:flex; flex-direction:column; gap:18px; align-items:center; background:transparent; }
.beitrag-box{
  background:transparent; border:0; border-radius:0; padding:18px; box-shadow:none;
  width:100%; max-width:880px;
}

/* ---------- Kacheln ---------- */
.grid{ display:grid; gap:16px; }
.tile{ display:flex; flex-direction:column; gap:10px; }
.square{
  aspect-ratio: 1 / 1;
  border:5px solid var(--ink);
  border-radius:0;
  overflow:hidden;
  background: transparent;
}
.square > img.tile-img{
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit: cover !important;
  object-position: center center;
  display:block;
  margin:0;
  border:0 !important;
  border-radius:0 !important;
}

/* ---------- FULL-BLEED ---------- */
.full-bleed{
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
}

/* ---------- HERO-TITEL ---------- */
.hero-title{
  color:#fff !important;
  background:var(--ink) !important;
  display:block;
  margin: 8px 0 12px;
  padding: 6px 0;
  line-height: 1.2;
}
.hero-title.full-bleed{
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding: 10px 0;
}

/* ---------- Einzelbild-Galerie ---------- */
.full-gallery{ width: 100%; background:transparent; }
.full-gallery .stage{
  width: 100%;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 0; border-radius: 0; overflow: hidden;
  display: block; padding: 0; margin: 0;
  touch-action: pan-y;
}
.full-gallery .stage img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  border-color: var(--ink) !important;
}
.full-gallery .stage .stage-placeholder{
  color:#111;
  font-weight:700;
  padding: 24px 0;
}

/* Pfeile/Zähler */
.gallery-controls{
  display:grid !important;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  margin-top: 8px;
  white-space: nowrap;
  background: transparent;
}
.gallery-controls > :first-child,
.gallery-controls > :last-child{
  all: unset;
  display: inline-block;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace !important;
  font-weight: 800;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1;
  padding: 0 8px;
  user-select: none;
  color: var(--ink);
}
.gallery-controls > :first-child::before{ content:"<"; }
.gallery-controls > :last-child::before { content:">"; }
.gallery-controls > *:focus-visible{ outline: 2px solid var(--ring); outline-offset: 2px; }
.gallery-counter, .gallery-counter span{ color: var(--ink); }
.gallery-caption{
  margin-top:10px;
  color:#111;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

/* ---------- Footer ---------- */
body{ min-height:100vh; display:flex; flex-direction:column; }
main{ flex:1 0 auto; background:transparent; }
footer{ margin-top:auto; text-align:center; padding:28px; color:#333; font-size:.92rem; }

/* ---------- Mobile Tweaks ---------- */
@media (max-width: 560px){
  .header-inner{ padding: 6px 12px; gap: 8px; }
  .logo img, .logo svg{ height: 36px !important; width:auto !important; display:block !important; }
  .auth-inline{ gap: 6px; }
  .auth-inline a{ padding: 2px 6px; font-size: 14px; }
  .hamburger{ width: 44px; height: 40px; }
  .hamburger span{ width: 22px; height: 3px; }
}

/* ---------- Desktop Galerie ---------- */
@media (min-width: 1024px){
  .full-gallery{
    display: grid !important;
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto auto;
    grid-template-areas:
      "stage side"
      "stage caption";
    column-gap: 16px; /* kleinerer Abstand für breitere Textspalte */
    align-items: start;
    max-width: var(--maxw);
    margin-inline: auto;
  }
  .full-gallery .stage{ grid-area: stage; }
  .full-gallery .gallery-controls{ grid-area: side; margin-top: 0; justify-content: center; }
  .full-gallery .gallery-caption{ grid-area: caption; text-align: left; margin-top: 8px; }
}

/* Force BG */
:root{ --bg:#D6C4A9 !important; }
html, body{ background-color:#D6C4A9 !important; background-image:none !important; }
.site-header{ background:#fff !important; }
main,
.container,
.card,
.full-bleed,
.beitraege,
.beitrag-box,
.grid,
.tile,
.full-gallery,
.gallery-controls,
.full-gallery .stage,
footer{
  background-color:transparent !important;
  background-image:none !important;
}

/* ---------- Formulare ---------- */
.register-page{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 40px;
  background: transparent;
}
.register-page > h2{
  color:#fff !important;
  background: var(--ink) !important;
  display:block;
  margin: 8px 0 16px;
  padding: 8px 0;
  line-height:1.2;
}
.register-form{
  display:grid;
  gap:16px;
  justify-items:center;
  max-width:720px;
  margin:0 auto;
  background:transparent;
}
.register-form label{
  width:100%;
  text-align:left;
  font-weight:inherit;
  color:var(--text);
}
.register-form input,
.register-form textarea,
.register-form select{
  width:100%;
  max-width:720px;
  background:#ffffff !important;
  color:#000;
  border:2px solid #000 !important;
  border-radius:0;
  padding:12px 14px;
  font:inherit;
  line-height:1.3;
  outline:none !important;
  box-shadow:none !important;
}
.register-form ::placeholder{ color: var(--muted); opacity:.9; }
.register-form input:focus,
.register-form textarea:focus,
.register-form select:focus{
  border-color:#000 !important;
  outline:none !important;
  box-shadow:none !important;
}
.register-form input:invalid,
.register-form textarea:invalid,
.register-form select:invalid{
  border-color:#000 !important;
  box-shadow:none !important;
}
.password-row{
  width:100%;
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
  align-items:center;
}
.password-row .btn-toggle-pw{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff !important;
  color:#000 !important;
  border:2px solid #000 !important;
  border-radius:0;
  padding:6px 12px;
  font: inherit;
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1;
  cursor:pointer;
  box-shadow:none !important;
  outline:none;
}
.password-row .btn-toggle-pw:hover{ background:#fff; color:#000; }
.password-row .btn-toggle-pw:active{ transform: translateY(1px); }
.form-error{ color:#e11e24; margin:8px 0; }
.form-warn { color:#a67c00; margin:8px 0; }
.form-note { color:var(--muted); }
.register-page button[type="submit"]{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 16px;
  border:2px solid #000;
  background:#fff;
  color:#000;
  font:inherit;
  border-radius:0;
  cursor:pointer;
  text-decoration:none;
  transition: filter .15s ease, transform .02s ease;
  outline:none !important;
  box-shadow:none !important;
}
.register-page button[type="submit"]:hover{ background:#000; color:#fff; }
.register-page button[type="submit"]:active{ transform: translateY(1px); }
.register-page button[type="submit"][disabled]{ opacity:.6; cursor:not-allowed; }

/* Mobile Form-Spacing */
@media (max-width:560px){
  .register-page{ padding:16px 14px 28px; }
  .register-form{ gap:14px; }
  .register-page button[type="submit"]{ padding:10px 14px; }
}

/* Profilseite */
.profile-page .btn,
.profile-page button,
.profile-page input[type="submit"]{
  background:#fff !important;
  color:#000 !important;
  border:2px solid #000 !important;
}
.profile-page .btn:hover,
.profile-page button:hover,
.profile-page input[type="submit"]:{
  background:#000 !important;
  color:#fff !important;
}
.profile-page a{ color:#000 !important; text-decoration:none; }
.profile-page a:hover{ text-decoration:underline; }
.profile-page .quick-grid a,
.profile-page nav a{
  display:inline-block;
  border:2px solid #000;
  background:#fff;
  color:#000;
  text-decoration:none;
  padding:12px 16px;
}
.profile-page .quick-grid a:hover,
.profile-page nav a:hover{
  background:#000; color:#fff;
}

/* ---------- Mobile: Schriftgrößen etwas größer ---------- */
@media (max-width: 560px){
  body{ font-size: 1.06rem; line-height: 1.6; }
  p, .meta, .notice{ font-size: 1.06rem; }
  h3{ font-size: clamp(1.1rem, 5vw, 1.35rem); }
  h4{ font-size: clamp(1.0rem, 4.5vw, 1.2rem); }
  .gallery-caption{ font-size: clamp(1.05rem, 4.5vw, 1.25rem); }
}
