/**
 * EB Logo Slider - Main Styles
 * Scope: .mod-logo-slider
 */

/* =========================================
   Wrapper & Layout
   ========================================= */
.mod-logo-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    /* Space for shadow/dots */
    overflow: hidden;
    /* Prevent scrollbar flickers during slide */
}

/* Adjust padding for outside arrows to prevent overflow clipping */
.mod-logo-slider-wrapper.arrows-outside {
    padding-left: 50px;
    padding-right: 50px;
    overflow: visible;
    /* Allow arrows to sit outside */
}

/* But we need to ensure the parent container clips if needed, 
   or allow it. Usually sliders need overflow hidden on the swiper-container. */

.mod-logo-slider {
    width: 100%;
    height: 100%;
    padding: 10px 0;
    /* Internal padding for item shadows */
}

/* =========================================
   Slide Items
   ========================================= */
.mod-logo-slider .swiper-slide {
    height: auto;
    /* Flex height matching */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo Box Item */
.mod-logo-slider .logo-item {
    position: relative;
    width: fit-content;
    /* Shrink to fit image */
    max-width: var(--logo-max-width, 100%);
    /* Respect config */
    background: #fff;
    padding: 10px;
    /* Reduced padding */
    margin: 0 auto;

    /* Flex alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* Transitions */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Dynamic Styling Variables (set in PHP) */
    border: var(--box-border, 1px solid transparent);
    border-radius: var(--box-radius, 0);
    box-shadow: none;
    /* Shadow applied on hover or via variable if set */
}

/* Interactive States */
.mod-logo-slider .logo-item:hover {
    box-shadow: var(--box-shadow, 0 10px 20px rgba(0, 0, 0, 0.1));
    z-index: 5;
    /* Lift above others */
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.1);
    /* Subtle border highlight */
}

/* Image Styling */
.mod-logo-slider .logo-item img {
    display: block;
    /* Image defines the size now, constrained by valid max values */
    width: auto;
    height: auto;

    max-width: 100%;
    /* Don't overflow box */
    max-height: var(--logo-max-height, 120px);
    /* Primary height controller */

    /* Ensure aspect ratio is preserved */
    object-fit: contain;

    filter: grayscale(0%);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.mod-logo-slider .logo-item:hover img {
    transform: scale(1.08);
    filter: grayscale(0%);
}

/* Title Text */
.mod-logo-slider .logo-title {
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
}

/* Links */
.mod-logo-slider a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.mod-logo-slider a:hover .logo-title {
    color: #000;
    /* Darken title on hover */
}

/* =========================================
   Navigation (Arrows)
   ========================================= */
.mod-logo-slider-wrapper .swiper-button-prev,
.mod-logo-slider-wrapper .swiper-button-next {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    /* Center Vertical */
    background-color: #fff;
    color: #333;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.mod-logo-slider-wrapper .swiper-button-prev:hover,
.mod-logo-slider-wrapper .swiper-button-next:hover {
    background-color: #333;
    color: #fff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.mod-logo-slider-wrapper .swiper-button-prev::after,
.mod-logo-slider-wrapper .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
}

/* Outside Positioning */
.mod-logo-slider-wrapper.arrows-outside .swiper-button-prev {
    left: 0;
}

.mod-logo-slider-wrapper.arrows-outside .swiper-button-next {
    right: 0;
}

/* Inside Positioning */
.mod-logo-slider-wrapper.arrows-inside .swiper-button-prev {
    left: 10px;
}

.mod-logo-slider-wrapper.arrows-inside .swiper-button-next {
    right: 10px;
}

/* =========================================
   Pagination (Dots)
   ========================================= */
.mod-logo-slider-wrapper .swiper-pagination {
    position: relative;
    bottom: 0 !important;
    margin-top: 20px;
    text-align: center;
}

.mod-logo-slider-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 0.5;
    margin: 0 6px !important;
    transition: all 0.3s ease;
}

.mod-logo-slider-wrapper .swiper-pagination-bullet-active {
    width: 24px;
    /* Elongated active dot */
    border-radius: 5px;
    background: #333;
    opacity: 1;
}

/* =========================================
   Special Modes
   ========================================= */
/* Continuous Marquee */
.mod-logo-slider-marquee .swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Grouped 3D Slides Grid */
.mod-logo-slider .logo-slide-group {
    /* Ensure the slide takes full width/height for the grid to work */
    height: auto;
    min-height: 200px;
}

/* Bootstrap util helpers already present in markup (d-flex, etc) 
   Just ensure wrapping works */
.mod-logo-slider .logo-slide-group .d-flex {
    flex-wrap: wrap;
    align-content: flex-start;
}

/* --- Hover Effects --- */

/* Zoom Effect */
.mod-logo-slider-wrapper.hover-effect-zoom .logo-item img {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.mod-logo-slider-wrapper.hover-effect-zoom .logo-item:hover img {
    transform: scale(1.15) !important;
}

/* Grayscale Effect */
.mod-logo-slider-wrapper.hover-effect-grayscale .logo-item img {
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.mod-logo-slider-wrapper.hover-effect-grayscale .logo-item:hover img {
    filter: grayscale(0%) !important;
    opacity: 1 !important;
}

/* Lift Effect */
.mod-logo-slider-wrapper.hover-effect-lift .logo-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mod-logo-slider-wrapper.hover-effect-lift .logo-item:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 10;
}

/* Shine Effect */
.mod-logo-slider-wrapper.hover-effect-shine .logo-item {
    position: relative;
    overflow: hidden;
}

.mod-logo-slider-wrapper.hover-effect-shine .logo-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 100%);
    transform: skewX(-25deg);
    z-index: 2;
    transition: none;
    pointer-events: none;
}

.mod-logo-slider-wrapper.hover-effect-shine .logo-item:hover::before {
    animation: shine-anim 0.75s;
}

@keyframes shine-anim {
    0% {
        left: -75%;
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    100% {
        left: 125%;
        opacity: 0;
    }
}