* {
    box-sizing: border-box;
}

[v-cloak] {
    display: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
    background: #dcf0fd;
    height: 100%;
}

.top .bg {
    background-size: cover;
    /* 铺满容器，可能裁剪 */
    background-repeat: no-repeat;
    width: 100%;

}

.logo {
    position: absolute;
    left: 18%;
    width: 12%;
    top: 3%;
    padding: 10px;
    background: #fff;
    cursor: pointer;
    border-radius: 8px;
}

.container {
    left: 50%;
    bottom: 102px;
    transform: translateX(-50%);
}

.government-portal {
    padding-top: 3%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
}

/* 筛选区域 - 更新样式与图片一致 */
.filter-section {
    margin: 20px 0;
    position: relative;
}

.filter-toggle {
    position: relative;
    right: 0;
    width: 24px;
    height: 24px;
    background-color: #a1d5fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #343635;
    font-size: 18px;
    transition: transform 0.3s;
}

.filter-tags-container {
    position: relative;
    overflow: visible;
    flex: 1;
    /* min-width: 0; 防止flex子项溢出 */
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tags-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    position: relative;
}

/* 隐藏滚动条 */
.filter-tags-row::-webkit-scrollbar {
    display: none;
}

.filter-tags-more {
    top: 100%;
    left: 0;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    z-index: 20;
}

.filter-tags-more.expanded {
    max-height: 500px;
}

.filter-tags-more.expanded+.nav-container {
    height: auto;
}

.tag {
    padding: 0 10px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    /* 防止标签被压缩 */
}

.tag:hover,
.tag.active {
    color: #0080ff;
}

/* 导航菜单 */

.nav-container {
    background-color: #b6e3ff;
    border-radius: 20px;
    margin: 0 auto;
    padding: 8px 50px;
    position: relative;
    z-index: 10;
    width: 100%;
    height: auto;
    min-height: 56px;
    max-width: 1400px;
    display: flex;
}

.nav-menu {
    display: flex;
    align-items: baseline;
    padding: 0;
    margin: 0;
    line-height: 56px;
    background-color: #b6e3ff;
    border-radius: 20px;
    padding: 8px 50px;
}

.nav-menu-item {
    margin-right: 50px;
    cursor: pointer;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
    color: #00477B;
    position: relative;
    transition: color 0.3s;
    flex-shrink: 0;
}

.nav-menu-item.active {
    color: #0066cc;
}

.nav-menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 70%;
    left: 50%;
    transform: translateX(-50%);
    height: 2px;
    background-color: #0066cc;
}

/* 内容区域 */
.content-container {
    flex: 1;
    padding: 20px 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #0066cc;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.news-list {
    margin-bottom: 30px;
}

.news-item {
    line-height: 1.5;
    padding-bottom: 20px;
}

.news-item a {
    text-decoration: none;
    display: flex;
}

.news-item:nth-child(5n) {
    border-bottom: 1px dashed #ccc;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.bullet {
    margin-right: 10px;
    color: #0066cc;
    font-weight: bold;
}

.news-content {
    font-size: 18px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content:hover {
    color: #0066cc;
}

/* 分页 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 10px;
}

/* 自定义 Element Plus 分页组件样式 */
.el-pagination .el-pagination__total,
.el-select__wrapper,
.el-pager li,
.el-pagination__jump {
    font-size: 16px;
}

.el-pagination {
    --el-pagination-button-color: #0066cc;
    --el-pagination-hover-color: #409eff;
}

.el-pagination .el-pagination__total {
    margin-right: 16px;
}

.el-pagination .el-pagination__sizes {
    margin-right: 16px;
}

.el-pagination .btn-prev,
.el-pagination .btn-next {
    background: #e1e1e1 !important;
    color: #303133;
    padding: 0 6px;
}
.el-pagination .btn-next {
    margin-left: 10px;
}

.el-pagination button.is-disabled,
.el-pagination button:disabled {
    color: var(--el-pagination-button-disabled-color);
    cursor: not-allowed;
}

.el-pagination .el-pager li {
    background: transparent;
    border: 1px #d0d0d0 solid;
    color: #000;
    margin-left: 10px;
}


.el-pager li.is-active,
.el-pager li:hover {
    color: var(--el-pagination-button-disabled-bg-color) !important;
    background: #1d6ac4 !important;
}

.el-pagination .el-pagination__jump {
    margin-left: 16px;
}



/* 内容区域的显示控制 */
.content-section.active {
    display: block;
}

@media (max-width: 1400px) {

    .logo {
        top: 1%;
    }

    .content-container {
        padding: 20px;
    }
}

/* 添加媒体查询 */
@media (max-width: 1200px) {
    .logo {
        width: 17%;
        padding: 1%;
    }
    
    .government-portal {
        max-width: 100%;
    }

    .nav-container {
        max-width: 100%;
    }

    .nav-menu-item {
        line-height: 1.5;
    }

    .nav-menu-item.active::after {
        bottom: -12%;
    }
}

@media (max-width: 768px) {
    .government-portal {
        max-width: 100%;
    }

    .nav-container {
        overflow-x: auto;
        /* 允许横向滚动 */
        white-space: nowrap;
        /* 防止换行 */
        -webkit-overflow-scrolling: touch;
        /* 在iOS上平滑滚动 */
    }


    .tag {
        padding: 0 0 4px 0;
        /* 减小标签内边距 */
        font-size: 14px;
        /* 减小标签字体大小 */
    }

    .filter-toggle {
        width: 20px;
        /* 减小展开按钮大小 */
        height: 20px;
        font-size: 16px;
    }

    .nav-menu {
        flex-wrap: nowrap;
        padding: 10px;
        line-height: 40px;
    }

    .nav-menu-item {
        flex: 0 0 auto;
        /* 不伸缩，不收缩 */
        border-bottom: none;
        /* 移除底部边框 */
    }


    .section-title {
        font-size: 16px;
    }


    .bullet {
        margin-bottom: 5px;
    }

    .pagination-container {
        padding: 10px 5px;
    }

    .el-pagination {
        --el-pagination-font-size: 14px;
        gap: 5px;
    }

    /* 调整分页组件各部分的显示 */
    .el-pagination .el-pagination__total {
        margin-right: 8px;
        font-size: 14px;
    }

    .el-pagination .el-pagination__sizes {
        margin-right: 8px;
    }

    .el-pagination .el-select {
        width: 80px;
    }

    .el-pagination .el-pagination__jump {
        margin-left: 8px;
    }

    .el-pagination .el-pagination__jump .el-input {
        width: 50px;
    }

    /* 调整页码按钮大小 */
    .el-pagination .el-pager li {
        min-width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 14px;
    }

    /* 调整上一页下一页按钮 */
    .el-pagination .btn-prev,
    .el-pagination .btn-next {
        min-width: 28px;
        height: 28px;
        line-height: 28px;
    }

    /* 调整跳转输入框 */
    .el-pagination .el-pagination__jump .el-input__inner {
        height: 28px;
        line-height: 28px;
        padding: 0 4px;
    }
}

@media (max-width: 600px) {


    .nav-menu-item {
        margin-right: 20px;
    }
}

@media (max-width: 500px) {
    .nav-container {
        padding: 0
    }

    .nav-menu-item {
        font-size: 14px;
        margin-right: 16px;
    }

    .news-content {
        font-size: 14px;
    }

    .pagination-container {
        padding: 5px;
    }

    .el-pagination {
        --el-pagination-font-size: 12px;
        gap: 3px;
        flex-wrap: wrap;
    }

    /* 隐藏部分文字，只显示数字 */
    .el-pagination .el-pagination__total {
        display: none;
    }

    .el-pagination .el-pagination__sizes {
        display: none;
    }

    /* 调整页码按钮大小 */
    .el-pagination .el-pager li {
        min-width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
        margin-left: 4px;
    }

    /* 调整上一页下一页按钮 */
    .el-pagination .btn-prev,
    .el-pagination .btn-next {
        min-width: 24px;
        height: 24px;
        line-height: 24px;
    }

    /* 调整跳转部分 */
    .el-pagination .el-pagination__jump {
        margin-left: 5px;
        display: none;
    }

    .el-pagination .el-pagination__jump .el-input {
        width: 40px;
    }

    .el-pagination .el-pagination__jump .el-input__inner {
        height: 24px;
        line-height: 24px;
        padding: 0 2px;
        font-size: 12px;
    }
}

/* 添加过渡效果 */
.government-portal,
.nav-container,
.content-container,
.nav-menu-item,
.news-item,
.pagination-container {
    transition: all 0.3s ease;
}

/* 添加 loading 效果 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading.active {
    opacity: 1;
    visibility: visible;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 超小屏幕的样式调整 */
@media (max-width: 360px) {
    .el-pagination {
        gap: 2px;
    }

    .el-pagination .el-pager li {
        min-width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 12px;
    }

    .el-pagination .btn-prev,
    .el-pagination .btn-next {
        min-width: 22px;
        height: 22px;
        line-height: 22px;
    }

    .el-pagination .el-pagination__jump {
        display: none;
    }
}


/* 添加 loading 效果 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading.active {
    opacity: 1;
    visibility: visible;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 超小屏幕的样式调整 */
@media (max-width: 360px) {
    .el-pagination {
        gap: 2px;
    }

    .el-pagination .el-pager li {
        min-width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 12px;
    }

    .el-pagination .btn-prev,
    .el-pagination .btn-next {
        min-width: 22px;
        height: 22px;
        line-height: 22px;
    }

    .el-pagination .el-pagination__jump {
        display: none;
    }
}