﻿/* ============================================
   台湾旅游博客 - 完整CSS样式文件
   整合首页、列表页、详情页所有样式
   设计风格：现代高级感、台湾特色、响应式
   ============================================ */

/* ============================================
   CSS重置与基础样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 色彩系统 - 台湾蓝鹊蓝 + 山林绿 */
    --primary-blue: #1a5f7a;
    --secondary-blue: #2d8f9e;
    --accent-green: #57cc99;
    --light-green: #c7f9cc;
    --dark-gray: #2d3436;
    --medium-gray: #636e72;
    --light-gray: #f8f9fa;
    --white: #ffffff;

    /* 设计系统 */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.p-5 {
    padding: 3rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: var(--border-radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* 标题样式 */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-green);
}

.section-title.center {
    text-align: center;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    max-width: 800px;
}

/* ============================================
   通用组件样式 - 所有页面共用
   ============================================ */

/* 1. 导航栏样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    transition: var(--transition);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo-icon {
    margin-right: 8px;
    font-size: 1.8rem;
    color: var(--accent-green);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-gray);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-blue);
}

.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    background-color: var(--accent-green);
    padding: 8px 20px;
    border-radius: var(--border-radius);
    color: var(--dark-gray);
    font-weight: 600;
}

.nav-cta:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary-blue);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: var(--transition);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 10px;
}

.hamburger span:nth-child(3) {
    top: 20px;
}

.hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

.hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* 2. 面包屑导航 */
.breadcrumb {
    padding: 25px 0 15px;
    background-color: var(--light-gray);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--medium-gray);
}

.breadcrumb-link {
    color: var(--medium-gray);
}

.breadcrumb-link:hover {
    color: var(--primary-blue);
}

.breadcrumb-current {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 3. 页脚样式 */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 60px 0 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-description {
    color: #b2bec3;
    margin-bottom: 20px;
    line-height: 1.7;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-green);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #b2bec3;
    display: inline-block;
    padding: 2px 0;
}

.footer-links a:hover {
    color: var(--accent-green);
    transform: translateX(5px);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition);
}

.newsletter-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(87, 204, 153, 0.3);
}

.newsletter-input::placeholder {
    color: #b2bec3;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #b2bec3;
    font-size: 0.9rem;
}

/* 4. 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    border: none;
    box-shadow: var(--shadow-hover);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-5px);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ============================================
   首页特有样式
   ============================================ */
main {
    margin-top: 80px;
}

/* 特色推荐区块 */
.featured {
    padding: 60px 0 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.featured-card {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.featured-card-large {
    grid-column: span 2;
}

.featured-img {
    height: 280px;
    overflow: hidden;
}

.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-card:hover .featured-img img {
    transform: scale(1.05);
}

.featured-content {
    padding: 25px;
}

.featured-category {
    display: inline-block;
    background-color: var(--light-green);
    color: var(--primary-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
    line-height: 1.3;
}

.featured-excerpt {
    color: var(--medium-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* 分类区块 */
.categories {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary-blue);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.category-count {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* 最新文章区块 */
.latest {
    padding: 60px 0;
}

.latest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-img img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    color: var(--secondary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}



.article-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark-gray);
    line-height: 1.3;

    overflow: hidden;
}

.detail-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--dark-gray);

    overflow: hidden;
}

.article-excerpt {
    color: var(--medium-gray);
    margin-bottom: 15px;
    line-height: 1.5;
    height: 4.5em;
    overflow: hidden;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-top: auto;
}

/* 标签云区块 */
.tags {
    padding: 40px 0 60px;
    background-color: var(--light-gray);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag {
    background-color: var(--white);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tag:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
}

/* 实用贴士区块 */
.tips {
    padding: 60px 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.tip-card {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
}

.tip-card:hover {
    background-color: var(--light-green);
    transform: translateY(-5px);
}

.tip-icon {
    font-size: 2rem;
    color: var(--accent-green);
    margin-bottom: 20px;
    height: 50px;
    display: flex;
    align-items: center;
}

.tip-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.tip-content {
    color: var(--medium-gray);
    line-height: 1.7;
}

/* ============================================
   列表页特有样式
   ============================================ */

/* 页面标题区域 */
.page-header {
    padding: 40px 0 30px;
    background-color: var(--light-gray);
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.page-description {
    font-size: 1.1rem;
    color: var(--medium-gray);
    max-width: 800px;
    line-height: 1.7;
}

/* 内容区域 - 两列布局 */
.content-area {
    padding: 40px 0 60px;
}

.content-layout {
    display: flex;
    gap: 40px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 30%;
    max-width: 350px;
    flex-shrink: 0;
}

/* 文章列表网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* 侧边栏样式 */
.sidebar-widget {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-green);
}

/* 推荐文章列表 */
.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommended-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.recommended-item:hover {
    transform: translateX(5px);
}

.recommended-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recommended-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.recommended-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recommended-item:hover .recommended-img img {
    transform: scale(1.05);
}

.recommended-content {
    flex: 1;
}

.recommended-title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--dark-gray);
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.recommended-meta {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 订阅侧边栏 */
.subscribe-widget {
    background-color: var(--light-green);
    border-radius: var(--border-radius);
    padding: 25px;
}

.subscribe-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.subscribe-description {
    color: var(--medium-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscribe-input {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(87, 204, 153, 0.2);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background-color: var(--white);
    color: var(--dark-gray);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pagination-item:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.pagination-item.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

.pagination-prev,
.pagination-next {
    width: auto;
    padding: 0 20px;
}

.pagination-ellipsis {
    background-color: transparent;
    box-shadow: none;
    cursor: default;
}

.pagination-ellipsis:hover {
    background-color: transparent;
    color: var(--dark-gray);
    transform: none;
}

/* ============================================
   详情页特有样式
   ============================================ */

/* 文章头部 */
.article-header {
    margin-bottom: 40px;
}

.article-category {
    display: inline-block;
    background-color: var(--light-green);
    color: var(--primary-blue);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}


.article-subtitle {
    font-size: 1.3rem;
    color: var(--medium-gray);
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 400;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--medium-gray);
    font-size: 0.95rem;
}

.meta-icon {
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.author-details p {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* 文章特色图片 */
.article-featured-img {
    margin-bottom: 40px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-featured-img img {
    width: 100%;
    height: auto;
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
    padding: 10px;
    background-color: var(--light-gray);
    font-style: italic;
}

/* 文章正文 */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body>* {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--primary-blue);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-green);
}

.article-body h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--accent-green);
    padding: 20px 30px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    font-style: italic;
    color: var(--medium-gray);
}

.article-body blockquote p {
    margin-bottom: 0;
}

.article-body ul,
.article-body ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-body li {
    margin-bottom: 0.8rem;
    position: relative;
}

.article-body ul li::before {
    content: '•';
    color: var(--accent-green);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.article-body ol {
    counter-reset: item;
}

.article-body ol li {
    counter-increment: item;
}

.article-body ol li::before {
    content: counter(item) ". ";
    color: var(--accent-green);
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

.article-body img {
    border-radius: var(--border-radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
    max-width: 100%;
    height: auto;
}

.tip-box {
    background-color: var(--light-green);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 2rem 0;
    border-left: 4px solid var(--accent-green);
}

.tip-title {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 文章底部 */
.article-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.article-tags span {
    color: var(--medium-gray);
    font-weight: 600;
}

/* 分享按钮 */
.share-section {
    margin-bottom: 40px;
}

.share-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.share-fb:hover {
    background-color: #1877F2;
    color: white;
}

.share-twitter:hover {
    background-color: #1DA1F2;
    color: white;
}

.share-line:hover {
    background-color: #00C300;
    color: white;
}

/* 评论区域 */
.comments-section {
    margin-bottom: 50px;
}

.comments-list {
    margin-bottom: 40px;
}

.comment {
    padding: 25px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    transition: var(--transition);
}

.comment:hover {
    box-shadow: var(--shadow-light);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.comment-date {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.comment-content {
    line-height: 1.6;
}

.comment-form {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(87, 204, 153, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* 相关文章推荐 */
.related-articles {
    margin-bottom: 60px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.article-category-small {
    display: inline-block;
    color: var(--secondary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-title-small {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--dark-gray);
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.article-excerpt {
    color: var(--medium-gray);
    margin-bottom: 15px;
    line-height: 1.5;
    height: 4.5em;
    overflow: hidden;
    flex-grow: 1;
}

.article-meta-small {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-top: auto;
}

/* 作者信息侧边栏 */
.author-widget {
    text-align: center;
}

.author-widget .author-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.author-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.author-widget p {
    color: var(--medium-gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/*author*/
.author-info {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin: 10px 0;
    background: #dff0f8;
    border-radius: 20px;

}

.author-info img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex: auto;
    border: 4px solid white;
    overflow: clip;
    margin: 0;
}

.author-name {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

/* ============================================
   响应式设计 - 移动端适配
   ============================================ */

/* 中等屏幕 (平板) */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .featured-card-large {
        grid-column: span 1;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .latest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .article-title {
        font-size: 2rem;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 小屏幕 (手机) */
@media (max-width: 768px) {
    .author-info {
        flex-direction: column;
        align-items: center;
    }

    .author-name {
        text-align: center;
    }

    header{
        position: relative;
    }

    main{
        margin-top: 0;
    }

    .breadcrumb{
        padding: 10px 0;
    }

    .page-header{
        padding: 10px 0;
    }

    .featured,.latest{
        padding: 30px 0;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 80px 20px 40px;
        box-shadow: var(--shadow);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .nav-container {
        padding: 12px 20px;
    }

    .latest-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-subtitle {
        font-size: 1.1rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 15px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pagination-item {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .pagination-prev,
    .pagination-next {
        padding: 0 15px;
        font-size: 0.9rem;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .page-title {
        font-size: 1.4rem;
        margin: 0;
    }

    .article-title-small {
        font-size: 1.1rem;
    }

    .share-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .share-btn {
        justify-content: center;
    }

    .comment-form {
        padding: 20px;
    }

    .back-to-top {
        bottom: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* 打印样式 */
@media print {

    header,
    footer,
    .breadcrumb,
    .sidebar,
    .share-section,
    .comments-section,
    .back-to-top {
        display: none !important;
    }

    main {
        margin-top: 0;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .article-featured-img {
        max-height: 300px;
    }

    .article-body img {
        max-height: 250px;
    }

    .tip-box,
    .article-card,
    .featured-card,
    .category-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}