/* Testimonials - Opinie klientów */
/* Nowa wersja: pokazuje 3 opinie, przesuwa po 1 */

.testimonials-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--color-cream-light, #FFF5E8) 0%, var(--color-white, #FFFBF7) 100%);
    overflow: hidden;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-header .section-title {
    font-size: 2.5rem;
    color: var(--color-primary, #5C4A3E);
    margin-bottom: 10px;
    font-weight: 700;
}

.testimonials-header .section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light, #8C7A6B);
    margin: 0;
}

/* Grid layout (bez slidera) */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Slider layout - pokazuje N opinii, przesuwa po 1 */
.testimonials-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 10px;
    min-height: 400px;
}

.testimonials-slider-wrapper {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: stretch;
    padding: 0;
}

.testimonials-slider .testimonial-card {
    flex-shrink: 0;
    /* Szerokość ustawiana dynamicznie przez JS */
    box-sizing: border-box;
}

/* Karta opinii */
.testimonial-card {
    background: white;
    border-radius: var(--radius-lg, 25px);
    padding: 40px 30px;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonials-grid .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.15));
}

.testimonial-stars {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1;
}

.testimonial-text {
    margin-bottom: 25px;
    color: var(--color-text, #5C4A3E);
    min-width: 0;
    overflow-wrap: anywhere;
}

.testimonial-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    font-style: italic;
    white-space: normal;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid var(--color-gray-light, #F0EBE5);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-sage, #C8D5C0), var(--color-lavender, #D4C5E0));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.author-name {
    font-size: 1.1rem;
    color: var(--color-primary, #5C4A3E);
    font-weight: 600;
}

.author-product {
    font-size: 0.9rem;
    color: var(--color-text-light, #8C7A6B);
}

/* Nawigacja slidera */
.testimonials-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.testimonial-prev,
.testimonial-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--color-sage, #C8D5C0);
    color: var(--color-primary, #5C4A3E);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: var(--color-sage, #C8D5C0);
    color: white;
    transform: scale(1.1);
}

.testimonials-dots {
    display: flex;
    gap: 10px;
}

.testimonials-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gray, #D9D0C8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonials-dots .dot:hover {
    background: var(--color-sage-light, #DFE8D9);
    transform: scale(1.2);
}

.testimonials-dots .dot.active {
    background: var(--color-sage, #C8D5C0);
    width: 30px;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Na tablecie gap może być mniejszy */
    .testimonials-slider-wrapper {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 40px 10px;
    }

    .testimonials-header .section-title {
        font-size: 2rem;
    }

    .testimonial-card {
        padding: 25px 20px;
    }

    .testimonials-slider {
        min-height: auto;
        padding: 20px 5px;
    }

    /* Na mobile mniejszy gap */
    .testimonials-slider-wrapper {
        gap: 15px;
    }

    /* Długie opinie muszą zwiększać wysokość karty na małych ekranach. */
    .homepage > .testimonials-section .testimonial-card,
    .homepage > .testimonials-section .testimonial-card:has(.testimonial-photo) {
        min-height: 0;
        max-height: none;
        height: auto;
        grid-template-rows: auto auto auto;
    }

    /* Miniatura zostaje w nagłówku, a tekst wykorzystuje pełną szerokość karty. */
    .homepage > .testimonials-section .testimonial-card:has(.testimonial-photo) {
        grid-template-columns: minmax(0, 1fr) 4rem;
        grid-template-areas:
            "stars photo"
            "text text"
            "author author";
        column-gap: 12px;
        row-gap: 12px;
    }

    .homepage > .testimonials-section .testimonial-text {
        overflow: visible;
    }

    .homepage > .testimonials-section .testimonial-text p {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .homepage > .testimonials-section .testimonial-author {
        margin-top: 0;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .testimonials-nav {
        gap: 15px;
        margin-top: 30px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .testimonials-header .section-title {
        font-size: 1.7rem;
    }

    .testimonials-header .section-subtitle {
        font-size: 1rem;
    }

    .testimonial-card {
        padding: 20px 16px !important;
    }

    .testimonial-text p {
        font-size: 1rem;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .author-name {
        font-size: 1rem;
    }

    .author-product {
        font-size: 0.85rem;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    .testimonials-dots .dot {
        width: 10px;
        height: 10px;
    }

    .testimonials-dots .dot.active {
        width: 24px;
    }
}

