/* Gallery layout */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, 260px);
    gap: 30px;
    justify-content: start;
    margin-top: 20px;
}

/* Single gallery item */
.gallery-item {
    width: 260px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Hover effect */
.gallery-item:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 30px rgba(0,0,0,0.25);
    z-index: 5;
}

/* Image – fixed height */
.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Title */
.gallery-item h3 {
    margin: 12px 0 4px;
    font-size: 18px;
    color: #222;
    text-align: center;
}

/* Description */
.gallery-item p {
    font-size: 14px;
    color: #666;
    padding-bottom: 14px;
    text-align: center;
}

/* Modal background */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* Active modal */
.modal.active {
    display: flex;
}

/* Modal image */
.modal-image {
    max-width: 85%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

/* Caption */
.modal-caption {
    position: absolute;
    bottom: 30px;
    color: white;
    font-size: 16px;
    opacity: 0.9;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* Animation */
@keyframes zoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.category-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-buttons .filter-btn {
    padding: 8px 18px;
    border: none;
    background: #415534;

    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.category-buttons .filter-btn:hover,
.category-buttons .filter-btn.active {
    background-color: #366954;
    box-shadow: 0px 0px 7px #000000;
}

.search-container {
    margin-bottom: 15px;
}

#gallery-search {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    transition: border 0.2s;
}

#gallery-search:focus {
    border-color: #415534;
}

/* ========================= */
/* Responsive gallery layout */
/* ========================= */

/* Store skærme (default – din nuværende opsætning) */
/* auto-fill + 260px virker allerede fint her */


/* Tablets */
@media (max-width: 1024px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, 260px);
        justify-content: center;
    }
}


/* Små tablets / store telefoner */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(2, 260px);
        justify-content: center;
    }
}


/* Telefoner */
@media (max-width: 560px) {
    .gallery-container {
        grid-template-columns: repeat(1, 260px);
        justify-content: center;
    }
}
