/* reviews.css - Styling for review submission form and slider */

/* Review Section Container */
.review-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8f0 100%);
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 12px;
    border: 2px solid #e8f5e9;
}

.review-section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.review-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #2e7d32;
    margin-bottom: 10px;
}

.review-section .section-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
}

/* Review Form */
.review-form-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.review-form h3 {
    font-size: 1.4rem;
    color: #2e7d32;
    margin-bottom: 18px;
    text-align: center;
}

/* Form Layout - Side by Side */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

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

.form-group-half {
    flex: 1;
    min-width: 0;
}

.form-group-third {
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group label .optional {
    color: #7f8c8d;
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 5px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFD700;
    border-width: 2px;
}

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

/* Adjust textarea height for 3-column layout */
.form-row .form-group-third textarea {
    min-height: 70px;
}

/* Align submit button properly in 3-column layout */
.form-group-third .submit-review-btn {
    margin-top: 0;
}

/* Star Rating - LEFT TO RIGHT with reverse flex */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.6rem;
    color: #ddd;
    transition: all 0.2s ease;
    position: relative;
}

.star-rating input[type="radio"] {
    display: none;
}

/* Highlight selected star and all following stars (which appear to the left due to row-reverse) */
.star-rating input[type="radio"]:checked ~ label,
.star-rating input[type="radio"]:checked + label {
    color: #FFD700;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #FFD700;
    transform: scale(1.1);
}

/* Submit Button */
.submit-review-btn {
    width: 100%;
    padding: 11px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0;
}

.submit-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    background: linear-gradient(135deg, #388e3c 0%, #4caf50 100%);
}

.submit-review-btn:active {
    transform: translateY(0);
}

.submit-review-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
#reviewSuccessMessage {
    display: none;
    margin-bottom: 20px;
}

.success-message {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
}

.success-icon {
    display: inline-block;
    width: 45px;
    height: 45px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 45px;
    margin-bottom: 8px;
}

.success-message p {
    margin: 6px 0;
    color: #155724;
}

.success-message strong {
    font-size: 1.1rem;
}

/* Published Reviews Slider */
.published-reviews-container {
    margin-top: 30px;
}

.published-reviews-container h3 {
    font-size: 1.5rem;
    color: #2e7d32;
    text-align: center;
    margin-bottom: 20px;
}

.reviews-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.reviews-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.review-card {
    min-width: 100%;
    padding: 28px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.review-card.active {
    opacity: 1;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

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

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
}

.author-info h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.review-date {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.review-rating {
    font-size: 1.4rem;
    color: #FFD700;
    white-space: nowrap;
}

.review-text {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #FFD700;
    border-radius: 4px;
}

.review-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.review-language {
    margin-top: 12px;
}

.language-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #2e7d32;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 125, 50, 0.85);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: #2e7d32;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev-btn {
    left: 12px;
}

.slider-btn.next-btn {
    right: 12px;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: #bdc3c7;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot:hover {
    background: #7f8c8d;
    transform: scale(1.2);
}

.slider-dot.active {
    background: #2e7d32;
    width: 26px;
    border-radius: 5px;
}

/* No Reviews Message */
.no-reviews,
.error-message {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.1rem;
    color: #7f8c8d;
}

.error-message {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-section {
        padding: 25px 15px;
        margin: 30px 0;
    }

    .review-section h2 {
        font-size: 1.6rem;
    }

    .review-form-container {
        padding: 20px;
    }

    .review-form h3 {
        font-size: 1.2rem;
    }

    /* Stack form fields vertically on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group-half,
    .form-group-third {
        width: 100%;
    }

    .review-card {
        padding: 20px;
    }

    .review-header {
        flex-direction: column;
        gap: 12px;
    }

    .author-avatar {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .author-info h4 {
        font-size: 1.1rem;
    }

    .review-rating {
        font-size: 1.2rem;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
    }

    .slider-btn.prev-btn {
        left: 8px;
    }

    .slider-btn.next-btn {
        right: 8px;
    }

    .star-rating label {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .review-section h2 {
        font-size: 1.4rem;
    }

    .review-form-container {
        padding: 15px;
    }

    .form-group input[type="text"],
    .form-group textarea {
        font-size: 0.9rem;
        padding: 9px 12px;
    }

    .star-rating label {
        font-size: 1.3rem;
    }

    .submit-review-btn {
        font-size: 0.9rem;
    }
}

/* Animation for review cards appearing */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card.active {
    animation: slideInUp 0.6s ease;
}
