/* Modern box-style slider for CleverVision Case Study Slider */
.cv-case-study-slider {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.cv-case-study-slider .swiper {
    padding: 24px 8px;
}

.cv-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(28,34,44,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(28,34,44,0.12);
}

.cv-card-media {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #f5f5f5;
    overflow: hidden;
}

.cv-card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cv-card:hover .cv-card-media img {
    transform: scale(1.05);
}

.cv-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
}

.cv-card-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #1a1a1a;
}

.cv-card-title a { 
    color: inherit; 
    text-decoration: none;
    transition: color 0.2s ease;
}

.cv-card-title a:hover {
    color: #2563eb;
}

.cv-one-liner {
    margin: 0;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    color: #4b5563;
}

/* Swiper navigation styling */
/* Swiper overrides */
.cv-case-study-slider .swiper-button-prev,
.cv-case-study-slider .swiper-button-next {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    margin-top: calc(0px - (48px / 2));
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.cv-case-study-slider .swiper-button-prev { left: 0; }
.cv-case-study-slider .swiper-button-next { right: 0; }

.cv-case-study-slider .swiper-button-prev:hover,
.cv-case-study-slider .swiper-button-next:hover {
    background: #2563eb;
    box-shadow: 0 6px 16px rgba(37,99,235,0.2);
}

.cv-case-study-slider .swiper-button-prev:after,
.cv-case-study-slider .swiper-button-next:after {
    font-size: 20px;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.cv-case-study-slider .swiper-button-prev:hover:after,
.cv-case-study-slider .swiper-button-next:hover:after {
    color: #fff;
}

/* Pagination styles */
.cv-case-study-slider .swiper-pagination {
    position: relative;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.cv-case-study-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    opacity: 1;
    margin: 0 !important;
    transition: all 0.3s ease;
}

.cv-case-study-slider .swiper-pagination-bullet-active {
    background: #2563eb;
    transform: scale(1.2);
}

/* Additional button styles for better UX */
.cv-case-study-slider .swiper-button-disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

/* Custom button colors */
.cv-case-study-slider .swiper-button-prev.swiper-button-disabled,
.cv-case-study-slider .swiper-button-next.swiper-button-disabled {
    opacity: 0;
}

/* spacing between slides */
.swiper .swiper-slide { 
    height: auto;
    padding: 12px;
}

/* Ensure accessible focus styles */
.cv-swiper-button-prev:focus,
.cv-swiper-button-next:focus,
.cv-swiper-pagination button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

/* Container padding for navigation buttons */
.cv-case-study-slider {
    padding: 0 60px;
}

/* Responsive design */
@media (max-width: 767px) {
    .cv-case-study-slider {
        padding: 0;
    }
    .cv-case-study-slider .swiper-button-prev,
    .cv-case-study-slider .swiper-button-next {
        display: none;
    }
    .cv-case-study-slider .swiper {
        padding: 16px 0;
    }
    .cv-card {
        min-height: 280px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .cv-case-study-slider {
        padding: 0 40px;
    }
    .cv-case-study-slider .swiper {
        padding: 20px 0;
    }
    .cv-card {
        min-height: 340px;
    }
}

@media (min-width: 1024px) {
    .cv-case-study-slider {
        padding: 0 60px;
    }
    .cv-case-study-slider .swiper {
        padding: 24px 0;
    }
    .cv-card {
        min-height: 380px;
    }
}
