/* ==========================================================================
   Block: Testimonial Slider
   File:  assets/css/blocks/testimonial-slider.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Section shell
   -------------------------------------------------------------------------- */
.testimonial-slider {
    background-color: var(--color-sand-light);
    padding-block: var(--space-xl);
    padding-inline: var(--gutter);
}

.testimonial-slider--empty {
    text-align: center;
}

/* --------------------------------------------------------------------------
   2. Section header (label + heading above the slider)
   -------------------------------------------------------------------------- */
.testimonial-slider__header {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    text-align: center;
    margin-bottom: var(--space-40);
}

.testimonial-slider__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-dark);
    opacity: 0.6;
    margin-bottom: var(--space-12);
}

.testimonial-slider__heading {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--weight-regular);
    color: var(--color-dark);
}

/* --------------------------------------------------------------------------
   3. Slider track — overflow hidden, slides positioned inside
   -------------------------------------------------------------------------- */
.testimonial-slider__track {
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   3. Individual slide
   -------------------------------------------------------------------------- */
.testimonial-slide {
    display: none;
    animation: ts-fadeIn 0.4s ease forwards;
}

.testimonial-slide--active {
    display: block;
}

@keyframes ts-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* --------------------------------------------------------------------------
   4. Blockquote / Quote
   -------------------------------------------------------------------------- */
.testimonial-slide__quote {
    margin: 0;
    padding: 0;
    border: none;
    text-align: center;
}

.testimonial-slide__quote-text {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: var(--weight-regular);
    font-style: italic;
    line-height: 1.6;
    color: var(--color-dark);
    margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   5. Author
   -------------------------------------------------------------------------- */
.testimonial-slide__author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: var(--space-sm);
}

.testimonial-slide__author-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-slide__author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
}

.testimonial-slide__author-name {
    font-style: normal;
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #444;
}

.testimonial-slide__author-role {
    font-size: var(--text-xs);
    font-weight: var(--weight-light);
    color: #888;
    font-style: normal;
}

/* --------------------------------------------------------------------------
   6. Controls wrapper
   -------------------------------------------------------------------------- */
.testimonial-slider__controls {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   7. Prev / Next buttons
   -------------------------------------------------------------------------- */
.testimonial-slider__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--color-dark);
    border-radius: 50%;
    background-color: transparent;
    color: var(--color-dark);
    cursor: pointer;
    font-size: 1.125rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.testimonial-slider__btn:hover,
.testimonial-slider__btn:focus-visible {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.testimonial-slider__btn:focus-visible {
    outline: 2px solid var(--color-dark);
    outline-offset: 3px;
}

.testimonial-slider__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. Dot navigation
   -------------------------------------------------------------------------- */
.testimonial-slider__dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.testimonial-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(28, 28, 28, 0.22);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease;
}

.testimonial-slider__dot:hover {
    background-color: rgba(28, 28, 28, 0.5);
}

.testimonial-slider__dot--active {
    background-color: var(--color-dark);
    transform: scale(1.25);
}

.testimonial-slider__dot:focus-visible {
    outline: 2px solid var(--color-dark);
    outline-offset: 3px;
    border-radius: 50%;
}

/* --------------------------------------------------------------------------
   9. Editor notice
   -------------------------------------------------------------------------- */
.testimonial-slider__editor-notice {
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 0.875rem;
    padding: 1.5rem;
    border: 1px dashed #c8bfb5;
    border-radius: 2px;
    max-width: 480px;
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .testimonial-slider {
        padding-block: var(--space-lg);
    }

    .testimonial-slide__quote-text {
        font-size: 1.125rem;
    }
}
