.mps-pg,
.mps-pg * {
    box-sizing: border-box;
}

.mps-pg {
    position: relative;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

.mps-pg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 50% -10%, rgba(86, 255, 63, 0.16), transparent 35%),
        linear-gradient(180deg, rgba(6, 16, 8, 0.98), #000 34%, #000 100%);
    pointer-events: none;
}

.mps-pg::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    z-index: -1;
    height: 220px;
    background: linear-gradient(180deg, transparent, rgba(64, 255, 74, 0.035));
    pointer-events: none;
}

.mps-pg-inner {
    width: 100%;
    margin: 0 auto;
}

.mps-pg-head {
    max-width: 760px;
    margin: 0 auto 34px;
}

.mps-pg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mps-pg-eyebrow::before,
.mps-pg-eyebrow::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 18px currentColor;
}

.mps-pg-title {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 58px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.mps-pg-intro {
    max-width: 640px;
    margin: 16px auto 0;
    font-size: 15px;
    line-height: 1.75;
}

.mps-pg-head[style*="text-align: left"] .mps-pg-intro,
.mps-pg-head[style*="text-align:left"] .mps-pg-intro {
    margin-left: 0;
}

.mps-pg-head[style*="text-align: right"] .mps-pg-intro,
.mps-pg-head[style*="text-align:right"] .mps-pg-intro {
    margin-right: 0;
}

.mps-pg-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 0 34px;
}

.mps-pg-tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.mps-pg-tab:hover,
.mps-pg-tab:focus-visible {
    transform: translateY(-2px);
    outline: none;
    border-color: rgba(124, 255, 89, 0.55);
}

.mps-pg-tab.is-active {
    box-shadow: 0 0 0 5px rgba(124, 255, 89, 0.10), 0 14px 35px rgba(80, 255, 77, 0.18);
}

.mps-pg-panel {
    display: none;
    animation: mpsPgFade 0.42s ease both;
}

.mps-pg-panel.is-active {
    display: block;
}

.mps-pg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mps-pg-card {
    overflow: hidden;
    position: relative;
    min-width: 0;
    isolation: isolate;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.mps-pg-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(circle at 50% 0%, rgba(91, 255, 83, 0.18), transparent 42%);
    transition: opacity 0.28s ease;
}

.mps-pg-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.mps-pg-card:hover::before {
    opacity: 1;
}

.mps-pg-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    cursor: grab;
}

.mps-pg-media:active {
    cursor: grabbing;
}

.mps-pg-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.mps-pg-main-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.mps-pg-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.5s ease, opacity 0.22s ease;
}

.mps-pg-card:hover .mps-pg-main-image {
    transform: scale(1.045);
}

.mps-pg-main-image.is-changing {
    opacity: 0;
}

.mps-pg-thumb-shell {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.52);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.mps-pg-thumb-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.mps-pg-thumb-track::-webkit-scrollbar {
    display: none;
}

.mps-pg-thumb {
    flex: 0 0 auto;
    overflow: hidden;
    padding: 0;
    border: 2px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    opacity: 0.68;
    scroll-snap-align: start;
    transition: opacity 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.mps-pg-thumb:hover,
.mps-pg-thumb.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.mps-pg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mps-pg-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.mps-pg-arrow span {
    display: block;
    font-size: 30px;
    line-height: 32px;
    transform: translateY(-1px);
}

.mps-pg-prev {
    left: 14px;
}

.mps-pg-next {
    right: 14px;
}

.mps-pg-arrow:hover,
.mps-pg-arrow:focus-visible {
    outline: none;
    background: rgba(76, 255, 66, 0.18);
    border-color: rgba(124,255,89,0.7);
    transform: translateY(-50%) scale(1.06);
}

.mps-pg-body {
    position: relative;
}

.mps-pg-body::before {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7cff59, transparent);
    box-shadow: 0 0 18px rgba(124,255,89,0.45);
}

.mps-pg-project-title {
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.mps-pg-project-desc {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.72;
}

.mps-pg-empty {
    padding: 36px 24px;
    border: 1px dashed rgba(255,255,255,0.16);
    border-radius: 18px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.03);
}

@keyframes mpsPgFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .mps-pg-head {
        margin-bottom: 28px;
    }
}

@media (max-width: 767px) {
    .mps-pg-tabs {
        flex-direction: column;
        align-items: stretch;
        max-width: 390px;
        margin-left: auto;
        margin-right: auto;
    }

    .mps-pg-tab {
        width: 100%;
    }

    .mps-pg-title {
        font-size: clamp(28px, 9vw, 42px);
    }

    .mps-pg-intro {
        font-size: 14px;
    }

    .mps-pg-thumb-shell {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 7px;
        border-radius: 14px;
    }

    .mps-pg-arrow {
        width: 34px;
        height: 34px;
    }

    .mps-pg-prev {
        left: 10px;
    }

    .mps-pg-next {
        right: 10px;
    }
}
