/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #51dbb1;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Lightbox standardmäßig komplett verstecken */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

/* Magie: Wenn die ID in der URL aufgerufen wird, Lightbox anzeigen */
.lightbox-overlay:target {
    display: flex;
}

/* Unsichtbarer Link über den gesamten Hintergrund zum Schließen beim Danebenklicken */
.lightbox-close-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* Container für das große Bild */
.lightbox-inhalt {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-inhalt img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}


/* Das Schließen-Kreuz (X) exakt oben rechts auf dem Bild platziert */
.lightbox-close-btn {
    position: absolute;
    top: 10px;        /* Abstand vom oberen Bildrand nach innen */
    right: 10px;      /* Abstand vom rechten Bildrand nach innen */
    color: #ffffff;
    font-size: 32px;
    text-decoration: none;
    line-height: 1;
    
    /* Touch-optimierte Klickfläche */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Wichtig: Hintergrund & Schatten, damit das X auch auf hellen Bildern sichtbar bleibt */
    background: rgba(0, 0, 0, 0.5); 
    border-radius: 50%;             /* Macht den Hintergrund kreisrund */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
}

/* Kleiner Effekt beim Drüberfahren oder Antippen */
.lightbox-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #ff4d4d; /* Wechselt zu Rot beim Hovern */
    transform: scale(1.05);
}
/* ==========================================
   STANDARD HYPERLINKS (Im Fließtext)
   ========================================== */
a:not(.links a):not(.burger-btn):not(.close-btn):not(.css-pagination label) {
  color: #073a31; /* Das edle Dunkelgrün deiner Buttons für beste Lesbarkeit */
  text-decoration: underline; /* Standard-Unterstreichung für Barrierefreiheit */
  text-decoration-color: rgba(7, 58, 49, 0.4); /* Dezente Unterstreichung */
  font-weight: 600; /* Leicht fett, damit sie im Text sofort auffallen */
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

/* Hover-Effekt für Text-Links */
a:not(.links a):not(.burger-btn):not(.close-btn):not(.css-pagination label):hover {
  color: #005c4e; /* Ein minimal helleres, sattes Smaragdgrün beim Drüberfahren */
  text-decoration-color: #005c4e; /* Unterstreichung wird voll sichtbar */
}

/* Fokus-Zustand für Tastatur-Navigation (Barrierefreiheit) */
a:not(.links a):not(.burger-btn):not(.close-btn):not(.css-pagination label):focus-visible {
  outline: 3px solid rgba(0, 92, 78, 0.7);
  outline-offset: 2px;
}


/* Standardmäßig alle Bilder-Blöcke unsichtbar machen */
.galerie-seite-block {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

/* Bildelemente innerhalb der Galerie */
.galerie-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px; /* Leicht abgerundet passend zu den Alben */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Sanfter Schatten für mehr Tiefe */
  transition: transform 0.2s ease;
}

/* Kleiner Zoom-Effekt beim Überfahren der Bilder */
.galerie-item img:hover {
  transform: scale(1.02);
}

/* ==========================================
   DESKTOP STYLES (Standard für große Bildschirme)
   ========================================== */

/* Layout (Desktop) */
.layout {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr; /* links / mitte / rechts = 3 drittel */
  gap: 0;
}

/* Seiten */
.side {
  position: sticky;
  overflow: hidden;
  min-height: 0;
}

.side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.side::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(81,219,177,0) 18%, rgba(0,0,0,0.35) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.25));
}

/* Mitte */
.center {
  min-height: 0;          /* wichtig in Grid/Flex-Kontexten */
  overflow-y: auto;       /* scroll nur hier */
  overflow-x: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.14),
    rgba(255,255,255,0.02)
  );
}

/* Optional: falls du in .center Content hast, der sonst überläuft */
.center > * {
  min-width: 0;
}

.caption {
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  font-weight: 800;
  margin: 0 0 12px 0;

  text-shadow:
    0 4px 18px rgba(0, 0, 0, 0.35),
    0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Social Links & Navigation (Allgemeines Aussehen) */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.links a {
  color: #073a31; 
  text-decoration: none;
  border: 1px solid rgba(7,58,49,0.35);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.links a i {
  margin-right: 0;
  font-size: 1.05em;
  line-height: 1;
}

.links a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.55);
  border-color: rgba(7,58,49,0.6);
}

.links a:focus-visible {
  outline: 3px solid rgba(0, 92, 78, .7);
  outline-offset: 3px;
}

.socials {
  margin-top: auto;
  padding-top: 10px;
  min-height: 10px; /* Garantiert den Mindestabstand auf allen Bildschirmen */
}

.no-bullets {
  list-style-type: none;
}

/* Sichtbarkeiten für große Bildschirme (> 900px) */
.desktop-nav {
  display: flex;
}

.burger-btn {
  display: none; /* Burger-Button auf Desktop unsichtbar */
}

.mobile-nav[popover] {
  display: none; /* Mobiles Popover auf Desktop unsichtbar */
}

/* ==========================================
   RESPONSIVE: Tablets / Smartphones (< 900px)
   ========================================== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;     /* alles untereinander */
    grid-template-rows: 1fr auto 1fr;
    height: 100svh;                  /* besser auf Mobil */
  }

  .side {
    min-height: 10vh;
  }

  .center {
    min-height: 0;
    overflow-y: auto;
    padding: 18px 16px;
  }

  .brand {
    font-size: clamp(2rem, 7.5vw, 3.2rem);
    margin-bottom: 10px;
  }

  .links {
    gap: 10px;
    margin-top: 8px;
  }

  .links a {
    padding: 10px 12px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  /* --- MOBIL-NAVIGATION (VON OBEN) --- */

  /* Desktop-Navigation auf Smartphones ausblenden */
  .desktop-nav {
    display: none;
  }

  /* Burger-Button auf Smartphones anzeigen */
  .burger-btn {
    display: block;
    font-size: 28px;
    background: none;
    border: none;
    color: #073a31;
    cursor: pointer;
    padding: 10px;
  }

  /* Das mobile Popover-Menü */
  .mobile-nav[popover] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;            
    height: auto;           
    max-height: 80vh;       
    margin: 0;
    border: none;
    padding: 24px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);

    background: rgba(7, 58, 49, 0.85); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 

    transform: translateY(-100%);

    transition: 
      transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
      display 0.35s ease allow-discrete, 
      overlay 0.35s ease allow-discrete;
  }

  /* Wenn das Popover geöffnet wird */
  .mobile-nav:popover-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    transform: translateY(0);
  }

  @starting-style {
    .mobile-nav:popover-open {
      transform: translateY(-100%);
    }
  }

  /* Schließen-Button im mobilen Menü (X) */
  .mobile-nav .close-btn {
    align-self: flex-end;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    margin-bottom: 10px;
    padding: 5px;
  }

  /* Links exklusiv innerhalb des mobilen Menüs anpassen */
  .mobile-nav a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    justify-content: center;
  }

  .mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
  }
}
