/* Version: 2.11 - Mobile & Desktop Burger-Menü Fix - Mit Admin-Styles */
/* 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 15px;width:100%;text-align:center;z-index:2;
  box-sizing:border-box;
}

/* =========================
   Burger-Menü - Mobile & Desktop Fix
   ========================= */
nav{ 
  background:brown;color:white;width:100%; position:relative; z-index:1000; 
  box-sizing:border-box;
  padding: 5px 0;
}

/* Burger-Icon - Immer sichtbar auf allen Geräten */
.hamburger{
  display:flex !important;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  margin:8px 12px;
  padding:8px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
}
.hamburger span{
  display:block;
  width:25px;
  height:3px;
  background:white; 
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Menu - Standardmäßig ausgeblendet */
.menu{
  position:fixed;
  top:0;
  left:0;
  width:280px;
  max-width:85vw;
  height:100vh;
  height: 100dvh; /* Dynamic Viewport Height für Mobile */
  background:brown;
  margin:0;
  padding:70px 20px 20px;
  list-style:none;
  overflow-y:auto;
  transform:translateX(-100%);
  transition:transform 0.35s ease;
  box-sizing:border-box;
  z-index: 1001;
  -webkit-overflow-scrolling: touch; /* Smooth Scroll auf iOS */
}

/* Offen-Zustand */
nav.menu-open .menu{ 
  transform:translateX(0) !important;
}

/* Burger-zu-X Animation */
nav.menu-open .hamburger span:nth-child(1){ 
  transform:translateY(8px) rotate(45deg);
}
nav.menu-open .hamburger span:nth-child(2){ 
  opacity:0;
}
nav.menu-open .hamburger span:nth-child(3){ 
  transform:translateY(-8px) rotate(-45deg);
}

/* Seiten-Overlay + Scroll-Lock */
body.nav-open{ 
  overflow:hidden;
  position: fixed;
  width: 100%;
}
body.nav-open::after{
  content:"";
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.5);
  z-index:999;
  pointer-events:auto;
  cursor: pointer;
}

/* Menu Links */
.menu li{ 
  margin:0 0 10px;
}
.menu a{ 
  color:white;
  text-decoration:none;
  display:block;
  padding:15px 20px;
  border-radius:8px;
  font-size:16px;
  background: rgba(255,255,255,0.1);
  transition: background-color 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.menu a:hover,
.menu a:active{
  background: rgba(255,255,255,0.2);
}

/* MOBILE: Korrigierte Größe - Menütext weiter verkleinert */
@media (max-width: 768px) {
  /* Burger-Icon Größe beibehalten */
  .hamburger {
    width: 92px !important;
    height: 92px !important;
    margin: 17px 25px;
    padding: 17px;
    gap: 8px;
  }
  
  .hamburger span {
    width: 53px !important;
    height: 6px !important;
  }
  
  /* Burger-zu-X Animation angepasst */
  nav.menu-open .hamburger span:nth-child(1){ 
    transform:translateY(17px) rotate(45deg);
  }
  nav.menu-open .hamburger span:nth-child(3){ 
    transform:translateY(-17px) rotate(-45deg);
  }
  
  /* Menütext um weitere 25% verkleinert (insgesamt 52.5% kleiner als ursprüngliche 3x Version) */
  .menu a {
    font-size: 25px !important; /* 34px * 0.75 */
    padding: 24px 32px !important; /* 32px * 0.75, 42px * 0.75 */
    min-height: 69px !important; /* 92px * 0.75 */
    border-radius: 13px; /* 17px * 0.75 */
  }
  
  /* Menü-Container angepasst */
  .menu {
    width: 85vw;
    padding: 110px 32px 32px; /* 147px * 0.75, 42px * 0.75 */
  }
  
  /* Menü-Element Abstände angepasst */
  .menu li {
    margin: 0 0 16px !important; /* 21px * 0.75 */
  }
}

/* Touch-Optimierungen für Mobile */
@media (hover: none) and (pointer: coarse) {
  .hamburger {
    min-width: 44px;
    min-height: 44px;
  }
  
  .menu a {
    padding: 18px 20px;
    font-size: 17px;
  }
  
  /* Bessere Touch-Targets */
  .menu li {
    margin: 0 0 12px;
  }
}

/* Safe Area Support für Notch Phones */
@supports(padding: max(0px)) {
  .menu {
    padding-top: max(70px, env(safe-area-inset-top));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* Main Content */
main{
  background:#f5f5dc;
  width:95%;
  margin:20px auto;
  padding:15px;
  border-radius:8px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  z-index:2
}

/* Hero-Case */
body.has-hero main{
  width:100%;
  margin:0;
  padding:0;
  border-radius:0;
  background:transparent
}

/* =========================
   Admin-Styles für Seitenverwaltung, Benutzerverwaltung, Zimmerverwaltung
   ========================= */

/* Allgemeine Admin-Styles */
.admin-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tabellen */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.admin-table th, 
.admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  word-break: break-word;
}

.admin-table th {
  background: #f6f6f6;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  background: #f6f6f6;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  text-align: center;
  font-size: 16px;
  box-sizing: border-box;
}

.btn--up     { background: #eef7ff; border-color: #bcdcff; }
.btn--down   { background: #eef7ff; border-color: #bcdcff; }
.btn--del    { background: #ffeded; border-color: #ffc9c9; color: #7a0000; }
.btn--save   { background: #ecffef; border-color: #b8f0c3; color: #0b5e24; }
.btn--edit   { background: #eef7ff; border-color: #bcdcff; }
.btn--cancel { background: #f6f6f6; border-color: #cfcfcf; }
.btn--new    { background: #ecffef; border-color: #b8f0c3; color: #0b5e24; margin: 20px 0; }

/* Button Layouts */
.btncol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px 0;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions .btn {
  margin-right: 0;
  text-decoration: none;
  min-width: 80px;
}

.form-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-buttons .btn {
  min-width: 120px;
  flex: 1;
}

/* Formulare */
.admin-form {
  width: 100%;
  max-width: 600px;
}

.admin-form label {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  min-height: 44px;
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Scrollbare Tabellen für Mobile */
.scroll-table {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ccc;
  background: #fff;
  margin: 1rem 0;
}

/* Dark Castle Styles */
.dc-user {
  color: #dc3545 !important;
  font-weight: bold;
}

.dc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #6c757d;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  min-height: 44px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.dc-toggle-btn.active {
  background: #dc3545;
}

.dc-toggle-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.dc-toggle-btn .checkmark {
  font-size: 18px;
  font-weight: bold;
}

/* Login Info Box */
.login-info {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  border-left: 4px solid #007bff;
}

.login-info p {
  margin: 0.5rem 0;
  font-size: 14px;
  color: #555;
}

/* Status-Farben für Seitenverwaltung */
.text-public { color: #1e88e5; font-weight: 600; }
.text-private { color: #333333; font-weight: 600; }
.text-dc { color: #d32f2f; font-weight: 600; }

.status-legend {
  display: flex;
  gap: 20px;
  margin: 15px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}

.legend-public { background-color: #1e88e5; }
.legend-private { background-color: #333333; }
.legend-dc { background-color: #d32f2f; }

.legend-text {
  font-size: 14px;
  font-weight: 500;
}

/* Zimmerverwaltung spezifische Styles */
.image-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.image-item {
  margin: 20px 0;
  text-align: center;
}

.image-frame {
  --image-max: 320px;
  display: block;
  width: 100%;
  max-width: var(--image-max);
  margin: 0 auto;
  text-align: center;
}

.image-thumb {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 10px 0;
  border-radius: 8px;
}

.images-empty {
  text-align: center;
  color: #666;
  margin: 16px 0;
  font-size: 16px;
}

/* FullCalendar Mobile Optimierungen */
.fc {
  max-width: 100%;
  margin: auto;
}

.fc .fc-toolbar {
  flex-direction: column;
  gap: 10px;
}

.fc .fc-toolbar-chunk {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.fc .fc-toolbar-chunk button {
  font-size: 14px;
  padding: 8px 12px;
  min-height: 44px;
}

.fc .fc-toolbar-chunk .fc-prev-button,
.fc .fc-toolbar-chunk .fc-next-button,
.fc .fc-toolbar-chunk .fc-today-button {
  font-size: 14px;
  padding: 10px 14px;
  min-height: 44px;
}

/* Quill Editor Mobile */
#editor-container {
  height: 200px;
}

.ql-toolbar.ql-snow {
  position: static;
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
  .admin-container {
    padding: 10px;
  }
  
  .admin-table {
    font-size: 16px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 16px 12px;
  }
  
  .form-buttons {
    flex-direction: column;
  }
  
  .form-buttons .btn {
    width: 100%;
    min-width: auto;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .actions .btn {
    width: 100%;
  }
  
  .status-legend {
    flex-direction: column;
    gap: 10px;
  }
  
  /* Stack table cells vertically on very small screens */
  @media (max-width: 480px) {
    .admin-table, 
    .admin-table thead, 
    .admin-table tbody, 
    .admin-table th, 
    .admin-table td, 
    .admin-table tr {
      display: block;
    }
    
    .admin-table thead tr {
      position: absolute;
      top: -9999px;
      left: -9999px;
    }
    
    .admin-table tr {
      border: 1px solid #ccc;
      margin-bottom: 1rem;
      padding: 0.5rem;
      border-radius: 6px;
      background: white;
    }
    
    .admin-table td {
      border: none;
      border-bottom: 1px solid #eee;
      position: relative;
      padding-left: 50%;
    }
    
    .admin-table td:before {
      content: attr(data-label);
      position: absolute;
      left: 6px;
      width: 45%;
      padding-right: 10px;
      white-space: nowrap;
      font-weight: bold;
      color: #333;
    }
    
    .dc-user {
      color: #dc3545 !important;
    }
  }
  
  /* FullCalendar Mobile */
  .fc .fc-toolbar-title {
    font-size: 1.2em;
  }
  
  .fc .fc-toolbar-chunk {
    flex-wrap: wrap;
  }
  
  .fc .fc-toolbar-chunk button {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 40px;
  }
}

/* Desktop Optimierungen */
@media (min-width: 769px) {
  .scroll-table {
    max-height: 500px;
  }
  
  .fc {
    max-width: 80%;
  }
}

@media (min-width: 1024px) {
  .admin-container {
    padding: 20px;
  }
}

/* Landscape Mode Optimierungen */
@media (max-height: 500px) and (orientation: landscape) {
  .menu {
    padding-top: 50px;
  }
  
  .menu li {
    margin: 0 0 8px;
  }
  
  .menu a {
    padding: 12px 20px;
    min-height: 40px;
  }
  
  .scroll-table {
    max-height: 250px;
  }
}

/* Rest Ihrer bestehenden Styles... */
.msg{
  max-width:95%;
  margin:8px auto;
  padding:12px;
  text-align:center;
  border-radius:4px;
  font-size:14px;
}
.msg.success{background:#d4edda;color:#155724}
.msg.error{background:#f8d7da;color:#721c24}

input[type="text"],input[type="file"],select,button,#editor-container{
  width:100%;
  margin:.5rem auto;
  display:block;
  font-size:16px;
  box-sizing:border-box;
  padding:12px;
  border-radius:6px;
  border:1px solid #ccc;
  max-width:100%;
}
button{
  min-height:44px;
  cursor:pointer;
}

.existing-images{
  margin:1.5rem auto;
  width:100%;
  max-width:100%;
}
.existing-images ul{
  list-style:none;
  padding:0;
  margin:0;
}
.existing-images li{
  background:#fff;
  border:1px solid #ccc;
  border-radius:8px;
  padding:12px;
  margin-bottom:1rem;
  width:100%;
  box-shadow:0 2px 5px rgba(0,0,0,0.1);
  display:flex;
  flex-direction:column;
  align-items:center;
  box-sizing:border-box;
}
.existing-images img{
  width:100%;
  height:auto;
  border:1px solid #888;
  border-radius:4px;
  margin-bottom:12px;
  max-width:100%;
}

.image-controls{
  margin-bottom:1rem;
  text-align:center;
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.image-controls button{
  background:#003366;
  color:white;
  border:none;
  cursor:pointer;
  padding:12px 16px;
  font-size:16px;
  border-radius:6px;
  transition:background-color .2s;
  min-width:120px;
  min-height:44px;
}
.image-controls button:disabled{background:#555;opacity:.6;cursor:not-allowed}

.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:12px;
  border:1px solid #888;
  border-radius:6px;
  font-size:16px;
  min-height:44px;
  box-sizing:border-box;
}
.image-caption-form button{
  padding:12px;
  background:#2196F3;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
  transition:background-color .2s;
  min-height:44px;
  font-size:16px;
}

.delete-button{
  width:100%;
  padding:12px;
  background:#e74c3c;
  color:white;
  border:none;
  border-radius:6px;
  text-align:center;
  cursor:pointer;
  transition:background-color .2s;
  margin-bottom:1rem;
  min-height:44px;
  font-size:16px;
}

.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;
  padding:15px;
  box-sizing:border-box;
}
.cookie-content{
  background:white;
  padding:20px;
  border-radius:8px;
  box-shadow:0 0 15px rgba(0,0,0,0.2);
  text-align:center;
  width:100%;
  max-width:350px;
  box-sizing:border-box;
}
.cookie-content h2{color:#333;font-size:18px;margin-bottom:15px;}
.cookie-content p{font-size:14px;color:#666;line-height:1.4;}
.cookie-content form{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:15px;
}
.cookie-content form button{
  margin:0;
  padding:12px 16px;
  background:#007BFF;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
  min-height:44px;
  font-size:16px;
}

.img-limit{
  max-width:100%;
  max-height:300px;
  width:auto;
  height:auto;
  display:block;
  margin:0 auto;
}

.slider-container{ 
  position:relative;
  overflow:hidden;
  width:100%;
  max-width:100%;
}
.slider-wrapper{ 
  position:relative;
  height:auto;
}
.slider-item{
  position:absolute;
  inset:0;
  opacity:0;
  transition:opacity 800ms ease;
  pointer-events:none;
  margin:0;
  text-align:center;
}
.slider-item.is-active{
  opacity:1;
  pointer-events:auto;
  z-index:1;
  position:relative;
}
.slider-item img{
  width: var(--slider-image-width, 100%);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce){ .slider-item{ transition:none } }

.native-date{
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Media Queries für Mobile */
@media (max-width: 480px) {
  main {
    width: 98%;
    padding: 10px;
    margin: 10px auto;
  }
  
  .menu {
    width: 85vw;
    padding: 60px 15px 15px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  main {
    width: 90%;
    padding: 20px;
  }
  
  .menu {
    width: 300px;
  }
}

/* Desktop: Auch hier Burger-Menü */
@media (min-width: 769px) {
  .hamburger {
    display: flex !important;
  }
  
  .menu {
    position: fixed;
    transform: translateX(-100%);
  }
  
  nav.menu-open .menu {
    transform: translateX(0) !important;
  }
  
  body.nav-open::after {
    display: block;
  }
  
  body.nav-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .menu {
    width: 320px;
  }
}