.reviews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin: 2rem 0;
}

.review-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-width: 350px;
    flex: 1 1 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.review-stars {
    font-size: 1.2rem;
    color: #e0e0e0;
    display: flex;
    gap: 0.2rem;
    justify-content: flex-start;
}

.review-stars .star.filled {
    color: #fbc02d;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.review-text {
    font-style: italic;
    color: #555;
}

.review-author-row {
    display: flex;
    align-items: flex-start;
}

.review-author {
    font-size: 0.95rem;
    color: var(--secondary-color2);
    word-wrap: break-word;
}

.review-author strong {
    display: block;
    font-size: 1rem;
    color: var(--main-color);
    white-space: normal;
}

.review-form {
    margin-top: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.review-form h2 {
    margin-bottom: 1rem;
    color: var(--main-color);
}

.review-form form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.review-form input,
.review-form textarea {
    padding: 0.6rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.review-form button {
    align-self: flex-start;
    background-color: var(--main-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.review-form button:hover {
    background-color: var(--secondary-color2);
}

.review-card form {
    margin-top: 0.8rem;
}

.review-card button.btn-danger {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.review-card button.btn-danger:hover {
    background-color: #e60000;
}

.review-input-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 0.5rem;
}

.star-input {
    direction: ltr;
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    margin-top: 0.3rem;
    flex-direction: row-reverse;
}

.star-input input {
    display: none;
}

.star-input label {
    color: #ccc;
    transition: transform 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.star-input label:hover,
.star-input label:hover~label {
    color: #fbc02d;
    transform: scale(1.2);
}

.star-input input:checked~label {
    color: #fbc02d;
}

.review-input-row textarea {
    flex: 1;
    min-height: 120px;
    resize: vertical;
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.reviews-overview {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.reviews-overview .overview-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: #fbc02d;
}

.reviews-overview .overview-stars .star {
    font-size: 1.8rem;
    color: #e0e0e0;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.reviews-overview .overview-stars .star.filled {
    color: #fbc02d;
}

.reviews-overview .average-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--main-color);
}

.reviews-overview .review-count {
    font-size: 1rem;
    color: var(--secondary-color2);
    margin-top: 0.3rem;
}

.star.half-filled {
    color: #fbc02d;
    position: relative;
}

.star.half-filled::after {
    content: '★';
    color: #e0e0e0;
    position: absolute;
    left: 50%;
    width: 50%;
    overflow: hidden;
}

.review-form.login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 75px;
    text-align: center;
    font-size: 1rem;
    color: #333333;
}

.review-form.login-prompt a {
    text-decoration: underline;
    color: var(--main-color);
    margin-right: 0.3rem;
    margin-left: 0.3rem;
}

.review-form.login-prompt a:hover {
    text-decoration: underline;
}