/* ===============================
   RESET & BASIS
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  /* Hintergrund schwarz */
  background-color: #000000;
  /* Schriftfarbe: Cremeweiß */
  color: #fafaf8;
  line-height: 1.6;
  padding: 40px 40px 0 40px;
}

html {
  scroll-behavior: smooth;
}

/* ===============================
   SCREENREADER & SKIPLINK
================================= */
.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 {
  position: absolute;
  top: 0;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: bold;
  transform: translateY(-120%);
  transition: transform 0.3s ease;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #fff;
}

/* ===============================
   CONTAINER-VARIABLEN
================================= */
:root {
  --container-w: 75%;
  --container-max: clamp(600px, 90%, 1500px);
  --container-pad-x: 2rem;
}

/* ===============================
   HEADER & NAVIGATION
================================= */
header {
  text-align: center;
  width: var(--container-w);
  max-width: var(--container-max);
  margin: 0 auto 40px auto;
  padding: 0 var(--container-pad-x);
}

/* Standard-Headings (z.B. h2 in den Sektionen) */
header h1,
header h2,
header h3,
header h4,
header h5,
header h6,
h1, h2, h3, h4, h5, h6 {
  font-family: Helvetica, "Arial", sans-serif;
}

/* Klickbare H1s (allgemein) */
header h1 a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ===============================================
   NAVIGATION & H1: exklusive Unterstreichung (CSS-only)
   (gilt weiterhin für Standardseiten-Struktur)
================================================ */

/* Basis: nichts ist unterstrichen */
header h1,
header h1 a,
nav a {
  text-decoration: none;
  text-underline-offset: 6px;
  transition: text-decoration 0.4s ease;
}

/* Standardfälle für andere Seiten */
header h1.is-home { text-decoration: underline; }   /* Startseite */
nav a.active { text-decoration: underline; }        /* Unterseiten */

/* Hover-Effekte */
nav a:hover { text-decoration: underline; }

/* Aktiver Link verliert Unterstrich, wenn anderer Link gehovert wird */
nav:has(a:hover) a.active:not(:hover) {
  text-decoration: none;
}

/* H1 verliert Unterstrich, sobald irgendein Nav-Link gehovert wird */
header:has(nav a:hover) h1,
header:has(nav a:hover) h1 a {
  text-decoration: none;
}

/* Hover auf H1 → nur H1 unterstrichen
header h1:hover,
header h1 a:hover {
  text-decoration: underline;
}
header:has(h1:hover) nav a {
  text-decoration: none;
} */

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  padding: 0;
}

nav li {
  display: inline-flex;
}

nav li.blog {
  display: none;
}

/* Navigation: Linkfarbe hell auf schwarzem Hintergrund */
nav a {
  color: #fafaf8;
  text-decoration: none;
}

/* =========================================
   NAVIGATION: Mobile Layout
========================================= */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.4s ease;
  }

  nav li {
    display: block;
  }
}

/* ===============================
   MAIN CONTAINER
================================= */
main {
  flex: 1;
}

#main-content {
  width: var(--container-w);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
}

section {
  margin-bottom: 60px;
}

/* ===============================
   ÜBERSCHRIFTEN IM CONTENT
================================= */
main section h2 {
  max-width: 1500px;
  margin: 0 auto 1rem auto;
  padding-left: 0;
  text-align: left;
}

/* ===============================
   FORMULARE (Kontaktseite – falls wieder benutzt)
================================= */
main section#kontakt,
main section#blog-content {
  width: 100%;
  max-width: clamp(600px, 90%, 1500px);
  margin: 0 auto;
  padding: 2rem 0;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  line-height: 1.5;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form label {
  font-weight: bold;
}

form input,
form textarea {
  width: 100%;
  max-width: 500px;
  padding: 8px 10px;
  background-color: #fafaf8;
  border: 1px solid #111;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: none;
  box-sizing: border-box;
}

form textarea {
  min-height: 120px;
}

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

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

a.subtiler-link {
  color: #fafaf8;            /* gleiche Farbe wie der Rest des Textes */
  font-style: italic;        /* kursiv */
  text-decoration: none;     /* kein Unterstrich */
  text-underline-offset: 4px;
  transition: text-decoration 0.2s ease;
}

a.subtiler-link:hover {
  text-decoration: underline; /* Unterstrich beim Hover */
}


/* ===============================
   MAILTO-LINKS
================================= */
a[href^="mailto:"] {
  color: #fafaf8;
  text-decoration: underline;
}
a[href^="mailto:"]:hover {
  color: #fafaf8;
}

/* ===============================
   GALERIE
================================= */
#main-content .gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 20px auto 0 auto;
  width: 100%;
  max-width: 1400px;
}

@media (min-width: 600px) {
  #main-content .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  #main-content .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0.5px solid #888;
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transform: translateZ(0);
}

.gallery-item img:hover {
  transform: scale(1.05);
  filter: blur(0);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* Hover-Effekt nur für Geräte mit Maus */
@media (hover: hover) and (pointer: fine) {
  .gallery-item img {
    filter: blur(1.5px);
  }

  .gallery-item img:hover {
    transform: scale(1.05);
    filter: blur(0);
  }
}

/* ===============================
   LIGHTBOX – ZENTRIERTES BILD + HINWEIS
================================= */

.lightbox-overlay {
  position: fixed;
  inset: 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 ease;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: none;
}

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

/* Wrapper für Bild + Hinweis */
.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Bild: NICHT mehr absolut positionieren */
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  margin-bottom: 12px;   /* Abstand zum Hinweis */
  display: block;
  box-shadow: 0 0 20px #000;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
}

/* Hinweis */
.lightbox-tap-hint {
  font-size: 0.75rem;
  font-style: italic;
  font-family: Helvetica, Arial, sans-serif;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0,0,0,0.35);
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
  display: none; /* Standard: versteckt */
}

/* Hinweis nur auf Touch-Geräten einblenden */
@media (hover: none) and (pointer: coarse) {
  .lightbox-tap-hint {
    display: block;
  }
}

/* Caption (unverändert, außer dass sie jetzt NICHT vom Bild abhängt) */
.lightbox-caption {
  position: absolute;
  bottom: 5%;
  right: 5%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0,0,0,0.4);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: Helvetica, Arial, sans-serif;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

/* Hover Caption */
.lightbox-overlay img:hover + .lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation */
.lightbox-overlay .nav-zone {
  position: absolute;
  top: 0;
  height: 100%;
  width: 20%;
  cursor: pointer;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.2s;
}

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

.lightbox-overlay .nav-zone:hover { opacity: 0.2; }

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

.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
================================= */
footer {
  text-align: center;
  padding: 20px 10px 20px 10px;
  margin-top: auto;
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.4;
  word-wrap: break-word;
  font-family: "Courier New", Consolas, Menlo, "Liberation Mono", monospace;
}

/* Footer-Linkfarbe hell */
footer a {
  color: #fafaf8;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}



/* ===============================
   TITEL DER WILDNIS-&-PERFORMANZ-SEITE
================================= */

.site-title {
  font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 4rem;
  text-align: center;
  margin: 0;
  line-height: 1.2;
  color: #F66535 !important; /* Orangeton */
}

/* Titel-Link: gleiche Farbe, keine Unterstreichung */
.site-title a {
  color: #F66535 !important;
  text-decoration: none !important;
}

/* Untertitel der Arbeit */
.site-subtitle {
  font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 0.97rem;
  text-align: center;
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* Auf kleinen Screens Titel etwas verkleinern */
@media (max-width: 600px) {
  .site-title {
    font-size: 2.6rem;
  }
}
/* Mobile-Optimierung: mehr Breite für Content & Galerie */
@media (max-width: 600px) {

  /* Außenränder des Body verkleinern */
  body {
    padding: 20px 10px 0 10px;
  }

  /* Haupt-Container auf volle Breite ziehen */
  :root {
    --container-w: 100%;
    --container-pad-x: 1rem;
  }

  /* Galerie wirklich auf die volle Containerbreite */
  #main-content .gallery {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
