/* Reset + Grundlayout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    background-color: #fafafa;
    line-height: 1.4;
}

/* Header + Suche */
.header_filter {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    background: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.search-box input {
    padding: 0.5rem;
    font-size: 1rem;
    width: 100%;
    margin-left: 20px;
    max-width: 500px;
}

/* Filtermenü */
.filter-toggle1 {
    background: #79a84a;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
}
.filter-toggle1:hover {
    background: #79a84a;
}
.filter-toggle1:active {
    background: #023d28;
}
.filter-toggle {
    display: none;
    background: #79a84a;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    margin-right: 20px;
    cursor: pointer;
}
.expand-btn-filter {
    background: #cecdcb;
    color: rgb(0, 0, 0);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
}
.logo{
    margin-right: 20px;
}
.filterbar {
    display: block;
    max-width: 30%;
    float: left;
    background: white;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.filterbar.active {
    display: block;
    max-width: 30%;
    float: left;
}
.filterbar section {
    margin-bottom: 1rem;
}
.filterbar button.expand-btn {
    margin-top: 0.5rem;
}
.filter-content {
    max-height: 80px;
    overflow-y: hidden;
    transition: max-height 0.3s ease;
}

.filter-content.expanded {
    max-height: none; /* oder: none für volle Höhe */
}

.filter-content {
    max-height: 114px;
    overflow-y: hidden;
    transition: max-height 0.3s ease;
}

.filter-content.expanded {
    max-height: 300px; /* oder 40vh, je nach Wunsch */
    overflow-y: auto;
}
.filter-content.expanded::-webkit-scrollbar {
    width: 6px;
}
.filter-content.expanded::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 3px;
}
/* Checkbox größer + Abstand zum Label */
.filter-content input[type="checkbox"] {
    width: 25px;
    height: 25px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Optional: Etwas mehr Abstand zwischen den Zeilen */
.filter-content label {
    display: inline-block;
    margin-bottom: 9px;
    cursor: pointer;
    font-size: 1rem;
}



/* Galerie-Grid */
#gallery {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}
.gallery-item:hover {
    transform: scale(1.02);
}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}
.gallery-item p {
    
    padding-top: 0.5rem;
    padding-right: 0.5rem;
    padding-bottom: 0rem !important;
    padding-left: 0.5rem;
    font-size: 1rem;
    word-wrap: break-word;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}
.lightbox img {
    max-width: 90%;
    max-height: 90%;
}
.lightbox-caption {
    position: absolute;
    bottom: 5%;
    color: white;
    background-color: rgba(55, 54, 54, 0.85);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1.2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.75rem 2.25rem;
    background: #FCA23F;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 0px;
    cursor: pointer;
    display: none;
    z-index: 1002;
}
.back-to-top:hover {
    background: #FCA23F;
}



/* Lightbox Buttons */
.lightbox-caption a.button {
    display: inline-block;
    padding: 9px 15px;
    margin: 4px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.button1 {
    background-color: #79a84a;
    color: white;
}
.button2 {
    background-color: #007bff;
    color: black;
}
.button3 {
    background-color: #FCA23F;
    color: white;
}
.button4 {
    background-color: #ffffff;
    color: black;
}

.lightbox-caption a.button:hover {
    opacity: 0.85;
}
.lightbox-caption {
    text-align: center;
    padding: 0.5rem 1rem;
}

.close-lightbox {
    position: fixed;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 1002;
    user-select: none;
}

.close-lightbox:hover {
    color: #ccc;
}
.gallery-item {
    position: relative;
}

.hover-open-icon {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background-image: url('open-tab-icon.svg'); /* <<< ersetze durch dein Icon */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.85;
    z-index: 10;
}

.gallery-item:hover .hover-open-icon {
    display: block;
}




/* Responsive Breakpoints */
@media (max-width: 600px) {
    .header_filter {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    .search-box input {
        max-width: 100%;
        margin-left: 0px;
    }    
    .filter-toggle {
    display:block;
    }
    .filterbar {
    display: none;
    }
    .filterbar.active {
    display: block;
        max-width:60%;
    }

    #gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .filter-toggle {
    margin-right: 0px;
    }
   .lightbox {
  align-items: flex-start !important;
  padding-top: 20px;
}
  .lightbox img#lightbox-img {
    margin-top: 35px;
    max-height: calc(100vh - 180px); /* Damit Bild nicht übersteht */
    object-fit: contain;
  }

  .lightbox-caption {
    margin-top: 10px;
  }
  .logo{
    display: block;
    margin: auto;
    width: 50%;
    }

    /* Suche volle Breite */
    .search-box{ flex: 1; min-width: 0; }
    .search-box input{
    width: 100%;
    max-width: none;   /* überschreibt deine 500px */
    margin-left: 0;
    }

    /* Mobile: Topbar oft höher */
    @media (max-width: 600px){
    .search-box{ order: 3; width: 100%; }
    }


}
.gallery-item { position: relative; cursor: pointer; }
.motif-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center !important; justify-content: center;
  padding: 10px; background: rgba(0,0,0,.45);
  color: #fff; font-weight: 600;
  opacity: 0; transition: opacity .2s ease;
}
.gallery-item:hover .motif-overlay { opacity: 1; }