/* ============================================
   TESTIMONIALS — Slider, Cards, Stars, Legal Modal
   Bağımlılık: style.css (variables, buttons)
============================================ */

/* --- Header Meta --- */
.testimonials-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.testimonials-stars { color: var(--accent-orange); display: inline-flex; gap: 2px; }

.testimonial-stars svg,
.testimonials-stars svg {
    width: 16px; height: 16px;
    fill: var(--accent-orange);
    stroke: var(--accent-orange);
}

.testimonials-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-orange);
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

.testimonials-link:hover { text-decoration: underline; }

/* --- Grid (fallback) --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    min-height: 200px;
}

.testimonial-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

/* --- Slider --- */
.testimonials-slider-wrap {
    position: relative;
    padding: 0 36px;
    overflow: hidden;
}

.testimonials-slider {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testimonials-slider::-webkit-scrollbar { display: none; }

.testimonials-track {
    display: flex;
    gap: 18px;
    padding: 8px 4px;
}

/* --- Card --- */
.testimonial-card {
    flex: 0 0 calc((100% - 54px) / 4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
}

.testimonial-card:hover { border-color: var(--accent-orange); background: var(--bg-card-hover); }

.testimonial-stars { display: inline-flex; gap: 2px; color: var(--accent-orange); }
.testimonial-stars i { width: 16px; height: 16px; fill: var(--accent-orange); }
.testimonial-text { color: var(--text-secondary); font-size: 14px; line-height: 1.65; font-style: italic; }

/* --- Slider Arrows --- */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    background: var(--accent-orange);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.slider-arrow:hover { background: var(--accent-orange-hover); transform: translateY(-50%) scale(1.1); }
.slider-arrow i { width: 20px; height: 20px; }
.slider-arrow-prev { left: 0; }
.slider-arrow-next { right: 0; }

/* --- Yıldız Seçme (Form) --- */
.star-rate-wrap {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.star-rate-item {
    color: #ccc;
    transition: color 0.2s;
    font-size: 28px;
    line-height: 1;
}

.star-rate-item.active,
.star-rate-item.hover {
    color: #ff8800;
}

/* --- Legal Modal (KVKK vb.) --- */
.legal-modal {
    max-width: 640px;
    display: flex;
    flex-direction: column;
}

.legal-body {
    padding: 36px 32px 16px;
    overflow-y: auto;
}

.legal-content { display: none; }

.legal-content.active {
    display: block;
    animation: legalFadeIn 0.3s ease both;
}

@keyframes legalFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.legal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
}

.legal-subtitle { font-size: 1rem; font-weight: 700; color: var(--accent-orange); margin-top: 18px; margin-bottom: 8px; }

.legal-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 14px;
    word-break: break-word;
}

.legal-content p strong { color: var(--text-primary); }
.legal-content ul { padding-left: 18px; margin-bottom: 14px; }

.legal-content li {
    list-style: disc;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.legal-footer {
    padding: 18px 32px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-shrink: 0;
}

.open-legal { cursor: pointer; }

/* --- Testimonials Responsive --- */
@media (max-width: 992px) {
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-card { flex: 0 0 calc((100% - 36px) / 3); }
}

@media (max-width: 768px) {
    .testimonials-grid { grid-template-columns: 1fr; }
    .testimonial-card { flex: 0 0 calc((100% - 18px) / 2); }
    .slider-arrow { display: none; }
    .testimonials-slider-wrap { padding: 0; }
}

@media (max-width: 480px) {
    .testimonial-card { flex: 0 0 85%; }

    .legal-body { padding: 24px 18px 12px; }
    .legal-title { font-size: 1.15rem; }
    .legal-content p, .legal-content li { font-size: 13px; }

    .legal-footer {
        padding: 14px 18px 20px;
        justify-content: stretch;
    }

    .legal-footer .btn { width: 100%; }

    .legal-modal {
        max-height: 88vh;
        max-height: 88dvh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    #testimonialModal input,
    #testimonialModal textarea,
    #testimonialModal select {
        font-size: 16px !important;
        width: 100%;
        box-sizing: border-box;
    }
}