/* --- Layout & Grundstruktur --- */
body {
  font-family: system-ui, sans-serif;
  background-color: #fdfdfd;
  color: #222;
  margin: 0 auto;
  padding: 2rem 1rem;
  max-width: 1200px;
  line-height: 1.5;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.date {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* --- Panel-Layout (Comicstrip) --- */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.panel {
  flex: 1 1 100%;
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panel img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* --- Responsive Panel Grid --- */
@media (min-width: 501px) and (max-width: 768px) {
  .panel {
    flex: 1 1 calc(50% - 1rem);
  }
}

@media (min-width: 769px) {
  .panel {
    flex: 1 1 calc(25% - 1rem);
  }
}

/* --- Navigation & Footer --- */
nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

nav a {
  color: darkred;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover {
  color: black;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ccc;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

footer a {
  color: darkred;
  text-decoration: none;
}

footer a:hover {
  color: black;
}

/* --- Header --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ccc;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #222;
}

header .menu {
  font-size: 1.5rem;
  cursor: default;
}

/* --- Archiv-Einträge --- */
.entry {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid #ccc;
  padding: 1.5rem 0;
  align-items: flex-start;
}

.entry img {
  width: 160px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
}

.info {
  flex: 1;
}

.info h2 {
  margin: 0 0 0.5rem;
}

.info h2 a {
  text-decoration: none;
  color: #000;
}

.info p {
  margin: 0.5rem 0;
}

.tags {
  color: #777;
  font-size: 0.9rem;
}

.tags span {
  margin-right: 0.5em;
}

a.button {
  text-decoration: none;
  font-weight: bold;
  color: darkred;
}

a.button:hover {
  color: black;
}

/* --- Fehlerseiten-Bilder (auch für kontakt) --- */
.error-image {
  display: block;
  margin: 2rem auto;
  max-width: 500px;
  width: 100%;
}

/* --- Copy Button --- */
.share-tools {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #444;
}
.share-tools button {
  background: none;
  border: none;
  font: inherit;
  color: darkred;
  cursor: pointer;
}
.share-tools button:hover {
  color: black;
}
.share-tools button {
  display: inline-block;
  transition: opacity 0.2s ease;
}

/* --- Lightbox-Stile --- */
.lightbox img {
  max-width: 768px;
  width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.lightbox-inner {
  position: relative;
  max-width: 768px;
  width: 90%;
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  max-height: 90vh;
}

/* Schließen-X im Bild */
#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  z-index: 2;
}

#lightbox-close:hover {
  opacity: 1;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  padding: 0;
  line-height: 1;
}

.nav-button:hover {
  opacity: 1;
}

.nav-button.left {
  left: calc(50% - 400px + 1.5rem); /* bei max 768px Breite */
}

.nav-button.right {
  right: calc(50% - 400px + 1.5rem);
}

#lightbox-close {
  position: absolute;
  top: calc(50% - 384px); /* max 90% von 768px */
  right: calc(50% - 384px + 1.5rem);
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  opacity: 0.6;
}

#lightbox-close:hover {
  opacity: 1;
}

/* Optional: nur anzeigen, wenn Platz */
@media (max-width: 768px) {
  .nav-button {
    font-size: 2rem;
    padding: 0.3rem 0.8rem;
  }
}

.no-scroll {
  overflow: hidden;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox.show {
  display: flex;
}

.panel-button {
  all: unset;
  padding: 0;
  margin: 0;
  border: none;
  display: block;
  cursor: pointer;
}
.panel-button img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 768px;
  width: 90%;
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  max-height: 90vh;
  pointer-events: auto;
  z-index: 10000;
}

#lightbox button {
  z-index: 10001;
}

#lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: white;
  cursor: pointer;
  opacity: 0.6;
}
#lightbox-close:hover {
  opacity: 1;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  padding: 0;
  line-height: 1;
}
.nav-button:hover {
  opacity: 1;
}
.nav-button.left {
  left: calc(50% - 400px + 1.5rem);
}
.nav-button.right {
  right: calc(50% - 400px + 1.5rem);
}

@media (max-width: 768px) {
  .nav-button {
    font-size: 2rem;
    padding: 0.3rem 0.8rem;
  }
}

.no-scroll {
  overflow: hidden;
}