/**
 * 文章卡片展示组件样式
 * 仿快科技 main_box 设计
 */

.wifilu-com-article-card-showcase {
    background: transparent;
    border-radius: var(--border-radius);
    padding: 0px 0px;
    margin-bottom: 14px;
}

/* 移动端隐藏 */
@media (max-width: 768px) {
    .wifilu-com-article-card-showcase.hide-on-mobile {
        display: none;
    }
}

/* 标题区域 */
.wifilu-com-article-card-showcase__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;  /* 外边距 - 下方 */
    padding-bottom: 12px; /* 内边距 - 下方 */
    border-bottom: 1px solid var(--border-secondary);
}

.wifilu-com-article-card-showcase__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* 轮播指示点 */
.wifilu-com-article-card-showcase__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wifilu-com-article-card-showcase__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-input);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wifilu-com-article-card-showcase__dot:hover {
    background: var(--text-muted);
}

.wifilu-com-article-card-showcase__dot.active {
    background: var(--theme-color);
    width: 20px;
    border-radius: 4px;
}

/* 容器区域 */
.wifilu-com-article-card-showcase__container {
    position: relative;
}

/* 左右箭头 */
.wifilu-com-article-card-showcase__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.wifilu-com-article-card-showcase__arrow:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

.wifilu-com-article-card-showcase__arrow--left {
    left: -20px;
}

.wifilu-com-article-card-showcase__arrow--right {
    right: -20px;
}

.wifilu-com-article-card-showcase__arrow svg {
    width: 20px;
    height: 20px;
}

/* 更多按钮 */
.wifilu-com-article-card-showcase__more {
    position: absolute;
    right: 0;
    top: -50px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.wifilu-com-article-card-showcase__more:hover {
    color: var(--theme-color);
}

.wifilu-com-article-card-showcase__more::after {
    content: '';
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
}

/* 视口区域 */
.wifilu-com-article-card-showcase__viewport {
    overflow: hidden;
    margin: 0 -10px;
}

/* 卡片列表 */
.wifilu-com-article-card-showcase__list {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
    padding: 0 10px;
}

/* 单个卡片项 - 使用 CSS 变量动态计算宽度 */
.wifilu-com-article-card-showcase__item {
    flex: 0 0 calc((100% - (var(--items-per-page, 4) - 1) * 20px) / var(--items-per-page, 4));
    min-width: 0;
}

/* 卡片 */
.wifilu-com-article-card-showcase__card {
    background: #fff;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wifilu-com-article-card-showcase__card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 图片区域 */
.wifilu-com-article-card-showcase__image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background: var(--bg-hover);
}

.wifilu-com-article-card-showcase__image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wifilu-com-article-card-showcase__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wifilu-com-article-card-showcase__card:hover .wifilu-com-article-card-showcase__image img {
    transform: scale(1.05);
}

/* 内容区域 */
.wifilu-com-article-card-showcase__content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 标题 */
.wifilu-com-article-card-showcase__item-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 3em;
}

.wifilu-com-article-card-showcase__item-title a {
    color: var(--text-content);
    text-decoration: none;
    transition: color 0.2s;
}

.wifilu-com-article-card-showcase__item-title a:hover {
    color: var(--theme-color);
}

/* 作者 */
.wifilu-com-article-card-showcase__meta {
    margin-bottom: 8px;
}

.wifilu-com-article-card-showcase__author {
    font-size: 12px;
    color: var(--text-muted);
}

.wifilu-com-article-card-showcase__author a {
    color: var(--text-muted);
    text-decoration: none;
}

.wifilu-com-article-card-showcase__author a:hover {
    color: var(--theme-color);
}

/* 底部信息 */
.wifilu-com-article-card-showcase__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-secondary);
    font-size: 12px;
    color: var(--text-muted);
}

.wifilu-com-article-card-showcase__stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wifilu-com-article-card-showcase__views,
.wifilu-com-article-card-showcase__comments {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wifilu-com-article-card-showcase__views i,
.wifilu-com-article-card-showcase__comments i {
    font-size: 14px;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .wifilu-com-article-card-showcase__item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 992px) {
    .wifilu-com-article-card-showcase__item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .wifilu-com-article-card-showcase__arrow--left {
        left: -10px;
    }
    
    .wifilu-com-article-card-showcase__arrow--right {
        right: -10px;
    }
}

/* 移动端轮播 - 一屏2个 */
@media (max-width: 768px) {
    .wifilu-com-article-card-showcase {
        padding: 0;
    }

    .wifilu-com-article-card-showcase__viewport {
        overflow: hidden;
        margin: 0;
    }

    .wifilu-com-article-card-showcase__list {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0;
    }

    .wifilu-com-article-card-showcase__item {
        flex: 0 0 calc((100% - 10px) / 2);
        min-width: 0;
    }

    .wifilu-com-article-card-showcase__arrow {
        width: 32px;
        height: 32px;
    }

    .wifilu-com-article-card-showcase__arrow--left {
        left: 5px;
    }

    .wifilu-com-article-card-showcase__arrow--right {
        right: 5px;
    }

    .wifilu-com-article-card-showcase__title {
        font-size: 16px;
        margin-bottom: 0px;
    }

    /* 移动端卡片样式调整 */
    .wifilu-com-article-card-showcase__card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .wifilu-com-article-card-showcase__content {
        padding: 8px;
    }

    .wifilu-com-article-card-showcase__item-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .wifilu-com-article-card-showcase__footer {
        font-size: 11px;
        padding-top: 6px;
    }

    .wifilu-com-article-card-showcase__stats {
        gap: 8px;
    }
}
