/**
 * 文章卡片展示组件样式
 * 仿快科技 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; /* 内边距 - 下方 */

}

.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: var(--bg-card);
    border: 1px solid var(--border-secondary);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-color) 10%, transparent);
    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: var(--bg-card);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 根据 data-card-opacity 设置透明度 - 使用 color-mix 适配深色模式 */
.wifilu-com-article-card-showcase[data-card-opacity="0"] .wifilu-com-article-card-showcase__card { background: transparent; }
.wifilu-com-article-card-showcase[data-card-opacity="0.1"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 10%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.2"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 20%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.3"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 30%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.4"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 40%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.5"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 50%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.6"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 60%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.7"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 70%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.8"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 80%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="0.9"] .wifilu-com-article-card-showcase__card { background: color-mix(in srgb, var(--bg-card) 90%, transparent); }
.wifilu-com-article-card-showcase[data-card-opacity="1"] .wifilu-com-article-card-showcase__card { background: var(--bg-card); }

.wifilu-com-article-card-showcase__card:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-color) 15%, transparent);
    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;
    }
}

/* ============================================
   深色模式适配
   ============================================ */

/* 深色模式 - Slate 800 (默认) */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"],
html[data-theme="dark"] .wifilu-com-article-card-showcase:not([data-dark-mode-bg]) {
    --bg-card: rgba(30, 41, 59, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-secondary: rgba(15, 23, 42, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-primary: rgba(51, 65, 85, 0.6);
    --border-secondary: rgba(51, 65, 85, 0.4);
}

/* 深色模式 - Slate 900 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"] {
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-card-hover: rgba(15, 23, 42, 0.95);
    --bg-secondary: rgba(2, 6, 23, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-primary: rgba(30, 41, 59, 0.6);
    --border-secondary: rgba(30, 41, 59, 0.4);
}

/* 深色模式 - 纯黑 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"] {
    --bg-card: rgba(0, 0, 0, 0.85);
    --bg-card-hover: rgba(0, 0, 0, 0.95);
    --bg-secondary: rgba(20, 20, 20, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-primary: rgba(50, 50, 50, 0.6);
    --border-secondary: rgba(50, 50, 50, 0.4);
}

/* 深色模式 - 跟随主题 */
/* 使用主题CSS变量，不覆盖，让组件继承主题样式 */

/* 深色模式卡片样式 - Slate 800 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"] .wifilu-com-article-card-showcase__card,
html[data-theme="dark"] .wifilu-com-article-card-showcase:not([data-dark-mode-bg]) .wifilu-com-article-card-showcase__card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 深色模式卡片样式 - Slate 900 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"] .wifilu-com-article-card-showcase__card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 深色模式卡片样式 - 纯黑 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"] .wifilu-com-article-card-showcase__card {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(50, 50, 50, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 深色模式卡片样式 - 跟随主题 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="theme"] .wifilu-com-article-card-showcase__card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 深色模式卡片悬停效果 */
html[data-theme="dark"] .wifilu-com-article-card-showcase__card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 深色模式箭头按钮 */
html[data-theme="dark"] .wifilu-com-article-card-showcase__arrow {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(51, 65, 85, 0.6);
    color: #94a3b8;
}

html[data-theme="dark"] .wifilu-com-article-card-showcase__arrow:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #fff;
}

/* 深色模式指示点 */
html[data-theme="dark"] .wifilu-com-article-card-showcase__dot {
    background: rgba(51, 65, 85, 0.6);
}

html[data-theme="dark"] .wifilu-com-article-card-showcase__dot:hover {
    background: #94a3b8;
}

html[data-theme="dark"] .wifilu-com-article-card-showcase__dot.active {
    background: var(--theme-color);
}

/* 深色模式底部边框 */
html[data-theme="dark"] .wifilu-com-article-card-showcase__footer {
    border-top-color: rgba(51, 65, 85, 0.4);
}

/* 深色模式透明度设置 - Slate 800 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.1"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.1); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.2"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.2); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.3"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.3); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.4"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.4); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.5"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.5); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.6"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.6); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.7"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.7); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.8"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.8); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="0.9"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 0.9); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate800"][data-card-opacity="1"] .wifilu-com-article-card-showcase__card { background: rgba(30, 41, 59, 1); }

/* 深色模式透明度设置 - Slate 900 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.1"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.1); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.2"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.2); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.3"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.3); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.4"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.4); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.5"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.5); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.6"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.6); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.7"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.7); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.8"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.8); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="0.9"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 0.9); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="slate900"][data-card-opacity="1"] .wifilu-com-article-card-showcase__card { background: rgba(15, 23, 42, 1); }

/* 深色模式透明度设置 - 纯黑 */
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.1"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.1); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.2"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.2); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.3"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.4"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.4); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.5"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.6"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.7"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.8"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.8); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="0.9"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 0.9); }
html[data-theme="dark"] .wifilu-com-article-card-showcase[data-dark-mode-bg="black"][data-card-opacity="1"] .wifilu-com-article-card-showcase__card { background: rgba(0, 0, 0, 1); }
