/* ========================================
   RATINGS PAGE STYLES
   Modern, clean design for testimonials and reviews
   ======================================== */

/* Custom CSS Variables for Ratings Page */
:root {
    --card-radius: 16px;
    --btn-radius: 50px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ========================================
   RATINGS PAGE LAYOUT
   ======================================== */

.ratings-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ========================================
   HERO SECTION
   ======================================== */

.page-hero {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: -60px;
    padding-bottom: 60px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   STATS CARD & OVERVIEW
   ======================================== */

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.stats-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 60px;
}

.rating-overview {
    display: flex;
    align-items: center;
    gap: 20px;
}

.big-score {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.rating-details .stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.rating-details .count {
    color: var(--text-secondary);
    font-weight: 500;
}

.write-review-btn {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 30, 63, 0.3);
}

.write-review-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 30, 63, 0.4);
    color: white;
}

/* ========================================
   REVIEWS GRID & CARDS
   ======================================== */

/* Reviews Section */
.reviews-section {
    padding: 40px 20px 60px;
    background: linear-gradient(to bottom, var(--background), #f8f9fa);
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Filter Section */
.filter-section {
    padding: 30px 20px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-btn i {
    font-size: 0.85rem;
}

.review-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-stars {
    color: #fbbf24;
    font-size: 0.95rem;
    margin-left: auto;
}

.user-info {
    flex: 1;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1.2rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h3 {
    font-size: 1.05rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}



.review-body {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary);
    font-weight: 500;
    margin-left: 5px;
}

.review-images {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.review-img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
}

.review-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.more-images {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-reviews i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.no-reviews p {
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px;
}

.page-link {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   REVIEW FORM SECTION
   ======================================== */

.review-form-section {
    background: white;
    padding: 80px 0;
    border-top: 1px solid #eee;
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.form-box {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 24px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.form-input, 
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 30, 63, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   STAR RATING INPUT
   ======================================== */

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 5px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #fbbf24;
}

/* ========================================
   FILE UPLOAD
   ======================================== */

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(139, 30, 63, 0.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
    opacity: 0.7;
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   IMAGE PREVIEW
   ======================================== */

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.remove-preview:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* ========================================
   FORM SUBMIT BUTTON
   ======================================== */

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .hero-content h1 { 
        font-size: 2.5rem; 
    }
    
    .stats-card { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .big-score { 
        font-size: 3rem; 
    }
    
    .reviews-grid { 
        grid-template-columns: 1fr; 
    }
    
    .form-box {
        padding: 30px 20px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .stats-card {
        padding: 30px 20px;
    }
    
    .big-score {
        font-size: 2.5rem;
    }
    
    .review-card {
        padding: 20px;
    }
}
