.brandotbd-portfolio {
    --brandotbd-transition: 320ms cubic-bezier(.2,.75,.25,1);
    width: 100%;
}

.brandotbd-portfolio-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 46px;
}

.brandotbd-filter-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 15px;
    border: 1px solid #343741;
    border-radius: 999px;
    background: transparent;
    color: #c9cdd6;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color var(--brandotbd-transition), border-color var(--brandotbd-transition), color var(--brandotbd-transition), transform var(--brandotbd-transition);
    box-shadow: none;
    outline: 0;
}

.brandotbd-filter-btn:hover,
.brandotbd-filter-btn:focus-visible {
    color: #fff;
    border-color: #5a5f6b;
    transform: translateY(-1px);
}

.brandotbd-filter-btn.is-active {
    background: #f20a35;
    border-color: #f20a35;
    color: #fff;
}

.brandotbd-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.brandotbd-portfolio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: auto;
    overflow: hidden;
    border: 1px solid #292c32;
    border-radius: 14px;
    background: #090a0c;
    color: inherit;
    text-decoration: none !important;
    isolation: isolate;
    transition: transform var(--brandotbd-transition), border-color var(--brandotbd-transition), box-shadow var(--brandotbd-transition), opacity 220ms ease;
}

.brandotbd-portfolio-card:hover {
    transform: translateY(-4px);
    border-color: #444851;
}

.brandotbd-portfolio-card.is-hidden {
    display: none;
}

.brandotbd-portfolio-card.is-entering {
    animation: brandotbdPortfolioIn 340ms cubic-bezier(.2,.75,.25,1) both;
}

@keyframes brandotbdPortfolioIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.brandotbd-portfolio-image-wrap {
    position: relative;
    height: 370px;
    overflow: hidden;
    background: #111318;
}

.brandotbd-portfolio-image-wrap:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(0,0,0,.05);
}

.brandotbd-portfolio-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 700ms cubic-bezier(.2,.75,.25,1), filter 350ms ease;
}

.brandotbd-portfolio-card:hover .brandotbd-portfolio-image {
    transform: scale(1.04);
}

.brandotbd-portfolio-content {
    position: relative;
    z-index: 2;
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, rgba(9,10,12,.84) 0%, #090a0c 34%);
}

.brandotbd-portfolio-content {
    flex: 0 0 auto;
    min-height: 0;
}

.brandotbd-portfolio-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 7px;
    color: #ff133f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.brandotbd-meta-separator {
    font-size: .9em;
    opacity: .95;
}

.brandotbd-portfolio-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brandotbd-portfolio-title {
    min-width: 0;
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.035em;
}

.brandotbd-portfolio-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    color: #aeb3bc;
    font-size: 18px;
    line-height: 1;
    transition: transform var(--brandotbd-transition), color var(--brandotbd-transition);
}

.brandotbd-portfolio-card:hover .brandotbd-portfolio-arrow {
    transform: translate(3px, -3px);
    color: #fff;
}

.brandotbd-portfolio-empty {
    margin-top: 20px;
    padding: 20px;
    border: 1px dashed #343741;
    border-radius: 12px;
    color: #b7bbc4;
    text-align: center;
}

@media (max-width: 1024px) {
    .brandotbd-portfolio-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
    .brandotbd-portfolio-image-wrap {
        height: 330px;
    }
}

@media (max-width: 767px) {
    .brandotbd-portfolio-filters {
        margin-bottom: 30px;
    }
    .brandotbd-filter-btn {
        min-height: 32px;
        padding: 8px 13px;
        font-size: 11px;
    }
    .brandotbd-portfolio-grid {
        grid-template-columns: 1fr;
    }
    .brandotbd-portfolio-card {
        align-self: start;
    }
    .brandotbd-portfolio-image-wrap {
        height: 310px;
        flex: 0 0 auto;
    }
    .brandotbd-portfolio-content {
        padding-top: 14px;
        padding-bottom: 16px;
        min-height: 0 !important;
        flex: 0 0 auto;
    }
    .brandotbd-portfolio-title {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brandotbd-portfolio-card,
    .brandotbd-portfolio-image,
    .brandotbd-portfolio-arrow,
    .brandotbd-filter-btn {
        transition: none !important;
        animation: none !important;
    }
}

.brandotbd-image-placeholder {
    background: linear-gradient(135deg, #15171c 0%, #0b0c0f 100%);
}

/* Prevent theme/editor CSS from stretching card content and creating large empty gaps */
.brandotbd-portfolio-grid > .brandotbd-portfolio-card,
.brandotbd-portfolio-grid > a.brandotbd-portfolio-card,
.brandotbd-portfolio-grid > article.brandotbd-portfolio-card {
    place-self: start stretch;
}

.brandotbd-portfolio-card > .brandotbd-portfolio-image-wrap,
.brandotbd-portfolio-card > .brandotbd-portfolio-content {
    width: 100%;
}
