.gallery {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
}

.gallery .container {
    max-width: 1200px;
    /*
    width: 80%;
    margin: 0 auto;
    background: #fff;
    border: solid 2px var(--color-warm-3);
    border-radius: 20px;
    padding: 2rem 1rem 3rem 1rem;
    */
}

@media (max-width: 768px) {
    /*
    .gallery .container {
        width: 95%;
        padding: 2rem 1rem 3rem 1rem;
    }
    */
}

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

/* 2 columns */
@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3 columns */
@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 4 columns */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.placeholder {
    aspect-ratio: 1 / 1;
    background: #ddd;
    border-radius: 8px;
}

.wp-block-gallery {
    margin-top: 20px;
}

.wp-block-gallery img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.wp-block-gallery img:hover {
    transform: scale(1.05);
}

/* ------------------------------------
   PROJECT GALLERY (front-page-cutompage-links)
------------------------------------ */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    justify-content: center;
    justify-items: center;
    max-width: 600px;
    margin: 20px auto;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
    
    overflow: hidden;border: solid 1px red;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.02);
}

.gallery-item {
   
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
}


/* ------------------------------------
   PROJECT PAGE GALLERY (lightbox thumbs)
   .project-thumb is a DIV wrapping the gallery image
------------------------------------ */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    justify-content: center;
    justify-items: center;
    max-width: 600px;
    margin: 20px auto;
}

.project-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-thumb:hover img {
    transform: scale(1.05);
}

/* ------------------------------------
   LIGHTBOX
------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-arrow,
.lightbox-close {
    position: fixed;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    padding: 0.5em 0.6em;
    border-radius: 6px;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-arrow:hover,
.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.75);
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 1.6rem;
}
/* ------------------------------------
   FILTER BUTTONS
------------------------------------ */
.filter-dropdown {
    display: none;
    margin-bottom: 2rem;
}

.filter-dropdown select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: none;
    background: var(--color-warm-2);
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--color-warm-2);
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.filter-btn:hover {
    background: var(--color-warm-3);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4), 0 0 6px rgba(255, 255, 255, 0.5), 0 0 12px rgba(255, 255, 255, 0.6), 0 0 18px rgba(255, 255, 255, 0.3);
}

.filter-btn:active {
    background: var(--color-warm-2);
    transform: scale(0.95);
}

.filter-btn.active {
    background: var(--color-warm-3);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4), 0 0 6px rgba(255, 255, 255, 0.5), 0 0 12px rgba(255, 255, 255, 0.6), 0 0 18px rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .filter-buttons {
        display: none;
    }
    .filter-dropdown {
        display: block;
    }
}