.portfolio-page {
    background: #ffffff;
    color: #1b2430;
}

.portfolio-hero {
    padding: 72px 0 34px;
    text-align: center;
}

.portfolio-eyebrow {
    margin: 0 0 16px;
    color: #079bd3;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portfolio-hero h1 {
    margin: 0;
    color: #2f3033;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 1.1;
}

.portfolio-hero__intro {
    max-width: 680px;
    margin: 20px auto 0;
    color: #657180;
    font-size: 16px;
    line-height: 1.7;
}

.portfolio-galleries {
    padding: 18px 0 90px;
}

.portfolio-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 480px));
    justify-content:center;
    gap:26px;
}
}

.portfolio-card {
    min-width: 0;
}

.portfolio-card__button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(13, 66, 96, 0.12);
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.portfolio-card__button:hover,
.portfolio-card__button:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(13, 66, 96, 0.18);
}

.portfolio-card__button:focus-visible {
    outline: 3px solid rgba(7, 155, 211, 0.35);
    outline-offset: 4px;
}

.portfolio-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eef3f6;
}

.portfolio-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.portfolio-card__button:hover .portfolio-card__media img,
.portfolio-card__button:focus-visible .portfolio-card__media img {
    transform: scale(1.055);
}

.portfolio-card__overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(13, 66, 96, 0);
    color: #ffffff;
    font-size: 28px;
    opacity: 0;
    transition:
        background 0.25s ease,
        opacity 0.25s ease;
}

.portfolio-card__button:hover .portfolio-card__overlay,
.portfolio-card__button:focus-visible .portfolio-card__overlay {
    background: rgba(13, 66, 96, 0.38);
    opacity: 1;
}

.portfolio-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 84px;
    padding: 14px 18px;
}

.portfolio-card__title {
    color: #1b2430;
    font-size: 17px;
    line-height: 1.35;
}

.portfolio-card__count {
    flex: 0 0 auto;
    color: #079bd3;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.portfolio-empty {
    padding: 50px 20px;
    border: 1px solid #e3eaee;
    border-radius: 18px;
    background: #f8fafb;
    color: #657180;
    text-align: center;
}

body.portfolio-lightbox-open {
    overflow: hidden;
}

.portfolio-lightbox[hidden] {
    display: none;
}

.portfolio-lightbox {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.portfolio-lightbox.is-open {
    opacity: 1;
}

.portfolio-lightbox__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(4, 12, 18, 0.9);
    cursor: zoom-out;
}

.portfolio-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    padding: 20px 76px 26px;
    border-radius: 20px;
    background: #0d1820;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.portfolio-lightbox__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    margin-bottom: 12px;
}

.portfolio-lightbox__header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.3;
}

.portfolio-lightbox__close,
.portfolio-lightbox__nav {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.portfolio-lightbox__close:hover,
.portfolio-lightbox__nav:hover {
    background: #079bd3;
    transform: scale(1.06);
}

.portfolio-lightbox__close {
    width: 42px;
    height: 42px;
    font-size: 20px;
}

.portfolio-lightbox__nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    font-size: 20px;
    transform: translateY(-50%);
}

.portfolio-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.06);
}

.portfolio-lightbox__prev {
    left: 16px;
}

.portfolio-lightbox__next {
    right: 16px;
}

.portfolio-lightbox__figure {
    display: grid;
    place-items: center;
    margin: 0;
}

.portfolio-lightbox__figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 180px);
    border-radius: 12px;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.15s ease;
}

.portfolio-lightbox__figure img.is-loading {
    opacity: 0.35;
}

.portfolio-lightbox__figure figcaption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .portfolio-hero {
        padding: 48px 0 24px;
    }

    .portfolio-galleries {
        padding-bottom: 60px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .portfolio-card__body {
        min-height: 76px;
        padding: 17px 18px;
    }

    .portfolio-card__title {
        font-size: 17px;
    }

    .portfolio-lightbox {
        padding: 10px;
    }

    .portfolio-lightbox__dialog {
        max-height: calc(100vh - 20px);
        padding: 14px 14px 70px;
        border-radius: 14px;
    }

    .portfolio-lightbox__header {
        margin-bottom: 8px;
    }

    .portfolio-lightbox__header h2 {
        font-size: 17px;
    }

    .portfolio-lightbox__figure img {
        max-height: calc(100vh - 165px);
    }

    .portfolio-lightbox__nav {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .portfolio-lightbox__nav:hover {
        transform: scale(1.06);
    }

    .portfolio-lightbox__prev {
        left: calc(50% - 62px);
    }

    .portfolio-lightbox__next {
        right: calc(50% - 62px);
    }
}
