.gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}
.gallery-main-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #1d3557;
}
.gallery-main-subtitle {
    color: #457b9d;
    font-size: 1.1rem;
}

/* Filters */
.gallery-filters {
    text-align: center;
    margin-bottom: 2rem;
}
.filter-btn {
    background: #f1faee;
    border: none;
    padding: 8px 16px;
    margin: 4px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all .3s ease;
}
.filter-btn.active,
.filter-btn:hover {
    background: #457b9d;
    color: #fff;
}
.filter-count {
    font-size: .8rem;
    opacity: .7;
}

/* Category */
.gallery-category {
    margin-bottom: 3rem;
}
.gallery-category-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d3557;
    margin-bottom: 1rem;
}
.gallery-count {
    font-size: .9rem;
    color: #6c757d;
    margin-left: 8px;
}

/* Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    cursor: pointer;
    transition: all .4s ease;
}
.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,.2);
}
.gallery-img {
    width: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
    opacity: 0;
    transition: .3s;
    display: flex;
    align-items: flex-end;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay-content {
    color: #fff;
    padding: 1rem;
}
.gallery-overlay-content h4 {
    margin: 0;
    font-size: 1rem;
}
.gallery-category-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .75rem;
    margin-top: 5px;
}

/* Empty */
.gallery-empty {
    text-align: center;
    padding: 3rem;
    color: #999;
}


.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Album card */
.album-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: .4s;
}
.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.album-cover {
    width: 100%;
    object-fit: cover;
    display: block;
}

.album-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem;
}
.album-overlay h3 {
    margin: 0;
    font-size: 1.3rem;
}
.album-overlay span {
    font-size: .9rem;
    opacity: .8;
}

/* Modal */
.album-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 9999;
    padding: 2rem;
}
.album-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 1200px;
    margin: auto;
    padding: 1.5rem;
}
.album-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.album-modal-header button {
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}


.album-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.album-modal.active {
    display: block;
}

/* backdrop */
.album-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: .4s ease;
}

/* box */
.album-content {
    position: relative;
    max-width: 1100px;
    margin: 5vh auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    transform: translateY(40px) scale(.9);
    opacity: 0;
    transition: .5s cubic-bezier(.22,1,.36,1);
}

/* active animation */
.album-modal.active .album-backdrop {
    opacity: 1;
}

.album-modal.active .album-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
    gap: 16px;
}

.album-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(20px);
    animation: imgIn .6s ease forwards;
}

.album-grid img:nth-child(n) {
    animation-delay: calc(var(--i) * 0.05s);
}

/* close */
.album-close {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

/* stagger */
@keyframes imgIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
