/* ============================================================================
 * 置顶卡片双层视觉体系（v3：修复移动端选择器优先级、对齐与双列防重叠）
 * 1) 常规置顶「站长推荐」：靛蓝→紫罗兰精选卡（.resource-card.sticky-post）
 * 2) 专属导览「进站必看」：琥珀金尊享导览卡（.resource-card.sticky-post.is-guide-featured）
 * ============================================================================ */

/* ---------- 1. 常规置顶卡：「站长推荐」靛蓝紫精选样式 ---------- */
.resource-card.sticky-post:not(.is-guide-featured) {
    position: relative;
    border: 1.5px solid rgba(59, 130, 246, 0.42);
    background: linear-gradient(160deg, #f8fbff 0%, #eff5ff 46%, #ffffff 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.resource-card.sticky-post:not(.is-guide-featured)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4;
    background: linear-gradient(90deg, #2563eb 0%, #6366f1 55%, #8b5cf6 100%);
    pointer-events: none;
}

.resource-card.sticky-post:not(.is-guide-featured):hover {
    border-color: rgba(79, 70, 229, 0.78);
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.20), 0 0 0 1px rgba(99, 102, 241, 0.22);
}

.resource-card.sticky-post:not(.is-guide-featured) .sticky-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    top: 8px;
    left: 8px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 58%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.38);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.resource-card.sticky-post:not(.is-guide-featured) .sticky-badge svg {
    display: block;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    color: #fde68a;
}

.resource-card.sticky-post:not(.is-guide-featured) .card-thumbnail::after {
    content: "";
    position: absolute;
    inset: 58% 0 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.22), transparent);
    pointer-events: none;
    z-index: 1;
}

.resource-card.sticky-post:not(.is-guide-featured) .card-thumbnail img {
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.resource-card.sticky-post:not(.is-guide-featured):hover .card-thumbnail img {
    transform: scale(1.04);
}

.resource-card.sticky-post:not(.is-guide-featured):hover .resource-title-text {
    color: var(--primary, #2563eb);
}

/* 常规置顶卡深色模式（OLED 纯黑背景下的冷调蓝紫辉光） */
html[data-theme="dark"] .resource-card.sticky-post:not(.is-guide-featured) {
    border-color: rgba(96, 165, 250, 0.42);
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.14) 0%, rgba(99, 102, 241, 0.06) 46%, #0d0e13 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

html[data-theme="dark"] .resource-card.sticky-post:not(.is-guide-featured):hover {
    border-color: rgba(129, 140, 248, 0.82);
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.26), 0 0 0 1px rgba(129, 140, 248, 0.28);
}

html[data-theme="dark"] .resource-card.sticky-post:not(.is-guide-featured) .sticky-badge {
    border-color: rgba(199, 210, 254, 0.32);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.50);
}

/* ---------- 2. 专属导览卡：「进站必看」琥珀金样式 ---------- */
.resource-card.sticky-post.is-guide-featured {
    position: relative;
    border: 1.5px solid rgba(245, 158, 11, 0.58);
    background: linear-gradient(155deg, #fffdf7 0%, #fff7e6 52%, #ffffff 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.resource-card.sticky-post.is-guide-featured::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 45%, #ea580c 100%);
    pointer-events: none;
}

.resource-card.sticky-post.is-guide-featured:hover {
    border-color: rgba(245, 158, 11, 0.92);
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.24), 0 0 0 1px rgba(251, 191, 36, 0.25);
}

.resource-card.sticky-post.is-guide-featured .sticky-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    top: 8px;
    left: 8px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.42);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.35px;
    white-space: nowrap;
    overflow: hidden;
}

.resource-card.sticky-post.is-guide-featured .sticky-badge svg {
    display: block;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.resource-card.sticky-post.is-guide-featured .sticky-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 75%;
    height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.42) 50%, transparent 80%);
    animation: grGuideShimmer 4.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes grGuideShimmer {
    0%, 62% { left: -120%; }
    100% { left: 160%; }
}

.resource-card.sticky-post.is-guide-featured .card-thumbnail::after {
    content: "";
    position: absolute;
    inset: 55% 0 0;
    background: linear-gradient(to top, rgba(120, 53, 15, 0.24), transparent);
    pointer-events: none;
    z-index: 1;
}

.resource-card.sticky-post.is-guide-featured .card-thumbnail img {
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.resource-card.sticky-post.is-guide-featured:hover .card-thumbnail img {
    transform: scale(1.045);
}

.resource-card.sticky-post.is-guide-featured .card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.resource-card.sticky-post.is-guide-featured .guide-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.45;
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.32);
    white-space: nowrap;
}

.resource-card.sticky-post.is-guide-featured .guide-category-pill svg {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
}

.resource-card.sticky-post.is-guide-featured .resource-title {
    color: #78350f;
}

.resource-card.sticky-post.is-guide-featured .resource-title-text {
    font-weight: 700;
}

.resource-card.sticky-post.is-guide-featured .guide-card-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed rgba(217, 119, 6, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    line-height: 1.35;
}

.resource-card.sticky-post.is-guide-featured .guide-card-tip {
    color: #92400e;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-card.sticky-post.is-guide-featured .guide-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    color: #d97706;
    font-weight: 700;
    white-space: nowrap;
}

.resource-card.sticky-post.is-guide-featured .guide-card-cta svg {
    width: 12px;
    height: 12px;
    transition: transform 0.22s ease;
}

.resource-card.sticky-post.is-guide-featured:hover .guide-card-cta svg {
    transform: translateX(3px);
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured {
    border-color: rgba(251, 191, 36, 0.48);
    background: linear-gradient(155deg, rgba(245, 158, 11, 0.14) 0%, rgba(217, 119, 6, 0.05) 45%, #0e0e11 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(251, 191, 36, 0.12);
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured:hover {
    border-color: rgba(251, 191, 36, 0.85);
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.22), 0 0 0 1px rgba(251, 191, 36, 0.3);
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured .guide-category-pill {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.36);
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured .resource-title {
    color: #fef3c7;
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured .guide-card-footer {
    border-top-color: rgba(251, 191, 36, 0.2);
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured .guide-card-tip {
    color: #d6c5a3;
}

html[data-theme="dark"] .resource-card.sticky-post.is-guide-featured .guide-card-cta {
    color: #fbbf24;
}

/* ---------- 3. 移动端适配（对齐 768px 双列断点，与桌面端同等选择器权重） ---------- */
@media (max-width: 768px) {
    .resource-card.sticky-post:not(.is-guide-featured):hover,
    .resource-card.sticky-post.is-guide-featured:hover {
        transform: none;
    }

    .resource-card.sticky-post:not(.is-guide-featured) .sticky-badge,
    .resource-card.sticky-post.is-guide-featured .sticky-badge {
        top: 6px;
        left: 6px;
        gap: 3px;
        padding: 3px 7px 3px 6px;
        font-size: 10px;
        line-height: 1.1;
        letter-spacing: 0.1px;
        max-width: calc(100% - 64px);
        overflow: hidden;
        text-overflow: ellipsis;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.30);
    }

    .resource-card.sticky-post:not(.is-guide-featured) .sticky-badge svg,
    .resource-card.sticky-post.is-guide-featured .sticky-badge svg {
        width: 10px;
        height: 10px;
        flex: 0 0 10px;
    }

    .resource-card.sticky-post.is-guide-featured .guide-category-pill {
        font-size: 10px;
        padding: 1.5px 6px;
    }

    .resource-card.sticky-post.is-guide-featured .guide-card-footer {
        font-size: 10px;
        gap: 4px;
        padding-top: 6px;
    }
}

/* 超窄屏（360px 以下双列卡片 ~155px 宽）：进一步紧凑，绝不与右上角浏览量重叠 */
@media (max-width: 390px) {
    .resource-card.sticky-post:not(.is-guide-featured) .sticky-badge,
    .resource-card.sticky-post.is-guide-featured .sticky-badge {
        top: 5px;
        left: 5px;
        gap: 2.5px;
        padding: 2.5px 6px 2.5px 5px;
        font-size: 9.5px;
        max-width: calc(100% - 58px);
    }

    .resource-card.sticky-post:not(.is-guide-featured) .sticky-badge svg,
    .resource-card.sticky-post.is-guide-featured .sticky-badge svg {
        width: 9px;
        height: 9px;
        flex: 0 0 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resource-card.sticky-post.is-guide-featured .sticky-badge::after {
        animation: none;
    }
}

