/* BK Articles v10.4 */
.bk-feed-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    padding: 30px; box-sizing: border-box;
    overflow: visible;
}
.bk-page-title {
    font-size: 60px; font-weight: 600; text-align: center;
    color: #1a1a1a; margin: 0 0 40px;
    font-family: 'Poppins', sans-serif; line-height: 60px;
}

/* 瀑布流 */
.bk-grid { column-count: 4; column-gap: 30px; width: 100%; }
.bk-card {
    break-inside: avoid; margin-bottom: 20px; padding-bottom: 10px;
    border-radius: 12px; background: transparent;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));

    cursor: pointer;
}
.bk-card.bk-loading { pointer-events: none; }
.bk-card.bk-loading .bk-img::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 32px; height: 32px; margin: -16px 0 0 -16px;
    border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: bkSpin 0.6s linear infinite; z-index: 5;
}
@keyframes bkSpin { to { transform: rotate(360deg); } }
.bk-img { position: relative; width: 100%; overflow: hidden; background: #f0f0f0; border-radius: 12px 12px 0 0; }
.bk-info { background: #fff; border-radius: 0 0 12px 12px; padding: 14px 16px 16px; }
.bk-img img { display: block; width: 100%; height: auto; }
.bk-placeholder {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; font-weight: 700; color: #ccc;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
}
.bk-badge-video {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,0.6); color: #fff;
    font-size: 14px; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.bk-info {
    background: #fff; border-radius: 0 0 12px 12px;
    padding: 16px 20px 20px;
}
.bk-info h3 {
    font-size: 20px; font-weight: 600; line-height: 1.5;
    margin: 0 0 8px; color: #1a1a1a;
    letter-spacing: 0.01em;
}
.bk-date {
    font-size: 13px; color: #999; margin: 0;
    letter-spacing: 0.02em;
}

@media (max-width: 1100px) { .bk-grid { column-count: 3; } }
@media (max-width: 768px) { .bk-grid { column-count: 2; column-gap: 16px; } }
@media (max-width: 480px) { .bk-grid { column-count: 1; } }

/* 弹窗 */
.bk-overlay {
    visibility: hidden; opacity: 0;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.bk-overlay.active { visibility: visible; opacity: 1; }
.bk-modal {
    display: flex; width: 95%; max-width: 1000px; max-height: 90vh;
    background: #fff; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative;
    transform: scale(0.92) translateY(30px); opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}
.bk-overlay.active .bk-modal { transform: scale(1) translateY(0); opacity: 1; }

.bk-close {
    position: absolute !important; top: 12px !important; right: 12px !important;
    z-index: 20 !important;
    width: 32px !important; height: 32px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; padding: 0 !important;
    background: rgba(0,0,0,0.45) !important;
    border: none !important; border-radius: 50% !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    transition: background 0.2s ease !important;
}
.bk-close:hover { background: rgba(0,0,0,0.7) !important; }
.bk-close svg { stroke: #fff !important; }
.bk-close:hover svg { stroke: #fff !important; }

.bk-m-left {
    flex: 0 0 55%; width: 55%;
    background: #000; position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-radius: 16px 0 0 16px;
}
.bk-slider { width: 100%; height: 100%; position: relative; overflow: hidden; }
.bk-track { display: flex; height: 100%; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.bk-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bk-slide img, .bk-slide video {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.bk-sbtn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.5); border: none; border-radius: 50%;
    width: 40px; height: 40px; cursor: pointer; z-index: 10; pointer-events: none;
}
.bk-sbtn:hover { background: rgba(255,255,255,0.7); }
.bk-sbtn::after {
    content: ''; display: block; width: 12px; height: 12px;
    border-top: 3px solid #333; border-right: 3px solid #333;
    position: absolute; top: 50%; left: 50%;
}
.bk-sp::after { transform: translate(-35%, -50%) rotate(225deg); }
.bk-sn::after { transform: translate(-65%, -50%) rotate(45deg); }
.bk-sp { left: -10px; opacity: 0; transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.bk-sn { right: -10px; opacity: 0; transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.bk-m-left:hover .bk-sp { left: 16px; opacity: 1; pointer-events: auto; }
.bk-m-left:hover .bk-sn { right: 16px; opacity: 1; pointer-events: auto; }

.bk-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.2s; }
.bk-dot.active { background: #fff; transform: scale(1.3); }

.bk-m-right {
    width: 380px; min-width: 320px;
    display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 0 16px 16px 0;
}
.bk-m-right::-webkit-scrollbar { width: 4px; }
.bk-m-right::-webkit-scrollbar-track { background: transparent; }
.bk-m-right::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
.bk-m-right::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }
.bk-p-title { font-size: 28px; font-weight: 600; line-height: 1.4; margin: 40px 32px 28px !important; color: #1a1a1a; }
.bk-p-content { padding: 0 32px 24px !important; font-size: 14px; line-height: 1.8; color: #333; flex: 1; overflow-y: auto; }
.bk-p-content p { margin: 0 0 14px; }
.bk-p-content img { max-width: 100%; border-radius: 8px; }
.bk-p-tags { padding: 0 32px 28px !important; display: flex; gap: 8px; flex-wrap: wrap; }
.bk-p-tags span { font-size: 12px; color: #2a7fff; background: rgba(42,127,255,0.06); padding: 4px 10px; border-radius: 6px; }

@media (max-width: 768px) {
    .bk-modal { flex-direction: column; max-height: 88vh; border-radius: 16px; width: 92%; margin: 6vh auto; }
    .bk-m-left { max-width: 100%; }
    .bk-m-left { max-height: 50vh; flex-shrink: 0; }
    .bk-m-right {
        width: 100%; min-width: auto;
        flex: 1; overflow-y: auto; overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        min-height: 0;
        border-radius: 0 0 12px 12px;
    }
    .bk-m-left { border-radius: 12px 12px 0 0; }
    .bk-p-title { font-size: 18px; margin: 20px 20px 14px; }
    .bk-p-content { padding: 0 20px 16px; }
    .bk-p-tags { padding: 0 20px 16px; }
    .bk-sbtn { opacity: 0.8; pointer-events: auto; }
}

/* ============================================================
   导航遮罩
   ============================================================ */
.bk-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; z-index: 99998;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.bk-nav-overlay.active { opacity: 1; visibility: visible; }

.bk-nav-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}
.bk-nav-close {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bk-nav-close:hover {
    background: transparent;
    transform: scale(0.85);
}
.bk-nav-close:hover svg { stroke: #000; }

.bk-nav-content {
    display: flex; flex-direction: column; align-items: center; gap: 33px;
}

/*
 * 导航链接样式
 * 入场动画和悬停动画完全分离：
 * - 入场：opacity + translateY，带交错 delay
 * - 悬停：scale，无 delay，缓进缓出
 */

/* 基础样式 */
.bk-nav-link {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 67px;
    font-weight: 400;
    color: #aaa;           /* 未选中：灰色 */
    text-decoration: none;
    padding: 0;
    line-height: 67px;
    letter-spacing: normal;
    outline: none;
    background: transparent;
    /* 入场动画 */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bk-nav-link:focus { outline: none; background: transparent; }

/* 遮罩打开后：链接入场 */
.bk-nav-overlay.active .bk-nav-link {
    opacity: 1;
    transform: translateY(0);
}
.bk-nav-overlay.active .bk-nav-link:nth-child(1) { transition-delay: 0.08s; }
.bk-nav-overlay.active .bk-nav-link:nth-child(2) { transition-delay: 0.14s; }
.bk-nav-overlay.active .bk-nav-link:nth-child(3) { transition-delay: 0.20s; }
.bk-nav-overlay.active .bk-nav-link:nth-child(4) { transition-delay: 0.26s; }

/* 入场完成后（0.4s + 0.26s = 0.66s 后），切换到悬停模式 */
.bk-nav-overlay.active .bk-nav-link {
    transition: color 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.7s;
}

/* 悬停：白色 + 微放大，缓进缓出，无 delay */
.bk-nav-overlay.active .bk-nav-link:hover {
    color: #000;
    transform: scale(1.06);
    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0s;
}

@media (max-width: 768px) {
    .bk-nav-content { gap: 24px; }
    .bk-nav-link { font-size: 42px; line-height: 42px; }
}
@media (max-width: 480px) {
    .bk-nav-content { gap: 20px; }
    .bk-nav-link { font-size: 32px; line-height: 32px; }
}

/* 暗色模式下卡片显示边框 */
[data-wp-dark-mode-active] .bk-card,
.wp-dark-mode-active .bk-card {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
