    body{
        background-color: var(--background);
        margin: 0px;
        padding: 0px;
    }
    

:root {
--gap: 16px;
--page-bg: #f6f7f9;
--maxw: 1200px;
}


* { box-sizing: border-box; }



.wrap {
max-width: var(--maxw);
margin: 0 auto;
margin-top: 0px;
width: 90%;
}


/* 3 Spalten nebeneinander */
.gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--gap);
}


/* Bilder innerhalb jeder Spalte untereinander */
.col {
display: flex;
flex-direction: column;
gap: var(--gap);
}


.image-wrapper{
  position: relative;      /* Bezugsrahmen für .overlay */
  display: inline-block;   /* passt sich an Bildgröße an */
  width: fit-content;
  height: fit-content;
  cursor: pointer;
}

.overlay{
  position: absolute;
  inset: 0;                /* top:0; right:0; bottom:0; left:0 */
  background: linear-gradient(0deg,rgba(51, 51, 51, 1) 0%, rgba(51, 51, 51, 0) 50%);
  z-index: 2;              /* über dem Bild */
  display: flex;
  justify-content: space-between;    /* Titel links, Jahr rechts */
  align-items: flex-end;             /* GANZ WICHTIG → nach unten */
  padding: 8px;
  color: var(--background);  
  opacity: 0;   
  visibility: hidden;
  transition: 0.3s;    
  pointer-events: none;
}

.image-wrapper:hover .overlay{
    opacity: 100;
    visibility: visible;
    cursor: pointer;
}

.overlay p{
    font-size: 1.5rem;
    margin: 0px;
    margin: 10px;
}

.overlay-left{
    font-weight: 450;
}

.overlay-right{
    font-weight: 350;
}

.col a img{
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  z-index: 1; 
  cursor: pointer;             /* unter der Overlay */
}

.icon{
  position: absolute;
  width: 40px !important;
  box-shadow: none !important;
  margin: 5px;
  right: 0px;
  background-color: rgba(50, 50, 50, 0.3);
  border-radius: 50px;
  z-index: 4 !important;
   pointer-events: auto;   /* Icon darf Klicks bekommen */
  cursor: pointer;
  padding: 5px;
  transition: 0.2s;
}

.icon:hover{
  background-color: rgba(60, 60,60, 1);
}

/* Responsiv: 2 Spalten auf Tablets, 1 auf Phones */
@media (max-width: 1024px) {
.gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
.gallery { grid-template-columns: 1fr; }
}

/* Modal-Container */
.modal {
  display: none; /* ausgeblendet */
  position: fixed;
  z-index: 9999;
  inset: 0; /* top,right,bottom,left:0 */
  background: rgba(0, 0, 0, 0.6);
}

/* Box-Inhalt */
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  line-height: 1.5;
  font-family: sans-serif;
}

/* Schließen-Button */
.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.zitatPerson{
  font-size: 15pt !important;
  font-style: italic;
}

/* Text-Kachel soll die Spaltenbreite füllen */
.image-wrapper.text-wrapper{
  width: 100%;
  aspect-ratio: 3 / 4;      /* gleiche Proportion wie die Bilder */
  display: flex;
  align-items: stretch;
  padding: 18px;
  background: #f7f7f7;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;          /* Rahmen bleibt fix, Inhalt scrollt */
  cursor: default;
}

/* Vollständigen Text anzeigen: scroll statt Abschneiden */
.text-wrapper .text-content{
  height: 100%;
  overflow: auto;            /* <— wichtig: Scrollbar statt cut */
  display: block;            /* Zeilen-Clamp deaktivieren */
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
  padding-right: 6px;        /* Platz für Scrollbar */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; /* smoother auf iOS */
  scrollbar-width: thin;                     /* Firefox */
  scrollbar-color: rgba(0,0,0,.25) transparent;
}

/* dezente Scrollbar (Chromium/WebKit) */
.text-wrapper .text-content::-webkit-scrollbar{ width: 6px; }
.text-wrapper .text-content::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.25);
  border-radius: 6px;
}
.text-wrapper .text-content::-webkit-scrollbar-track{ background: transparent; }

/* Optional: Überschrift & Typo */
.text-wrapper h3{
  margin: 0 0 8px 0;
  font-size: 1.15rem;
}
