

.new-gallery {
    display: grid;
   grid-template-columns: repeat(12, 1fr);
    /*  grid-template-rows: auto; */
    /* grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); */
    grid-auto-rows: 100px; /* Einheitliche Grundzeilenhöhe */
    grid-gap: 10px;
}

.new-gallery img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    cursor: pointer;
    transition: all 250ms ease-in-out;
}

.new-gallery img:hover {
    transform: scale(0.95);
}

.new-gallery-landscape {
    grid-column: span 6;
    grid-row: span 2;
}

.new-gallery-portrait {
    grid-row: span 4;
    grid-column: span 3;
}


.new-gallery-overlay {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
}

.new-gallery-overlay-cap {
    position: absolute;
    bottom: 2%;
    background: rgba(9,9,9,.8);
    color: rgba(255,255,255,.9);
    border-radius: 4px;
    max-width: 95%;
    line-height: 1.3;
    padding: .6em 1.2em;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    width: -moz-fit-content;
    display: table;
    transition: opacity .3s;
    text-align: center;
}

.new-gallery-overlay-cap a {
    color: inherit
}

/* Tab content styling for showing tabs*/
.tab-content {
  display: none;
}

.show {
  display: block;
}

#new-gallery-overlay-img {
    max-height: 80vh;
    max-width: 80vw;
}

#new-gallery-close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

#new-gallery-prev-btn,
#new-gallery-next-btn {
    position: absolute;
    height: 20px;
    filter: invert(1);
    cursor: pointer;
}

#new-gallery-prev-btn {
    left: 3vw;
}

#new-gallery-next-btn {
    right: 3vw;
}

@media (max-width: 1000px) {
.new-gallery {
    grid-gap: 5px;
}

.new-gallery img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.new-gallery-landscape {
    grid-column: span 8;
    grid-row: span 2;
}

.new-gallery-portrait {
    grid-row: span 2;
    grid-column: span 4;
}
}

@media (max-width: 600px) {
  .new-gallery {
    grid-template-columns: repeat(6, 1fr); /* Mehr Spalten */
    grid-gap: 4px;
  }

  .new-gallery-landscape {
    grid-column: span 6; /* 100% Breite */
    grid-row: span 2;
  }

  .new-gallery-portrait {
    grid-column: span 3; /* Halbe Breite */
    grid-row: span 3;
  }
}

@media (min-width: 620px) {
    #new-gallery-prev-btn,
    #new-gallery-next-btn {
        padding: 20px;
        height: 70px;
    }
}