.gallery-page {
    background: var(--color-canvas);
}

.gallery-page-hero {
    padding-block: 68px 32px;
    background:
        radial-gradient(circle at top left, rgba(196,30,42,0.1), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.72), transparent);
}

.gallery-page-hero-inner {
    max-width: 860px;
}

.gallery-page-label {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(196,30,42,0.08);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
}

.gallery-page-title {
    font-size: clamp(2.1rem, 4.5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--color-dark);
    margin-bottom: 16px;
}

.gallery-page-subtitle {
    max-width: 760px;
    color: var(--color-gray);
    font-size: 1.05rem;
    line-height: 1.75;
}

.gallery-page-showcase {
    padding-top: 40px;
}

.gallery-page-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 36px;
}

.gallery-page-intro-copy {
    max-width: 760px;
}

.gallery-page-intro-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(100,114,130,0.16);
    color: var(--color-dark-2);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.gallery-page-intro .section-title,
.gallery-page-intro .section-subtitle {
    text-align: left;
    margin-inline: 0;
    max-width: none;
}

.gallery-page-intro .section-title {
    margin-bottom: 14px;
}

.gallery-page-intro .section-subtitle {
    margin-bottom: 0;
}

.gallery-page-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    max-width: 340px;
}

.gallery-page-tag-cloud span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(100,114,130,0.14);
    color: var(--color-dark);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(37,48,58,0.06);
 }

.portfolio-page-item {
    cursor: zoom-in;
    text-align: left;
    padding: 0;
}

.portfolio-mobile-scroll {
    display: none;
}

.portfolio-mobile-card {
    flex-shrink: 0;
    width: min(82vw, 320px);
    max-width: 320px;
    aspect-ratio: 5 / 6;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    background: var(--color-dark);
    border: 1px solid rgba(100,114,130,0.18);
    box-shadow: var(--shadow-md);
}

.portfolio-mobile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9);
}

.portfolio-mobile-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 74px 18px 18px;
    background: linear-gradient(180deg, rgba(37,48,58,0) 0%, rgba(37,48,58,0.08) 8%, rgba(37,48,58,0.82) 60%, rgba(37,48,58,0.96) 100%);
}

.portfolio-mobile-tag,
.ig-label,
.plb-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.portfolio-title {
    color: #fff;
    font-size: 1.15rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.portfolio-mobile-copy {
    color: rgba(255,255,255,0.8);
    font-size: 0.92rem;
    line-height: 1.55;
}

.portfolio-scroll-hint {
    display: none;
    text-align: center;
    font-size: 0.72rem;
    color: var(--color-gray-2);
    margin-top: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.inox-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 240px;
    gap: 16px;
    grid-auto-flow: dense;
}

.inox-gallery-item {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border-radius: 28px;
    background: linear-gradient(180deg, #dce3ea 0%, #c8d2db 100%);
    border: 1px solid rgba(100,114,130,0.14);
    box-shadow: var(--shadow-sm);
}

.inox-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.98) brightness(0.92);
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.inox-gallery-item:hover img {
    transform: scale(1.05);
    filter: saturate(1.04) brightness(1);
}

.inox-gallery-item.ig-tall {
    grid-row: span 2;
}

.inox-gallery-item.ig-wide {
    grid-column: span 2;
}

.ig-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 72px 22px 22px;
    background: linear-gradient(180deg, rgba(37,48,58,0) 0%, rgba(37,48,58,0.14) 18%, rgba(37,48,58,0.86) 72%, rgba(37,48,58,0.96) 100%);
}

.ig-title {
    color: #fff;
    font-size: 1.18rem;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.gallery-page-pagination {
    margin-top: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.gallery-page-page-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    flex: 1 1 auto;
}

.gallery-page-page,
.gallery-page-page-dots {
    min-height: 46px;
    min-width: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-weight: 800;
    font-size: 0.96rem;
}

.gallery-page-page {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(100,114,130,0.14);
    color: var(--color-dark);
    box-shadow: 0 10px 28px rgba(37,48,58,0.06);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.gallery-page-page:hover {
    transform: translateY(-1px);
}

.gallery-page-page.is-active {
    background: var(--color-primary);
    border-color: rgba(196,30,42,0.32);
    color: #fff;
    box-shadow: 0 16px 34px rgba(196,30,42,0.18);
}

.gallery-page-page-nav {
    min-width: auto;
    padding-inline: 18px;
}

.gallery-page-page-dots {
    color: var(--color-gray-2);
}

.gallery-page-pagination-note {
    margin-top: 14px;
    text-align: center;
    color: var(--color-gray-2);
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.gallery-page-cta {
    margin-top: 52px;
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(231,237,243,0.96));
    border: 1px solid rgba(100,114,130,0.14);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.gallery-page-cta {
    scroll-margin-top: 120px;
}

.gallery-page-cta h2 {
    color: var(--color-dark);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 8px;
}

.gallery-page-cta p {
    color: var(--color-gray);
    line-height: 1.7;
    max-width: 660px;
}

.gallery-page-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
}

.portfolio-lightbox.active {
    display: block;
}

.plb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(24, 32, 40, 0.84);
    backdrop-filter: blur(14px);
}

.plb-inner {
    position: relative;
    width: min(1120px, calc(100vw - 40px));
    margin: clamp(24px, 5vh, 48px) auto;
    padding: clamp(18px, 3vw, 24px);
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(248,250,252,0.98) 0%, rgba(231,237,243,0.96) 100%);
    border: 1px solid rgba(255,255,255,0.58);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.plb-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.plb-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.plb-category {
    background: rgba(196,30,42,0.1);
    border-color: rgba(196,30,42,0.14);
    color: var(--color-primary);
}

.plb-title {
    color: var(--color-dark);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.plb-description {
    color: var(--color-gray);
    line-height: 1.65;
    max-width: 760px;
}

.plb-category:empty,
.plb-title:empty {
    display: none;
}

.plb-close {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255,255,255,0.84);
    border: 1px solid rgba(100,114,130,0.14);
    color: var(--color-dark);
    font-size: 1.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(37,48,58,0.08);
}

.plb-stage {
    position: relative;
    min-height: min(68vh, 760px);
    padding: 24px;
    border-radius: 28px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(100,114,130,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.plb-img {
    max-width: 100%;
    max-height: min(68vh, 700px);
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.16s ease;
}

.plb-prev,
.plb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(37,48,58,0.82);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 16px 36px rgba(16,22,29,0.26);
}

.plb-prev {
    left: 18px;
}

.plb-next {
    right: 18px;
}

.plb-counter-wrap {
    display: flex;
    justify-content: flex-end;
}

.plb-counter {
    color: var(--color-dark-2);
    font-weight: 800;
    font-size: 0.92rem;
}

@media (max-width: 1080px) {
    .gallery-page-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-page-tag-cloud {
        justify-content: flex-start;
        max-width: none;
    }

    .inox-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-page-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-page-pagination {
        justify-content: center;
    }
}

@media (max-width: 820px) {
    .inox-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 220px;
    }

    .inox-gallery-item.ig-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .portfolio-mobile-scroll {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 24px;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-inline: -24px;
        padding-inline: 24px;
        padding-bottom: 8px;
    }

    .portfolio-mobile-scroll::-webkit-scrollbar {
        display: none;
    }

    .portfolio-scroll-hint {
        display: block;
    }

    .inox-gallery-grid {
        display: none;
    }

    .plb-inner {
        width: min(100vw - 20px, 720px);
        margin: 10px auto;
        min-height: calc(100vh - 20px);
        padding: 14px;
        border-radius: 26px;
        gap: 14px;
    }

    .plb-topbar {
        flex-direction: column;
    }

    .plb-close {
        align-self: flex-end;
    }

    .plb-stage {
        min-height: auto;
        padding: 0;
        border: 0;
        background: transparent;
        border-radius: 24px;
    }

    .plb-img {
        width: 100%;
        max-width: none;
        max-height: min(62vh, 560px);
        border-radius: 24px;
    }

    .plb-prev,
    .plb-next {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .plb-prev {
        left: 10px;
    }

    .plb-next {
        right: 10px;
    }
}

@media (max-width: 620px) {
    .gallery-page-hero {
        padding-block: 48px 20px;
    }

    .gallery-page-showcase {
        padding-top: 28px;
    }

    .gallery-page-intro {
        margin-bottom: 28px;
    }

    .gallery-page-cta {
        margin-top: 40px;
        padding: 24px 20px;
    }

    .gallery-page-cta-buttons {
        display: none;
    }

    .gallery-page-page,
    .gallery-page-page-dots {
        min-height: 42px;
        min-width: 42px;
        border-radius: 14px;
        font-size: 0.9rem;
    }

    .portfolio-mobile-card {
        width: min(84vw, 300px);
    }

    .gallery-page-tag-cloud span {
        font-size: 0.84rem;
        min-height: 40px;
        padding: 9px 14px;
    }

    .plb-description {
        font-size: 0.94rem;
    }

    .plb-counter-wrap {
        justify-content: center;
    }

    .plb-prev,
    .plb-next {
        width: 42px;
        height: 42px;
    }
}
