.dwpa-portfolio {
    --dwpa-primary: var(--primary-color-one, #0b5f9e);
    --dwpa-primary-dark: #073f6b;
    --dwpa-ink: var(--heading-color, #132238);
    --dwpa-muted: #5e6a78;
    --dwpa-accent: var(--e-global-color-ce1668c, #ff600f);
    --dwpa-surface: #ffffff;
    --dwpa-border: #cbd5df;
    position: relative;
    width: 100%;
    color: var(--dwpa-ink);
}

.dwpa-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    padding: 16px 0 24px;
}

.dwpa-filter label {
    margin: 0;
    color: var(--dwpa-ink);
    font-size: clamp(17px, 1.4vw, 21px);
    font-weight: 700;
    white-space: nowrap;
}

.dwpa-select-wrap {
    position: relative;
    display: block;
    width: min(100%, 330px);
}

.dwpa-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--dwpa-ink);
    border-bottom: 2px solid var(--dwpa-ink);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.dwpa-filter select {
    width: 100%;
    min-height: 60px;
    margin: 0;
    padding: 0 52px 0 22px;
    border: 1px solid var(--dwpa-primary);
    border-radius: 6px;
    background: var(--dwpa-surface);
    color: var(--dwpa-ink);
    font-size: 17px;
    line-height: 1.2;
    appearance: none;
    cursor: pointer;
}

.dwpa-filter select:focus-visible,
.dwpa-reset:focus-visible,
.dwpa-card a:focus-visible,
.dwpa-pagination .page-numbers:focus-visible {
    outline: 3px solid #78abd0;
    outline: 3px solid color-mix(in srgb, var(--dwpa-primary) 40%, transparent);
    outline-offset: 3px;
}

.dwpa-reset {
    min-height: 60px;
    padding: 0 29px;
    border: 2px solid var(--dwpa-primary);
    border-radius: 999px;
    background: transparent;
    color: var(--dwpa-primary-dark);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, opacity .2s ease;
}

.dwpa-reset:hover:not(:disabled) {
    background: var(--dwpa-primary);
    color: #fff;
}

.dwpa-reset:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.dwpa-separator {
    width: min(100%, 640px);
    height: 2px;
    margin: 16px auto 40px;
    background: repeating-linear-gradient(to right, var(--dwpa-ink) 0 15px, transparent 15px 25px);
    opacity: .85;
}

.dwpa-result-count {
    margin: -20px 0 24px;
    color: var(--dwpa-muted);
    font-size: 14px;
    text-align: right;
}

.dwpa-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 22px;
    min-height: 220px;
    transition: opacity .2s ease, transform .2s ease;
}

.dwpa-portfolio--compact .dwpa-grid {
    min-height: 0;
}

.dwpa-card {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: 0 0 10px 10px;
    background: var(--dwpa-surface);
    box-shadow: 0 14px 34px rgba(9, 30, 54, .11);
    isolation: isolate;
}

.dwpa-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8eef4;
}

.dwpa-card-image {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.dwpa-card:hover .dwpa-card-image {
    transform: scale(1.035);
}

.dwpa-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dce7ef, #f4f7f9);
}

.dwpa-card-overlay {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(9, 28, 48, .74), transparent);
    pointer-events: none;
}

.dwpa-card-category {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 18px;
    max-width: calc(100% - 36px);
    padding: 7px 13px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--dwpa-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.dwpa-card-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 17px 19px;
    background: linear-gradient(135deg, #142a3b, #233b4e);
}

.dwpa-card-title {
    margin: 0;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.25;
}

.dwpa-card-title a,
.dwpa-card-link {
    color: #fff !important;
    text-decoration: none !important;
}

.dwpa-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.dwpa-card-link span {
    font-size: 21px;
    line-height: 1;
    transition: transform .2s ease;
}

.dwpa-card-link:hover span {
    transform: translateX(4px);
}

.dwpa-empty {
    grid-column: 1 / -1;
    padding: 56px 24px;
    border: 1px dashed var(--dwpa-border);
    border-radius: 10px;
    background: #f7f9fb;
    text-align: center;
}

.dwpa-pagination-wrap {
    margin-top: 42px;
}

.dwpa-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dwpa-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid var(--dwpa-border);
    border-radius: 999px;
    background: #fff;
    color: var(--dwpa-ink);
    font-weight: 700;
    text-decoration: none;
}

.dwpa-pagination .page-numbers.current,
.dwpa-pagination a.page-numbers:hover {
    border-color: var(--dwpa-primary);
    background: var(--dwpa-primary);
    color: #fff;
}

.dwpa-loader {
    position: absolute;
    z-index: 5;
    top: 150px;
    left: 50%;
    display: none;
    gap: 6px;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 8px 28px rgba(9, 30, 54, .18);
    transform: translateX(-50%);
}

.dwpa-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dwpa-primary);
    animation: dwpa-pulse .8s infinite alternate;
}

.dwpa-loader span:nth-child(2) { animation-delay: .15s; }
.dwpa-loader span:nth-child(3) { animation-delay: .3s; }

.dwpa-portfolio.is-loading .dwpa-grid,
.dwpa-portfolio.is-loading .dwpa-pagination-wrap {
    opacity: .38;
    transform: translateY(3px);
    pointer-events: none;
}

.dwpa-portfolio.is-loading .dwpa-loader {
    display: flex;
}

.dwpa-portfolio.has-error .dwpa-status {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 18px !important;
    padding: 12px 16px !important;
    overflow: visible !important;
    border-left: 4px solid #b42318;
    background: #fff1f0;
    color: #8a1c14;
    clip: auto !important;
    clip-path: none !important;
}

@keyframes dwpa-pulse {
    from { opacity: .35; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 991px) {
    .dwpa-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dwpa-filter {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .dwpa-filter {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    .dwpa-filter label {
        white-space: normal;
    }

    .dwpa-select-wrap {
        width: 100%;
        max-width: none;
    }

    .dwpa-reset {
        width: 100%;
    }

    .dwpa-separator {
        margin-top: 10px;
        margin-bottom: 30px;
    }

    .dwpa-result-count {
        margin-top: -12px;
        text-align: left;
    }

    .dwpa-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .dwpa-card-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .dwpa-card-link {
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dwpa-card-image,
    .dwpa-card-link span,
    .dwpa-grid,
    .dwpa-pagination-wrap {
        transition: none;
    }

    .dwpa-loader span {
        animation: none;
    }
}
