/* generelles zeug */
img.border {
    border: 4px solid var(--primary);
    border-radius: 8px;
}

.img-full img {
    display: block;
    width: 100%;
    height: auto;
}

.img-fullw img {
    display: block;
    width: 100%;
    height: auto;
}

.img-fullh img {
    display: block;
    width: auto;
    height: 100%;
    max-width: min(95vw, var(--maxw));
}
/* generelles zeug */



/* Vollbild */
.clickable-img {
  cursor: pointer;
}

#img-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  inset:0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3 ease;
}

#img-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

#close {
  position: absolute;
  top: 20px; right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}
/* Vollbild */



/* Media Galerie */
.media-gallery {
  display: grid;
  gap: .75rem;
  justify-items: center;
  width: min(100%, 200px);
}
.gallery-full-box {
  width: min(100%, 480px);
  aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--radius, 12px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-img {
  width: 480px;
  aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--radius, 12px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
  background: var(--panel-2);
}
.gallery-full-box .gallery-img-full {
  height: 100%;
}
.gallery-thumbs { display: flex; gap: .5rem; overflow-x: auto; }
.gallery-thumbs .thumb{
  width: 64px; height: 64px; object-fit: cover; display: block;
  border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: .8;
}
.gallery-thumbs .thumb:hover{ opacity: 1; }
.gallery-thumbs .thumb.is-active{ border-color: var(--accent); opacity: 1; }
/* Media Galerie */


/* img zoom */
.img-zoom-container {
    position: relative;
    display: inline-block;
    user-select: none;
    touch-action: none;
}

.img-zoom-container img {
    display: block;
    -webkit-user-drag: none;
}

.img-zoom-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid #d4d4d4;
    background: #fff;
    opacity: .35;
    pointer-events: none;
    display: none;
    z-index: 10;
    cursor: crosshair;
}

.img-zoom-result {
    position: fixed;
    width: 320px;
    height: 320px;
    border: 1px solid #d4d4d4;
    overflow: hidden;
    display: none;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.img-zoom-result img {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
}
/* img zoom */