﻿/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #f60;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 响应式容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* 工具类 */
.blank5 { height: 5px; }
.blank10 { height: 10px; }
.blank20 { height: 20px; }
.text-center { text-align: center; }
.yh-blue { color: #084282; }

/* 头部样式 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 顶部工具栏 */
.header-tools {
    background: #2c3e50;
    color: #fff;
    padding: 8px 0;
    font-size: 12px;
}

.header-tools .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-tools a {
    color: #fff;
    margin-left: 15px;
}

.header-tools a:hover {
    color: #f60;
}

/* 搜索区域 */
.search-area {
    padding: 20px 0;
}

.logo-area {
    text-align: center;
    margin-bottom: 20px;
}

.logo-area a {
    display: inline-block;
}

.logo-area img {
    max-height: 50px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 15px;
}

.search-form {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    height: 45px;
    padding: 0 20px;
    border: 2px solid #f60;
    border-right: none;
    font-size: 16px;
    outline: none;
    color: #333;
    background: #fff;
}

.search-button {
    width: 100px;
    background: #f60;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    font-weight: bold;
}

.search-button:hover,
.search-button:focus {
    background: #e55c00;
}

/* 快速分类 */
.quick-categories {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar {
    display: none;
}

.cat-tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 5px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
    transition: all 0.3s ease;
}

.cat-tag:hover {
    background: #f60;
    color: #fff;
    border-color: #f60;
}

/* 主导航菜单 - 重点优化PC端和移动端显示 */
.main-navigation {
    background: #333;
    position: relative; /* 新增：确保子菜单定位参考 */
}

.nav-toggle {
    display: none;
    background: #444;
    color: white;
    padding: 15px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
}

.nav-toggle i {
    margin-right: 8px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* PC端导航核心优化 */
.nav-menu > li {
    position: relative;
    z-index: 1001; /* 新增：提高层级避免被遮挡 */
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: bold;
    transition: background-color 0.3s;
}

.nav-menu > li:hover > a,
.nav-menu > li.active > a {
    background: #444;
}

/* 子菜单 - 彻底优化PC端显示 */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1002; /* 新增：确保子菜单层级最高 */
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0; /* 新增：用于动画 */
    transform: translateY(5px); /* 新增：用于动画 */
    transition: opacity 0.3s ease, transform 0.3s ease; /* 新增：平滑过渡 */
}

/* 修复PC端导航悬停问题 - 增强稳定性 */
@media (min-width: 992px) {
    .nav-menu {
        display: flex !important; /* 强制显示 */
    }
    .nav-menu > li {
        flex: 1;
        text-align: center;
    }
    .nav-menu > li:hover .sub-menu {
        display: block !important; /* 强制显示 */
        opacity: 1;
        transform: translateY(0);
    }
    /* 新增：防止子菜单因鼠标移动间隙消失 */
    .nav-menu > li {
        padding-bottom: 5px;
    }
}

/* 导航淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 12px 0;
    font-size: 13px;
    color: #666;
}

.breadcrumb a {
    color: #4C8F01;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* 主要内容区 */
.main-content {
    background: #fff;
    margin: 20px auto;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.content-header {
    border-bottom: 2px solid #f60;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.content-title {
    margin-bottom: 10px;
}

.title-icon {
    display: inline-block;
    background: #f60;
    color: white;
    padding: 8px 20px;
    font-size: 18px;
    border-radius: 4px 0 0 4px;
    vertical-align: middle;
    margin-right: 10px;
}

.title-main {
    display: inline-block;
    vertical-align: middle;
}

.title-main h2 {
    font-size: 20px;
    color: #084282;
    font-weight: normal;
    margin: 0 0 5px 0;
}

.title-main p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.title-main .more {
    color: #f60;
}

/* 手机版访问和实用工具推荐行 开始 */
.content-meta {
    color: #8C8C8C;
    font-size: 12px;
    text-align: center;
    padding: 18px 15px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    line-height: 1.8;
    margin: 15px 0;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.content-meta:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-color: #e0e0e0;
}

.content-meta .meta-item {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.content-meta .meta-item:hover {
    background-color: #f0f7ff;
}

.content-meta a {
    color: #f60;
    text-decoration: none;
    margin: 0 3px;
    position: relative;
    padding-bottom: 1px;
}

.content-meta a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #f60;
    transition: width 0.3s ease;
}

.content-meta a:hover::after {
    width: 100%;
}

.content-meta a:hover {
    color: #e55a00;
}

.content-meta .separator {
    margin: 0 12px;
    color: #d0d0d0;
    font-weight: 300;
}

@media (max-width: 768px) {
    .content-meta {
        font-size: 11px;
        padding: 12px 10px;
        max-width: 95%;
        border-radius: 6px;
    }
    .content-meta .meta-item {
        display: block;
        margin: 6px 0;
        padding: 4px 8px;
        text-align: center;
    }
    .content-meta .separator {
        display: none;
    }
    .content-meta a::after {
        width: 100%;
        background-color: #ffe8d8;
    }
    .content-meta a:hover::after {
        background-color: #f60;
    }
}

.content-meta .meta-item:nth-child(3) {
    color: #7a7a7a;
}
/* 手机版访问和实用工具推荐行 结束 */

.content-body {
    font-size: 15px;
    line-height: 1.8;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h3 {
    color: #f60;
    margin: 20px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

.content-section p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.highlight-box {
    background: #f8f9fa;
    border-left: 4px solid #f60;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

/* 幻灯片轮播样式 - 调整为5:3比例 */
.focus_img {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.index_focus_img {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 60%; /* 5:3比例 (3/5=0.6) */
}

.focus_img_box {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.focus_img_box li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.focus_img_box a {
    display: block;
    width: 100%;
    height: 100%;
}

.focus_img_box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fs_info_bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.fs_info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 20px;
    margin: 0;
}

.fs_info a {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.fs_info a:hover {
    color: #f60;
}

.focus_s_img {
    position: absolute;
    bottom: 20px;
    right: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.focus_s_img li {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: rgba(255,255,255,0.7);
    color: #333;
    margin-left: 8px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 13px;
    transition: all 0.3s ease;
}

.focus_s_img li.act {
    background: #f60;
    color: white;
    transform: scale(1.1);
}

.focus_s_img li.nor {
    background: rgba(255,255,255,0.8);
}

.focus_s_img li:hover {
    background: #f60;
    color: white;
}

/* 找知识百科新布局 - 两行两列网格布局 */
.recommend02-cont {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
}

.img-border {
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
}

.img-border img {
    width: 100%;
    height: auto;
}

/* 两行两列网格布局 */
.baike-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.baike-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.3s ease;
}

.baike-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.baike-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.baike-img {
    flex: 0 0 100px;
    margin-right: 15px;
}

.baike-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.baike-desc {
    flex: 1;
}

.baike-desc h4 {
    font-size: 16px;
    color: #333;
    margin: 0 0 8px 0;
}

.baike-desc p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.baike-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.baike-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.baike-list li:last-child {
    border-bottom: none;
}

.baike-list a {
    color: #333;
    font-size: 14px;
}

.baike-list a:hover {
    color: #f60;
}

.fnb {
    color: #f60;
    margin-right: 5px;
}

/* 推荐文章列表并列布局 */
.recommend-articles {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.recommend-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommend-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.recommend-list li:last-child {
    border-bottom: none;
}

.recommend-list .f-date {
    color: #999;
    font-size: 12px;
    margin-right: 10px;
}

/* 分类信息网格布局 - 新样式：左图片、右简介 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.category-item-new {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.3s ease;
}

.category-item-new:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-header-new {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.category-img-new {
    flex: 0 0 100px;
    margin-right: 15px;
}

.category-img-new img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.category-desc-new {
    flex: 1;
}

.category-desc-new h4 {
    font-size: 16px;
    color: #333;
    margin: 0 0 8px 0;
}

.category-desc-new p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.category-list-new {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list-new li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.category-list-new li:last-child {
    border-bottom: none;
}

.category-list-new a {
    color: #333;
    font-size: 14px;
}

.category-list-new a:hover {
    color: #f60;
}

.category-list-new .yh-blue a {
    color: #084282;
}

/* 关键词标签 */
.keywords {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.keywords span {
    font-weight: bold;
    margin-right: 10px;
}

.keyword-tag {
    display: inline-block;
    padding: 4px 8px;
    margin: 4px;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

.keyword-tag:hover {
    background: #ddd;
}

/* 页脚样式 - 美化版 */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 40px;
    position: relative;
}

/* 页脚装饰元素 */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f60, #ff9500);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    padding: 0 15px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f60;
    display: inline-block;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    background: rgba(255, 102, 0, 0.2);
    transform: translateX(5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    margin-right: 10px;
    color: #f60;
    font-size: 18px;
}

/* 页脚信息 */
.footer-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 40px;
    margin: 0 auto;
}

.footer-logo-text {
    margin-top: 15px;
    font-size: 14px;
    color: #ccc;
}

.copyright {
    font-size: 13px;
    color: #aaa;
    line-height: 2;
}

.copyright a {
    color: #f60;
    transition: all 0.3s ease;
}

.copyright a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 移动端样式 - 重点优化导航响应性 */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .header-tools {
        display: none;
    }
    
    .search-area {
        padding: 15px 0;
    }
    
    .search-input {
        height: 40px;
        font-size: 14px;
        padding: 0 12px;
    }
    
    .search-button {
        width: 80px;
        font-size: 14px;
    }
    
    /* 优化快速分类标签文字大小和间距 */
    .cat-tag {
        padding: 8px 10px;
        font-size: 13px;
        margin: 0 4px 8px;
        white-space: nowrap;
    }
    
    /* 优化导航切换按钮 */
    .nav-toggle {
        display: block !important; /* 强制显示 */
        font-size: 17px;
        padding: 12px 15px;
        font-weight: 500;
    }
    
    /* 移动端导航核心优化 */
    .nav-menu {
        display: none !important; /* 强制隐藏 */
        max-height: calc(100vh - 200px); /* 新增：限制高度防止溢出 */
        overflow-y: auto; /* 新增：子菜单过多时可滚动 */
    }
    
    .mobile-nav-active .nav-menu {
        display: block !important; /* 强制显示 */
    }
    
    .nav-menu > li {
        border-bottom: 1px solid #444;
        position: relative; /* 新增：确保子菜单定位 */
    }
    
    .nav-menu > li:last-child {
        border-bottom: none;
    }
    
    /* 优化主导航文字大小和内边距 */
    .nav-menu > li > a {
        padding: 14px 15px;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.4;
    }
    
    /* 移动端子菜单优化 */
    .sub-menu {
        position: static !important; /* 强制静态定位 */
        box-shadow: none;
        background: #3a3a3a;
        border-radius: 0;
        opacity: 1 !important; /* 取消动画 */
        transform: none !important; /* 取消动画 */
        display: none; /* 默认隐藏 */
    }
    
    /* 新增：移动端子菜单展开/收起样式 */
    .nav-menu > li.has-submenu > a::after {
        content: "▼";
        font-size: 12px;
        margin-left: 8px;
        float: right;
        transition: transform 0.3s ease;
    }
    
    .nav-menu > li.has-submenu.open > a::after {
        transform: rotate(180deg);
    }
    
    .sub-menu a {
        padding: 10px 15px 10px 30px;
        color: #ccc;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .sub-menu a:hover {
        padding-left: 35px;
        background: #444;
    }
    
    .breadcrumb {
        font-size: 12px;
        padding: 10px 0;
    }
    
    .main-content {
        padding: 20px 15px;
        margin: 10px auto;
    }
    
    .content-header {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .title-icon {
        padding: 6px 15px;
        font-size: 16px;
        margin-right: 5px;
    }
    
    .title-main h2 {
        font-size: 18px;
    }
    
    .content-body {
        font-size: 14px;
        line-height: 1.7;
    }
    
    /* 优化内容区域标题文字 */
    .content-section h3 {
        font-size: 17px;
        margin: 18px 0 12px;
    }
    
    .index_focus_img {
        padding-top: 60%; /* 保持5:3比例 */
    }
    
    .fs_info a {
        font-size: 15px;
    }
    
    .focus_s_img {
        bottom: 10px;
        right: 10px;
    }
    
    .focus_s_img li {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 12px;
    }
    
    .baike-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .baike-header {
        flex-direction: column;
    }
    
    .baike-img {
        flex: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* 优化百科栏目文字 */
    .baike-desc h4 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .baike-desc p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .baike-list a {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .recommend-articles {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 优化推荐文章列表文字 */
    .recommend-list .f-date {
        font-size: 11px;
    }
    
    .recommend-list a {
        font-size: 14px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-header-new {
        flex-direction: column;
    }
    
    .category-img-new {
        flex: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* 优化分类信息文字 */
    .category-desc-new h4 {
        font-size: 16px;
    }
    
    .category-desc-new p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .category-list-new a {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* 优化关键词标签 */
    .keyword-tag {
        font-size: 13px;
        padding: 5px 9px;
    }
    
    /* 移动端页脚样式 */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-contact {
        display: inline-block;
        text-align: left;
    }
    
    /* 优化页脚文字 */
    .footer-links a {
        margin: 0 8px 8px;
        font-size: 13px;
    }
    
    .copyright {
        font-size: 12px;
        line-height: 1.7;
    }
}

/* 平板端样式 */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-menu {
        display: flex !important; /* 强制显示 */
        flex-wrap: wrap;
    }
    
    .nav-menu > li {
        flex: 1 1 33.333%;
    }
    
    .nav-menu > li:nth-child(3n+1) {
        border-right: 1px solid #444;
    }
    
    .nav-menu > li:nth-child(3n+2) {
        border-right: 1px solid #444;
    }
    
    .nav-menu > li:nth-child(3n) {
        border-right: none;
    }
    
    /* 平板端导航文字优化 */
    .nav-menu > li > a {
        font-size: 15px;
        padding: 12px 10px;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .baike-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 平板端子菜单优化 */
    .sub-menu {
        min-width: 180px;
    }
}