@charset "utf-8";

/* ============================================
   响应式样式表 - 针对手机和电脑自适应
   ============================================ */

/* ==================== 通用响应式设置 ==================== */
@media screen and (max-width: 1260px) {
    .wrapper .inner {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}

/* ==================== 平板设备 (768px - 1024px) ==================== */
@media screen and (max-width: 1024px) {
    /* 头部调整 */
    #header .inner {
        height: auto;
        padding: 10px 0;
    }
    
    .header .sitelogo {
        padding-top: 10px;
        float: none;
        text-align: center;
    }
    
    .header .sitetitle {
        font-size: 30px;
        margin-left: 20px;
    }
    
    .header .head-right {
        float: none;
        margin-top: 15px;
        text-align: center;
    }
    
    .site-lang {
        float: none;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .searchbox {
        float: none;
        margin-right: 0;
        display: inline-block;
    }
    
    /* 导航调整 */
    .wp-menu .menu-item a.menu-link {
        padding: 0 30px;
        font-size: 16px;
    }
    
    /* 内容区域调整 */
    .col_menu {
        width: 200px;
    }
    
    .col_news .col_news_box {
        margin-left: 230px;
    }
    
    /* 页脚调整 */
    .shares li.news {
        margin-right: 10px;
    }
}

/* ==================== 手机设备 (最大768px) ==================== */
@media screen and (max-width: 768px) {
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 15px;
        top: 15px;
        width: 30px;
        height: 24px;
        cursor: pointer;
        z-index: 1000;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background: #fff;
        margin-bottom: 5px;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 头部完全重排 */
    #header .inner {
        height: auto;
        min-height: 70px;
        position: relative;
    }
    
    .header .head-left {
        float: left;
        width: 70%;
    }
    
    .header .sitelogo {
        padding-top: 10px;
        padding-left: 0;
        text-align: left;
    }
    
    .sitelogo img {
        width: 250px;
        max-width: 100%;
    }
    
    .header .sitetitle {
        font-size: 18px;
        margin-left: 10px;
        margin-top: 5px;
        display: block;
    }
    
    .header .head-right {
        margin-top: 20px;
        width: 100%;
        position: relative;
    }
    
    /* 语言链接调整为垂直 */
    .site-lang {
        display: none; /* 移动端隐藏顶部链接 */
    }
    
    .site-lang ul li.links {
        display: block;
        float: none;
        margin-bottom: 5px;
    }
    
    /* 搜索框调整 */
    .searchbox {
        display: none; /* 移动端先隐藏，可考虑在菜单中显示 */
    }
    
    /* 导航菜单移动端样式 */
    #nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100%;
        background: #187bbe;
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    
    #nav.active {
        left: 0;
    }
    
    .wp-menu {
        margin: 0;
        padding: 20px 0;
    }
    
    .wp-menu .menu-item {
        display: block;
        float: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .wp-menu .menu-item a.menu-link {
        display: block;
        padding: 15px 20px;
        line-height: normal;
        color: #fff;
        font-size: 16px;
        border-bottom: none;
    }
    
    .wp-menu .menu-item.hover a.menu-link,
    .wp-menu .menu-item a.hover {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* 子菜单调整 */
    .sub-menu {
        position: static;
        display: none;
        background: rgba(0,0,0,0.1);
        min-width: auto;
    }
    
    .wp-menu .menu-item.active .sub-menu {
        display: block;
    }
    
    .sub-menu .sub-item a {
        padding-left: 40px;
        color: #fff;
    }
    
    /* 栏目图片调整 */
    .l-banner {
        height: 150px;
    }
    
    .l-banner img {
        width: 100%;
        height: auto;
        max-height: 150px;
        object-fit: cover;
    }
    
    /* 内容区域移动端布局 */
    #l-container .inner {
        padding: 15px 10px;
    }
    
    .mobile-column-switch {
        display: block;
        background: #187bbe;
        color: #fff;
        padding: 12px 15px;
        margin-bottom: 10px;
        cursor: pointer;
        border-radius: 4px;
        position: relative;
    }
    
    .mobile-column-switch .arrow {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #fff;
        transition: transform 0.3s ease;
    }
    
    .mobile-column-switch.active .arrow {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .col_menu {
        width: 100%;
        float: none;
        margin-right: 0;
        display: none; /* 默认隐藏，点击后显示 */
    }
    
    .col_menu.active {
        display: block;
    }
    
    .col_menu_con {
        border: 1px solid #e4e4e4;
        margin-bottom: 20px;
    }
    
    .col_news {
        width: 100%;
        float: none;
    }
    
    .col_news .col_news_box {
        margin-left: 0;
    }
    
    /* 新闻列表调整 */
    .col_metas .col_title {
        float: none;
        height: auto;
        line-height: normal;
        margin-bottom: 10px;
    }
    
    .col_metas .col_path {
        float: none;
        height: auto;
        line-height: normal;
        text-align: left;
        white-space: normal;
    }
    
    .col_metas .col_title h2 {
        font-size: 18px;
        padding-bottom: 5px;
    }
    
    .col_news_list .news_list li.news {
        font-size: 16px !important;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .news_title {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        font-size: 16px;
        line-height: 1.4;
    }
    
    .news_meta {
        display: block;
        width: 100%;
        text-align: left;
        color: #666;
        font-size: 14px;
    }
    
    /* 页脚移动端调整 */
    #footer .inner {
        padding: 20px 0;
        text-align: center;
    }
    
    #footer .inner .foot-left,
    #footer .inner .foot-right {
        float: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .shares ul.news_list {
        justify-content: center;
    }
    
    .shares li.news {
        margin: 0 5px 10px;
    }
    
    .copyright {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* 文章图片响应式 */
    .col_news_list .wp_entry img,
    .article .entry .read img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 表格响应式 */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ==================== 小屏幕手机 (最大480px) ==================== */
@media screen and (max-width: 480px) {
    .header .sitetitle {
        font-size: 16px;
    }
    
    .sitelogo img {
        width: 200px;
    }
    
    .l-banner {
        height: 120px;
    }
    
    .col_menu_head h3.col_name {
        font-size: 18px;
    }
    
    .col_menu .col_menu_head h3.col_name .col_name_text {
        line-height: 40px;
        padding: 0 15px;
    }
    
    .col_list .wp_listcolumn .wp_column a .column-name {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .col_list .wp_listcolumn .sub_list a .column-name {
        padding: 8px 15px 8px 30px;
        font-size: 13px;
    }
    
    .col_news_list .news_list li.news {
        font-size: 14px !important;
    }
    
    .shares img {
        width: 70px;
        height: 70px;
    }
    
    .shares .news_title {
        font-size: 13px;
    }
}

/* ==================== 横屏手机优化 ==================== */
@media screen and (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {
    #nav {
        width: 50%;
    }
    
    .col_menu {
        width: 200px;
        float: left;
        display: block !important;
    }
    
    .col_news {
        width: calc(100% - 220px);
        float: right;
    }
    
    .col_news .col_news_box {
        margin-left: 0;
    }
    
    .mobile-column-switch {
        display: none;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    #header, #nav, .mobile-menu-btn, .mobile-column-switch, .searchbox, #footer {
        display: none !important;
    }
    
    .wrapper .inner {
        width: 100% !important;
        max-width: none !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .col_menu {
        display: none !important;
    }
    
    .col_news {
        width: 100% !important;
        float: none !important;
    }
}