/* Секция отзывов */
.reviews-section {
    padding: 20px 0 0 0;
    background: linear-gradient(180deg, 
        rgba(26, 13, 40, 0.3) 0%, 
        rgba(10, 13, 26, 0.5) 50%,
        rgba(26, 13, 40, 0.3) 100%);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.reviews-section > .container {
    padding: 20px max(20px, var(--safe-area-inset-left)) 0 max(20px, var(--safe-area-inset-right));
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .reviews-section > .container {
        padding: 20px max(16px, var(--safe-area-inset-left)) 0 max(16px, var(--safe-area-inset-right));
    }
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(600px, 100vw);
    height: 600px;
    max-width: 100vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    transform: translate(-50%, 0);
    pointer-events: none;
    overflow: hidden;
}

/* Заголовок секции */
.reviews-header {
    text-align: center;
    margin-bottom: 60px;
}

.reviews-header .section-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-top: 16px;
    line-height: 1.6;
}

/* Статистика */
.reviews-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 60px;
}

@media (min-width: 769px) {
    .reviews-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-item {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.15) 0%, 
        rgba(236, 72, 153, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.stat-item:hover::before {
    opacity: 1;
}

/* Иконки статистики */
.stat-icon {
    font-size: var(--emoji-size-md);
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
    min-width: var(--emoji-size-md);
    min-height: var(--emoji-size-md);
    width: var(--emoji-size-md);
    height: var(--emoji-size-md);
}

.stat-number {
    font-family: var(--font-family-heading);
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.stat-number::after {
    content: '%';
    margin-left: 2px;
}

.stat-item[data-stat="2"] .stat-number::after,
.stat-item[data-stat="3"] .stat-number::after {
    content: '';
}

.stat-label {
    font-family: var(--font-family-base);
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Сетка отзывов */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 0;
}

@media (min-width: 769px) {
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Карточка отзыва */
.review-card {
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.6) 0%, 
        rgba(22, 16, 48, 0.6) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(236, 72, 153, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.review-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.review-card:hover::before {
    opacity: 1;
}

/* Заголовок карточки */
.review-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.review-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.review-avatar svg {
    width: 60px;
    height: 60px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.4));
}

.review-author {
    flex: 1;
    min-width: 0;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.author-name {
    font-family: var(--font-family-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    white-space: nowrap;
}

.author-info {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Рейтинг */
.review-rating {
    margin-bottom: 20px;
    font-size: var(--emoji-size-sm);
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
    line-height: 1;
    min-height: var(--emoji-size-sm);
}

.review-rating .star {
    font-size: inherit;
    display: inline-block;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.6));
    min-width: var(--emoji-size-sm);
    min-height: var(--emoji-size-sm);
    width: var(--emoji-size-sm);
    height: var(--emoji-size-sm);
    vertical-align: middle;
}

/* Текст отзыва */
.review-text {
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.7;
    color: rgba(232, 238, 243, 0.85);
    overflow-wrap: break-word;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Бейдж проверенного отзыва */
.review-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(4, 120, 87, 0.064);
    border: 1px solid rgba(4, 120, 87, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(4, 120, 87, 0.95);
    font-weight: 600;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.review-verified:hover {
    background: rgba(4, 120, 87, 0.096);
    border-color: rgba(4, 120, 87, 0.32);
    color: rgba(4, 120, 87, 1);
    transform: translateX(2px);
}

/* Кнопки действий */
.reviews-cta {
    text-align: center;
    margin: 10px 0 0 0;
    padding: 40px max(20px, var(--safe-area-inset-left)) 0 max(20px, var(--safe-area-inset-right));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    box-sizing: border-box;
}

/* Контейнер для кнопок отзывов */
.reviews-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

@media (min-width: 1025px) {
    .reviews-cta {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
        align-items: center;
        padding-top: 40px;
        padding-bottom: 0;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .reviews-cta {
        padding-top: 40px;
        padding-bottom: 0;
        padding-left: max(24px, var(--safe-area-inset-left));
        padding-right: max(24px, var(--safe-area-inset-right));
    }
}

@media (max-width: 480px) {
    .reviews-cta {
        padding-top: 40px;
        padding-bottom: 0;
        padding-left: max(16px, var(--safe-area-inset-left));
        padding-right: max(16px, var(--safe-area-inset-right));
    }
}

/* Кнопка обновления отзывов */
.btn-refresh-reviews {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(99, 102, 241, 0.08) 100%);
    border: 1.5px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-family-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-refresh-reviews:hover {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(99, 102, 241, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.btn-refresh-reviews:hover svg {
    animation: rotate360 0.6s ease-in-out;
}

.btn-refresh-reviews:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-refresh-reviews svg {
    transition: transform 0.3s ease;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Кнопка добавления отзыва */
.btn-add-review {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.03) 0%, 
        rgba(168, 85, 247, 0.05) 50%,
        rgba(192, 132, 252, 0.03) 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-family-heading);
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.01) inset,
        inset 0 1px 2px rgba(255, 255, 255, 0.03);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.3px;
    opacity: 0.75;
}

.btn-add-review::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.btn-add-review:hover {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.08) 0%, 
        rgba(168, 85, 247, 0.12) 50%,
        rgba(192, 132, 252, 0.08) 100%);
    border-color: rgba(139, 92, 246, 0.25);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        inset 0 2px 4px rgba(255, 255, 255, 0.08);
    opacity: 0.9;
}

.btn-add-review:hover::before {
    left: 100%;
}

.btn-add-review:active {
    transform: translateY(0) scale(1);
}

.btn-add-review svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.btn-add-review:hover svg {
    transform: rotate(90deg) scale(1.1);
}

.btn-add-review span {
    position: relative;
    z-index: 2;
}

/* Анимации */
@keyframes reviewShimmer {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes getMatrixPulse {
    0%, 100% {
        box-shadow: 
            0 8px 30px rgba(4, 120, 87, 0.5),
            0 4px 15px rgba(5, 150, 105, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 30px rgba(4, 120, 87, 0.7),
            0 4px 15px rgba(5, 150, 105, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 30px rgba(4, 120, 87, 0.6);
    }
}

.btn-get-matrix {
    width: 100%;
    max-width: 100%;
    padding: 22px 32px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, 
        #047857 0%, 
        #059669 25%,
        #10b981 50%,
        #059669 75%,
        #047857 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: clamp(15px, 4vw, 18px);
    font-weight: 800;
    font-family: var(--font-family-heading);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: clamp(0.4px, 0.2vw, 0.8px);
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 
        0 8px 30px rgba(4, 120, 87, 0.5),
        0 4px 15px rgba(5, 150, 105, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 64px;
    box-sizing: border-box;
    contain: layout style paint;
    isolation: isolate;
    animation: getMatrixPulse 3s ease-in-out infinite;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
}

/* Оптимизация для мобильных */
@media (max-width: 768px) {
    .btn-get-matrix {
        padding: 18px 24px;
        min-height: 56px;
        white-space: normal;
        line-height: 1.2;
        will-change: auto;
    }
}

.btn-get-matrix::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: reviewShimmer 2.5s ease-in-out infinite;
    z-index: 1;
}

.btn-get-matrix:hover {
    transform: translateY(-3px) scale(1.02);
    background-position: 100% 50%;
    box-shadow: 
        0 12px 40px rgba(4, 120, 87, 0.6),
        0 6px 20px rgba(5, 150, 105, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        inset 0 2px 6px rgba(255, 255, 255, 0.3);
    animation: none;
}

.btn-get-matrix:hover::before {
    left: 100%;
    animation: none;
}

.btn-get-matrix:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 
        0 6px 25px rgba(4, 120, 87, 0.5),
        0 3px 15px rgba(5, 150, 105, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-get-matrix .btn-glow {
    display: none;
}

.btn-get-matrix .btn-text {
    position: relative;
    z-index: 2;
    white-space: nowrap;
    font-family: var(--font-family-heading);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    flex-shrink: 1;
    min-width: 0;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
}

@media (max-width: 768px) {
    .btn-get-matrix .btn-text {
        white-space: normal;
        word-break: keep-all;
        overflow: visible;
    }
}

/* Плавная анимация смены отзывов */
#reviewsGrid {
    transition: opacity 0.4s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stat-icon,
    .review-card,
    .btn-add-review,
    .btn-refresh-reviews {
        filter: none;
    }
    
    .reviews-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .btn-refresh-reviews,
    .btn-add-review {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .btn-get-matrix {
        padding: 18px 20px;
        font-size: 15px;
        min-height: 56px;
        letter-spacing: 0.3px;
        gap: 8px;
    }
    
    .btn-get-matrix .btn-text {
        font-size: 15px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 480px) {
    .btn-refresh-reviews,
    .btn-add-review {
        max-width: 100%;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .btn-refresh-reviews svg {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        max-width: 16px;
        max-height: 16px;
    }
    
    .btn-add-review svg {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
    
    .btn-get-matrix {
        padding: 16px 12px;
        font-size: 14px;
        min-height: auto;
        letter-spacing: 0.2px;
        gap: 6px;
        white-space: normal;
        line-height: 1.4;
    }
    
    .btn-get-matrix .btn-text {
        font-size: 14px;
        letter-spacing: 0.2px;
        white-space: normal;
        line-height: 1.4;
        text-align: center;
        word-break: break-word;
        hyphens: auto;
    }
}

@media (max-width: 360px) {
    .btn-get-matrix {
        padding: 14px 10px;
        font-size: 12px;
        letter-spacing: 0.05px;
        gap: 4px;
        white-space: normal;
        line-height: 1.4;
    }
    
    .btn-get-matrix .btn-text {
        font-size: 12px;
        letter-spacing: 0.05px;
        white-space: normal;
        line-height: 1.4;
        word-break: break-word;
        hyphens: auto;
    }
}
