.demo-block-scope {
    padding: 60px;
    padding-bottom: 100px;
    scroll-margin-top: 5px;
}

/* ---------- FILTERS ---------- */
.demo-block-scope .tag-cloud-div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding-bottom: 2rem;
}

.demo-block-scope .tag-span {
    padding: 0.9rem 2rem;
    border: 1px solid #464646;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s;
    color: #939393;
}

.demo-block-scope .tag-span.active {
    background: #958e6a;
    color: rgb(0, 0, 0);
}

.tag-select {
    display: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    width: 100%;
    border: 0;
    outline: 0;
    margin-bottom: 1rem;
}

/* Mobile: show dropdown instead of tag cloud */
@media (max-width: 700px) {

    .demo-block-scope .tag-cloud-div {
        display: none;
    }

    .tag-select {
        display: inline-block;
    }

}

/* ---------- PORTFOLIO GRID ---------- */
.demo-list-div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* ✅ centers items horizontally */
    gap: 1.5rem;               /* constant spacing */
    max-width: 1600px;
    margin: 0 auto;
  }

/* ---------- ITEMS ---------- */
.portfolio-item {
    position: relative;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: scale(1);
    text-align: center;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* ---------- IMAGES ---------- */
.portfolio-item img {
    width: 100%;
    max-width: 400px; /* match column width for clean layout */
    height: auto;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.portfolio-item:hover img {
    transform: scale(1.03);
}