/**
 * Image Carousel WP - Frontend Styles
 * Elementor-style carousel appearance
 */

/* ============================================
   Carousel Wrapper
   ============================================ */
.icw-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 40px;
}

.icw-carousel-wrapper .swiper {
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* ============================================
   Slide
   ============================================ */
.icw-slide {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
}

.icw-slide-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 5px; /* Memberi jarak ke caption */
    box-shadow: none !important;
}

.icw-slide-inner:hover {
    transform: translateY(-2px);
    box-shadow: none !important;
}

.icw-slide-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transition: transform 0.4s ease;
}

/* Image Stretch */
.icw-slide-inner.icw-stretch .icw-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover zoom effect */
.icw-slide-inner:hover .icw-slide-image {
    transform: scale(1.03);
}

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

.icw-carousel-wrapper .icw-button-prev {
    left: -10px;
}

.icw-carousel-wrapper .icw-button-next {
    right: -10px;
}

.icw-carousel-wrapper .icw-button-prev:hover,
.icw-carousel-wrapper .icw-button-next:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-50%) scale(1.08);
}

.icw-carousel-wrapper .icw-button-prev svg,
.icw-carousel-wrapper .icw-button-next svg {
    width: 24px;
    height: 24px;
    stroke: #333;
    fill: none;
    transition: stroke 0.3s ease;
}

/* Hide default Swiper arrow */
.icw-carousel-wrapper .swiper-button-prev::after,
.icw-carousel-wrapper .swiper-button-next::after {
    display: none;
}

/* Arrow disabled state */
.icw-carousel-wrapper .swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ============================================
   Pagination Dots
   ============================================ */
.icw-carousel-wrapper .icw-pagination {
    position: relative;
    bottom: auto;
    margin-top: 20px;
    text-align: center;
}

.icw-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    margin: 0 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.icw-carousel-wrapper .swiper-pagination-bullet:hover {
    background: #999;
    transform: scale(1.2);
}

.icw-carousel-wrapper .swiper-pagination-bullet-active {
    background: #333;
    transform: scale(1.2);
}

/* ============================================
   Caption Below Image
   ============================================ */
.icw-caption {
    position: relative;
    width: 100%;
    padding: 10px 5px;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    background: transparent !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* ============================================
   Lightbox Link
   ============================================ */
.icw-lightbox-link {
    display: block;
    position: relative;
    text-decoration: none;
    border: none;
    outline: none;
}

.icw-lightbox-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.icw-slide-inner:hover .icw-lightbox-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   Custom Link
   ============================================ */
.icw-custom-link {
    display: block;
    position: relative;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
}

.icw-link-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.icw-slide-inner:hover .icw-link-indicator {
    opacity: 1;
}

/* ============================================
   Lightbox Overlay
   ============================================ */
.icw-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icw-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.icw-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icw-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    animation: icw-lightbox-fadeIn 0.3s ease;
}

@keyframes icw-lightbox-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.icw-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.icw-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.icw-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.icw-lightbox-nav svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    fill: none;
}

.icw-lightbox-prev {
    left: 20px;
}

.icw-lightbox-next {
    right: 20px;
}

.icw-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.icw-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    z-index: 10;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .icw-carousel-wrapper .icw-button-prev {
        left: 4px;
    }
    .icw-carousel-wrapper .icw-button-next {
        right: 4px;
    }
    .icw-carousel-wrapper .icw-button-prev,
    .icw-carousel-wrapper .icw-button-next {
        width: 36px;
        height: 36px;
    }
    .icw-carousel-wrapper .icw-button-prev svg,
    .icw-carousel-wrapper .icw-button-next svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 767px) {
    .icw-carousel-wrapper .icw-button-prev,
    .icw-carousel-wrapper .icw-button-next {
        width: 32px;
        height: 32px;
    }

    .icw-carousel-wrapper .icw-button-prev svg,
    .icw-carousel-wrapper .icw-button-next svg {
        width: 16px;
        height: 16px;
    }

    .icw-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .icw-lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .icw-caption {
        font-size: 12px;
        padding: 8px 10px;
    }
}
