/* Videos Slider Styles */

.foz-videos-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--theme-normal-container-max-width, 1290px);
    margin: 40px auto;
    padding: 40px 40px 80px 40px;
    /* 40px for arrow space */
    overflow: visible;
    /* Bottom padding for dots */
}

/* Full Width Support - Break out of parent */
.foz-videos-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-videos-container {
    display: flex;
    align-items: center;
    min-height: 360px;
    overflow: hidden;
    /* No horizontal padding - cards fill entire width */
}

/* Video Item Card - Square Format */
.foz-video-item {
    position: relative;
    flex-shrink: 0;
    /* 3 cards: (100% - 2 gaps of 20px) / 3 */
    width: calc((100% - 40px) / 3);
    aspect-ratio: 1 / 1;
    /* Square ratio */
    margin-right: 20px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.foz-video-card {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: transparent !important;
    cursor: pointer;
}

/* Cover Image - Fills most of the card */
.foz-video-cover {
    width: 100%;
    height: 100%;
    position: relative;
    background: transparent !important;
    /* Ensure no background here either */
}

/* KILL ANY OVERLAY LAYERS */
.foz-video-cover::before,
.foz-video-cover::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

.foz-video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 
       High-Key Brightness Filter
       Since backgrounds are removed, this filter ensures the image itself is bright.
    */
    filter: grayscale(100%) brightness(1.5) contrast(0.9);
    transition: filter 0.3s ease;
}

/* Active Item */
.foz-video-item.active .foz-video-cover img {
    /* Color on hover, not active */
}

/* Hover - Full Color */
.foz-video-item:hover .foz-video-cover img {
    filter: grayscale(0%) brightness(1) contrast(1);
    mix-blend-mode: normal;
}

/* Play Button - YouTube Style (Red Background, White Circle Icon) */
.foz-play-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55px;
    height: 32px;
    background: var(--theme-palette-color-1, #D32F2F);
    color: #fff;
    display: flex;
    align-items: center;
    /* Center alignment for upward overflow with negative margin */
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.foz-play-button svg {
    position: relative;
    width: 28px;
    height: 28px;
    padding: 7px;
    background: #ffffff;
    border-radius: 50%;
    color: #000;
    box-sizing: border-box;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    margin-top: -15px;
    /* Overflow upward from red background */
}

/* Hover Effects */
.foz-play-button:hover svg {
    transform: scale(1.1);
    color: var(--theme-palette-color-1, #D32F2F);
}

.foz-play-button:hover {
    /* Optional: brighten background or shadow */
}

/*
 * Positioning Logic - 5 visible items
 */
.foz-videos-slider-wrapper .foz-play-button {
    /* Ensure it overrides any generic styles if necessary */
}

/* Active (Center) */
/* Positioning handled by JS */
.foz-video-item.active {
    z-index: 10;
}

/* Non-active items - no opacity change, luminosity handles B&W */


/* Navigation Arrows - Small (32px, at card edges with half overlap) */
.foz-videos-slider-wrapper .foz-slider-prev,
.foz-videos-slider-wrapper .foz-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #222;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 30;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Position: half inside card (16px), half outside */
.foz-videos-slider-wrapper .foz-slider-prev {
    left: 24px;
}

.foz-videos-slider-wrapper .foz-slider-next {
    right: 24px;
}

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

/* Dots positioned over the slider; styling lives in foz-slider-shared.css */
.foz-videos-slider-wrapper .foz-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
}

/* On dark video covers the default grey dots are hard to see; use white. */
.foz-videos-slider-wrapper .foz-dot {
    background: rgba(255, 255, 255, 0.45);
}
.foz-videos-slider-wrapper .foz-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}


/* Editor fixes */
.foz-videos-editor-wrapper {
    padding: 20px;
    border-radius: 8px;
}

.foz-video-item-editor {
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.foz-video-cover-upload {
    flex: 0 0 120px;
    /* Fixed width for image column */
}

.foz-video-cover-upload img {
    width: 120px;
    height: 80px;
    /* Thumbnail size */
    object-fit: cover;
    border: 1px solid #666;
}

.foz-video-item-editor .components-base-control {
    flex: 1;
    margin-bottom: 0;
    /* Remove default margin for cleaner look */
}

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

    .foz-videos-slider-wrapper {
        padding: 30px 15px 60px 15px;
    }

    .foz-videos-slider-wrapper .foz-slider-prev,
    .foz-videos-slider-wrapper .foz-slider-next {
        width: 28px;
        height: 28px;
    }
}


/* Compact Mode (5-column sleek strip for mid-page placement e.g. İntibak) */
.foz-videos-slider-wrapper.foz-videos-slider-compact {
    max-width: 1060px;
    margin: 12px auto 10px;
    padding: 16px 36px 48px 36px;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-videos-container {
    min-height: 175px;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-video-item {
    width: calc((100% - 64px) / 5);
    margin-right: 16px;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-video-item:last-child {
    margin-right: 0;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-play-button {
    width: 42px;
    height: 24px;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-play-button svg {
    width: 22px;
    height: 22px;
    padding: 5px;
    margin-top: -11px;
}

.foz-videos-slider-wrapper.foz-videos-slider-compact .foz-slider-dots {
    bottom: 10px;
}

@media (max-width: 960px) and (min-width: 690px) {
    .foz-videos-slider-wrapper.foz-videos-slider-compact .foz-video-item {
        width: calc((100% - 32px) / 3);
        margin-right: 16px;
    }
}

@media (max-width: 689.98px) {
    .foz-videos-slider-wrapper.foz-videos-slider-compact {
        padding: 12px 15px 44px 15px;
    }
    .foz-videos-slider-wrapper.foz-videos-slider-compact .foz-videos-container {
        min-height: 150px;
    }
    .foz-videos-slider-wrapper.foz-videos-slider-compact .foz-video-item {
        width: calc((100% - 12px) / 2);
        margin-right: 12px;
    }
}


/* Compact 3D Reels Focus Showcase */
.foz-videos-slider-wrapper.foz-videos-reels-focus {
    max-width: 560px;
    margin: 6px auto 10px;
    padding: 8px 48px 42px;
    box-sizing: border-box;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-videos-container {
    position: relative;
    display: block;
    width: 100%;
    height: 316px;
    min-height: 316px;
    overflow: visible;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 184px;
    height: 304px;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.65);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s ease, box-shadow 0.45s ease, visibility 0.45s;
    box-sizing: border-box;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 10;
    transform: translate(-50%, -50%) scale(1);
    border: 3px solid var(--theme-palette-color-1, #BB141A);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58), 0 0 28px rgba(187, 20, 26, 0.3);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.active .foz-video-cover img {
    filter: grayscale(0%) brightness(1) contrast(1);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-left {
    opacity: 0.44;
    visibility: visible;
    pointer-events: auto;
    z-index: 5;
    transform: translate(-50%, -50%) translateX(-132px) scale(0.78);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-right {
    opacity: 0.44;
    visibility: visible;
    pointer-events: auto;
    z-index: 5;
    transform: translate(-50%, -50%) translateX(132px) scale(0.78);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-left .foz-video-cover img,
.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-right .foz-video-cover img {
    filter: grayscale(100%) brightness(0.85) contrast(0.95);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-left:hover,
.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-right:hover {
    opacity: 0.68;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-left .foz-play-button,
.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-right .foz-play-button {
    opacity: 0;
    pointer-events: none;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-play-button {
    width: 44px;
    height: 26px;
    border-top-left-radius: 6px;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-play-button svg {
    width: 22px;
    height: 22px;
    padding: 5px;
    margin-top: -11px;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-prev,
.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-next {
    width: 38px;
    height: 38px;
    top: calc(50% - 14px);
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-prev {
    left: 6px;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-next {
    right: 6px;
}

.foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-dots {
    bottom: 6px;
}

@media (max-width: 560px) {
    .foz-videos-slider-wrapper.foz-videos-reels-focus {
        max-width: 360px;
        padding: 6px 36px 38px;
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-videos-container {
        height: 260px;
        min-height: 260px;
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item {
        width: 150px;
        height: 248px;
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-left {
        transform: translate(-50%, -50%) translateX(-92px) scale(0.76);
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-video-item.side-right {
        transform: translate(-50%, -50%) translateX(92px) scale(0.76);
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-prev,
    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-next {
        width: 32px;
        height: 32px;
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-prev {
        left: 2px;
    }

    .foz-videos-slider-wrapper.foz-videos-reels-focus .foz-slider-next {
        right: 2px;
    }
}
