/**
 * Client Logo Carousel - Frontend Styles
 */

/* Container */
.wp-block-client-logo-carousel {
    margin: 2em 0;
    position: relative;
}

.wp-block-client-logo-carousel.alignwide {
    margin-left: calc(25% - 25vw);
    margin-right: calc(25% - 25vw);
}

.wp-block-client-logo-carousel.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Carousel Base */
.clc-carousel {
    position: relative;
    margin: 0 40px; /* Space for arrows */
}

.clc-carousel.slick-dotted {
    margin-bottom: 50px; /* Space for dots */
}

/* Slides */
.clc-slide {
    outline: none;
    padding: 0 10px;
}

.clc-slide:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Logo Wrapper */
.clc-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.clc-logo-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Logo Styles */
.style-default .clc-logo-wrapper {
    /* Default style - no additional styling */
}

.style-bordered .clc-logo-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.style-shadow .clc-logo-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.style-rounded .clc-logo-wrapper {
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
}

/* Hover Effects */
.hover-zoom .clc-logo-wrapper:hover {
    transform: translateY(-5px);
}

.hover-zoom .clc-logo-wrapper:hover img {
    transform: scale(1.1);
}

.hover-grayscale .clc-logo-wrapper img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.hover-grayscale .clc-logo-wrapper:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.hover-opacity .clc-logo-wrapper img {
    opacity: 0.6;
}

.hover-opacity .clc-logo-wrapper:hover img {
    opacity: 1;
}

.hover-none .clc-logo-wrapper:hover {
    /* No hover effect */
}

/* Links */
.clc-slide a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.clc-slide a:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Captions */
.clc-caption {
    position: absolute;
    width: 100%;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.caption-bottom {
    bottom: 0;
    left: 0;
    transform: translateY(100%);
}

.clc-logo-wrapper:hover .caption-bottom {
    transform: translateY(0);
}

.caption-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    width: 90%;
    border-radius: 4px;
}

.clc-logo-wrapper:hover .caption-overlay {
    opacity: 1;
}

/* Slick Overrides */
.clc-carousel .slick-track {
    display: flex;
    align-items: center;
}

.clc-carousel .slick-slide {
    height: auto;
}

.clc-carousel .slick-slide > div {
    height: 100%;
}

/* Navigation Arrows */
.clc-carousel .slick-prev,
.clc-carousel .slick-next {
    z-index: 1;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clc-carousel .slick-prev:hover,
.clc-carousel .slick-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.clc-carousel .slick-prev {
    left: -40px;
}

.clc-carousel .slick-next {
    right: -40px;
}

.clc-carousel .slick-prev:before,
.clc-carousel .slick-next:before {
    font-size: 20px;
    line-height: 1;
    opacity: 1;
    color: #fff;
}

/* Dots */
.clc-carousel .slick-dots {
    bottom: -35px;
}

.clc-carousel .slick-dots li {
    margin: 0 5px;
}

.clc-carousel .slick-dots li button {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.clc-carousel .slick-dots li button:before {
    display: none;
}

.clc-carousel .slick-dots li button:hover,
.clc-carousel .slick-dots li.slick-active button {
    background: #333;
    transform: scale(1.2);
}

/* Loading State */
.clc-carousel.slick-loading .clc-slide {
    visibility: hidden;
}

.clc-carousel.slick-initialized .clc-slide {
    visibility: visible;
}

/* No Logos Message */
.clc-no-logos {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    color: #666;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .clc-carousel {
        margin: 0 30px;
    }
    
    .clc-carousel .slick-prev {
        left: -30px;
    }
    
    .clc-carousel .slick-next {
        right: -30px;
    }
}

@media (max-width: 768px) {
    .clc-carousel {
        margin: 0;
    }
    
    .clc-carousel .slick-prev,
    .clc-carousel .slick-next {
        width: 35px;
        height: 35px;
    }
    
    .clc-carousel .slick-prev {
        left: 10px;
    }
    
    .clc-carousel .slick-next {
        right: 10px;
    }
    
    .clc-carousel .slick-prev:before,
    .clc-carousel .slick-next:before {
        font-size: 18px;
    }
    
    .clc-logo-wrapper {
        padding: 10px;
    }
    
    .clc-caption {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .clc-slide {
        padding: 0 5px;
    }
    
    .clc-carousel .slick-dots {
        bottom: -25px;
    }
    
    .clc-carousel .slick-dots li {
        margin: 0 3px;
    }
    
    .clc-carousel .slick-dots li button {
        width: 8px;
        height: 8px;
    }
}

/* Print Styles */
@media print {
    .clc-carousel .slick-arrow,
    .clc-carousel .slick-dots {
        display: none !important;
    }
    
    .clc-carousel .slick-slide {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .clc-logo-wrapper {
        border: 1px solid;
    }
    
    .clc-carousel .slick-arrow {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonText;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .clc-logo-wrapper,
    .clc-logo-wrapper img,
    .clc-caption,
    .clc-carousel .slick-arrow,
    .clc-carousel .slick-dots li button {
        transition: none !important;
    }
    
    .hover-zoom .clc-logo-wrapper:hover {
        transform: none;
    }
    
    .hover-zoom .clc-logo-wrapper:hover img {
        transform: none;
    }
}