.mpr-portfolio {
    width: 100%;
    --mpr-accent: #f5a515;
    --mpr-columns-desktop: 3;
    --mpr-columns-tablet: 2;
    --mpr-gap: 28px;
    --mpr-image-ratio: 4 / 3;
    box-sizing: border-box;
}

.mpr-portfolio *,
.mpr-portfolio *::before,
.mpr-portfolio *::after {
    box-sizing: border-box;
}

.mpr-heading {
    margin: 0 0 14px;
    text-align: center;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
}

.mpr-intro {
    max-width: 860px;
    margin: 0 auto 26px;
    text-align: center;
    line-height: 1.6;
}

.mpr-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 58px;
}

.mpr-filter {
    appearance: none;
    border: 1px solid transparent;
    background: #f0f0f0;
    color: #111;
    padding: 12px 18px;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.mpr-filter:hover,
.mpr-filter:focus-visible {
    transform: translateY(-1px);
    outline: none;
    border-color: var(--mpr-accent);
}

.mpr-filter.is-active {
    background: var(--mpr-accent);
    color: #fff;
}

.mpr-grid {
    display: grid;
    grid-template-columns: repeat(var(--mpr-columns-desktop), minmax(0, 1fr));
    gap: var(--mpr-gap);
    align-items: stretch;
}

.mpr-card {
    min-width: 0;
    background: #f2f2f2;
    box-shadow: 0 3px 18px rgba(0,0,0,.08);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, opacity .18s ease;
}

.mpr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 26px rgba(0,0,0,.12);
}

.mpr-card[hidden] {
    display: none !important;
}

.mpr-slider {
    position: relative;
    overflow: hidden;
    background: #e7e7e7;
    aspect-ratio: var(--mpr-image-ratio);
}

.mpr-slides,
.mpr-slide {
    width: 100%;
    height: 100%;
    margin: 0;
}

.mpr-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
}

.mpr-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.mpr-cover-link {
    display: block;
    width: 100%;
    height: 100%;
}

.mpr-cover-link:focus-visible {
    outline: 3px solid var(--mpr-accent);
    outline-offset: -3px;
}

.mpr-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mpr-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 58px;
    border: 0;
    background: rgba(0,0,0,.08);
    color: #fff;
    font-size: 44px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color .2s ease;
}

.mpr-arrow:hover,
.mpr-arrow:focus-visible {
    background: rgba(0,0,0,.42);
    outline: none;
}

.mpr-arrow-prev { left: 0; }
.mpr-arrow-next { right: 0; }

.mpr-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    background: rgba(0,0,0,.55);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
}

.mpr-no-image {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 20px;
    color: #777;
    text-align: center;
}

.mpr-card-body {
    padding: 0 0 14px;
}

.mpr-card-title {
    margin: 0;
    padding: 12px 14px 4px;
    font-size: clamp(17px, 1.4vw, 21px);
    line-height: 1.22;
    font-weight: 700;
    text-align: center;
}

.mpr-card-title a {
    color: inherit;
    text-decoration: none;
}

.mpr-card-title a:hover,
.mpr-card-title a:focus-visible {
    color: var(--mpr-accent);
    outline: none;
}

.mpr-location {
    padding: 0 14px 10px;
    text-align: center;
    color: #6d6d6d;
    font-size: 14px;
}

.mpr-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 8px 10px 0;
}

.mpr-stat {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3px;
}

.mpr-stat-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
}

.mpr-stat-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.mpr-stat strong {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.mpr-stat small {
    color: #747474;
    font-size: 11px;
    line-height: 1.1;
}

.mpr-actions {
    padding: 16px 14px 0;
    text-align: center;
}

.mpr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    background: var(--mpr-accent);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: filter .2s ease, transform .2s ease;
}

.mpr-button:hover,
.mpr-button:focus-visible {
    filter: brightness(.94);
    transform: translateY(-1px);
    outline: none;
}

.mpr-empty {
    padding: 24px;
    text-align: center;
    background: #f5f5f5;
    color: #666;
}

@media (max-width: 991.98px) {
    .mpr-grid {
        grid-template-columns: repeat(var(--mpr-columns-tablet), minmax(0, 1fr));
    }

    .mpr-filters {
        margin-bottom: 34px;
    }

    .mpr-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }
}

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

    .mpr-filters {
        justify-content: stretch;
        gap: 8px;
        margin-bottom: 24px;
    }

    .mpr-filter {
        flex: 1 1 calc(50% - 4px);
        padding: 11px 12px;
        font-size: 13px;
    }

    .mpr-card-title {
        font-size: 18px;
    }

    .mpr-arrow {
        width: 38px;
        height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mpr-card,
    .mpr-filter,
    .mpr-slide,
    .mpr-button {
        transition: none;
    }
}
