.masonry-gallery {
    position: relative;
    width: 100%;
    margin: 20px auto;
    opacity: 0;
    transition: opacity 0.3s;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}
.masonry-gallery.is-ready {
    opacity: 1;
}
.masonry-tile {
    width: calc((100% / 4) - 6px);
    float: left;
    margin-bottom: 8px;
    box-sizing: border-box;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.masonry-tile img {
    width: 100%;
    height: auto;
    display: block;
}
.masonry-sizer { display: none; }
.spinner {
    border: 4px solid #eee;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}
.load-more-btn {
    display: block;
    margin: 0 auto 32px auto;
    padding: 12px 32px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    background: #333;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.load-more-btn:hover {
    background: #555;
}
.gallery-category-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    background: #f7f7f7;
    padding: 12px 0 12px 12px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border-radius: 16px;
    font-size: 0.98rem;
    margin: 32px 0;
}
.gallery-category-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Webkit */
}
.category-filter-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    /*font-size: 0.98rem;*/
    font-weight: bold;
    background: none;
    border: none;
    color: #666666cc;
    padding: 0 12px;
    cursor: pointer;
    transition: color 0.2s;
}
#gallery-title {
    text-align:center;
    margin-top:150px;
    font-size:2rem;
    font-weight:bold;
}
.gallery-hero-bg {
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0 32px 0;
    margin-bottom: 24px;
}
.gallery-hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
}
.gallery-hero-bg-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 21%);
    z-index: 1;
}
.gallery-hero-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.gallery-category-bar-hero {
    position: relative;
    z-index: 2;
}
.modal-center-spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-spinner-inner {
    border: 4px solid #eee;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    background: none;
}
.masonry-img-info {
    position: absolute;
    left: 10px;
    bottom: 10px;
    /*background: rgba(255,255,255,0.7);*/
    /*color: #222;*/
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 8px;
    z-index: 2;
    pointer-events: none;
}
/* Responsive */
@media (max-width: 1200px) {
    .masonry-tile { width: calc((100% / 3) - 6px); }
}
@media (max-width: 600px) {
    .masonry-tile { width: calc((100% / 2) - 6px); }
    .gallery-hero-bg {height: 300px;}
    .masonry-img-info {font-size: 0.5rem}
}