/*
Theme Name: 通用网站模板
Theme URI: http://1201.fg27.com/
Description: 通用网站模板 - 自适应PC端和手机端
Version: 1.0
Author: Universal Theme
Text Domain: universal-theme
*/

/* ============================================
   通用网站模板样式 - 通用版
   适配PC端和手机端
   可自定义：修改根变量即可改变主题色
   ============================================ */

/* ===== CSS 变量（主题色配置） ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --bg-gray: #f1f5f9;
    --bg-dark: #1e293b;
    --bg-footer: #0f172a;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;
    
    --container-width: 1200px;
    --header-height: 80px;
    --topbar-height: 36px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary);
}

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* ===== Utility ===== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.fl { float: left; }
.fr { float: right; }
.hidden { display: none; }
.text-center { text-align: center; }
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Topbar ===== */
.topbar {
    background: var(--bg-dark);
    height: var(--topbar-height);
    line-height: var(--topbar-height);
    font-size: var(--font-size-xs);
    color: var(--text-light);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.topbar-left a {
    color: var(--text-light);
    margin-right: 18px;
}
.topbar-left a:hover {
    color: var(--text-white);
}
.topbar-right a {
    color: var(--text-light);
    margin-left: 18px;
}
.topbar-right a:hover {
    color: var(--text-white);
}

/* ===== Header ===== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.header .container {
    display: flex;
    align-items: center;
    height: var(--header-height);
    justify-content: space-between;
}
.logo {
    flex-shrink: 0;
}
.logo a {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
}
.logo img {
    height: 40px;
    margin-right: 10px;
}
.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-text span {
    color: var(--primary);
}

/* ===== Search ===== */
.header-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header-search form {
    display: flex;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.header-search form:focus-within {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.header-search input {
    border: none;
    outline: none;
    padding: 8px 16px;
    width: 260px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--bg-white);
}
.header-search input::placeholder {
    color: var(--text-light);
}
.header-search button {
    border: none;
    background: var(--primary);
    color: var(--text-white);
    padding: 8px 18px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-search button:hover {
    background: var(--primary-dark);
}

/* ===== Navigation ===== */
.nav-wrap {
    background: var(--primary);
    box-shadow: var(--shadow);
}
.nav {
    display: flex;
    position: relative;
}
.nav > li {
    position: relative;
}
.nav > li > a {
    display: block;
    padding: 0 22px;
    height: 44px;
    line-height: 44px;
    color: var(--text-white);
    font-size: var(--font-size-base);
    transition: background 0.2s;
    white-space: nowrap;
}
.nav > li > a:hover,
.nav > li.current-menu-item > a {
    background: var(--primary-dark);
}
.nav > li > a.home-icon {
    font-size: 18px;
    padding: 0 18px;
}

/* Dropdown */
.nav > li:hover .sub-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 999;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s;
}
.sub-menu li:last-child a {
    border-bottom: none;
}
.sub-menu li a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 26px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    padding: 10px 15px;
    line-height: 1;
}
.menu-toggle .close-icon {
    display: none;
}
.menu-toggle.active .menu-icon {
    display: none;
}
.menu-toggle.active .close-icon {
    display: inline;
}

/* ===== Hero / Banner ===== */
.hero-section {
    padding: 20px 0;
}
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.hero-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow);
}
.hero-slider .slide {
    position: relative;
    display: none;
}
.hero-slider .slide.active {
    display: block;
}
.hero-slider .slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.hero-slider .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--text-white);
    font-size: var(--font-size-lg);
    font-weight: 600;
}
.slider-dots {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
}
.slider-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}
.slider-dots span.active {
    background: var(--text-white);
    width: 24px;
    border-radius: 5px;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}
.hero-slider:hover .slider-arrow {
    opacity: 1;
}
.slider-arrow:hover {
    background: var(--primary);
    color: var(--text-white);
}
.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

/* Hero Sidebar */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hero-news {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    flex: 1;
}
.hero-news-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-news-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}
.hero-news-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}
.hero-news-list li:last-child {
    border-bottom: none;
}
.hero-news-list li a {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hero-news-list li a:hover {
    color: var(--primary);
}
.hero-news-list li .news-time {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-left: 8px;
    flex-shrink: 0;
}

/* Hero Right Image */
.hero-img-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}
.hero-img-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.hero-img-card .img-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: var(--text-white);
    font-size: var(--font-size-sm);
}

/* ===== Section ===== */
.section {
    padding: 30px 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}
.section-header .section-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-header .section-title .title-icon {
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}
.section-header .section-tabs {
    display: flex;
    gap: 0;
}
.section-header .section-tabs a {
    padding: 4px 14px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.section-header .section-tabs a:hover,
.section-header .section-tabs a.active {
    color: var(--primary);
    background: var(--primary-bg);
}
.section-header .more-link {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-header .more-link:hover {
    color: var(--primary);
}


/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.card:hover .card-img img {
    transform: scale(1.05);
}
.card-img .card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--text-white);
    padding: 2px 10px;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}
.card-body {
    padding: 14px 16px 16px;
}
.card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 42px;
}
.card:hover .card-title {
    color: var(--primary);
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

/* ===== List with Thumbnails ===== */
.list-thumb {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.list-thumb-item {
    display: flex;
    gap: 14px;
    background: var(--bg-white);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.list-thumb-item:hover {
    transform: translateX(3px);
}
.list-thumb-item .thumb-img {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.list-thumb-item .thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.list-thumb-item .thumb-info {
    flex: 1;
    min-width: 0;
}
.list-thumb-item .thumb-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.list-thumb-item:hover .thumb-title {
    color: var(--primary);
}
.list-thumb-item .thumb-desc {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.list-thumb-item .thumb-meta {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-top: 6px;
}

/* ===== Text List ===== */
.text-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.text-list li:last-child {
    border-bottom: none;
}
.text-list li a {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-list li a:hover {
    color: var(--primary);
}
.text-list li .list-date {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    flex-shrink: 0;
    margin-left: 15px;
}

/* ===== Two Column Layout ===== */
.col-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 14px 0;
    font-size: var(--font-size-sm);
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--text-secondary);
}
.breadcrumb a:hover {
    color: var(--primary);
}
.breadcrumb span {
    color: var(--text-primary);
}
.breadcrumb .sep {
    margin: 0 8px;
    color: var(--text-light);
}

/* ===== Page Layout (List/Content) ===== */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 20px 0 40px;
}
.page-main {
    min-width: 0;
}
.page-sidebar {
    min-width: 0;
}

/* ===== Sidebar Widgets ===== */
.widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.widget-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    padding: 15px 18px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}
.widget-body {
    padding: 15px 18px;
}
.widget-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}
.widget-list li:last-child {
    border-bottom: none;
}
.widget-list li a {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    display: block;
}
.widget-list li a:hover {
    color: var(--primary);
    padding-left: 4px;
}

/* Widget - Tags */
.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.widget-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-gray);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.widget-tags a:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* Widget - Image */
.widget-img img {
    width: 100%;
    border-radius: var(--radius-sm);
}

/* ===== Category Banner ===== */
.cat-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 30px 40px;
    color: var(--text-white);
    margin-bottom: 20px;
}
.cat-banner h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: 8px;
}
.cat-banner p {
    font-size: var(--font-size-sm);
    opacity: 0.85;
}

/* ===== Article List ===== */
.article-list .article-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    transition: transform 0.2s;
}
.article-list .article-item:hover {
    transform: translateX(3px);
}
.article-item .article-img {
    width: 220px;
    height: 150px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-item .article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-item:hover .article-img img {
    transform: scale(1.05);
}
.article-item .article-info {
    flex: 1;
    min-width: 0;
}
.article-item .article-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-item:hover .article-title {
    color: var(--primary);
}
.article-item .article-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.article-item .article-meta {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}
.article-item .article-meta .cat-link {
    color: var(--primary);
    background: var(--primary-bg);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}
.article-item .article-meta .cat-link:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 30px 0 10px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    background: var(--bg-white);
    transition: all 0.2s;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.pagination .current {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* ===== Content Page ===== */
.content-header {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
}
.content-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
}
.content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    align-items: center;
}

.content-body {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    font-size: var(--font-size-md);
    line-height: 1.9;
    color: var(--text-primary);
}
.content-featured-img {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.content-featured-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}
.content-body h2 {
    font-size: 22px;
    margin: 30px 0 15px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
}
.content-body h3 {
    font-size: 18px;
    margin: 25px 0 12px;
}
.content-body p {
    margin-bottom: 16px;
}
.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px auto;
    display: block;
}
.content-body a {
    color: var(--primary);
    text-decoration: underline;
}
.content-body a:hover {
    color: var(--primary-dark);
}
.content-body ul, .content-body ol {
    margin: 15px 0;
    padding-left: 25px;
}
.content-body ul li {
    list-style: disc;
    margin-bottom: 8px;
}
.content-body ol li {
    list-style: decimal;
    margin-bottom: 8px;
}
.content-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--primary-bg);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
}
.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.content-body table th,
.content-body table td {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: left;
}
.content-body table th {
    background: var(--bg-gray);
    font-weight: 600;
}
.content-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 20px 0;
}
.content-body code {
    background: var(--bg-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.content-body pre code {
    background: none;
    padding: 0;
}

/* Content Navigation */
.content-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}
.content-nav a {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    max-width: 45%;
}
.content-nav a:hover {
    color: var(--primary);
}
.content-nav .prev-link::before {
    content: '\2190 ';
}
.content-nav .next-link::after {
    content: ' \2192';
}

/* Related Content */
.related-section {
    margin-top: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}
.related-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.related-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.related-item {
    text-align: center;
}
.related-item img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.related-item .related-name {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-item:hover .related-name {
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-footer);
    color: var(--text-light);
    margin-top: 40px;
}
.footer-widgets {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
}
.footer-col h3 {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}
.footer-col p {
    font-size: var(--font-size-sm);
    line-height: 1.8;
}
.footer-col ul li {
    padding: 5px 0;
}
.footer-col ul li a {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}
.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 4px;
}
.footer-contact li {
    display: flex;
    gap: 8px;
    font-size: var(--font-size-sm);
    margin-bottom: 10px;
    align-items: flex-start;
}

.footer-bottom {
    padding: 16px 0;
    font-size: var(--font-size-xs);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-bottom a {
    color: var(--text-light);
}
.footer-bottom a:hover {
    color: var(--primary);
}
.footer-bottom .footer-links {
    margin-bottom: 6px;
}
.footer-bottom .footer-links a {
    margin: 0 10px;
}

/* ===== Mobile Nav ===== */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-white);
    z-index: 1001;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.mobile-nav.open {
    left: 0;
}
.mobile-nav-header {
    background: var(--primary);
    padding: 20px;
    color: var(--text-white);
    text-align: center;
}
.mobile-nav-header .logo-text {
    color: var(--text-white);
    font-size: 20px;
}
.mobile-nav .mobile-nav-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
}
.mobile-nav-list > li {
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav-list > li > a {
    display: block;
    padding: 14px 20px;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: 500;
}
.mobile-nav-list > li > a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}
.mobile-nav-sub {
    display: none;
    background: var(--bg-gray);
}
.mobile-nav-sub li a {
    display: block;
    padding: 10px 20px 10px 36px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}
.mobile-nav-sub li a:hover {
    color: var(--primary);
}
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}
.mobile-nav-overlay.show {
    display: block;
}

/* ===== Responsive - 平板 ===== */
@media (max-width: 991px) {
    .container { max-width: 100%; }
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-slider .slide img {
        height: 300px;
    }
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .page-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .list-thumb {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-search input {
        width: 180px;
    }
    .col-2 {
        grid-template-columns: 1fr;
    }
}

/* ===== Responsive - 手机 ===== */
@media (max-width: 767px) {
    :root {
        --header-height: 60px;
        --topbar-height: 0px;
    }

    .topbar {
        display: none;
    }

    .header-search {
        display: none;
    }

    .nav-wrap {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: block;
    }

    .hero-section {
        padding: 10px 0;
    }
    .hero-slider .slide img {
        height: 200px;
    }
    .hero-slider .slide-caption {
        font-size: var(--font-size-sm);
        padding: 12px 16px;
    }
    .slider-arrow {
        display: none;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .card-body {
        padding: 10px 12px 12px;
    }
    .card-title {
        font-size: var(--font-size-sm);
        min-height: auto;
    }

    .section {
        padding: 15px 0;
    }
    .section-header {
        flex-wrap: wrap;
    }
    .section-header .section-tabs {
        display: none;
    }
    .section-header .section-title {
        font-size: var(--font-size-md);
    }

    .article-list .article-item {
        flex-direction: column;
        padding: 14px;
    }
    .article-item .article-img {
        width: 100%;
        height: 180px;
    }

    .list-thumb-item {
        flex-direction: column;
    }
    .list-thumb-item .thumb-img {
        width: 100%;
        height: 160px;
    }

    .content-header {
        padding: 18px;
    }
    .content-header h1 {
        font-size: var(--font-size-xl);
    }
    .content-body {
        padding: 18px;
        font-size: var(--font-size-base);
    }
    .content-featured-img {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.content-featured-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}
.content-body h2 {
        font-size: 18px;
    }

    .cat-banner {
        padding: 20px;
    }
    .cat-banner h1 {
        font-size: var(--font-size-xl);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .footer-widgets {
        padding: 25px 0;
    }

    .pagination a, .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: var(--font-size-xs);
    }

    .breadcrumb {
        font-size: var(--font-size-xs);
        padding: 10px 0;
    }

    .container {
        padding: 0 12px;
    }

    .content-nav {
        flex-direction: column;
        gap: 10px;
    }
    .content-nav a {
        max-width: 100%;
    }

    .hero-news {
        padding: 14px;
    }
}

/* ===== 小屏手机 ===== */
@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .card-img .card-category {
        font-size: 10px;
        padding: 1px 6px;
    }
    .card-meta {
        font-size: 10px;
    }
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 99;
    transition: all 0.3s;
}
.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.back-to-top.show {
    display: flex;
}
@media (max-width: 767px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== Page Links (WP pagination inside content) ===== */
.page-links {
    text-align: center;
    padding: 20px 0;
    font-size: var(--font-size-sm);
}
.page-links a, .page-links span {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}
.page-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Comments ===== */
.comments-area {
    margin-top: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}
.comment-reply-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.comment-form .submit {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    padding: 10px 24px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.comment-form .submit:hover {
    background: var(--primary-dark);
}

/* ===== Responsive - 平板 ===== */
@media (max-width: 991px) {
    .container { max-width: 100%; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-slider .slide img { height: 280px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .list-thumb { grid-template-columns: 1fr; }
    .page-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-item { flex-direction: column; }
    .article-item .article-img { width: 100%; height: 200px; }
    .topbar { display: none; }
    .header-search input { width: 180px; }
    .nav > li > a { padding: 0 14px; font-size: 13px; }
}

/* ===== Responsive - 手机 ===== */
@media (max-width: 767px) {
    :root { --header-height: 60px; }
    .topbar { display: none; }
    .header-search { display: none; }
    .menu-toggle { display: block; }
    .nav-wrap .nav { display: none; }
    .mobile-nav { display: block; }
    .hero-slider .slide img { height: 200px; }
    .hero-slider .slide-caption { font-size: 14px; padding: 12px 16px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-body { padding: 10px; }
    .card-title { font-size: 13px; min-height: auto; }
    .card-meta { font-size: 11px; }
    .section-header { flex-wrap: wrap; }
    .section-header .section-tabs { margin-top: 8px; }
    .section-header .section-tabs a { font-size: 12px; padding: 2px 10px; }
    .list-thumb { grid-template-columns: 1fr; }
    .list-thumb-item .thumb-img { width: 100px; height: 70px; }
    .page-layout { grid-template-columns: 1fr; }
    .cat-banner { padding: 20px; }
    .cat-banner h1 { font-size: 20px; }
    .article-item { flex-direction: column; padding: 14px; }
    .article-item .article-img { width: 100%; height: 180px; }
    .article-item .article-title { font-size: 16px; }
    .content-header { padding: 20px; }
    .content-header h1 { font-size: 20px; }
    .content-body { padding: 20px; }
    .content-featured-img {
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
}
.content-featured-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}
.content-body h2 { font-size: 18px; }
    .content-nav { flex-direction: column; gap: 10px; }
    .content-nav a { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-widgets { padding: 25px 0; }
    .slider-arrow { display: none; }
    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
    .col-2 { grid-template-columns: 1fr; }
    .col-2-left { border-right: none; padding-right: 0; }
    .col-2-right { padding-left: 0; }
}

/* ===== Responsive - 小屏手机 ===== */
@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .card-img .card-category { font-size: 10px; padding: 1px 8px; }
    .hero-news { padding: 14px; }
    .hero-news-list li a { font-size: 12px; }
    .pagination a, .pagination span { min-width: 30px; height: 30px; font-size: 12px; padding: 0 8px; }
}
