/* Testimonials Slider Styles */

.foz-testimonials-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin: 60px auto;
    padding: 20px 20px 120px 20px;
    /* overflow removed — arrows/dots are position:absolute children */
}

/* Full Width Support - Break out of any parent container */
.foz-testimonials-slider-wrapper.alignfull {
    max-width: none !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.foz-testimonials-container {
    display: flex;
    align-items: center;
    /* position removed so arrows position relative to wrapper */
    min-height: 420px;
}

/* Base Card Style - 5 cards visible (desktop) */
.foz-testimonial-item {
    position: relative;
    flex-shrink: 0;
    /* 5 cards with 4 gaps of 15px = 60px total gaps */
    width: calc((100% - 60px) / 5);
    min-width: 180px;
    margin-right: 15px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: scale(0.85);
    /* Side cards smaller */
    opacity: 0.6;
}

.foz-testimonial-item:last-child {
    margin-right: 0;
}

/* Active (Center) - Larger Size */
.foz-testimonial-item.active {
    transform: scale(1.05);
    /* Center card bigger */
    opacity: 1;
    z-index: 10;
}

.foz-testimonial-card {
    background: #fff;

    padding: 25px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

/* Card Header: Avatar + Stars in one row */
.foz-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative;
}

/* Avatar - Floating Top Left (overlapping edge) */
.foz-testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    /* Pull up to overlap card edge */
    flex-shrink: 0;
}

.foz-testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stars - Top Right */
.foz-rating {
    color: #FFC107;
    /* Amber */
    font-size: 14px;
    letter-spacing: 1px;
}

.foz-star {
    color: #ddd;
}

.foz-star.filled {
    color: #FFC107;
}

/* Quote Icon */
.foz-quote-icon {
    font-size: 40px;
    color: var(--theme-palette-color-1, #D32F2F);
    line-height: 1;
    margin-bottom: 15px;
}

/* Content Text */
.foz-testimonial-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.65;
    margin-bottom: 25px;
}

/* Meta: Author Info at bottom */
.foz-testimonial-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.foz-author-info h5,
.foz-author-info .foz-author-name {
    display: block;
    font-size: 0.95rem;
    margin: 0 0 3px 0;
    color: #000;
    font-weight: 600;
}

.foz-author-role {
    font-size: 0.8rem;
    color: #888;
    display: block;
}

/*
 * Positioning Logic
 */

/* Active (Center) - Larger with scale */
.foz-testimonial-item.active {
    transform: scale(1.05);
    /* Center card bigger */
    opacity: 1;
    z-index: 10;
}

.foz-testimonial-item:not(.active) {
    transform: scale(0.85);
    /* Side cards smaller */
    opacity: 0.6;
}


/* Navigation: single flex row so arrows + dots never misalign */
.foz-testimonials-slider-wrapper .foz-slider-nav {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 20;
}

.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-prev,
.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-next {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-prev {
    background: #fff;
    color: #333;
}

.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-next {
    background: var(--theme-palette-color-1, #D32F2F);
    color: #fff;
}

.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-prev:hover {
    background: #f0f0f0;
}

.foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-next:hover {
    opacity: 0.9;
}

/* Dot styling lives in foz-slider-shared.css */


/* Editor Layout Fixes - Dark Mode */
.foz-testimonials-editor-wrapper {
    padding: 20px;
    border-radius: 8px;
}

.foz-testimonials-editor-wrapper h4 {
    margin-bottom: 20px;
}

.foz-testimonial-card-editor {
    padding: 15px;
    margin-bottom: 10px;

    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.foz-testimonial-avatar-upload {
    flex: 0 0 80px;
    text-align: center;
}

.foz-testimonial-avatar-upload img {
    width: 80px;
    height: 80px !important;
    border-radius: 50%;
    object-fit: cover;
}

.foz-testimonial-card-editor .components-base-control {
    flex: 1 1 200px;
}



.foz-testimonial-quote {
    flex-basis: 100%;
    font-style: italic;
    color: #eee;
    background: transparent;
    border-left: 3px solid #D32F2F;
    padding-left: 10px;
}

/* Responsive: 4 cards (large tablet / small desktop) */
@media (max-width: 1399.98px) {
    .foz-testimonial-item {
        width: calc((100% - 45px) / 4);
        min-width: 0;
    }
}

/* Responsive: 3 cards (tablet) */
@media (max-width: 1199.98px) {
    .foz-testimonial-item {
        width: calc((100% - 30px) / 3);
        min-width: 0;
    }
}

/* Responsive: 2 cards (small tablet) */
@media (max-width: 991.98px) {
    .foz-testimonial-item {
        width: calc((100% - 15px) / 2);
        min-width: 0;
    }
}

/* Responsive: 1 card (mobile) */
@media (max-width: 689.98px) {
    .foz-testimonial-item {
        width: 100%;
        min-width: unset;
        margin-right: 0;
        transform: scale(1);
        opacity: 1;
    }

    .foz-testimonials-slider-wrapper {
        padding: 20px 15px 100px 15px;
    }

    .foz-testimonials-slider-wrapper .foz-slider-nav {
        gap: 14px;
    }

    .foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-prev,
    .foz-testimonials-slider-wrapper .foz-slider-nav .foz-slider-next {
        width: 40px;
        height: 40px;
    }
}