.gallery-page {
    padding: calc(80px + 2.5rem) 1.25rem 4rem;
    background: linear-gradient(180deg, var(--color-secondary) 0%, #fff 28%);
}

.gallery-page-inner {
    max-width: 720px;
    margin: 0 auto;
}

.gallery-hero {
    text-align: center;
    margin-bottom: 2.25rem;
}

.gallery-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    text-transform: none;
}

.gallery-hero p {
    max-width: 40rem;
    margin: 0 auto;
    color: #5c5c6a;
    line-height: 1.6;
}

.gallery-empty {
    text-align: center;
    background: #fff;
    border: 2px dashed #d8d8f8;
    border-radius: 14px;
    padding: 2.5rem 1.5rem;
    color: #666;
}

.gallery-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gallery-post {
    background: #fff;
    border: 1px solid rgba(115, 115, 252, 0.16);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(54, 54, 54, 0.07);
}

.gallery-carousel-viewport {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #1b1b22;
}

.gallery-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.gallery-carousel-slide {
    flex: 0 0 100%;
    margin: 0;
    height: 100%;
}

.gallery-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-dark);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.gallery-carousel-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.gallery-carousel-nav:disabled {
    opacity: 0.28;
    cursor: default;
    transform: translateY(-50%);
}

.gallery-carousel-nav--prev {
    left: 0.7rem;
}

.gallery-carousel-nav--next {
    right: 0.7rem;
}

.gallery-carousel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem 0;
}

.gallery-carousel-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gallery-carousel-dot {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d7d7ea;
    cursor: pointer;
}

.gallery-carousel-dot.is-active {
    background: var(--color-primary);
    transform: scale(1.15);
}

.gallery-carousel-count {
    margin: 0;
    color: #7a7a8c;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.gallery-post-body {
    padding: 0.85rem 1.1rem 1.2rem;
}

.gallery-post-title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--color-dark);
    text-transform: none;
}

.gallery-post-description {
    margin: 0.45rem 0 0;
    color: #5c5c6a;
    font-size: 0.94rem;
    line-height: 1.55;
}

@media (min-width: 900px) {
    .gallery-page-inner {
        max-width: 1120px;
    }

    .gallery-feed {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem;
    }
}

@media (max-width: 640px) {
    .gallery-page {
        padding-top: calc(80px + 1.5rem);
    }

    .gallery-carousel-nav {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 1.25rem;
    }
}
