/* =========================================
   GLOBAL
========================================= */
html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

body.bg {
  background-color: #0d0f10;
  color: #e5e7eb;
}

/* Hintergrund-Wappen */
.rk-bg-wappen {
  position: fixed;
  top: 180px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.rk-bg-wappen img {
  opacity: 0.1;
  width: 500px;
}

/* =========================================
   HEADER
========================================= */
.rk-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #131516;
  border-bottom: 1px solid #1f2933;
  padding: 1rem 0;
  border-top: 4px solid #3a4a2f;
  z-index: 20;
}

.rk-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rk-logo-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.rk-logo-img {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  border: 1px solid #374151;
  object-fit: cover;
}

/* Ghost */
.rk-ghost {
  position: absolute;
  top: -10px;
  left: 10px;
  width: 140px;
  height: 140px;
  background-image: url('/assets/images/ghost.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 5;
  animation: ghost-peek 12s infinite ease-in-out;
  pointer-events: none;
}

@keyframes ghost-peek {
  0% { opacity: 0; transform: translateX(-20px); }
  10% { opacity: 0.8; transform: translateX(0); }
  20% { opacity: 1; transform: translateX(5px); }
  30% { opacity: 0.8; transform: translateX(0); }
  40% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 0; }
}

/* NAVIGATION */
.rk-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Uhrzeit im HEADER */
#header-datetime {
  position: absolute;
  right: 20px;
  bottom: 5px;
  color: #e5e7eb;
  font-size: 0.85rem;
  text-align: right;
  opacity: 0.85;
  font-weight: 500;
  pointer-events: none;
}

#header-time {
  font-family: "Courier New", monospace;
  width: 50px;
  text-align: right;
  color: #00ff9d;
  text-shadow: 0 0 4px rgba(0,255,157,0.6);
}

#header-datetime span {
  display: block;
  line-height: 1.2;
}

#header-date {
  display: block;
  color: #00ff9d;
}

/* =========================================
   MAIN
========================================= */
.rk-main {
  max-width: 960px;
  margin: 10rem auto 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 10;
  flex: 1;
}

/* Karten */
.card {
  background: #1a1d1f;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  overflow: visible !important;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-success {
  background: #16a34a;
  color: #fff;
}

.btn-primary {
  background: #166534;
  color: #fff;
}

.btn-primary:hover {
  background: #15803d;
}

.btn-secondary {
  background: #374151;
  color: #fff;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Inputs */
.input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #374151;
  background: #ffffff;
  color: #111827;
}

.input:focus {
  outline: none;
  border-color: #16a34a;
}

.label-block {
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* =========================================
   FOOTER
========================================= */
.rk-footer {
  background: #131516;
  border-top: 1px solid #1f2933;
  padding: 0.5rem 1rem;
  color: #d1d5db;
  position: relative;
  z-index: 10;
  font-size: 0.85rem;
}

.rk-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.75rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  line-height: 1.2;
}

.footer-col h3 {
  margin: 0 0 0.2rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-link {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-link:hover {
  color: #ffffff;
}

.rk-footer-bottom {
  text-align: center;
  color: #6b7280;
  margin-top: 0.3rem;
  font-size: 0.75rem;
}

/* =========================================
   GALERIE – ALBEN (Ordnerübersicht)
========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* statt auto-fill/minmax */
  gap: 1.5rem;
  margin-top: 1rem;
}

.album-card {
  background: #1f2937;
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
  color: #e5e7eb;
  text-decoration: none;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.album-card:hover {
  background: #374151;
  transform: scale(1.03);
}

.album-icon {
  font-size: 3.2rem;
  margin-bottom: 0.6rem;
}

.album-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* =========================================
   GALERIE – BILDER IN EINEM ALBUM
========================================= */
.gallery-item {
  background: #1f2937;
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  transition: 0.2s;
}

.gallery-item:hover {
  transform: scale(1.03);
  background: #374151;
}

.gallery-item img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  background: url('/assets/images/flecktarn.jpg') center/cover;
  padding: 8px;
  border-radius: 6px;
  border: 3px solid #3a4a2f;
  box-sizing: border-box;
  cursor: pointer;
}

.gallery-title {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #d1d5db;
}

/* =========================================
   LIGHTBOX (Overlay)
========================================= */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#lightbox-inner {
  position: relative;
  max-width: 960px;        /* passt sich an deinen Main an */
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lb-img {
  width: 100%;             /* füllt den Main-Bereich */
  max-height: 80vh;        /* bleibt im sichtbaren Bereich */
  object-fit: contain;
  background: url('/assets/images/flecktarn.jpg') center/cover;
  padding: 12px;
  border-radius: 8px;
  border: 4px solid #3a4a2f;
  box-sizing: border-box;
}

/* Buttons */
#lb-close,
#lb-prev,
#lb-next {
  position: absolute;
  z-index: 10000;
  font-size: 2.6rem;
  color: #e5e7eb;
  background: rgba(58, 74, 47, 0.55);
  border: 2px solid #3a4a2f;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: 0.2s ease;
}

#lb-close {
  top: 10px;
  right: 10px;
}

#lb-prev {
  left: 10px;
  top: 50%;
  /* (unverändert gelassen) transform: translateY(-50%);*/
}

#lb-next {
  right: 10px;
  top: 50%;
  /* (unverändert gelassen) transform: translateY(-50%);*/
}

#lb-close:hover,
#lb-prev:hover,
#lb-next:hover {
  background: rgba(58, 74, 47, 0.85);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(58, 74, 47, 0.8);
}

#lb-caption {
  margin-top: 0.5rem;
  color: #e5e7eb;
  font-size: 0.95rem;
  text-align: center;
}

#lb-counter {
  margin-top: 0.2rem;
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
}

/* =========================================
   KALENDER
========================================= */
/* (unverändert gelassen) */


/* =========================================
   KALENDER-Layout
========================================= */
.calendar-layout {
  display: grid;
  grid-template-columns: 2.4fr 2.8fr 1.8fr;
  gap: 1rem;
  align-items: flex-start;
}

/* Seitenleisten */
.calendar-sidebar-left,
.calendar-sidebar-right {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.calendar-sidebar-left h3,
.calendar-sidebar-right h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Monatsliste links */
.calendar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.calendar-list-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  align-items: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.calendar-list-item:hover {
  background: #111827;
  transform: translateX(2px);
}

.calendar-list-item.active {
  background: #166534;
}

.calendar-list-date {
  font-weight: 600;
  color: #9ca3af;
  min-width: 70px;
}

.calendar-list-title {
  color: #e5e7eb;
}

/* Kalender Mitte */
.calendar-center {
  position: relative;
  z-index: 50;
}

.calendar-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-header-bar span {
  font-weight: 700;
}

/* Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-grid-header {
  text-align: center;
  font-weight: 600;
  color: #9ca3af;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #374151;
}

.calendar-cell {
  min-height: 50px;
  border-radius: 0.375rem;
  background: #111827;
  border: 1px solid #1f2937;
  position: relative;
  padding: 0.25rem 0.35rem;
  cursor: default;
}

.calendar-cell.empty {
  background: transparent;
  border: none;
}

.calendar-day {
  position: static !important;
  z-index: auto !important;
  overflow: visible !important;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.calendar-day:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.calendar-day.active {
  border-color: #16a34a;
  box-shadow: 0 0 0 1px #16a34a;
}

.calendar-day-number {
  font-weight: 600;
  color: #e5e7eb;
}

/* Markierungen */
.calendar-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  margin-top: 0.2rem;
}

.event-dot {
  background: #16a34a;
}

.birthday-dot {
  background: #3b82f6;
}

.calendar-day.today {
  border: 2px solid #16a34a !important;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  border-radius: 0.375rem;
  position: relative;
  z-index: 5;
}

/* Tooltip */
.calendar-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: #e5e7eb;
  white-space: nowrap;
  margin-top: 0.25rem;
  display: none;
  z-index: 999999;
  pointer-events: none;
}

.calendar-tooltip-item + .calendar-tooltip-item {
  margin-top: 0.25rem;
}

.calendar-day:hover .calendar-tooltip {
  display: block;
}

/* Rechte Details-Spalte */
.calendar-details h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.calendar-details p {
  margin-bottom: 0.5rem;
}

/* Geburtstags-Einträge in Liste */
.birthday-item .calendar-list-title {
  color: #93c5fd;
}

/* Responsive */
@media (max-width: 900px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

/* Feiertage im Kalender */
.calendar-day.feiertag {
    background-color: #b30000 !important;
    color: white !important;
    font-weight: bold;
    border-radius: 6px;
}

/* Feiertage in der linken Liste */
.feiertag-item {
    color: #b30000;
    font-weight: bold;
}

/* =========================================
   ADMIN / TABELLE
========================================= */
.admin-table-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-table-actions .btn {
  white-space: nowrap;
}
