/* =============================================
   REVIEWS PAGE STYLES
   ============================================= */

.reviews-section {
    position: relative;
    padding: 120px 0 100px 0;
    min-height: 800px;
    background-color: var(--white-bg, #ffffff);
    overflow: hidden;
}

/* Background elements */
.rev-bg-blossom {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 450px;
    z-index: 1;
    pointer-events: none;
}

.rev-bg-house {
    position: absolute;
    bottom: 50px;
    left: -50px;
    width: 350px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

.reviews-container {
    position: relative;
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    z-index: 5;
}

/* =============================================
   TOP SECTION: SUMMARY & FORM
   ============================================= */
.reviews-top-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

/* Card Common Styles */
.rev-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #f0f0f0;
}

.rev-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #000;
}

.rev-card-title svg {
    color: #ffb400;
    width: 24px;
    height: 24px;
}

.rev-card-title .icon-red {
    color: var(--primary-color, #e60000);
}

/* Summary Card */
.overall-score-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.overall-score {
    font-size: 4rem;
    font-weight: 800;
    font-family: var(--font-heading, 'Playfair Display', serif);
    line-height: 1;
    color: #000;
}

.overall-stars-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stars-display {
    color: #ffb400;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.reviews-count {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.star-label {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 30px;
}

.star-label span {
    color: #ffb400;
}

.bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: #ffb400;
    border-radius: 4px;
    width: 0%; /* for animation */
    transition: width 1s ease-in-out;
}

.bar-percent {
    width: 35px;
    text-align: right;
    color: #888;
    font-size: 0.8rem;
}

/* Submission Form Card */
.review-form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rating-selector {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 10px;
}

.rating-selector-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.star-rating-input {
    display: flex;
    justify-content: center;
    gap: 5px;
    direction: rtl; /* For hover logic */
}

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

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

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

.rev-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rev-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.rev-form-group input,
.rev-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.rev-form-group input:focus,
.rev-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #e60000);
}

.rev-form-group input.error,
.rev-form-group textarea.error {
    border-color: var(--primary-color, #e60000);
    background-color: #fff5f5;
}

.rev-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-submit-review {
    background-color: #ff5e00; /* Matching screenshot orange/red */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-submit-review:hover {
    background-color: #e65500;
}

.rev-form-message {
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.rev-form-message.success {
    display: block;
    background-color: #e6ffe6;
    color: #008000;
    border: 1px solid #b3ffb3;
}

.rev-form-message.error {
    display: block;
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffb3b3;
}

/* =============================================
   CUSTOMER REVIEWS LIST SECTION
   ============================================= */
.reviews-list-section {
    max-width: 900px;
    margin: 0 auto;
}

.reviews-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.reviews-list-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.reviews-sort-container {
    display: flex;
    align-items: center;
}

.reviews-sort-select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 20px;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}

.reviews-sort-select:focus {
    outline: none;
    border-color: #888;
}

.reviews-count-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.review-item-card {
    background-color: #bd0026; /* Dark red matching the screenshot */
    border-radius: 15px;
    padding: 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.review-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(189, 0, 38, 0.3);
}

.review-item-stars {
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.review-item-stars .star {
    color: transparent;
    -webkit-text-stroke: 1px #fff; /* Hollow stars effect */
}
.review-item-stars .star.filled {
    color: #fff;
    -webkit-text-stroke: 0;
}

.review-item-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

.review-item-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #d9d9d9;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.author-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Load More Button */
.load-more-container {
    text-align: center;
}

.btn-load-more {
    background-color: #d11232; /* Red matching screenshot */
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-family: inherit;
}

.btn-load-more:hover {
    background-color: #a80e28;
    transform: translateY(-2px);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .reviews-top-row {
        flex-direction: column;
        align-items: center;
    }
    
    .rev-card {
        max-width: 100%;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .overall-score {
        font-size: 3rem;
    }
    
    .rev-card {
        padding: 25px;
    }
    
    .rev-bg-blossom {
        width: 250px;
        right: -20px;
    }
    
    .rev-bg-house {
        width: 200px;
        left: -20px;
    }
}
