/* 手机/平板适配：在 index.css、common.css、jszc.css 之后加载 */

.nav-toggle {
    display: none;
}

.site-logo-banner img {
    display: block;
    margin: 0 auto;
}

@media screen and (max-width: 1024px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    /* 移动端彻底关闭旧域名迁移弹窗与全屏 canvas，避免出现白屏/遮挡导致下方内容看不见 */
    .w-modal-mask,
    .login {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }

    .w-modal-mask #large-header,
    #large-header img,
    #demo-canvas {
        display: none !important;
    }

    /* 主要内容区不超屏宽，减少对 body overflow-x:hidden 的误剪切 */
    .column1,
    .column2,
    .colunmn3,
    .friendship,
    .bottom_line {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .ccai_top,
    .nav {
        min-width: 0 !important;
        width: 100% !important;
    }

    .ccai_top_main {
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .search {
        float: none;
        margin: 7px 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
        max-width: 100%;
    }

    .search input {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        width: auto;
        box-sizing: border-box;
    }

    .site-logo-banner {
        height: auto !important;
        padding: 8px 12px 8px 30px;
        box-sizing: border-box;
        margin-bottom: 8px;
    }

    .site-logo-banner img {
        display: block;
        height: 70px !important;
        width: auto !important;
        max-width: 100%;
        object-fit: contain;
        margin: 0;
    }

    /* —— 移动端：右侧汉堡菜单，点击展开/再点关闭 —— */
    .nav {
        position: relative;
        z-index: 2000;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        min-height: 0;
        height: auto;
    }

    .nav-mobile-bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        min-height: 50px;
        padding: 6px 12px;
        box-sizing: border-box;
        background-color: #08387e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 6px;
        background: transparent;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        color: #fff;
    }

    .nav-toggle:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    .nav-toggle-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 6px;
        width: 22px;
    }

    .nav-toggle-line {
        display: block;
        height: 2px;
        width: 100%;
        border-radius: 1px;
        background: currentColor;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    #site-nav.is-open .nav-toggle-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #site-nav.is-open .nav-toggle-line:nth-child(2) {
        opacity: 0;
    }

    #site-nav.is-open .nav-toggle-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav:not(.is-open) #site-nav-list {
        display: none;
    }

    #site-nav.is-open #site-nav-list {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        background: linear-gradient(to bottom, #0a4894, #08387e);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        overflow: visible;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        animation: nav-drop 0.2s ease-out;
    }

    @keyframes nav-drop {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav ul li {
        flex: none;
        width: 100%;
        height: auto;
        line-height: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        background-position: 14px center;
        background-size: 28px auto;
    }

    .nav ul li:last-child {
        border-bottom: none;
    }

    .nav ul li a {
        display: flex;
        align-items: center;
        min-height: 48px;
        height: auto;
        line-height: 1.3;
        padding: 12px 16px 12px 48px;
        font-size: 15px;
        white-space: normal;
        color: #fff;
        box-sizing: border-box;
    }

    .nav ul li:hover,
    .nav ul li.active {
        background-color: rgba(28, 94, 249, 0.45);
    }

    /* 顶栏横幅：禁止 height:auto（竖向 Swiper 会塌成一条线）；用固定可视高度 */
    .home-banner-swiper {
        width: 100% !important;
        max-width: 100%;
        margin: 12px auto !important;
        padding: 0 10px;
        box-sizing: border-box !important;
        height: clamp(76px, 22vw, 110px) !important;
        min-height: 72px !important;
		max-height: 40px !important;
    }

    .home-banner-swiper .swiper-slide,
    .home-banner-swiper .swiper-slide > a {
        display: block;
        height: 100%;
    }

    .home-banner-swiper .swiper-slide img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }

    .column1 {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        margin: 12px auto !important;
        padding: 8px;
    }

    .column1_l,
    .column1_r {
        width: 100% !important;
        max-width: 100%;
        float: none !important;
        margin-left: 0 !important;
    }

    /*
     * 图片新闻 Swiper：子元素 swiper-wrapper 为 height:100%，容器必须有明确高度。
     * 勿对 .lunbo_img 使用 height:auto，否则整列高度塌陷，易出现「下面全没了」的假死现象。
     */
    .lunbo {
        width: 100% !important;
        max-width: 100%;
        overflow: hidden;
        position: relative;
		max-height: 280px !important;
    }

    .lunbo_img.swiper-container {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        height: clamp(260px, 68vw, 400px) !important;
        min-height: 240px !important;
    }

    .lunbo_img .swiper-wrapper {
        height: 100% !important;
    }

    .lunbo_img .swiper-slide {
        width: 100% !important;
        height: 100% !important;
        box-sizing: border-box;
    }

    .lunbo_img ul li {
        position: relative;
        padding-bottom: 0;
        width: 100% !important;
        height: 100% !important;
        float: none !important;
    }

    .lunbo_img ul li a {
        width: 100% !important;
        height: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        float: none !important;
        overflow: hidden;
    }

    .lunbo_img ul li a img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        display: block;
    }

    .lunbo_img ul li h2 {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-width: 100%;
        font-size: 14px;
        line-height: 1.3;
        height: auto;
        min-height: 44px;
        max-height: 52px;
        padding: 6px 8px 8px;
        white-space: normal;
        text-indent: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    #cricle {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        margin: 10px 0 4px;
        text-align: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .lunbo_btn span.swiper-button-prev,
    .lunbo_btn span.swiper-button-next {
        display: none;
    }

    .tpxw_tit p,
    .tzgg_tit p {
        font-size: 18px;
    }

    .sy_news_box {
        height: auto;
        min-height: 0;
    }

    .sy_news_img {
        float: none;
        margin: 0 auto 8px;
        text-align: center;
    }

    .sy_news_content {
        float: none;
        width: 100% !important;
        max-width: 100%;
    }

    .sy_news_content h4 {
        font-size: 15px;
        line-height: 1.35;
    }

    .sy_news_content p {
        font-size: 14px;
        line-height: 1.5;
    }

    .sy_tzgg ul li a {
        width: 100% !important;
        max-width: 100%;
        white-space: normal;
        height: auto;
        line-height: 1.4;
        padding: 8px 20px 8px 0 !important;
		margin-left: 0 !important;
    }

    .sy_tzgg ul li {
        height: auto;
    }

    .column2 {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 8px;
        margin: 12px auto !important;
    }

    .colunmn3 {
        width: 100% !important;
        max-width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
        margin: 12px auto !important;
    }

    .ywzq,
    .sjcx {
        width: 100% !important;
        max-width: 100%;
        float: none !important;
        margin-left: 0 !important;
        height: auto !important;
        box-sizing: border-box;
    }

    .sjcx {
        margin-top: 12px;
    }

    .ywzq ul {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ywzq ul li a {
        max-width: 100%;
    }

    .ywzq a img,
    .sjcx .cx img {
        max-width: 100%;
        height: auto;
    }

    .cx {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hybz,
    .hzcx {
        max-width: 48%;
    }

    .bottom_line,
    .friendship,
    .friebox {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
    }

    .bottom_line {
        margin: 12px auto !important;
    }

    .friendship {
        margin: 12px auto !important;
    }

    .jszc_list {
        margin: 12px auto !important;
    }

    .friebox ul li {
        width: auto;
        flex: 1;
        min-width: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .friebox ul {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fre_con {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
    }

    .fre_con ol li {
        width: 50%;
        box-sizing: border-box;
    }

    .footer {
        min-width: 0 !important;
    }

    .footer .foot {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px;
    }

    .footer .foot > div {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        line-height: 1.6 !important;
        margin-top: 0 !important;
        text-align: center;
    }

    /* 手机端隐藏底部二维码 */
    .footer img[src$="gzh.jpg"] {
        display: none !important;
    }

    .footer .foot ul {
        width: 100% !important;
        padding-top: 16px !important;
    }

    .footer .foot ul li {
        font-size: 14px;
        height: auto;
        line-height: 1.5;
        padding: 4px 0;
    }

    .jszc_page {
        width: 100% !important;
        max-width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
    }

    .jszc_tab {
        width: 100% !important;
        max-width: 100%;
        float: none !important;
        margin-right: 0 !important;
        margin-bottom: 16px;
    }

    .jszc_tab_img img {
        width: 100% !important;
        height: auto;
    }

    .jszc_box {
        width: 100% !important;
        max-width: 100%;
        float: none !important;
    }

    .zxgk_znbm {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .zxgk_znbm h3 {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        height: auto;
        white-space: normal;
        line-height: 1.35;
        padding: 8px 10px;
    }

    .zxgk_zxjj {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .zxgk_zxjj p img {
        max-width: 100%;
        height: auto;
        display: inline-block;
        vertical-align: top;
    }

    .dwxz_box {
        max-width: 100%;
    }

    .location {
        height: auto;
        line-height: 1.45;
        padding: 10px 12px;
        font-size: 14px;
    }

    .content_tit span {
        font-size: 20px;
    }

    /* 收费公示/文章详情页（news.css）适配 */
    .news_detail_page,
    .detail_content,
    .detail_main {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .detail_main {
        padding: 18px 12px !important;
    }

    .detail_messge img {
        max-width: 100% !important;
        height: auto !important;
    }

    .kyxm_table {
        width: 100% !important;
        max-width: 100%;
        table-layout: fixed;
        font-size: 12px;
    }

    .kyxm_table tr {
        height: auto !important;
    }

    .kyxm_table td {
        padding: 8px 4px !important;
        word-break: break-word;
        white-space: normal;
        vertical-align: middle;
    }

    .kyxm_table td.pname {
        text-align: left;
        padding-left: 8px !important;
    }

    .kyxm_table .kyxm_thead td {
        font-size: 13px;
    }

    .jszc_ul li {
        height: auto !important;
        min-height: 40px;
        line-height: 1.45 !important;
        padding: 10px 0 8px;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .jszc_ul li a {
        max-width: 100% !important;
        white-space: normal !important;
        float: none !important;
        display: block !important;
        padding-left: 40px !important;
    }

    .jszc_ul li span {
        float: none !important;
        display: block;
        text-align: right;
        color: #666;
        font-size: 12px;
        padding-left: 40px;
    }
	.jszc_ul{
		width: 100% !important;
	}
	.friebox ul li a{
		font-size: 12px !important;
	}
}

@media screen and (max-width: 600px) {
    .nav ul li {
        background-size: 26px auto;
        background-position: 12px center;
    }

    .nav ul li a {
        padding-left: 46px;
        font-size: 14px;
    }

    .hybz,
    .hzcx {
        float: none !important;
        width: 100% !important;
        max-width: 280px;
        margin: 8px auto !important;
        height: auto !important;
    }

    .hybz a img,
    .hzcx a img {
        margin: 0 auto;
        display: block;
    }

    .fre_con ol li {
        width: 100%;
        float: none;
    }

    /* 底部三项保持单行排列 */
    .friebox ul {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .friebox ul li {
        flex: 1;
        width: auto;
        white-space: nowrap;
        font-size: 14px;
        padding: 6px 4px;
        box-sizing: border-box;
    }
}
