.gallery-page {
    padding-top: 120px;
    padding-bottom: 80px;
    max-width: 1200px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    /* padding: 1.5rem; */
    /* border-radius: 20px; */
}

.gallery-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: #f6f7fb;
    border-radius: 14px;
}

.gallery-search input {
    background: transparent;
    box-shadow: none;
    padding-left: 0;
}

.gallery-media-toggle .btn {
    border-radius: 999px;
    border: 1px solid #dfe3f1;
    padding: 0.5rem 1.25rem;
    text-transform: capitalize;
    transition: all 0.2s ease;
    gap: 2px;
}

.gallery-media-toggle .btn.active {
    background: #1b5eff;
    border-color: #1b5eff;
    color: #fff;
    box-shadow: 0 10px 30px rgba(27, 94, 255, 0.25);
}

#galleryResetFilters {
    color: #1b5eff;
}

.gallery-tags__chips {
    min-height: 38px;
}

.tag-chip {
    --chip-color: #1b5eff;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(27, 94, 255, 0.2);
    background: rgba(27, 94, 255, 0.04);
    color: var(--chip-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-chip[data-active="true"] {
    background: var(--chip-color);
    color: #fff;
    box-shadow: 0 8px 20px rgba(27, 94, 255, 0.2);
}

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

.gallery-card {
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
}

.gallery-card__media {
    position: relative;
    /* padding-top: 62%; */
    padding-top: 50%;
    overflow: hidden;
}

.gallery-card__media img,
.gallery-card__media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card__media img,
.gallery-card:hover .gallery-card__media video {
    transform: scale(1.04);
}

.gallery-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card__title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.gallery-card__summary {
    color: #4c4c66;
    font-size: 0.95rem;
    line-height: 1.6;
}

.gallery-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gallery-card__stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: #51607a;
}

.gallery-card__stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-empty-state i {
    display: block;
    color: #94a3b8;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #e8ebf5 25%, #f4f6fb 50%, #e8ebf5 75%);
    background-size: 400% 100%;
    animation: shimmer 1.6s infinite;
}

.gallery-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 0 0; }
    100% { background-position: -400% 0; }
}

@media (max-width: 768px) {
    .gallery-media-toggle {
        width: fit-content;
    }
}

@media (max-width: 575.98px) {
    .gallery-media-toggle {
        display: none !important;
    }

    .gallery-search {
        padding: 0 1.25rem;
    }
    
    .gallery-media-filter-dropdown {
        position: relative;
    }

    .gallery-media-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        gap: 0.5rem;
        padding: 8px;
        background: #f6f7fb;
        border: 1px solid #dfe3f1;
        border-radius: 50rem;
        color: #0f172a;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .gallery-media-filter-btn:hover {
        background: #e8ebf5;
        border-color: #1b5eff;
    }

    .gallery-media-filter-btn.active {
        background: #1b5eff;
        border-color: #1b5eff;
        color: #fff;
    }

    .gallery-media-filter-btn i:last-child {
        transition: transform 0.2s ease;
    }

    .gallery-media-filter-btn.open i:last-child {
        transform: rotate(180deg);
    }

    .gallery-media-dropdown-menu {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #dfe3f1;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        overflow: hidden;
    }

    .gallery-media-dropdown-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .gallery-media-dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        border: none;
        background: transparent;
        width: 100%;
        text-align: right;
        color: #0f172a;
        font-size: 0.95rem;
    }

    .gallery-media-dropdown-item:hover {
        background: #f6f7fb;
    }

    .gallery-media-dropdown-item.active {
        background: rgba(27, 94, 255, 0.08);
        color: #1b5eff;
        font-weight: 500;
    }

    .gallery-media-dropdown-item i {
        font-size: 1.1rem;
    }
}
