/* 
 * 省份文章推荐样式
 * 文件名：province-posts.css
 * 位置：主题目录（如：/wp-content/themes/zibll/province-posts.css）
 */

/* 基础容器样式 */
.same-province-section {
    margin: 25px 0;
    padding: 0;
    position: relative;
}

.same-province-section h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    padding: 0;
    color: #333;
    font-weight: 600;
}

/* 网格布局 */
.same-province-posts {
    display: grid;
    gap: 8px;
}

.same-province-post-item {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.same-province-post-item:hover {
    color: #0073aa;
    border-color: #0073aa;
}

/* 响应式布局 */
@media (min-width: 1025px) {
    .same-province-posts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .same-province-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .same-province-posts {
        grid-template-columns: 1fr;
    }
    
    .same-province-section h3 {
        font-size: 16px;
    }
    
    .same-province-post-item {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* 桌面端悬停效果 */
@media (min-width: 769px) {
    .same-province-post-item:hover {
        position: relative;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .same-province-section h3 {
        color: #eee;
    }
    
    .same-province-post-item {
        background: #2c2c2c;
        border-color: #444;
        color: #ddd;
    }
    
    .same-province-post-item:hover {
        background: #3c3c3c;
        border-color: #0073aa;
        color: #fff;
    }
}

/* 动画效果 */
.same-province-post-item {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 动态列数的内联样式会通过行内样式覆盖这个默认值 */
.same-province-posts {
    /* 默认3列，会被JS动态覆盖 */
}