/**
 * Partners Plugin Styles
 * Modern CSS for partner slider and grid displays using Swiper.js
 */

/* Utility classes */
.partner-flex {
    display: flex;
}

/* Swiper navigation buttons - enhanced styles */
.swiper-button-next,
.swiper-button-prev {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(51, 51, 51, 0.1);
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #0073aa;
    color: #0073aa;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.swiper-button-next:focus,
.swiper-button-prev:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 1);
    border-color: #0073aa;
    color: #0073aa;
}

.swiper-button-next:active,
.swiper-button-prev:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.swiper-button-prev {
    left: -25px;
}

.swiper-button-next {
    right: -25px;
}

.swiper-button-prev::after {
    content: "‹";
    font-family: Arial, sans-serif;
}

.swiper-button-next::after {
    content: "›";
    font-family: Arial, sans-serif;
}

/* Button visibility states */
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Autoplay indicator */
.partner-slider[data-autoplay="playing"]::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    animation: autoplayProgress 5s linear infinite;
    z-index: 11;
    border-radius: 1px;
}

@keyframes autoplayProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Partner slider container */
.partner-slider {
    width: 100%;
    max-width: 1200px;
    margin: 1em auto;
    position: relative;
    overflow: hidden;
}

.swiper-horizontal>.swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: 0;
}

.partner-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.partner-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Partner slide content */
.partner-slide {
    padding: 1em;
    width: 14em;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-slide img {
    width: auto;
    max-height: 5em;
    height: auto;
    max-width: 100%;
    display: block;
}

.partner-slider .partner-link {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5em;
    text-decoration: none;
}

/* Partner grid layout */
.partner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.partner-tile {
    width: 14em;
    height: 14em;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease-in-out;
}

.partner-tile:hover {
    transform: scale(1.1);
}

.partner-tile .partner-link {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100%;
    text-decoration: none;
}

.partner-tile img {
    max-height: 12em;
    width: auto;
    display: block;
}

/* Responsive design for navigation */
@media (max-width: 1100px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
        font-size: 14px;
    }
    
    .swiper-button-prev {
        left: -20px;
    }
    
    .swiper-button-next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    /* Show pagination dots on mobile instead */
    .partner-slider .swiper-pagination {
        display: block;
        position: static;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    .partner-grid {
        justify-content: center;
    }
    
    .partner-tile {
        width: 12em;
        height: 12em;
        margin: 0.5em;
    }
    
    .partner-tile img {
        max-height: 10em;
    }
}

@media (max-width: 480px) {
    .partner-slider {
        max-width: 100%;
        margin: 0;
    }
    
    .partner-slide {
        padding: 0.5em;
        width: 100%;
    }
    
    .partner-tile {
        width: 10em;
        height: 10em;
    }
    
    .partner-tile img {
        max-height: 8em;
    }
}

/* Accessibility improvements */
.partner-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Swiper pagination dots (if needed) */
.swiper-pagination {
    bottom: 10px;
}

.swiper-pagination-bullet {
    background: #333;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #0073aa;
}