/**
 * Image Title Carousel Widget Styles
 * 图片标题轮播小部件样式
 */

.image-title-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 32px 0;
}

.image-title-swiper {
    width: 100%;
    overflow: visible;
}

.image-title-carousel-slide-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.image-title-carousel-slide-content a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 图片容器 */
.image-title-carousel-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.image-title-carousel-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-title-carousel-slide-content a:hover .image-title-carousel-image {
    transform: scale(1.05);
}

/* 标题 */
.image-title-carousel-title {
    margin-top: 12px;
    font-weight: 800;
    font-size: 18px;
    line-height: 1.4;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.image-title-carousel-slide-content a:hover .image-title-carousel-title {
    color: #666;
}

/* 导航控制区域 */
.image-title-carousel-controls {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    gap: 16px;
}

/* 分页点 */
.image-title-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 4px;
}

.image-title-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0;
}

.image-title-pagination .swiper-pagination-bullet:hover {
    background-color: #9ca3af;
}

.image-title-pagination .swiper-pagination-bullet-active {
    background-color: #1a1a1a;
    width: 24px;
    border-radius: 4px;
}

/* 导航按钮和计数器 */
.image-title-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.image-title-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.image-title-nav-btn:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

.image-title-nav-btn:active:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.1);
}

.image-title-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    color: #cccccc;
}

.image-title-nav-btn .icon-prev,
.image-title-nav-btn .icon-next {
    display: inline-block;
    width: 24px;
    height: 24px;
}

.image-title-counter {
    font-weight: 600;
    font-size: 14px;
    min-width: 32px;
    text-align: center;
    color: #1a1a1a;
    line-height: 1;
}

/* 响应式设计 */
@media (max-width: 1023px) {
    .image-title-carousel-wrapper {
        padding: 24px 0;
    }
    
    .image-title-carousel-image {
        height: 300px;
    }
    
    .image-title-carousel-title {
        font-size: 16px;
    }
    
    .image-title-carousel-controls {
        margin-top: 20px;
        min-height: 48px;
    }
}

@media (max-width: 767px) {
    .image-title-carousel-wrapper {
        padding: 20px 0;
    }
    
    .image-title-carousel-image {
        height: 250px;
    }
    
    .image-title-carousel-title {
        font-size: 15px;
        margin-top: 10px;
    }
    
    .image-title-carousel-controls {
        margin-top: 16px;
        flex-direction: row;
        min-height: 44px;
        gap: 12px;
    }
    
    .image-title-pagination {
        flex: 1;
        justify-content: flex-start;
    }
    
    .image-title-carousel-nav {
        gap: 6px;
    }
    
    .image-title-nav-btn {
        padding: 6px;
        font-size: 20px;
    }
    
    .image-title-counter {
        font-size: 13px;
        min-width: 28px;
    }
}

/* Elementor 编辑器支持 */
.elementor-editor-active .image-title-carousel-wrapper {
    pointer-events: auto;
}

/* 加载状态 */
.image-title-carousel-image[src=""] {
    background-color: #f3f4f6;
}

/* 无障碍支持 */
.image-title-nav-btn:focus-visible {
    outline: 2px solid #4b5563;
    outline-offset: 2px;
}

.image-title-pagination .swiper-pagination-bullet:focus-visible {
    outline: 2px solid #4b5563;
    outline-offset: 2px;
}

/* RTL 支持 */
[dir="rtl"] .image-title-pagination {
    justify-content: flex-end;
}

[dir="rtl"] .image-title-carousel-nav {
    flex-direction: row-reverse;
}

