.don-portfolio-gallery {
    --dpg-black: #080706;
    --dpg-ink: #15120f;
    --dpg-muted: #6f6760;
    --dpg-paper: #fbf7ef;
    --dpg-white: #ffffff;
    --dpg-line: #e6ded2;
    --dpg-orange: #f05a1a;
    --dpg-red: #d9251d;
    --dpg-radius: 8px;
    --dpg-shadow: 0 14px 40px rgba(21, 18, 15, 0.1);
}

.dpg-lightbox-open {
    overflow: hidden;
}

.dpg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
}

.dpg-filter-button {
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid var(--dpg-line);
    border-radius: var(--dpg-radius);
    color: var(--dpg-ink);
    background: var(--dpg-white);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}

.dpg-filter-button:hover,
.dpg-filter-button:focus,
.dpg-filter-button.is-active {
    color: var(--dpg-white);
    border-color: var(--dpg-orange);
    background: linear-gradient(135deg, var(--dpg-red), var(--dpg-orange));
}

.dpg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.dpg-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--dpg-line);
    border-radius: var(--dpg-radius);
    background: var(--dpg-white);
    box-shadow: var(--dpg-shadow);
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.dpg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(21, 18, 15, 0.16);
}

.dpg-card.is-hidden {
    display: none;
}

.dpg-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #ece6dc;
    cursor: zoom-in;
}

.dpg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms ease;
}

.dpg-card:hover .dpg-card-image img {
    transform: scale(1.04);
}

.dpg-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 18px 20px;
}

.dpg-category-label {
    display: inline-flex;
    width: max-content;
    margin-bottom: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--dpg-white);
    background: var(--dpg-black);
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
}

.dpg-card-body h3 {
    margin: 0;
    color: var(--dpg-ink);
    font-size: 1.2rem;
    line-height: 1.12;
    font-weight: 950;
}

.dpg-card-body p {
    margin: 10px 0 0;
    color: var(--dpg-muted);
    font-size: 0.96rem;
    line-height: 1.5;
}

.dpg-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-height: 38px;
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: var(--dpg-radius);
    color: var(--dpg-white);
    background: linear-gradient(135deg, var(--dpg-red), var(--dpg-orange));
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.dpg-card-link:hover,
.dpg-card-link:focus {
    color: var(--dpg-white);
    filter: brightness(0.95);
}

.dpg-lightbox,
.dpg-css-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 18px;
    padding: 34px;
    background: rgba(8, 7, 6, 0.88);
}

.dpg-css-lightbox {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dpg-css-lightbox:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dpg-lightbox[hidden] {
    display: none;
}

.dpg-lightbox-stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    max-width: 1120px;
    max-height: calc(100vh - 68px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--dpg-radius);
    background: var(--dpg-white);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.dpg-lightbox-stage img {
    width: 100%;
    max-height: calc(100vh - 250px);
    object-fit: contain;
    background: var(--dpg-black);
}

.dpg-lightbox-content {
    padding: 18px 22px 22px;
}

.dpg-lightbox-content h3 {
    margin: 0;
    color: var(--dpg-ink);
    font-size: clamp(1.4rem, 3vw, 2.3rem);
    line-height: 1.05;
    font-weight: 950;
}

.dpg-lightbox-content p {
    margin: 10px 0 0;
    color: var(--dpg-muted);
}

.dpg-project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: var(--dpg-radius);
    color: var(--dpg-white);
    background: linear-gradient(135deg, var(--dpg-red), var(--dpg-orange));
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.dpg-lightbox-close,
.dpg-lightbox-arrow {
    z-index: 10002;
    border: 3px solid var(--dpg-white);
    border-radius: 50%;
    color: var(--dpg-white);
    background: linear-gradient(135deg, var(--dpg-red), var(--dpg-orange));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
    cursor: pointer;
    opacity: 1;
    transition: transform 160ms ease, filter 160ms ease;
}

.dpg-lightbox-close:hover,
.dpg-lightbox-close:focus,
.dpg-lightbox-arrow:hover,
.dpg-lightbox-arrow:focus {
    color: var(--dpg-white);
    filter: brightness(1.08);
    transform: scale(1.06);
    outline: 3px solid rgba(255, 255, 255, 0.36);
    outline-offset: 3px;
}

.dpg-lightbox-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
}

.dpg-lightbox-close::before,
.dpg-lightbox-close::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 14px;
    width: 24px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
}

.dpg-lightbox-close::before {
    transform: rotate(45deg);
}

.dpg-lightbox-close::after {
    transform: rotate(-45deg);
}

.dpg-lightbox-arrow {
    position: relative;
    width: 68px;
    height: 68px;
}

.dpg-lightbox-arrow::before {
    content: "";
    position: absolute;
    top: 22px;
    width: 20px;
    height: 20px;
    border-top: 5px solid currentColor;
    border-right: 5px solid currentColor;
}

.dpg-lightbox-prev::before {
    left: 26px;
    transform: rotate(-135deg);
}

.dpg-lightbox-next::before {
    right: 26px;
    transform: rotate(45deg);
}

.dpg-empty {
    margin: 0;
    padding: 24px;
    border: 1px dashed var(--dpg-line);
    border-radius: var(--dpg-radius);
    color: var(--dpg-muted);
    background: var(--dpg-paper);
}

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

@media (max-width: 680px) {
    .dpg-grid {
        grid-template-columns: 1fr;
    }

    .dpg-lightbox {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto;
        gap: 12px;
        padding: 18px;
    }

    .dpg-lightbox-stage {
        grid-column: 1 / -1;
        grid-row: 1;
        max-height: calc(100vh - 116px);
    }

    .dpg-lightbox-stage img {
        max-height: calc(100vh - 310px);
    }

    .dpg-lightbox-prev,
    .dpg-lightbox-next {
        grid-row: 2;
        justify-self: center;
    }
}
