/* Version: 2.2 - Basis-Layout, Burger-Menü immer, Wasserzeichen fix, Slider-Fixes */

/* Reset/Basis */
html,body{height:100%;margin:0;padding:0}
body{
  font-family:Arial,sans-serif;color:black;
  background:beige;display:flex;flex-direction:column;align-items:center;
  position:relative; /* für Wasserzeichen-Stacking */
}

/* Wasserzeichen – sichtbar hinter dem Inhalt */
body::before{
  content:"";position:fixed;inset:0;
  background:url('images/elbe.jpeg') no-repeat center center;
  background-size:cover;opacity:0.6;z-index:0;pointer-events:none
}
/* Inhalt über dem Wasserzeichen */
body > *{ position:relative; z-index:1 }

/* Header & Footer */
header,footer{
  background:brown;color:white;padding:10px 20px;width:100%;text-align:center;z-index:2
}

/* =========================
   Burger-Menü: immer off-canvas
   ========================= */
nav{ background:brown;color:white;width:100%; position:relative; z-index:1000; }

/* Burger-Icon: immer sichtbar */
nav .hamburger{
  display:inline-flex;flex-direction:column;justify-content:center;gap:6px;
  cursor:pointer;margin:8px 16px
}
nav .hamburger div{width:25px;height:3px;background:white}

/* Off-canvas Menü (rechts), initial geschlossen */
nav .menu{
  position:fixed;top:0;right:0;width:280px;max-width:80vw;height:100vh;
  background:brown;margin:0;padding:80px 24px 24px;list-style:none;
  display:block;overflow-y:auto;transform:translateX(100%);transition:transform .35s ease;
}
nav .menu li{ margin:0 0 12px }
nav .menu a{ color:white;text-decoration:none;display:block;padding:10px 12px;border-radius:8px }
nav .menu a:hover{ text-decoration:underline }

/* Offen-Zustand via Klasse an <nav> (von JS) */
/* ===== Burger-Menü: immer off-canvas – LINKS öffnend ===== */
nav{ background:brown;color:white;width:100%; position:relative; z-index:1000; }

/* Burger-Icon (links) */
nav .hamburger{
  display:inline-flex;flex-direction:column;justify-content:center;gap:6px;
  cursor:pointer;margin:8px 16px;
}
nav .hamburger div{width:25px;height:3px;background:white}

/* Off-canvas Menü: LINKS andocken, initial verborgen */
nav .menu{
  position:fixed;top:0;left:0;               /* <-- statt right:0 */
  width:280px;max-width:80vw;height:100vh;
  background:brown;margin:0;padding:80px 24px 24px;list-style:none;
  display:block;overflow-y:auto;
  transform:translateX(-100%);               /* <-- statt translateX(100%) */
  transition:transform .35s ease;
}
nav .menu li{ margin:0 0 12px }
nav .menu a{ color:white;text-decoration:none;display:block;padding:10px 12px;border-radius:8px }
nav .menu a:hover{ text-decoration:underline }

/* Offen-Zustand */
nav.nav-open .menu{ transform:translateX(0) }

/* Optional: Burger-zu-X Animation (unverändert nutzbar) */
nav.nav-open .hamburger div:nth-child(1){ transform:translateY(9px) rotate(45deg) }
nav.nav-open .hamburger div:nth-child(2){ opacity:0 }
nav.nav-open .hamburger div:nth-child(3){ transform:translateY(-9px) rotate(-45deg) }

/* Seiten-Overlay + Scroll-Lock (bleibt gleich) */
body.menu-open{ overflow:hidden }
body.menu-open::after{
  content:""; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:999; pointer-events:none
}






/* Main */
main{
  background:/*rgba(255,255,255,0.8)*/#f5f5dc;width:80%;margin:40px auto;padding:20px;
  border-radius:10px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;z-index:2
}
/* Hero-Case: 100%-Slyder als erster Block (body.has-hero wird in seite.php gesetzt) */
body.has-hero main{
  width:100%;margin:0;padding:0;border-radius:0;background:transparent
}

/* Nachrichten */
.msg{max-width:800px;margin:10px auto;padding:10px;text-align:center;border-radius:4px}
.msg.success{background:#d4edda;color:#155724}.msg.error{background:#f8d7da;color:#721c24}

/* Formulare, Inputs, Editor, Buttons */
input[type="text"],input[type="file"],select,button,#editor-container{
  width:800px;max-width:95%;margin:.5rem auto;display:block;font-size:1rem;box-sizing:border-box
}
@media(max-width:768px){
  input[type="text"],input[type="file"],select,button,#editor-container{width:95%}
}
#editor-container{height:200px;background:#fff;border:1px solid #ccc;border-radius:4px}

/* Existierende Bilder */
.existing-images{margin:2rem auto;width:800px;max-width:95%}
.existing-images ul{list-style:none;padding:0;margin:0}
.existing-images li{
  background:#fff;border:1px solid #ccc;border-radius:8px;
  padding:1rem;margin-bottom:1.5rem;width:100%;box-shadow:0 2px 5px rgba(0,0,0,0.1);
  display:flex;flex-direction:column;align-items:center
}
.existing-images img{width:100%;height:auto;border:1px solid #888;border-radius:4px;margin-bottom:1rem}

/* Sortier-Buttons */
.image-controls{margin-bottom:1rem;text-align:center}
.image-controls button{
  background:#003366;color:white;border:none;cursor:pointer;margin:0 1rem;
  padding:.5rem 1rem;font-size:1rem;border-radius:4px;transition:background-color .2s
}
.image-controls button:hover{background:#002244}
.image-controls button:disabled{background:#555;opacity:.6;cursor:not-allowed}

/* Caption-Form */
.image-caption-form{display:flex;flex-direction:column;align-items:center;gap:.5rem;margin-bottom:1rem;width:100%}
.image-caption-form input,.image-caption-form button{width:100%}
.image-caption-form input{padding:.5rem;border:1px solid #888;border-radius:4px;font-size:1rem}
.image-caption-form button{
  padding:.5rem;background:#2196F3;color:white;border:none;border-radius:4px;cursor:pointer;transition:background-color .2s
}
.image-caption-form button:hover{background:#0b7dda}

/* Löschen-Button */
.delete-button{
  width:100%;max-width:800px;padding:.5rem;background:#e74c3c;color:white;
  border:none;border-radius:4px;text-align:center;cursor:pointer;transition:background-color .2s;margin-bottom:1rem
}
.delete-button:hover{background:#c0392b}

/* Cookie-Popup */
.cookie-consent-popup{
  position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);
  display:none;z-index:1000;justify-content:center;align-items:center
}
.cookie-content{
  background:white;padding:20px;border-radius:5px;box-shadow:0 0 15px rgba(0,0,0,0.2);
  text-align:center;width:80%;max-width:400px
}
.cookie-content h2{color:#333}.cookie-content p{font-size:16px;color:#666}
.cookie-content form button{margin:10px;padding:8px 16px;background:#007BFF;color:white;border:none;border-radius:4px;cursor:pointer}
.cookie-content form button:hover{background:#0056b3}

/* Image-Limit (allgemein) */
.img-limit{
  max-width:100%;max-height:500px;width:auto;height:auto;display:block;margin:0 auto /* zentriert */
}

/* =========================
   Slider – Crossfade & Zentrierung
   ========================= */

/* Container & Wrapper */
.slider-container{ position:relative; overflow:hidden; width:100%; max-width:100% }
.slider-wrapper{ position:relative; height:auto }

/* Slides: Crossfade (inaktive absolut), aktives Slide im Vordergrund */
.slider-item{
  position:absolute; inset:0; opacity:0; transition:opacity 800ms ease;
  pointer-events:none; margin:0; text-align:center /* zentriert Inhalt */
}
.slider-item.is-active{
  opacity:1; pointer-events:auto; z-index:1; position:relative
}

/* Bild: respektiert Prozentbreite, zentriert; niemals > Container */
.slider-item img{
  width: var(--slider-image-width, 100%);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto; /* zentriert bei <100% */
}

/* Buttons-Hinweis */
.slider-container:hover{ cursor:default }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce){ .slider-item{ transition:none } }

/* Das echte Input wird bei Klick dynamisch unter den Button gelegt */
.native-date{
  position: fixed;          /* Koordinaten setzen wir per JS */
  left: -9999px; top: -9999px;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none; z-index: 9999;
}
