/* ============================================
   iojwr.com 样式表
   AI模板生成规范 - 随机组合
   风格: N-自然有机 / 布局: Q-极简主义2.0
   色彩: 6-大地色系 #8b4513/#f5deb3/#228b22
   ============================================ */

/* CSS变量 */
:root {
    --primary: #8b4513;
    --secondary: #228b22;
    --accent: #d4a574;
    --bg-color: #faf8f5;
    --card-bg: #ffffff;
    --text-dark: #2d2d2d;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e8e4df;
    --shadow-sm: 0 2px 10px rgba(139, 69, 19, 0.08);
    --shadow-md: 0 4px 20px rgba(139, 69, 19, 0.12);
    --radius: 8px;
    --radius-sm: 6px;
    --transition: 0.3s ease;
}

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-dark);
    background: var(--bg-color);
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================
   头部导航 - 自然有机风格
   ============================================ */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo img { height: 50px; border-radius: var(--radius-sm); }
.main-nav ul {
    display: flex;
    gap: 5px;
}
.main-nav li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.main-nav li a:hover,
.main-nav li.active a {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

/* ============================================
   快捷导航
   ============================================ */
.quick-nav {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 12px 0;
}
.nav-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.nav-item:hover {
    background: rgba(255,255,255,0.3);
}

/* ============================================
   主内容区
   ============================================ */
.main-wrapper { padding: 30px 0 50px; }

/* ============================================
   头条推荐
   ============================================ */
.featured-section { margin-bottom: 30px; }
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.featured-item { overflow: hidden; border-radius: var(--radius); }
.featured-bg {
    display: block;
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.featured-overlay h2 {
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.featured-item:hover .featured-bg { transform: scale(1.02); }

/* ============================================
   内容布局
   ============================================ */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

/* ============================================
   文章列表
   ============================================ */
.article-list { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-header {
    padding: 18px 20px;
    border-bottom: 2px solid var(--primary);
}
.list-header h2 {
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.list-header h2 i { color: var(--primary); }
.list-body { padding: 15px; }
.article-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px dashed var(--border-color);
    transition: var(--transition);
}
.article-item:last-child { border-bottom: none; }
.article-item:hover { background: rgba(139, 69, 19, 0.03); }
.article-img {
    width: 140px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}
.article-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.article-item:hover .article-img img { transform: scale(1.05); }
.article-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.article-content h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}
.article-item:hover .article-content h3 { color: var(--primary); }
.article-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.article-meta span { display: flex; align-items: center; gap: 4px; }

/* ============================================
   侧边栏
   ============================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-widget h3 i { color: var(--secondary); }

.rank-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}
.rank-list li:last-child { border-bottom: none; }
.rank-num {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.rank-list a { flex: 1; font-size: 0.9rem; color: var(--text-dark); }
.rank-list a:hover { color: var(--primary); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(34, 139, 34, 0.1);
    color: var(--secondary);
    border-radius: 15px;
    font-size: 0.85rem;
}
.tag-item:hover { background: var(--secondary); color: #fff; }

/* 最新资讯 */
.news-list li { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border-color); }
.news-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.news-list a { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-dark); }
.news-list a:hover { color: var(--primary); }
.news-list i { color: var(--secondary); font-size: 0.75rem; }

/* 猜你喜欢 */
.like-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-color); }
.like-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.like-list a { display: flex; gap: 10px; align-items: center; }
.like-img { width: 60px; height: 45px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.like-img img { width: 100%; height: 100%; object-fit: cover; }
.like-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.like-content span { font-size: 0.85rem; color: var(--text-dark); line-height: 1.3; }
.like-content small { font-size: 0.75rem; color: var(--text-muted); }
.like-list a:hover .like-content span { color: var(--primary); }

/* 栏目导航 */
.sidebar-widget .nav-list li { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sidebar-widget .nav-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--border-color);
}
.sidebar-widget .nav-list li:last-child a { border-bottom: none; }
.sidebar-widget .nav-list a:hover { color: var(--primary); }
.sidebar-widget .nav-list i { color: var(--secondary); font-size: 0.75rem; }

/* ============================================
   底部
   ============================================ */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    padding: 30px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 25px;
}
.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-col h4 i { color: var(--accent); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: underline; }

/* ============================================
   页面头部
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 40px 0;
    margin-bottom: 25px;
}
.page-title { font-size: 1.5rem; color: #fff; margin-bottom: 10px; }
.page-breadcrumb { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.page-breadcrumb a { color: #fff; }
.page-breadcrumb a:hover { text-decoration: underline; }

/* ============================================
   文章详情页
   ============================================ */
.article-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 35px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}
.article-header { margin-bottom: 25px; }
.article-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}
.article-title { font-size: 1.5rem; color: var(--text-dark); margin-bottom: 15px; line-height: 1.4; }
.article-meta { display: flex; gap: 20px; font-size: 0.85rem; color: var(--text-muted); }
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-body { font-size: 0.95rem; line-height: 1.8; color: var(--text-dark); margin-bottom: 25px; }
.article-body p { margin-bottom: 15px; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 15px 0; }
.article-tags { padding-top: 15px; border-top: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-muted); }
.article-tags i { margin-right: 5px; color: var(--primary); }

/* ============================================
   分页
   ============================================ */
.pagination { text-align: center; padding: 25px 0; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 0.9rem;
}
.pagination a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
}
.pagination .active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .sidebar { flex-direction: row; flex-wrap: wrap; }
    .sidebar-widget { flex: 1 1 45%; }
}
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .main-nav { display: none; width: 100%; }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; }
    .nav-toggle { display: block; }
    .featured-grid { grid-template-columns: 1fr; }
    .featured-bg { height: 180px; }
    .article-item { flex-direction: column; }
    .article-img { width: 100%; height: 150px; }
    .sidebar-widget { flex: 1 1 100%; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .nav-list { gap: 5px; }
    .nav-item { padding: 6px 12px; font-size: 0.85rem; }
    .footer-grid { grid-template-columns: 1fr; }
}