/* Reset & Basis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Standard für Screenreader: unsichtbar, bleibt im Dokumentfluss */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip-Link: initial versteckt außerhalb des sichtbaren Bereichs */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: #000;        /* dunkler Hintergrund für Kontrast */
  color: #fff;             /* weißer Text */
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
  transform: translateY(-120%); /* Start außerhalb des Bildschirms */
  transition: transform 0.3s ease;
  border-radius: 4px;
}

/* Beim Fokussieren sichtbar machen */
.skip-link:focus {
  transform: translateY(0);   /* fährt ins sichtbare Feld */
  outline: 3px solid #fff;    /* klare Umrandung für Fokus */
}

/* Body-Copy und Standardtexte: Monospace-Systemstack */
body {
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  background-color: #fff;
  color: #111;
  line-height: 1.6;
  padding: 20px;
}

html, body {
  overflow-x: hidden;
}

/* Header & Navigation */
header {
  text-align: center;
  margin-bottom: 40px;
}

header h1, header h2, header h3, header h4, header h5, header h6 {
  font-family: Helvetica, "Arial", sans-serif;
}

/* Alle Überschriften serifenlos */
h1, h2, h3, h4, h5, h6 {
  font-family: Helvetica, "Arial", sans-serif;
}

header h1 a {
  text-decoration: none;   /* unterstreicht nicht */
  color: inherit;          /* übernimmt die Header-Farbe */
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  padding: 0; /* wichtig, falls ul noch Padding hat */
}

nav li {
  display: inline-flex; /* sorgt, dass ausgeblendete Elemente keinen Platz beanspruchen */
}

nav li.blog {
  display: none; /* ganze Listenelement ausblenden */
}

nav a {
  text-decoration: none;
  color: #111;
}

nav a:hover {
  text-decoration: underline;
}

section {
  margin-bottom: 60px;
}

a[href^="mailto:"] {
  color: #111;
  text-decoration: underline;
}

a[href^="mailto:"]:hover {
  color: #444;
}

form input, form textarea {
  width: 100%;
  max-width: 500px;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #111;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
}

form input[type="submit"] {
  cursor: pointer;
  background-color: #111;
  color: #fff;
  border: none;
  padding: 10px 20px;
  transition: background-color 0.3s;
}

form input[type="submit"]:hover {
  background-color: #444;
}

main section#kontakt {
  max-width: 800px;        /* Lesefreundliche Breite */
  margin: 0 auto;          /* zentriert auf der Seite */
  padding: 20px;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;  /* Retro / Clean Look */
  line-height: 1.5;
}

/* Einheitliche Lesebreite für Blogseite */
main section#blog-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  line-height: 1.5;
}

/* Formular */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;               /* Abstand zwischen Feldern */
}

/* Labels */
form label {
  font-weight: bold;
}

/* Textfelder */
form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;             /* volle Breite */
  max-width: 500px;        /* limitierte Breite */
  padding: 8px 10px;
  border: 1px solid #111;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: none;            /* kein Resize durch Nutzer */
  box-sizing: border-box;  /* Padding zählt zur Breite */
}

/* Textarea spezifisch */
form textarea {
  min-height: 120px;       /* ausreichende Höhe */
}

/* Submit-Button */
form input[type="submit"] {
  width: 150px;            /* fixe Breite */
  padding: 10px 20px;
  background-color: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: start;       /* linksbündig */
}

form input[type="submit"]:hover {
  background-color: #444;
}

/* Mailto-Links im Text */
a[href^="mailto:"] {
  color: #111;
  text-decoration: underline;
}

a[href^="mailto:"]:hover {
  color: #444;
}

/* Container: main-content */
#main-content {
  width: 75%;
  max-width: clamp(600px, 90%, 1500px); /* fluide Breite zwischen 600px und 1500px */
  margin: 0 auto;                        /* zentriert */
  padding: 0 2rem;                        /* Innenabstand */
}

/* Galerie innerhalb von main-content */
#main-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px auto 0 auto;               /* zentriert auf der Seite, Abstand oben */
  max-width: 1200px;                      /* Begrenzung für große Screens */
  width: 100%;
}

/* Galerie-Items bleiben unverändert */
.gallery-item {
  position: relative;
  width: 100%;
  padding-top: 100%; /* quadratischer Container */
  overflow: hidden;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 2px solid #111;
  transition: transform 0.3s;
  cursor: pointer;
}

.gallery-item img:hover {
  transform: scale(1.05);
}
/* Lightbox-Overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;

  /* NEU: Safari fix */
  overflow: hidden;
  box-sizing: border-box;
  touch-action: none; /* verhindert Scrollen / Pinch während Swipe */
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px #000;
  cursor: pointer;
}

/* Vor-/Zurück-Bereiche */
.lightbox-overlay .nav-zone {
  position: absolute;
  top: 0;
  height: 100%;
  width: 20%; /* großzügige Fläche */
  cursor: pointer;
  z-index: 1100; /* über dem Bild */
  opacity: 0; /* unsichtbar, wird beim Hover sichtbar */
  transition: opacity 0.2s;
}

.lightbox-overlay .nav-zone.left {
  left: 0;
}

.lightbox-overlay .nav-zone.right {
  right: 0;
}

/* sichtbar nur beim Hover über der jeweiligen Zone */
.lightbox-overlay .nav-zone:hover {
  opacity: 0.2;
}

/* optional: halbtransparentes Overlay für Feedback */
/* Hintergrund beim Hover nicht ändern */
.lightbox-overlay .nav-zone:hover {
  cursor: pointer;
}

/* Pfeile */
.lightbox-overlay .nav-zone.left::after,
.lightbox-overlay .nav-zone.right::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-top: 3px solid white;
  border-left: 3px solid white;
}

.lightbox-overlay .nav-zone.left::after {
  left: 20px;
  transform: translateY(-50%) rotate(-45deg);
}

.lightbox-overlay .nav-zone.right::after {
  right: 20px;
  transform: translateY(-50%) rotate(135deg);
}

footer {
  text-align: center;       /* Zentriert den Text horizontal */
  padding: 20px 10px;       /* Abstand oben/unten, etwas links/rechts */
  font-size: 0.9rem;        /* Dezente Schriftgröße */
  line-height: 1.4;         /* Zeilenabstand für bessere Lesbarkeit bei Umbruch */
  word-wrap: break-word;    /* Bricht lange Wörter / Links um */
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
}

footer a {
  color: #111;              /* gleiche Farbe wie Text */
  text-decoration: none;    /* keine Unterstreichung */
}

footer a:hover {
  text-decoration: underline; /* Hover-Effekt */
}
