/* 博客卡片样式 */
.blog-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #2563EB;
    z-index: 10;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-meta .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.blog-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-title a {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #2563EB;
}

.blog-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    position: relative;
}

.blog-footer .btn {
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-footer .btn:hover {
    transform: translateX(3px);
}

/* 下拉菜单样式 */
.blog-footer .dropdown {
    position: relative;
    z-index: 1070;
}

/* 当下拉菜单显示时，提升整个卡片的层级 */
.blog-card:has(.dropdown-menu.show),
.blog-card .dropdown.show {
    z-index: 1080 !important;
}

.blog-footer .dropdown-menu {
    z-index: 1080;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #fff;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    min-width: 150px;
    position: absolute;
    top: 100%;
    right: 0;
}

/* 确保下拉菜单显示时不被其他元素遮挡 */
.blog-footer .dropdown-menu.show {
    z-index: 1090;
}

.blog-footer .dropdown-item {
    color: #495057;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 0;
}

.blog-footer .dropdown-item:hover {
    background: #f8f9fa;
    color: #2563EB;
    transform: translateX(3px);
}

.blog-footer .dropdown-item i {
    width: 16px;
    text-align: center;
    margin-right: 0.5rem;
    color: #6c757d;
}

.blog-footer .dropdown-item:hover i {
    color: #2563EB;
}

.blog-footer .dropdown-divider {
    border-color: #e9ecef;
    margin: 0.25rem 0;
}

/* 博客区域整体样式 */
.blog-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.blog-section .section-title {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.blog-section .section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-content {
        padding: 1.25rem;
    }
    
    .blog-description {
        -webkit-line-clamp: 2;
    }
    
    .blog-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .blog-footer .btn {
        text-align: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .blog-card {
        background: #2a2a2a;
        border-color: #404040;
    }
    
    .blog-title a {
        color: #ffffff;
    }
    
    .blog-description {
        color: #cccccc;
    }
}