.reviews {
    margin: 0 var(--section-gutter) var(--section-gap);
}

.reviews--page {
    margin-top: clamp(30px, 6vw, 60px);
}

.reviews__back {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-soft);
    margin-bottom: clamp(20px, 4vw, 32px);
    transition: color 0.2s ease;
}

.reviews__back:hover {
    color: var(--color-text);
}

.reviews__title {
    font-family: var(--font-title);
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text);
    margin: 0 0 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reviews__title.in {
    opacity: 1;
    transform: none;
}

.reviews__subtitle {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.5;
    color: var(--color-text-soft);
    text-align: center;
    max-width: 560px;
    margin: 0 auto clamp(28px, 4vw, 44px);
}

.reviews__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, 2vw, 24px);
}

.reviews__thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    padding: 0;
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.reviews__thumb.in {
    opacity: 1;
    transform: none;
}

.reviews__thumb:nth-child(1).in { transition-delay: 0s, 0s, 0s; }
.reviews__thumb:nth-child(2).in { transition-delay: 0.08s, 0.08s, 0s; }
.reviews__thumb:nth-child(3).in { transition-delay: 0.16s, 0.16s, 0s; }
.reviews__thumb:nth-child(4).in { transition-delay: 0.24s, 0.24s, 0s; }
.reviews__thumb:nth-child(5).in { transition-delay: 0.32s, 0.32s, 0s; }
.reviews__thumb:nth-child(6).in { transition-delay: 0.4s, 0.4s, 0s; }

.reviews__thumb:hover,
.reviews__thumb:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.reviews__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.reviews__thumb-pdf {
    display: none;
}

.reviews__thumb[data-type="pdf"] img {
    display: none;
}

.reviews__thumb[data-type="pdf"] .reviews__thumb-pdf {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 16px;
    text-align: center;
    background: var(--color-surface);
}

.reviews__thumb-pdf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 56px;
    border-radius: 6px;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-title);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.reviews__thumb-pdf-label {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-soft);
}

@media (max-width: 900px) {
    .reviews__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .reviews__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 28, 0.7);
    backdrop-filter: blur(2px);
    animation: lightbox-fade 0.25s ease;
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    max-width: min(560px, 92vw);
    max-height: calc(100vh - 40px);
    display: flex;
    animation: lightbox-pop 0.25s ease;
}

.lightbox__image {
    max-width: 100%;
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    background: var(--color-white);
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-text);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__close:hover {
    background: var(--color-surface);
    transform: scale(1.05);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__nav:hover {
    background: var(--color-white);
    transform: translateY(-50%) scale(1.08);
}

.lightbox__nav--prev {
    left: -18px;
}

.lightbox__nav--next {
    right: -18px;
}

@media (max-width: 640px) {
    .lightbox__close {
        top: -14px;
        right: 0;
    }

    .lightbox__nav--prev {
        left: -8px;
    }

    .lightbox__nav--next {
        right: -8px;
    }
}

@keyframes lightbox-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lightbox-pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox__overlay,
    .lightbox__dialog {
        animation: none;
    }
}
