/**
 * Advanced Carousel - Frontend Styles
 */

/* Carousel Wrapper */
.ac-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

/* Swiper Container */
.ac-swiper {
    position: relative;
    overflow: hidden;
}

/* Slide */
.swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.ac-slide-inner {
    position: relative;
    width: 100%;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image Slides */
.ac-slide-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.ac-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
}

.ac-slide-title {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

.ac-slide-title a {
    color: inherit;
    text-decoration: none;
}

.ac-slide-title a:hover {
    text-decoration: underline;
}

.ac-slide-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.ac-lightbox-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* Video Slides */
.ac-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.ac-video-wrapper iframe,
.ac-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Text/Content Slides */
.ac-slide-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ac-slide-content .ac-slide-title {
    color: #333;
    margin-bottom: 10px;
}

.ac-slide-content .ac-slide-subtitle {
    color: #666;
    margin-bottom: 15px;
}

.ac-slide-text {
    flex: 1;
    color: #444;
    line-height: 1.6;
    margin-bottom: 20px;
}

.ac-slide-text p:last-child {
    margin-bottom: 0;
}

.ac-slide-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
    align-self: flex-start;
}

.ac-slide-button:hover {
    background: #005a87;
    color: #fff;
}

/* Shortcode Slides */
.ac-slide-shortcode {
    padding: 20px;
}

/* Mixed Content Slides */
.ac-slide-mixed {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ac-mixed-image {
    position: relative;
}

.ac-slide-mixed .ac-slide-content {
    flex: 1;
}

/* Navigation Arrows */
.ac-button-prev,
.ac-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ac-button-prev:hover,
.ac-button-next:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ac-button-prev {
    left: 10px;
}

.ac-button-next {
    right: 10px;
}

.ac-button-prev.swiper-button-disabled,
.ac-button-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ac-button-prev svg,
.ac-button-next svg {
    display: block;
}

/* Pagination Dots */
.ac-pagination {
    position: relative;
    text-align: center;
    margin-top: 20px;
}

.ac-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.ac-pagination .swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 5px;
}

/* Lazy Loading */
.swiper-lazy-preloader {
    width: 42px;
    height: 42px;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -21px;
    margin-top: -21px;
    z-index: 10;
    border-radius: 50%;
    border: 4px solid #0073aa;
    border-top-color: transparent;
    animation: swiper-preloader-spin 1s linear infinite;
}

@keyframes swiper-preloader-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ac-slide-title {
        font-size: 20px;
    }
    
    .ac-slide-subtitle {
        font-size: 14px;
    }
    
    .ac-slide-content {
        padding: 20px;
    }
    
    .ac-button-prev,
    .ac-button-next {
        width: 36px;
        height: 36px;
    }
    
    .ac-button-prev svg,
    .ac-button-next svg {
        width: 20px;
        height: 20px;
    }
}

/* Grid Mode Adjustments */
.swiper-grid > .swiper-wrapper {
    flex-wrap: wrap;
}

/* Coverflow Effect */
.swiper-3d .swiper-slide-shadow-left,
.swiper-3d .swiper-slide-shadow-right {
    background-image: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0));
}

/* Accessibility */
.ac-button-prev:focus,
.ac-button-next:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ac-button-prev,
    .ac-button-next,
    .ac-pagination {
        display: none;
    }
}
