/* css.css - 中国母婴保健网 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background-color: #fff9f9; color: #555; line-height: 1.8; }
a { text-decoration: none; color: #555; transition: all 0.3s ease; }
a:hover { color: #ff6b81; } /* 柔和的婴儿粉色为主色调 */
ul, li { list-style: none; }
.container { width: 1200px; margin: 0 auto; overflow: hidden; }

/* Header (整合到各页面) */
.header { background-color: #fff; border-bottom: 2px solid #ffe4e8; box-shadow: 0 2px 10px rgba(255,107,129,0.05); }
.top-bar { height: 110px; display: flex; align-items: center; justify-content: space-between; }
.logo h1 { font-size: 34px; font-weight: normal; color: #ff6b81; display: flex; align-items: center; font-family: "楷体", "KaiTi", serif; }
.logo h1 a { color: #ff6b81; }
.logo span { font-size: 15px; color: #888; margin-left: 15px; font-family: "Microsoft YaHei"; padding-top: 10px; }
.search { display: flex; }
.search input { padding: 12px 20px; width: 280px; border: 2px solid #ffe4e8; border-right: none; outline: none; border-radius: 30px 0 0 30px; font-size: 14px; background: #fffafb; }
.search input:focus { border-color: #ffb6c1; }
.search button { padding: 12px 30px; background: #ff6b81; color: #fff; border: none; cursor: pointer; border-radius: 0 30px 30px 0; font-size: 15px; letter-spacing: 2px; }
.nav { background-color: #ff6b81; }
.nav ul { display: flex; justify-content: center; }
.nav li a { display: block; padding: 0 35px; line-height: 55px; color: #fff; font-size: 16px; }
.nav li a:hover, .nav li a.active { background-color: #ff4d67; }

/* Layout */
.main { display: flex; justify-content: space-between; margin: 30px auto; }
.left-col { width: 840px; }
.right-col { width: 330px; }

/* Block Title */
.block-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #ffe4e8; margin-bottom: 20px; padding-bottom: 10px; }
.block-title h2 { font-size: 22px; color: #333; position: relative; padding-left: 20px; font-weight: normal; }
.block-title h2::before { content: '♥'; position: absolute; left: 0; top: 2px; color: #ff6b81; font-size: 18px; }
.block-title .more { font-size: 14px; color: #999; border: 1px solid #eee; padding: 2px 10px; border-radius: 15px; }
.block-title .more:hover { color: #ff6b81; border-color: #ff6b81; }

/* Index Cards (孕育百科/育儿知识) */
.card-list { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.card-item { width: calc(50% - 10px); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.3s; border: 1px solid #fff5f6; }
.card-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(255,107,129,0.08); }
.card-item .pic { display: block; width: 100%; height: 220px; overflow: hidden; }
.card-item .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card-item:hover .pic img { transform: scale(1.05); }
.card-item .text { padding: 20px; }
.card-item h3 { font-size: 18px; margin-bottom: 10px; font-weight: normal; }
.card-item p { color: #888; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* List Page (育儿文章列表) */
.article-list .item { display: flex; background: #fff; padding: 25px; margin-bottom: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: all 0.3s; border: 1px solid transparent; }
.article-list .item:hover { border-color: #ffe4e8; box-shadow: 0 8px 20px rgba(255,107,129,0.06); }
.article-list .item .pic { width: 220px; height: 150px; border-radius: 8px; overflow: hidden; margin-right: 25px; flex-shrink: 0; }
.article-list .item .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-list .item:hover .pic img { transform: scale(1.05); }
.article-list .item .info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.article-list .item h3 { font-size: 20px; font-weight: normal; }
.article-list .item .desc { color: #777; font-size: 14px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-list .item .meta { display: flex; align-items: center; color: #aaa; font-size: 13px; }
.article-list .item .meta .tag { background: #fff0f2; color: #ff6b81; padding: 2px 10px; border-radius: 10px; margin-right: 15px; }

/* Sidebar Widget */
.widget { background: #fff; padding: 25px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); margin-bottom: 25px; border-top: 4px solid #ffb6c1; }
.rank-list li { margin-bottom: 15px; display: flex; align-items: flex-start; }
.rank-list li:last-child { margin-bottom: 0; }
.rank-list .num { display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; background: #f5f5f5; color: #999; font-size: 12px; margin-right: 12px; border-radius: 50%; }
.rank-list li:nth-child(1) .num { background: #ff6b81; color: #fff; }
.rank-list li:nth-child(2) .num { background: #ff8c9d; color: #fff; }
.rank-list li:nth-child(3) .num { background: #ffb6c1; color: #fff; }
.rank-list a { flex: 1; font-size: 15px; line-height: 1.6; }

/* Breadcrumb & Pagination */
.breadcrumb { background: #fff; padding: 15px 25px; margin-bottom: 20px; font-size: 14px; border-radius: 10px; color: #888; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.breadcrumb a { color: #555; }
.pagination { text-align: center; margin: 40px 0; }
.pagination li { display: inline-block; margin: 0 3px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; background: #fff; border: 1px solid #ffe4e8; border-radius: 20px; color: #666; }
.pagination .thisclass, .pagination a:hover { background: #ff6b81; color: #fff; border-color: #ff6b81; }

/* Article Content */
.article-box { background: #fff; padding: 45px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.article-title { text-align: center; margin-bottom: 30px; }
.article-title h1 { font-size: 28px; margin-bottom: 20px; color: #333; font-weight: normal; }
.article-meta { color: #999; font-size: 13px; text-align: center; padding-bottom: 20px; border-bottom: 1px dashed #ffe4e8; margin-bottom: 35px; }
.article-meta span { margin: 0 15px; }
.article-content { font-size: 16px; line-height: 2.2; color: #444; }
.article-content p { margin-bottom: 20px; text-align: justify; }
.article-content img { max-width: 100%; height: auto; display: block; margin: 25px auto; border-radius: 8px; }
.article-nav { margin-top: 50px; padding-top: 20px; border-top: 1px solid #ffe4e8; font-size: 15px; color: #666; }
.article-nav p { margin-bottom: 12px; }

/* Footer */
.footer { background: #fff; border-top: 1px solid #ffe4e8; color: #888; text-align: center; padding: 50px 0; margin-top: 40px; box-shadow: 0 -2px 10px rgba(255,107,129,0.03); }
.footer p { margin-bottom: 12px; font-size: 14px; }
.footer a { color: #888; }
.footer a:hover { color: #ff6b81; }
.footer-tips { font-size: 12px; color: #bbb; margin-top: 20px; }