/* Mentor Slider - FIGMA EXACT MATCH v5
   Refinements:
   - Arrows pushed FURTHER out.
   - Side Mentors scaled up slightly (124px).
   - Spacing increased to reduce crowding.
   - Strict vertical centering maintained.
*/

.foz-mentor-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 40px auto;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    overflow: visible;
    box-sizing: border-box;
}

/* Container - The Anchor Point */
.foz-mentor-slider-container {
    position: relative;
    width: 320px;
    height: 300px;
    /* Slight height increase for breathing room */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Base Item Styles */
.foz-mentor-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    text-align: center;
    opacity: 0;
    z-index: 1;
    display: none;
    width: auto;
}

/* Common Image Styles */
.foz-mentor-image {
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 0 solid transparent;
    transition: all 0.5s ease;
    background: #1a1a1a;
    position: relative;
    box-sizing: border-box;
}

.foz-mentor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease;
}

.foz-mentor-name {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
    margin-top: 15px;
    transition: all 0.4s ease;
    white-space: normal;
    word-break: break-word;
    text-align: center;
}

/* ============================================= */
/* STATE: ACTIVE (CENTER)                        */
/* ============================================= */
.foz-mentor-item.active {
    display: block !important;
    opacity: 1;
    z-index: 10;
    transform: translate(-50%, -50%) scale(1);
}

.foz-mentor-item.active .foz-mentor-image {
    width: 300px;
    height: 300px;
    border: 5px solid var(--theme-palette-color-1, #BB141A);
    box-shadow: 0 0 40px rgba(187, 20, 26, 0.35);
}

.foz-mentor-item.active .foz-mentor-image img {
    filter: grayscale(0%);
}

.foz-mentor-item.active .foz-mentor-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-top: 20px;
}

/* ============================================= */
/* STATE: SIDE LEFT                              */
/* ============================================= */
.foz-mentor-item.side-left {
    display: block !important;
    opacity: 1;
    z-index: 5;
    /* Move Left 170px (spread out more) */
    transform: translate(-50%, -50%) translateX(-170px);
}

.foz-mentor-item.side-left .foz-mentor-image {
    width: 200px;
    /* Slightly larger */
    height: 200px;
    border: 0;
}

.foz-mentor-item.side-left .foz-mentor-image img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.foz-mentor-item.side-left .foz-mentor-name {
    font-size: 0.9rem;
    color: #888;
    margin-top: 12px;
}

/* ============================================= */
/* STATE: SIDE RIGHT                             */
/* ============================================= */
.foz-mentor-item.side-right {
    display: block !important;
    opacity: 1;
    z-index: 5;
    /* Move Right 170px */
    transform: translate(-50%, -50%) translateX(170px);
}

.foz-mentor-item.side-right .foz-mentor-image {
    width: 200px;
    height: 200px;
    border: 0;
}

.foz-mentor-item.side-right .foz-mentor-image img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.foz-mentor-item.side-right .foz-mentor-name {
    font-size: 0.9rem;
    color: #888;
    margin-top: 12px;
}


/* ============================================= */
/* ARROWS                                        */
/* ============================================= */
.foz-slider-prev,
.foz-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    /* Larger */
    height: 48px;
    background: #fff;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, background 0.2s;
}

.foz-slider-prev:hover,
.foz-slider-next:hover {
    background: #f0f0f0;
    transform: translateY(-50%) scale(1.1);
}

.foz-slider-prev svg,
.foz-slider-next svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 
   Container Width: 320px. Center is 0.
   Sides are at +/- 170px.
   Side Width 124px -> Radius 62px.
   Side Edge = 170 + 62 = 232px from Center.
   Arrows should be beyond 232px.
   Let's place Arrows at 290px from Center.
   Container Left Edge is -160px.
   Arrow Left should be 290 - 160 = 130px from Container Edge (negative).
   Let's use -140px for safety.
*/

.foz-slider-prev {
    left: -140px;
}

.foz-slider-next {
    right: -140px;
}


/* Link Reset */
a.foz-mentor-item {
    text-decoration: none;
    color: inherit;
}

/* ============================================= */
/* MOBILE RESPONSIVE                             */
/* ============================================= */
@media (max-width: 768px) {
    .foz-mentor-slider-container {
        height: 260px;
        /* Keep container width standard but flexible? */
        width: 300px;
    }

    /* Active */
    .foz-mentor-item.active .foz-mentor-image {
        width: 170px;
        height: 170px;
    }

    /* Sides */
    .foz-mentor-item.side-left {
        transform: translate(-50%, -50%) translateX(-120px);
    }

    .foz-mentor-item.side-right {
        transform: translate(-50%, -50%) translateX(120px);
    }

    .foz-mentor-item.side-left .foz-mentor-image,
    .foz-mentor-item.side-right .foz-mentor-image {
        width: 120px;
        height: 120px;
    }

    /* Arrows - Compact but outside */
    .foz-slider-prev {
        left: -80px;
        width: 40px;
        height: 40px;
    }

    .foz-slider-next {
        right: -80px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 550px) {
    /* Prevent cut-off on small screens by constraining the layout */

    .foz-mentor-slider-wrapper {
        padding: 10px 40px;
        /* Force internal padding for arrows */
    }

    .foz-mentor-slider-container {
        width: 100%;
        max-width: 220px;
        /* Small anchor */
    }

    .foz-mentor-item.side-left {
        transform: translate(-50%, -50%) translateX(-90px);
    }

    .foz-mentor-item.side-right {
        transform: translate(-50%, -50%) translateX(90px);
    }

    .foz-slider-prev {
        left: -50px;
        /* Relative to 220px container */
    }

    .foz-slider-next {
        right: -50px;
    }
}

/* ============================================= */
/* EDITOR VIEW                                   */
/* ============================================= */
.foz-mentor-editor-view .foz-mentor-slider-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: auto;
    min-height: auto;
    justify-content: center;
    width: auto;
}

.foz-mentor-editor-view .foz-mentor-item {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    width: 200px;
    margin-bottom: 20px;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    display: block !important;
}

.foz-mentor-editor-view .foz-mentor-image {
    width: 150px !important;
    height: 150px !important;
    border: 4px solid transparent !important;
}

.foz-mentor-editor-view .foz-mentor-image img {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
}

.foz-mentor-editor-view .foz-mentor-name {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 10px !important;
    font-size: 1rem !important;
    color: #fff !important;
    width: auto !important;
}

.foz-mentor-editor-view .foz-slider-prev,
.foz-mentor-editor-view .foz-slider-next {
    display: none;
}