/* ================================================================
   三九益生通 - 公共样式 (common.css)
   适用于：index.html / detail.html / search.html
   ================================================================ */

/* ========== 基础重置 ========== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: #333; background: #f5f5f5; line-height: 1.6; }
a { color: #333; text-decoration: none; }
a:hover { color: #409cdb; }
img { max-width: 100%; height: auto; border: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* ========== 顶部工具栏 ========== */
.topbar { background: #f5f5f5; border-bottom: 1px solid #eaeaea; font-size: 12px; color: #999; }
.topbar_inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: flex-end; height: 32px; gap: 6px; }
.topbar a { color: #666; text-decoration: none; font-size: 12px; }
.topbar a:hover { color: #409cdb; }
.topbar .sep { color: #ddd; margin: 0 2px; }

/* ========== 头部主区域 ========== */
.site_header { background: #fff; border-bottom: 1px solid #e8e8e8; }
.header_inner { max-width: 1200px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header_logo { flex-shrink: 0; }
.header_logo a { display: block; }
.header_logo img { display: block; height: 42px; width: auto; }
.header_mid { flex: 1; max-width: 480px; }
.header_search { position: relative; width: 100%; }
.header_search form { display: flex; border: 2px solid #409cdb; border-radius: 22px; overflow: hidden; background: #fff; }
.header_search input[type="text"] { flex: 1; border: none; padding: 9px 16px; font-size: 14px; outline: none; background: transparent; min-width: 0; }
.header_search input[type="submit"] { background: #409cdb; border: none; color: #fff; padding: 9px 22px; cursor: pointer; font-size: 14px; white-space: nowrap; transition: background .2s; }
.header_search input[type="submit"]:hover { background: #3688c0; }
.header_right_links { flex-shrink: 0; display: flex; align-items: center; gap: 20px; }
.header_right_links a { font-size: 14px; color: #555; text-decoration: none; white-space: nowrap; transition: color .2s; }
.header_right_links a:hover { color: #409cdb; }

/* ========== 主导航栏 ========== */
.main_nav { background: linear-gradient(135deg, #409cdb 0%, #3a8cc4 100%); box-shadow: 0 2px 8px rgba(64,156,219,.25); position: relative; z-index: 150; }
.main_nav_inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main_nav_list { list-style: none; margin: 0; padding: 0; display: flex; }
.main_nav_list li { position: relative; }
.main_nav_list li a { display: block; padding: 13px 22px; color: #fff; font-size: 15px; text-decoration: none; transition: background .2s; white-space: nowrap; }
.main_nav_list li a:hover,
.main_nav_list li.active a { background: rgba(255,255,255,.18); }
.main_nav_list li.active a { font-weight: bold; box-shadow: inset 0 -3px 0 rgba(255,255,255,.6); }
.main_nav_list li:first-child a { padding-left: 16px; }

/* 网站导航下拉 */
.site_nav_dropdown { position: relative; }
.site_nav_dropdown .dropdown_trigger { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.site_nav_dropdown .arrow { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid rgba(255,255,255,.8); transition: transform .2s; }
.site_nav_dropdown:hover .arrow { transform: rotate(180deg); }
.site_nav_dropdown .dropdown_menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 0 0 10px 10px; padding: 18px 22px; min-width: 520px; box-shadow: 0 8px 24px rgba(64,156,219,.18); z-index: 200; border-top: 3px solid #409cdb; }
.site_nav_dropdown:hover .dropdown_menu { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dropdown_menu dl { margin: 0; padding: 0 0 12px; border-bottom: 1px dashed #e6f0f8; }
.dropdown_menu dl:last-child { border-bottom: none; padding-bottom: 0; }
.dropdown_menu dt { font-weight: bold; color: #409cdb; margin-bottom: 8px; font-size: 14px; }
.dropdown_menu dd { margin: 0; }
.dropdown_menu dd a { display: inline-block; font-size: 13px; color: #666; margin: 3px 8px 3px 0; text-decoration: none; transition: color .2s; }
.dropdown_menu dd a:hover { color: #409cdb; }

/* 移动端菜单按钮 */
.mobile_menu_btn { display: none; width: 36px; height: 36px; border: none; background: transparent; cursor: pointer; padding: 6px; flex-shrink: 0; }
.mobile_menu_btn span { display: block; width: 100%; height: 3px; background: #409cdb; border-radius: 2px; margin: 4px 0; transition: .3s; }

/* 移动端导航面板 - 桌面端完全隐藏 */
.mobile_nav_overlay, .mobile_nav_panel { display: none !important; }

/* ========== 分页 ========== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 6px; font-size: 14px; text-decoration: none; transition: all .2s; }
.pagination a { background: #fff; border: 1px solid #e0eef8; color: #409cdb; }
.pagination a:hover { background: #409cdb; border-color: #409cdb; color: #fff; }
.pagination .page-current { background: #409cdb; color: #fff; font-weight: bold; border: 1px solid #409cdb; }
.pagination .disabled { background: #f5f5f5; border: 1px solid #e8e8e8; color: #ccc; cursor: not-allowed; }
.pagination .page-dots { border: none; background: none; color: #999; padding: 6px 4px; }
.pagination .page-info { border: none; background: none; color: #999; font-size: 12px; }

/* ========== 底部 Footer ========== */
.site_footer { background: #f8f8f8; border-top: 3px solid #409cdb; margin-top: 40px; }
.footer_main { max-width: 1200px; margin: 0 auto; padding: 36px 16px 24px; }
.footer_tab_nav { display: flex; gap: 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 20px; }
.footer_tab_btn { padding: 12px 24px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 15px; color: #666; cursor: pointer; transition: all .2s; font-weight: 500; }
.footer_tab_btn:hover { color: #409cdb; }
.footer_tab_btn.active { color: #409cdb; border-bottom-color: #409cdb; font-weight: 600; }
.footer_tab_content { min-height: 120px; }
.footer_tab_panel { display: none; }
.footer_tab_panel.active { display: block; }
.footer_tab_panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer_tab_panel ul li a { font-size: 14px; color: #666; text-decoration: none; transition: color .2s; }
.footer_tab_panel ul li a:hover { color: #409cdb; }
.footer_about { background: #fff; padding: 20px 0; border-top: 1px solid #eee; }
.footer_about_inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.footer_about_inner a { font-size: 13px; color: #666; text-decoration: none; }
.footer_about_inner a:hover { color: #409cdb; }
.footer_copyright { background: #f0f0f0; padding: 16px 0; text-align: center; font-size: 12px; color: #999; line-height: 2; }
.footer_copyright a { color: #999; text-decoration: none; }
.footer_copyright a:hover { color: #409cdb; }

/* ========== 平板端（768px - 1024px） ========== */
@media screen and (max-width: 1024px) {
    .header_right_links a { display: none; }
    .header_search { max-width: 320px; }
    .main_nav_list li a { padding: 12px 16px; font-size: 14px; }
    .site_nav_dropdown .dropdown_menu { min-width: 420px; }
    .footer_col { min-width: 140px; }
}

/* ========== 移动端（< 768px） ========== */
@media screen and (max-width: 767px) {
    /* 顶部工具栏隐藏 */
    .topbar { display: none; }

    /* 头部简化 */
    .header_inner { padding: 10px 12px; flex-wrap: wrap; }
    .header_mid { display: none; }
    .header_right_links { display: none; }
    .mobile_menu_btn { display: block; }
    .header_logo img { width: 130px !important; height: auto !important; }

    /* 导航栏横向滚动 */
    .main_nav_inner { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main_nav_inner::-webkit-scrollbar { display: none; }
    .main_nav_list { flex-wrap: nowrap; }
    .main_nav_list li a { padding: 10px 16px; font-size: 14px; }
    .site_nav_dropdown { display: none; }

    /* 移动端导航面板 */
    .mobile_nav_overlay { display: none !important; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); z-index: 500; }
    .mobile_nav_overlay.active { display: block !important; }
    .mobile_nav_panel { display: none !important; position: fixed; top: 0; right: -300px; width: 300px; height: 100%; background: #fff; z-index: 501; overflow-y: auto; transition: right .3s ease; padding: 0; flex-direction: column; }
    .mobile_nav_panel.active { display: flex !important; right: 0; }
    .mobile_nav_panel .mobile_nav_header { background: linear-gradient(135deg, #409cdb 0%, #3a8cc4 100%); color: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
    .mobile_nav_panel .mobile_nav_header .panel_title { font-size: 17px; font-weight: bold; }
    .mobile_nav_panel .mobile_nav_close { background: rgba(255,255,255,.2); border: none; font-size: 20px; cursor: pointer; color: #fff; width: 32px; height: 32px; border-radius: 50%; line-height: 32px; text-align: center; padding: 0; }
    .mobile_nav_panel .mobile_search { margin: 14px 16px; flex-shrink: 0; }
    .mobile_nav_panel .mobile_search input[type="text"] { width: 100%; border: 1px solid #d6e8f5; border-radius: 20px; padding: 9px 14px; font-size: 14px; outline: none; background: #f5fafd; }
    .mobile_nav_panel .mobile_search input[type="text"]:focus { border-color: #409cdb; background: #fff; }
    .mobile_nav_panel .mobile_nav_links { padding: 0 16px 20px; overflow-y: auto; flex: 1; }
    .mobile_nav_panel .mobile_nav_links a { display: block; padding: 11px 0 11px 12px; border-bottom: 1px solid #f0f6fb; color: #444; text-decoration: none; font-size: 15px; border-left: 3px solid transparent; transition: .2s; }
    .mobile_nav_panel .mobile_nav_links a:hover, .mobile_nav_panel .mobile_nav_links a:active { color: #409cdb; border-left-color: #409cdb; background: #f5fafd; }
    .mobile_nav_panel .mobile_nav_links .nav_group_title { font-weight: bold; color: #409cdb; padding: 16px 0 6px 12px; font-size: 13px; border-bottom: none; border-left: 3px solid #409cdb; background: transparent; letter-spacing: 1px; }

    /* Footer 移动端 */
    .footer_main { padding: 20px 12px 16px; }
    .footer_tab_nav { margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .footer_tab_nav::-webkit-scrollbar { display: none; }
    .footer_tab_btn { padding: 10px 16px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
    .footer_tab_content { min-height: 100px; }
    .footer_tab_panel ul { gap: 10px 16px; }
    .footer_tab_panel ul li a { font-size: 13px; padding: 6px 0; display: inline-block; }
    .footer_about_inner { gap: 10px 16px; padding: 0 12px; }
    .footer_about_inner a { font-size: 12px; }
    .footer_copyright { font-size: 11px; padding: 12px; line-height: 1.8; }
}

/* ========== 小屏手机（< 375px） ========== */
@media screen and (max-width: 374px) {
    .header_logo img { width: 110px !important; height: auto !important; }
    .main_nav_list li a { padding: 10px 12px; font-size: 13px; }
}
