/* === 1. Reset & Grundstruktur === */

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Cormorant Garamond', serif;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.6;
    color: #fff;
    background: #111;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; 
}

/* === Neuer Header === */
header {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  padding: 15px 0; /* Kein Padding links/rechts, das übernimmt .header-inner */
  border-bottom: 2px solid rgba(255,255,255,0.05);
  z-index: 1;
}

/* === 1. Innerer Container mit Abstand von links === */
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 32px; /* Abstand vom linken Rand */
}

/* === 2. Porträtbild – rund, ohne Rahmen === */
.header-inner img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
  border-style: none;
}

/* === 3. Titel mit neuer Schrift === */
.header-inner h1 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* === Mobile Anpassungen === */
@media (max-width: 600px) {
  .header-inner {
    padding-left: 16px;
  }

  .header-inner img {
    height: 36px;
    width: 36px;
  }

  .header-inner h1 {
    font-size: 1.4rem;
  }

  nav a {
    font-size: 14px;
    padding: 6px 8px;
  }

  footer {
    font-size: 12px;
  }

  .copyright {
    font-size: 12px;
  }
}


.container {
    width: 100%;
    max-width: 100%;
    padding: 0 2vw;
    box-sizing: border-box;
    z-index: 1;
}

.narrow {
    max-width: 1400px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

img {
    border: 2px solid white;
    -webkit-user-drag: none;
    user-drag: none;
}


/* === 2. Header & Footer === */

header {    
	background: rgba(0, 0, 0, 0.5); /* Abdunkelung: 0.3 = leicht, 0.5 = mittel, 0.7 = stark */
	backdrop-filter: blur(2px);     /* Optional: Hintergrund leicht weichzeichnen */
    padding: 15px 0;
    border-bottom: 2px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #fff;
}

/* =================
   Footer
   ================= */
footer {
  flex-shrink: 0;
  background: #111;
  padding: 15px 0;
  border-top: 2px solid rgba(255,255,255,0.05);
  margin-top: auto;
  z-index: 1;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* darf bei großen Screens umbrechen */
  gap: 10px;
}

footer nav ul {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-end;
}

footer nav ul li {
  white-space: nowrap;
}

footer nav ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s;
}

footer nav ul li a:hover {
  color: #fff;
}

footer span {
  white-space: nowrap;
  font-size: 0.95rem;
  color: #ccc;
}

/* === 3. Album-Übersicht (Cover) === */

#album-overview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 2vw;
    max-width: 100%;
    margin: 20px auto 0 auto; 
}

.album-card {
    position: relative;
    width: 100%; /* ← passt sich flexibel an Spaltenbreite an */
    max-width: 300px; /* ← bleibt auf großen Screens elegant */
    aspect-ratio: 3 / 2; /* moderne Alternative zu fixer Höhe */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}


.album-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid white;
    border-radius: 10px;
    display: block;
}

.album-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.4); /* dunkler Hintergrund */
  color: #fff;
  padding: 6px 8px;               /* etwas schmaler */
  text-align: left;
  font-size: 0.85rem;             /* kleinere Basisgröße */
  line-height: 1.2;               /* engerer Zeilenabstand */
}

.album-overlay h2 {
  margin: 0;
  font-size: 1.2rem;                /* Titel kleiner */
  line-height: 1.2;
  font-weight: 500;
}

.album-overlay p {
  margin: 2px 0 0 0;
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.2;
}

.album-card:hover .album-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* === 4. Einzelalbum: Leiste oben === */

#albumActions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 2vw;
    margin-bottom: 20px;
}

.btn-back {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: rgba(51, 51, 51, 0.1);
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.25s ease, transform 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-back:hover {
  background: rgba(85, 85, 85, 0.2);
  transform: translateY(-1px);
}

.btn-back:active {
  transform: scale(0.98);
  background: rgba(68, 68, 68, 0.3);
}

.album-meta {
    text-align: right;
    color: #fff;
    min-width: 200px;
}

.album-meta h2 {
    margin: 0;
    font-size: 1.2rem;
}

.album-meta p {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

/* === 6. Lightbox === */

/* === Lightbox-Overlay === */
#lightbox {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  padding: 20px;
  transition: opacity 0.3s ease;
}

#lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

/* === Lightbox-Inhalt === */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: rgba(20, 20, 20, 0.95);
  padding: 24px;
  border-radius: 14px;
  color: #f5f5f5;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  box-sizing: border-box;
  cursor: default;
}

/* === Bilddarstellung === */
#lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* === Bildschutz-Overlay === */
.image-overlay-blocker {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* === Metadaten zum Bild === */
.lightbox-meta {
  font-size: 0.95rem;
  color: #ddd;
  line-height: 1.4;
  margin-top: 10px;
  text-align: left;           /* ← stellt sicher, dass alles linksbündig ist */
  padding: 0 5px;             /* optional: etwas horizontaler Abstand */
}

.lightbox-meta p {
  margin: 2px 0;              /* kompaktere Abstände zwischen den Zeilen */
  font-size: 0.9rem;
  line-height: 1.3;
  color: #ccc;
}

/* === Schließen-Button === */
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  color: #fff;
  font-size: 2rem;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: #f66;
}

/* === Mobile Anpassung === */
@media (max-width: 600px) {
  .lightbox-content {
    padding: 16px;
    border-radius: 10px;
  }

  .lightbox-meta {
    font-size: 0.85rem;
  }

  .lightbox-meta p {
    font-size: 0.8rem;
  }
}

.image-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    cursor: default;
    background: transparent;
    z-index: 10;
    pointer-events: all;
}


/* === 7. Static-Seiten (Impressum, Datenschutz) === */

#static-page {
    padding: 20px 2vw;
    color: #eee;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 1000px;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.5);             /* halbtransparenter Hintergrund */
    backdrop-filter: blur(6px);                 /* Weichzeichner */
    -webkit-backdrop-filter: blur(6px);         /* Safari-Unterstützung */
    border-radius: 12px;                        /* optisch abgesetzt */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);   /* leichte Tiefe */
}

#static-page h1,
#static-page h2,
#static-page h3,
#static-page h4 {
    color: #fff;
    margin-top: 1.5em;
    margin-bottom: 0.3em;
    line-height: 1.3;
}

#static-page p,
#static-page div {
    margin-bottom: 0.8em;
}

#static-page ul {
    padding-left: 1.2em;
    margin-bottom: 1em;
}

#static-page li {
    margin-bottom: 0.5em;
}

#static-page a {
    color: #ccc;
    text-decoration: underline;
    transition: color 0.2s ease;
}

#static-page a:hover {
    color: #fff;
}

/* === 8. Kontaktformular === */

#kontaktformular {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
    max-width: 600px;
}

#kontaktformular label {
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #ddd;
    display: block;
}

#kontaktformular input[type="text"],
#kontaktformular input[type="email"],
#kontaktformular textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    resize: vertical;
}

#kontaktformular input:focus,
#kontaktformular textarea:focus {
    border-color: #888;
    outline: none;
}

#kontaktformular .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
}

#kontaktformular .checkbox input[type="checkbox"] {
    transform: scale(1.2);
    margin-top: 0.2rem;
}

#kontaktformular a {
    color: #ccc;
    text-decoration: underline;
}

#kontaktformular a:hover {
    color: #fff;
}

#kontaktformular button {
    padding: 0.8rem 1.2rem;
    border: none;
    background-color: #444;
    color: #fff;
    font-size: 1rem;
    border-radius: 4px;
    cursor: not-allowed;
    transition: background-color 0.2s ease;
}

#kontaktformular button.enabled,
#kontaktformular button:not(:disabled) {
    background-color: #666;
    cursor: pointer;
}

#kontaktformular button:hover:enabled {
    background-color: #888;
}



/* === 9. Slideshow-Hintergrund === */

/* === Abdunkelung des Hintergrunds hinter dem Hauptbereich === */
main.container {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5); /* Abdunkelung: 0.3 = leicht, 0.5 = mittel, 0.7 = stark */
  backdrop-filter: blur(2px);     /* Optional: Hintergrund leicht weichzeichnen */
  flex: 1;
}

#main-background-slideshow {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#main-background-slideshow img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Standard: unsichtbar */
  transition: opacity 2s ease-in-out;
  animation: kenburns 15s ease-in-out infinite;
  z-index: 0;
  transform: scale(1);
}

/* Abdunkelungseffekt mit halbtransparentem Overlay */
#main-background-slideshow::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* ↑ etwas stärkerer Dunkel-Effekt */
  z-index: 1;
  pointer-events: none;
}


#main-background-slideshow img.visible {
    opacity: 1;
}

#main-background-slideshow.hidden {
    display: none !important;
}

#main-background-slideshow.no-animate img {
    animation: none !important;
    transform: scale(1.05);
}

@keyframes kenburns {
    0% { transform: scale(1.02) translate(0, 0); }
    50% { transform: scale(1.05) translate(-1%, -1%); }
    100% { transform: scale(1.02) translate(0, 0); }
}

/* Unsichtbares Overlay gegen Bild-Download & Kopieren */
.image-overlay-blocker {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lightbox-image-wrapper {
  position: relative;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lightbox-title {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background-color: rgba(0, 0, 0, 0.0);
  color: white;
  font-size: 0.5rem;
  padding: 8px 16px;
  border-radius: 4px;
  max-width: 40%;
  z-index: 20;
  text-align: right;
  white-space: nowrap;
}

.lightbox-title-bottom {
  text-align: right;
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 8px;
  color: #eee;
}

#lightbox-meta {
  padding-top: 2px;
  font-size: 0.95rem;
  color: #ccc;
}

.meta-columns {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.meta-left p,
.meta-right p {
  margin: 2px 0;
}

.meta-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: #eee;
  white-space: nowrap;
}

.image-overlay-blocker {
  display: none !important;
}

/* ********************************** */
/* === Masonry.js Layout clean-up === */
/* ********************************** */

/* 1) Block-Flow für den Album-Container wiederherstellen */

#album-images {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0 auto 20px;
  position: relative;
  box-sizing: border-box;
}

/* 2) Sizer – definiert die Basis-Spaltenbreite */
.masonry-sizer {
  width: 180px;
  display: block;
}

/* 3) Jedes Item absolut positioniert */
.masonry-item {
  position: absolute;
  width: 180px;
  margin-bottom: 20px;
  border: 2px solid white;
  border-radius: 12px;
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: none;
  border-radius: 0;
}


/* === Responsive Utilities === */

/* ── Große Tablets / kleine Desktops ── */
@media (max-width: 900px) {
  /* Album-Übersicht: etwas engere Karten */
  .album-card {
    max-width: 250px;
  }

  /* Header-Titel etwas kleiner */
  header h1 {
    font-size: 2.2rem;
  }

  /* Lightbox-Meta und Buttons schmaler paddings */
  .lightbox-content {
    padding: 16px;
  }
}

/* ── Mittelgroße Smartphones ── */
@media (max-width: 600px) {
  /* Album-Übersicht: zwei Karten nebeneinander */
  #album-overview {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 0 2vw;
  }
  .album-card {
    flex: 0 0 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
    margin-bottom: 16px;
  }

  /* Header-Titel weiter verkleinern */
  header h1 {
    font-size: 1.8rem;
  }

  /* Back-Button leichtere Ränder */
  #albumActions {
    padding: 0 1.5vw;
    margin-bottom: 16px;
  }

  /* Lightbox: Texte und Buttons etwas kleiner */
  .lightbox-meta {
    font-size: 0.85rem;
  }
  .lightbox-close {
    font-size: 1.8rem;
    top: 8px;
    right: 12px;
  }
}

/* ── Kleine Smartphones ── */
@media (max-width: 480px) {
  /* Album-Übersicht: weiterhin zwei Spalten */
  #album-overview {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2vw;
  }
  .album-card {
    flex: 0 0 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
    margin-bottom: 14px;
  }

  /* Overlay-Schrift kleiner */
  .album-overlay h2 {
    font-size: 1rem;
  }
  .album-overlay p {
    font-size: 0.75rem;
  }

  /* Header-Title klein */
  header h1 {
    font-size: 1.6rem;
  }

  /* Footer-Nav enger */
  footer .container {
    gap: 8px;
  }
  footer nav ul {
    gap: 8px;
  }

  /* Kontaktformular: Eingaben etwas schmaler */
  #kontaktformular {
    gap: 1rem;
  }
}

/* zwinge das Ausblenden, wenn JS .hidden setzt */
#album-overview.hidden {
  display: none !important;
}
#album-view.hidden {
  display: none !important;
}

/* ── Lightbox-Titel Responsive ── */
@media (max-width: 600px) {
  /* Schrift verkleinern und näher an die Ecke rücken */
  .lightbox-title {
    font-size: 0.5rem;   /* vorher 0.8rem, passe bei Bedarf auf 0.7rem oder 0.6rem an */
    bottom: 10px;        /* vorher 24px */
    left: 12px;         /* vorher 24px */
	white-space: nowrap;
  }
}

@media (max-width: 480px) {
  /* Noch kompakter auf ganz kleinen Screens */
  .lightbox-title {
    font-size: 0.4rem;
    bottom: 8px;
    left: 8px;
  }
}

/* Auf Smartphones im Landscape-Modus */
@media (max-width: 600px) and (orientation: landscape) {
  #lightbox-title {
    bottom: 8px;      /* weiter nach unten */
    left: 8px;       /* weiter nach rechts */
    font-size: 0.5rem;/* etwas kleiner */
  }
}

/* === 11. Schriftstil für Überschriften anpassen === */
h1, h2, h3, h4, header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* === 12. Intro-Karte (Begrüßung oben) === */
.intro-card {
  max-width: 1000px;
  margin: 30px auto 10px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: #eee;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  line-height: 1.6;
  font-weight: 400;
  text-align: center;
}

/* === 13. Edleres Karten-Design mit Glaseffekt === */
.album-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-card:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* === 14. Responsive-Anpassung für Intro-Karte === */
@media (max-width: 600px) {
  .intro-card {
    font-size: 1.2rem;
    padding: 20px;
    margin: 20px 2vw 10px;
  }
  
  #static-page {
    background: rgba(0, 0, 0, 0.75);   /* dunklerer Fallback */
    backdrop-filter: none;            /* falls nicht unterstützt */
    -webkit-backdrop-filter: none;
    padding: 16px 4vw;
    margin: 16px 2vw;
  }
}

@media (max-width: 400px) {
  .intro-card {
    font-size: 1rem;
    padding: 16px;
  }
}

.intro-card.hidden {
  display: none !important;
}

/* === 15. Header mit Porträtbild linksbündig, ohne Rahmen === */
.header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-title img {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%; /* macht das Bild rund */
}

@media (max-width: 480px) {
  .header-title img {
    height: 36px;
    width: 36px;
  }

  .header-title h1 {
    font-size: 1.4rem;
  }
}

#static-page {
  background: rgba(0, 0, 0, 0.75); /* Standard-Fallback für alle */
}

@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  #static-page {
    background: rgba(0, 0, 0, 0.5); /* transparenter, wenn Blur unterstützt wird */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}
