/* =========================================================
   PHPEMS 前台 Content 模块样式
   来源：app/Content/Tpls/App/{Index,Category,Content}.tpl 内联 <style> 合并抽离
   引入：app/Content/Tpls/App/LayOut.tpl（前台公共布局）
   公共版式（.container / .header / .logo / .page-main / .sidebar / .category-list /
   .category-item / .category-count / .content-area / .breadcrumb / .pagination /
   .page-footer 等）见 resources/styles/phpems/css/style.css，此处只放模块专用规则
   ========================================================= */

/* 静态页头导航（LayOut 内直出链接，利于爬虫抓取） */
.logo a { color: inherit; text-decoration: none; }
.nav a.active { color: #fff; font-weight: 600; }

/* ===== 通用状态提示 ===== */
.state-tip { text-align: center; color: #6b7280; padding: 40px 0; font-size: 14px; }
.empty-tip { text-align: center; color: #9ca3af; padding: 60px 0; font-size: 15px; }

/* ===== 频道页（Index.tpl）===== */
.channel-banner { background: linear-gradient(135deg, #134e4a 0%, #0f766e 100%); color: #fff; padding: 40px 0; margin-bottom: 28px; }
.channel-banner .container { display: flex; flex-direction: column; gap: 8px; }
.channel-banner h1 { font-size: 30px; margin: 0; }
.channel-banner p { font-size: 15px; margin: 0; color: #d1fae5; }

/* 分类导航卡片 */
.cat-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 12px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-decoration: none; transition: all 0.2s; border: 1px solid transparent; }
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,118,110,0.15); border-color: #0f766e; }
.cat-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-body { min-width: 0; }
.cat-card-title { font-size: 16px; font-weight: 600; color: #1f2937; margin: 0 0 4px 0; }
.cat-card-desc { font-size: 13px; color: #6b7280; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 每类最新栏目 */
.cat-section { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 22px; overflow: hidden; }
.cat-section-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid #eef0f2; }
.cat-section-title { font-size: 18px; font-weight: 600; color: #065f46; margin: 0; }
.cat-section-more { font-size: 13px; color: #0f766e; text-decoration: none; }
.cat-section-more:hover { text-decoration: underline; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding: 20px 22px; }
.cat-item { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.cat-item-thumb { width: 100%; height: 150px; border-radius: 8px; overflow: hidden; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.cat-item-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.cat-item:hover .cat-item-thumb img { transform: scale(1.05); }
.cat-item-title { font-size: 15px; color: #1f2937; margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-item:hover .cat-item-title { color: #0f766e; }
.cat-item-meta { font-size: 12px; color: #9ca3af; display: flex; gap: 14px; }

/* ===== 列表页（Category.tpl）===== */
.news-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.news-section-title { font-size: 20px; font-weight: 600; color: #065f46; margin: 0; }
.news-tabs { display: flex; gap: 8px; }
.news-tab { padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all 0.2s; border: 1px solid #e5e7eb; background: #fff; color: #6b7280; }
.news-tab:hover { border-color: #0f766e; color: #0f766e; }
.news-tab.active { background: #0f766e; color: #fff; border-color: #0f766e; }

/* 图文列表 */
.news-image-list { display: flex; flex-direction: column; gap: 16px; }
.news-image-item { display: flex; gap: 20px; padding: 20px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.2s; cursor: pointer; text-decoration: none; }
.news-image-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.news-image-thumb { width: 200px; height: 140px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.news-image-thumb.is-empty { width: 200px; height: 140px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #9ca3af; }
.news-image-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.news-image-content h3 { font-size: 18px; color: #1f2937; margin: 0 0 10px 0; line-height: 1.4; }
.news-image-content h3 a { color: inherit; text-decoration: none; }
.news-image-content h3 a:hover { color: #0f766e; }
.news-image-content p { font-size: 14px; color: #6b7280; line-height: 1.6; margin: 0 0 12px 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-image-meta { display: flex; gap: 16px; font-size: 12px; color: #9ca3af; }
.news-image-meta span { display: flex; align-items: center; gap: 4px; }

/* 纯文字列表 */
.news-text-list { display: flex; flex-direction: column; gap: 0; }
.news-text-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #fff; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; border-bottom: 1px dashed #e5e7eb; text-decoration: none; }
.news-text-item:hover { border-color: #0f766e; }
.news-text-item:last-child { margin-bottom: 0; }
.news-text-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.news-text-index { width: 28px; height: 28px; background: #f3f4f6; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #6b7280; flex-shrink: 0; }
.news-text-item:nth-child(1) .news-text-index { background: #ef4444; color: #fff; }
.news-text-item:nth-child(2) .news-text-index { background: #f97316; color: #fff; }
.news-text-item:nth-child(3) .news-text-index { background: #f59e0b; color: #fff; }
.news-text-title { font-size: 15px; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-text-item:hover .news-text-title { color: #0f766e; }
.news-text-meta { font-size: 12px; color: #9ca3af; margin-left: 16px; flex-shrink: 0; }
.news-text-arrow { color: #d1d5db; margin-left: 12px; transition: color 0.2s; }
.news-text-item:hover .news-text-arrow { color: #0f766e; }

/* 侧栏下钻辅助 */
.sidebar-cur { display: block; padding: 10px 16px; font-size: 13px; color: #065f46; background: #f0fdf4; border-bottom: 1px solid #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-back { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 16px; border: 1px dashed #d1d5db; border-radius: 8px; font-size: 14px; color: #4b5563; text-decoration: none; transition: all 0.2s; }
.sidebar-back:hover { border-color: #0f766e; color: #0f766e; background: #f0fdf4; }

/* ===== 详情页（Content.tpl）===== */
.article { background: #f9fafb; padding: 25px 35px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.article-header { padding: 25px; text-align: center; }
.article-title { font-size: 28px; font-weight: 700; color: #1f2937; margin: 0 0 16px 0; line-height: 1.5; }
.article-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; justify-content: center; }
.article-meta-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #6b7280; }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: 12px; margin-bottom: 32px; }
.article-content { font-size: 16px; line-height: 1.8; color: #374151; }
.article-content h2 { font-size: 22px; font-weight: 600; color: #1f2937; margin: 32px 0 16px 0; padding-left: 12px; border-left: 4px solid #0f766e; }
.article-content h3 { font-size: 18px; font-weight: 600; color: #1f2937; margin: 24px 0 12px 0; }
.article-content p { margin: 0 0 16px 0; }
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content li { margin: 8px 0; }
.article-content a { text-decoration: none; }
.article-content blockquote { border-left: 4px solid #0f766e; padding: 16px 20px; margin: 24px 0; background: #f0fdf4; border-radius: 0 8px 8px 0; font-style: italic; color: #4b5563; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }
.article-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 14px; color: #0f766e; }
.article-content pre { background: #1f2937; color: #e5e7eb; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 20px 0; }
.article-content pre code { background: transparent; color: inherit; padding: 0; }
.article-summary { border-left: 4px solid #0f766e; background: #f0fdf4; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 24px 0; font-size: 15px; color: #4b5563; line-height: 1.7; }
.article-link-box { margin: 0 0 24px 0; padding: 16px 20px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; font-size: 14px; color: #92400e; }
.article-link-box a { color: #b45309; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.tag-item { padding: 6px 14px; background: #f3f4f6; color: #4b5563; border-radius: 6px; font-size: 13px; text-decoration: none; transition: all 0.2s; }
.tag-item:hover { background: #0f766e; color: #fff; }
.article-actions { display: flex; gap: 12px; margin: 32px 0; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; cursor: pointer; transition: all 0.2s; border: 1px solid #e5e7eb; background: #fff; color: #4b5563; text-decoration: none; }
.action-btn:hover { border-color: #0f766e; color: #0f766e; background: #f0fdf4; }
.article-author-box { display: flex; gap: 20px; padding: 24px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin: 32px 0; }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.author-info h4 { font-size: 18px; color: #1f2937; margin: 0 0 8px 0; }
.author-info p { font-size: 14px; color: #6b7280; margin: 0; line-height: 1.6; }

/* 详情页正文容器：沿用原内联版式与状态提示大间距 */
.content-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.article-container .state-tip { padding: 80px 0; font-size: 15px; }