/* assets/css/reviews.css - review form + testimonial section.
   Uses the same colour variables as the main site (:root in index.php).
   Fallbacks included so review.php works standalone. */

/* ---------- Testimonial section (on index.php) ---------- */
.testimonials-section { background-color: #f5f7fa; }

.testimonials-section .avg-rating { margin-top: 10px; color: var(--text-light, #777); }
.testimonials-section .avg-rating strong { color: var(--dark, #2c3e50); }

/* Slider: scroll-snap track, 1 card on mobile, 2 on tablet, 3 on desktop */
.testimonial-slider { --t-gap: 20px; --t-cols: 1; position: relative; }

.testimonial-track {
    display: flex;
    gap: var(--t-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 20px;   /* room for hover lift + shadow */
    scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-track .testimonial-card {
    flex: 0 0 calc((100% - (var(--t-cols) - 1) * var(--t-gap)) / var(--t-cols));
    scroll-snap-align: start;
    box-sizing: border-box;
}

.t-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}
.t-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--primary, #1a5276);
    background: #fff;
    color: var(--primary, #1a5276);
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}
.t-btn:hover { background: var(--primary, #1a5276); color: #fff; }
.t-dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.t-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c9d1d9;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.t-dot.active { background: var(--secondary, #d4af37); transform: scale(1.3); }

.testimonial-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.testimonial-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

.stars { color: var(--secondary, #d4af37); margin-bottom: 12px; }
.stars .empty { color: #ddd; }

.testimonial-text {
    color: var(--text, #333);
    font-size: 15px;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 18px;
    font-style: italic;
}

.testimonial-author { border-top: 1px solid #eee; padding-top: 12px; }
.testimonial-author strong { display: block; color: var(--primary, #1a5276); }
.testimonial-author span { font-size: 13px; color: var(--text-light, #777); }

@media (min-width: 768px) {
    .testimonial-slider { --t-cols: 2; --t-gap: 30px; }
}
@media (min-width: 992px) {
    .testimonial-slider { --t-cols: 3; }
}

/* ---------- Review form page ---------- */
.review-page {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}
.review-wrap { max-width: 600px; margin: 0 auto; padding: 30px 15px 60px; }
.back-link { display: inline-block; margin-bottom: 20px; color: #1a5276; text-decoration: none; font-weight: 600; }

.review-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}
.review-card h1 { color: #2c3e50; font-size: 26px; margin: 0 0 8px; }
.review-card .sub { color: #777; margin: 0 0 25px; }

.review-card label { display: block; font-weight: 600; margin: 18px 0 6px; color: #2c3e50; }
.review-card input[type="text"],
.review-card textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd3da;
    border-radius: 8px;
    font: inherit;
    box-sizing: border-box;
}
.review-card input[type="text"]:focus,
.review-card textarea:focus { outline: none; border-color: #1a5276; box-shadow: 0 0 0 3px rgba(26,82,118,0.15); }

/* Star rating: radios in reverse order so CSS sibling selector can fill stars */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { display: none; }
.star-input label { margin: 0; font-size: 28px; color: #ddd; cursor: pointer; transition: color 0.15s; }
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: #d4af37; }

.btn-submit {
    margin-top: 25px;
    width: 100%;
    padding: 14px;
    background: #d4af37;
    border: 2px solid #d4af37;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-submit:hover { background: transparent; color: #d4af37; }

.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: #e3f4e8; color: #216e39; }
.alert-error { background: #fdecea; color: #a12622; }