/* css/reviews.css - Additional review styles */

/* Review cards with images */
.review-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.review-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.review-image img {
    transition: transform 0.3s ease;
}

.review-card:hover .review-image img {
    transform: scale(1.05);
}

/* Source badge */
.review-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.3s ease;
}

.review-source:hover {
    background: #e9ecef;
}

.review-source i {
    font-size: 0.9rem;
}

.review-source a {
    color: inherit;
    text-decoration: none;
}

/* Rating stars */
.rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
}

.rating-stars i {
    font-size: 1rem;
}

.rating-stars i.filled {
    color: #ffc107;
}

.rating-stars i.empty {
    color: #e0e0e0;
}

/* Admin review items */
.admin-review-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Review filter buttons */
.review-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.review-filter-btn.active,
.review-filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Pending review badge */
.pending-badge {
    background: #fff3cd;
    color: #856404;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #28a745;
    font-size: 0.85rem;
}

/* Review modal */
#reviewsModal .reviews-slider {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .admin-review-item {
        padding: 15px;
    }
    
    .admin-review-item > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .admin-review-item h4 {
        font-size: 1rem;
    }
    
    .review-image img {
        height: 150px;
    }
}

/* Animation for new reviews */
@keyframes slideInReview {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.review-card {
    animation: slideInReview 0.3s ease forwards;
}

/* Stats cards */
.review-stats-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.review-stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.review-stats-label {
    color: #666;
    font-size: 0.9rem;
}

/* Image upload preview */
.review-image-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-image-upload:hover {
    border-color: var(--primary-color);
    background: rgba(212, 167, 98, 0.05);
}

.review-image-upload i {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 10px;
}

.review-image-preview {
    position: relative;
    display: inline-block;
}

.review-image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
}

.review-image-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ==================== ENHANCED REVIEWS WITH PHOTOS ==================== */
.reviews {
    padding: 80px 0;
    background: var(--light-color);
    position: relative;
    overflow: hidden;
}

.reviews-slider {
    display: flex;
    gap: 25px;
    margin-top: 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0 40px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.reviews-slider::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 calc(33.333% - 25px);
    max-width: calc(33.333% - 25px);
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(212, 167, 98, 0.2);
    position: relative;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 167, 98, 0.15);
    border-color: var(--primary-color);
}

/* Photo Frame - all photos same size */
.review-photo-frame {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f3e9, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--primary-color);
}

.review-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.review-card:hover .review-photo {
    transform: scale(1.05);
}

/* Source badge overlay on photo */
.review-source-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.review-source-badge i {
    font-size: 1rem;
}

.review-source-badge span {
    font-weight: 500;
}

/* Different colors for different sources */
.review-card[data-source="instagram"] .review-source-badge {
    background: linear-gradient(45deg, #f09433, #d62976, #962fbf, #4f5bd5);
}

.review-card[data-source="facebook"] .review-source-badge {
    background: #1877f2;
}

.review-card[data-source="telegram"] .review-source-badge {
    background: #0088cc;
}

.review-card[data-source="google"] .review-source-badge {
    background: #ea4335;
}

.review-card[data-source="2gis"] .review-source-badge {
    background: #ff6b6b;
}

.review-card[data-source="yandex"] .review-source-badge {
    background: #ff3333;
}

/* Review content */
.review-content {
    padding: 25px 25px 15px;
    flex: 1;
}

.review-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.review-rating i {
    color: #ffc107;
    font-size: 1rem;
}

.review-content p {
    font-style: italic;
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    position: relative;
    padding-left: 20px;
}

.review-content p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

/* Author section */
.review-author {
    display: flex;
    align-items: center;
    padding: 20px 25px 25px;
    border-top: 1px solid rgba(212, 167, 98, 0.2);
    background: rgba(248, 243, 233, 0.3);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(212, 167, 98, 0.3);
}

.author-info h4 {
    margin: 0 0 5px 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.author-info p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Navigation dots */
.reviews-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(212, 167, 98, 0.5);
}

/* Scroll hint */
.reviews-hint {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .review-card {
        flex: 0 0 calc(50% - 25px);
        max-width: calc(50% - 25px);
    }
    
    .review-photo-frame {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .review-card {
        flex: 0 0 calc(85vw - 30px);
        max-width: calc(85vw - 30px);
    }
    
    .review-photo-frame {
        height: 200px;
    }
    
    .review-content {
        padding: 20px 20px 10px;
    }
    
    .review-author {
        padding: 15px 20px 20px;
    }
    
    .reviews-hint {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .review-card {
        flex: 0 0 calc(90vw - 30px);
        max-width: calc(90vw - 30px);
    }
    
    .review-photo-frame {
        height: 180px;
    }
    
    .review-source-badge {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .review-content p {
        font-size: 0.95rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Animation for new reviews */
@keyframes slideInReview {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.review-card {
    animation: slideInReview 0.5s ease forwards;
    opacity: 0;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }
.review-card:nth-child(4) { animation-delay: 0.4s; }
.review-card:nth-child(5) { animation-delay: 0.5s; }
.review-card:nth-child(6) { animation-delay: 0.6s; }

/* Optional: Add gradient fade on edges for mobile */
.reviews-slider::before,
.reviews-slider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    pointer-events: none;
    z-index: 2;
}

.reviews-slider::before {
    left: 0;
    background: linear-gradient(to right, var(--light-color), transparent);
}

.reviews-slider::after {
    right: 0;
    background: linear-gradient(to left, var(--light-color), transparent);
}

/* ==================== ENHANCED REVIEWS WITH FIXED PHOTO SIZING ==================== */
.reviews {
    padding: 80px 0;
    background: var(--light-color);
    position: relative;
    overflow: hidden;
}

.reviews-slider {
    display: flex;
    gap: 25px;
    margin-top: 40px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 0 40px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.reviews-slider::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 calc(33.333% - 25px);
    max-width: calc(33.333% - 25px);
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(212, 167, 98, 0.2);
    position: relative;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 167, 98, 0.15);
    border-color: var(--primary-color);
}

.review-photo-frame {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f3e9, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--primary-color);
}

.review-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #242424; 
    z-index: 2;
    transition: transform 0.5s ease;
}

.review-photo-frame::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: var(--photo-url);
    background-size: cover;
    background-position: center;
    filter: blur(15px) brightness(0.95);  /* Убрал затемнение */
    opacity: 0.5;
    z-index: 1;
}

.review-card:hover .review-photo {
    transform: scale(1.02);
}

/* Source badge overlay on photo */
.review-source-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.review-source-badge i {
    font-size: 1rem;
}

.review-source-badge span {
    font-weight: 500;
}

/* Different colors for different sources */
.review-card[data-source="instagram"] .review-source-badge {
    background: linear-gradient(45deg, #f09433, #d62976, #962fbf, #4f5bd5);
}

.review-card[data-source="facebook"] .review-source-badge {
    background: #1877f2;
}

.review-card[data-source="telegram"] .review-source-badge {
    background: #0088cc;
}

.review-card[data-source="google"] .review-source-badge {
    background: #ea4335;
}

.review-card[data-source="2gis"] .review-source-badge {
    background: #ff6b6b;
}

.review-card[data-source="yandex"] .review-source-badge {
    background: #ff3333;
}

/* Review content */
.review-content {
    padding: 25px 25px 15px;
    flex: 1;
}

.review-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.review-rating i {
    color: #ffc107;
    font-size: 1rem;
}

.review-content p {
    font-style: italic;
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    position: relative;
    padding-left: 20px;
}

.review-content p::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

/* Author section */
.review-author {
    display: flex;
    align-items: center;
    padding: 20px 25px 25px;
    border-top: 1px solid rgba(212, 167, 98, 0.2);
    background: rgba(248, 243, 233, 0.3);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    margin-right: 15px;
    box-shadow: 0 4px 10px rgba(212, 167, 98, 0.3);
}

.author-info h4 {
    margin: 0 0 5px 0;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.author-info p {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Navigation dots */
.reviews-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(212, 167, 98, 0.5);
}

/* Scroll hint */
.reviews-hint {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .review-card {
        flex: 0 0 calc(50% - 25px);
        max-width: calc(50% - 25px);
    }
    
    .review-photo-frame {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .review-card {
        flex: 0 0 calc(85vw - 30px);
        max-width: calc(85vw - 30px);
    }
    
    .review-photo-frame {
        height: 200px;
    }
    
    .review-content {
        padding: 20px 20px 10px;
    }
    
    .review-author {
        padding: 15px 20px 20px;
    }
    
    .reviews-hint {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .review-card {
        flex: 0 0 calc(90vw - 30px);
        max-width: calc(90vw - 30px);
    }
    
    .review-photo-frame {
        height: 180px;
    }
    
    .review-source-badge {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .review-content p {
        font-size: 0.95rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* Animation for new reviews */
@keyframes slideInReview {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.review-card {
    animation: slideInReview 0.5s ease forwards;
    opacity: 0;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }
.review-card:nth-child(4) { animation-delay: 0.4s; }
.review-card:nth-child(5) { animation-delay: 0.5s; }
.review-card:nth-child(6) { animation-delay: 0.6s; }

/* Стили для белых отзывов */
.review-card[data-source$="-white"] .review-photo-frame {
    background: white;
}

.review-card[data-source$="-white"] .review-photo {
    background: white;
}

.review-card[data-source$="-white"] .review-photo-frame::before {
    filter: blur(15px) brightness(1);
    opacity: 0.3;
}

.review-card[data-source$="-white"] .review-source-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 1px solid rgba(212, 167, 98, 0.3);
}

.review-card[data-source$="-white"] .review-source-badge i {
    color: #d4a762;
}

.review-card[data-source$="-white"] .review-content p {
    color: #333;
}

.review-card[data-source$="-white"] .review-content p::before {
    color: #d4a762;
    opacity: 0.5;
}

.review-card[data-source$="-white"] .author-avatar {
    background: linear-gradient(135deg, #d4a762, #b88a4a);
}

.review-card[data-source$="-white"] .author-info h4 {
    color: #2c1810;
}

.review-card[data-source$="-white"] {
    background: white;
    border: 1px solid rgba(212, 167, 98, 0.2);
}