/* Gallery Container & Header */
.gallery-container {
    width: 100%;
    margin: 5vw auto;
    color: white;
}

/* STICKY HEADER - Trimmed to be slim */
.series-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: black;
    /* Reduced padding to trim the 'blue' area */
    padding: 10px 10% 0 10% ;
}


#seriesBtn {
    font-family: 'Pretendard-Black';
    font-size: 36px; 
    cursor: pointer;
    display: inline-block;
    transition: 0.3s;
    /* Removed default margin to save space */
    margin-bottom: 15px; 
}

#seriesBtn .fas {
    margin-left: 10px; 
}

#seriesBtn:hover {
    color: rgb(124, 0, 0);
}

/* Divider inside sticky header - appears when dropdown is open */
.series-divider-sticky {
    border: none;
    border-bottom: 1px solid white;
    margin: 0;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.5s ease, max-height 0.5s ease;
    overflow: hidden;
}

.series-divider-sticky.visible {
    opacity: 1;
    max-height: 10px;
}

/* Divider outside sticky header - scrolls with content */
.series-divider {
    border: none;
    border-bottom: 1px solid white;
        margin: 0 10%
}

/* Dropdown Animation: Dissolve & Move */
.gallery-filter {
    list-style: none;
    padding: 0;
    margin-bottom: 0; /* Tightened */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.5s ease;
    max-height: 1000px; 
    overflow: hidden;
}

.gallery-filter.hidden {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    pointer-events: none;
    display: block !important; 
}

.filter-btn {
    background: none;
    border: none;
    font-family: 'Pretendard-Black';
    font-size: 24px;
    color: #676767; 
    cursor: pointer;
    transition: color 0.3s ease, padding-left 0.3s ease;
    text-align: left;
    display: block;
    margin: 10px 0;
}

.gallery-filter li:last-child .filter-btn {
    margin-bottom: 20px;
}

.filter-btn:hover {
    color: rgb(124, 0, 0) !important;
}

.filter-btn.active {
    color: white !important;
}

/* Two-Column Gallery Grid */
.gallery-grid {
    width: 80%;
    margin: 0 auto;
    padding-top: 50px;
    transition: opacity 0.4s ease;
    /* We remove column-count and grid-template because Masonry.js handles it */
}

.gallery-item {
    /* (100% / 2) - half of your 50px gap */
width: calc(50% - 50px); 
    float: left;
    
}
.grid-sizer,
.gallery-item {
    width: calc(50% - 50px);  /* Each column is half, minus half the 100px gutter */
    box-sizing: border-box;
}

.gallery-item img {transition: all 0.3s ease;}
.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item img, 
.gallery-item .videotwo {
    width: 100%;
    height: auto;
    display: block;
}


.gallery-item .name {
    margin-top: 18px;
    font-size: 24px;
    text-align: center;
    color: #fff;
    font-family: 'Pretendard-Regular';
}
.gallery-item .desc {
    margin-top: 14px;
    font-size: 18px;
    text-align: center;
    color: #fff;
    font-family: 'Pretendard-Thin';
    margin-bottom: 100px;
}

/* RESPONSIVE BREAKPOINTS (Preserved your font sizes) */
@media screen and (max-width: 1600px) {
    #seriesBtn { font-size: 24px; }
    .filter-btn { font-size: 24px; }
    .gallery-item .name { font-size: 14px; }
}

@media screen and (max-width: 1000px) {
    .gallery-item {
        width: 100%;
        margin: auto
    }
    #seriesBtn { font-size: 18px; }
    .filter-btn { font-size: 18px; }
    .gallery-item .name { font-size: 12px; }

    #seriesBtn .fas {
    margin-left: 5px; 
}

    .gallery-container {
        width: 100%;
        margin: 0;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    .gallery-grid {
        width: 80%;
        padding-top: 35px;
    }
    
.grid-sizer,
    .gallery-item {
        width: calc(50% - 20px); 
        margin: 0; /* Remove 'auto' to let Masonry handle positioning */
    }
    #seriesBtn, .filter-btn {
        font-size: 18px;
    }
.gallery-item .name {
    margin-top: 12px;
    font-size: 14px;
}
.gallery-item .desc {
    margin-top: 10px;
    font-size: 10px;
    margin-bottom:50px
}
}

@media screen and (max-width: 650px) {
    .gallery-grid {
        width: 100%;
        padding-top: 30px;
    }
        .gallery-item {
        width: calc(50% - 15px); 
        margin: 0; /* Remove 'auto' to let Masonry handle positioning */
    }

.gallery-item .name {
    margin-top: 10px;
    font-size: 12px;
}
.gallery-item .desc {
    margin-top: 8px;
    font-size: 8px;
    margin-bottom:50px
}

    .series-header {
        padding: 10px 0 0 0;
    }

    .series-divider {
        margin: 0;
    }
}