/* ========== 重置与全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(180deg, #c5d9ee 0%, #d5e3f0 30%, #e2ecf4 60%, #edf3f8 100%);
    color: #333;
    line-height: 1.5;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部辅助栏 ========== */
.top-bar {
    background: linear-gradient(90deg, #b5cce2 0%, #cddcea 50%, #dae7f0 100%);
    font-size: 12px;
    color: #555;
    padding: 4px 0;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

/* ========== 头部 ========== */
.header {
    padding: 12px 0;
    background: linear-gradient(180deg, #d5e3f0 0%, #e4edf5 100%);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
}

.search-box {
    display: flex;
    border: 1px solid #b0c4d8;
    border-radius: 18px;
    overflow: hidden;
    width: 260px;
}

.search-box form {
    display: flex;
    width: 100%;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 6px 14px;
    outline: none;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.8);
}

.search-box button {
    background: #0056b3;
    color: #fff;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
}

/* ========== 导航栏 ========== */
.main-nav {
    background: linear-gradient(90deg, #003366 0%, #0056b3 50%, #0073e6 100%);
    color: #fff;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 30, 60, 0.3);
}

.main-nav > ul {
    display: flex;
    justify-content: center;
}

.main-nav li {
    position: relative;
}

.main-nav > ul > li > a {
    display: block;
    padding: 0 22px;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.25s ease;
    white-space: nowrap;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 46px;
    height: 46px;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 8px 15px;
}

/* ---- PC端下拉菜单 ---- */
@media (min-width: 769px) {
    .main-nav .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #fff;
        min-width: 150px;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 6px 20px rgba(0, 30, 80, 0.18);
        z-index: 1000;
        list-style: none;
        padding: 6px 0;
        margin: 0;
        margin-top: -1px;
        border-top: 2px solid #0056b3;
    }

    .main-nav .sub-menu:empty {
        display: none !important;
    }

    .main-nav li:hover > .sub-menu {
        display: block;
    }

    .main-nav .sub-menu li {
        position: relative;
        border-bottom: 1px solid #eef2f7;
    }

    .main-nav .sub-menu li:last-child {
        border-bottom: none;
    }

    .main-nav .sub-menu a {
        display: block;
        padding: 10px 20px;
        font-size: 13px;
        font-weight: normal;
        color: #444;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .main-nav .sub-menu a:hover {
        background: #eef5fc;
        color: #0056b3;
    }

    /* 有三级菜单的二级项：右侧加箭头 */
    .main-nav .sub-menu > li:has(> .sub-menu:not(:empty)) > a {
        padding-right: 30px;
    }

    .main-nav .sub-menu > li:has(> .sub-menu:not(:empty)) > a::after {
        content: '›';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        color: #999;
    }

    .main-nav .sub-menu > li:has(> .sub-menu:not(:empty)) > a:hover::after {
        color: #0056b3;
    }

    /* PC端三级菜单 */
    .main-nav .sub-menu li:hover > .sub-menu {
        display: block;
        top: 0;
        left: 100%;
        transform: none;
        border-radius: 8px;
        border-top: 3px solid #0056b3;
    }
}

/* ---- 移动端导航 ---- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        width: 100%;
        text-align: left;
    }

    .main-nav > ul {
        flex-direction: column;
        display: none;
        padding: 0;
        margin: 0;
    }

    .main-nav > ul.open {
        display: block;
    }

    /* 一级菜单项 */
    .main-nav > ul > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav > ul > li > a {
        padding: 0 40px 0 16px;
        font-size: 15px;
        line-height: 44px;
        height: 44px;
        position: relative;
    }

    /* 有子菜单的项：右侧 +/− 按钮 */
    .main-nav li.has-child > a {
        padding-right: 48px;
    }

    .main-nav li.has-child > a::after {
        content: '+';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 300;
        color: rgba(255,255,255,0.6);
        background: rgba(255,255,255,0.04);
        transition: all 0.2s;
    }

    .main-nav li.has-child.open > a::after {
        content: '−';
        color: #fff;
        background: rgba(255,255,255,0.1);
    }

    /* 二级子菜单 */
    .main-nav .sub-menu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background: rgba(0, 20, 50, 0.5);
    }

    .main-nav .sub-menu:empty {
        display: none !important;
    }

    /* 禁用hover展开 */
    .main-nav li:hover > .sub-menu {
        display: none;
    }

    /* JS控制展开 */
    .main-nav li.open > .sub-menu {
        display: block;
    }

    .main-nav .sub-menu li {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .main-nav .sub-menu li:last-child {
        border-bottom: none;
    }

    .main-nav .sub-menu a {
        display: block;
        padding: 0 16px 0 26px;
        font-size: 14px;
        line-height: 40px;
        height: 40px;
        color: rgba(255,255,255,0.75);
        transition: all 0.2s;
    }

    .main-nav .sub-menu a:hover,
    .main-nav .sub-menu a:active {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    /* 二级有子菜单 */
    .main-nav .sub-menu > li.has-child > a {
        padding-right: 48px;
        position: relative;
    }

    .main-nav .sub-menu > li.has-child > a::after {
        right: 0;
        width: 40px;
        font-size: 18px;
        background: rgba(255,255,255,0.04);
    }

    .main-nav .sub-menu > li.has-child.open > a::after {
        background: rgba(255,255,255,0.1);
    }

    /* 三级子菜单 */
    .main-nav .sub-menu .sub-menu {
        background: rgba(0, 15, 40, 0.5);
    }

    .main-nav .sub-menu .sub-menu a {
        display: block;
        padding: 0 16px 0 36px;
        font-size: 13px;
        line-height: 36px;
        height: 36px;
        color: rgba(255,255,255,0.65);
    }

    .main-nav .sub-menu .sub-menu a::before {
        content: '·';
        margin-right: 4px;
        color: rgba(255,255,255,0.35);
    }
}

/* ========== 主体 ========== */
.main-content {
    padding: 12px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========== 公用模块样式 ========== */
.section-box {
    background: #fff;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 56, 102, 0.06);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 2px solid #0056b3;
    background: #f6f9fc;
}

.section-header h3 {
    font-size: 15px;
    color: #0056b3;
}

.section-header .more {
    font-size: 11px;
    color: #999;
}

.list-items {
    padding: 8px 12px;
}

.list-items li {
    display: flex;
    margin-bottom: 5px;
    font-size: 13px;
    color: #444;
}

.list-items li a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-items li::before {
    content: "•";
    color: #0056b3;
    margin-right: 6px;
    flex-shrink: 0;
}

.list-items a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.list-items .date {
    white-space: nowrap;
    margin-left: 10px;
    color: #999;
    font-size: 12px;
}

/* ========== 第一排：轮播 + 资讯 ========== */
.row-1 {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 12px;
}

.carousel {
    background: #333;
    position: relative;
    color: white;
    overflow: hidden;
    min-height: 200px;
    border-radius: 6px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-text {
    position: absolute;
    bottom: 25px;
    left: 25px;
    z-index: 2;
}

.carousel-text h2 {
    font-size: 22px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-text p {
    font-size: 13px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.carousel-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 3;
    padding: 0 8px;
}

.carousel-arrows button {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 30px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
    border-radius: 3px;
}

.carousel-arrows button:hover {
    background: rgba(0, 0, 0, 0.6);
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    right: 15px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.carousel-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots span.active {
    background: #fff;
}

/* ========== 新闻 Tab ========== */
.news-tabs-container {
    display: flex;
    flex-direction: column;
}

.tabs-header {
    display: flex;
    background: #eef3f8;
}

.tab-btn {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    border-top: 3px solid transparent;
}

.tab-btn.active {
    background: #fff;
    border-top-color: #0056b3;
    color: #0056b3;
}

.tab-content {
    flex: 1;
    background: #fff;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ========== 三列网格 ========== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.grid-3 + .grid-3 {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #c5d9ee;
    position: relative;
}

.grid-3 + .grid-3::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0056b3, transparent);
    border-radius: 2px;
}

/* ========== 互动交流 ========== */
.interaction-icons {
    display: flex;
    justify-content: space-around;
    padding: 15px 8px;
}

.icon-btn {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: translateY(-3px);
}

.icon-circle {
    width: 42px;
    height: 42px;
    background: #ebf3fa;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 6px;
    border: 1px solid #d0e1f2;
}

.icon-btn p {
    font-size: 12px;
}

.interaction-box {
    display: flex;
    flex-direction: column;
}

.interaction-box .section-header {
    justify-content: center;
}

.interaction-box .interaction-icons {
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 12px 14px;
}

/* ========== 滚动区公用（专家照片 & 荣誉资质） ========== */
.scroll-section {
    display: flex;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 56, 102, 0.06);
    border: 1px solid #d8e0e8;
    background: #fff;
}

.side-title {
    width: 45px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    flex-shrink: 0;
    writing-mode: vertical-rl;
    padding: 14px 4px;
    clip-path: polygon(0 0, 100% 12%, 100% 88%, 0 100%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.side-title .title-icon {
    display: none;
}

.scroll-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding-right: 10px;
}

.scroll-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    transition: transform 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

.expert-section .scroll-inner {
    gap: 8px;
}

/* ========== 专家照片（蓝色梯形） ========== */
.expert-section {
    height: 150px;
}

.expert-section .side-title {
    background: linear-gradient(180deg, #1580cc, #0c4a7e);
}

.expert-section .scroll-track {
    background: linear-gradient(135deg, #fff, #edf6fd);
}

.expert-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85px;
    cursor: pointer;
    transition: transform 0.25s;
}

.expert-card:hover {
    transform: translateY(-3px);
}

.expert-card img {
    width: 75px;
    height: 90px;
    object-fit: cover;
    background: #edeef2;
    border-radius: 4px;
    margin-bottom: 4px;
    box-shadow: 0 2px 6px rgba(0, 56, 102, 0.08);
    border: 2px solid #fff;
    transition: box-shadow 0.3s;
}

.expert-card:hover img {
    box-shadow: 0 4px 12px rgba(0, 56, 102, 0.15);
}

.expert-card .expert-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 2px;
}

.expert-card .expert-field {
    font-size: 11px;
    color: #666;
    text-align: center;
}

/* ========== 荣誉资质（红色梯形） ========== */
.honor-section {
    height: 130px;
}

.honor-section .side-title {
    background: linear-gradient(180deg, #c45a4f, #a3483e);
}

.honor-section .scroll-track {
    background: linear-gradient(135deg, #fff, #fdf5f4);
}

.honor-item {
    flex-shrink: 0;
    height: 95px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.honor-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.honor-item img {
    height: 100%;
    width: auto;
    display: block;
}

/* ========== 右侧悬浮窗 ========== */
.floating-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 115px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.float-box {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: center;
    border-radius: 4px;
}

.float-box img {
    width: 100%;
    height: auto;
    margin-bottom: 5px;
}

.float-box p {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* ========== 底部 - 友情链接 ========== */
.footer-links {
    background: #f5f5f5;
    padding: 25px 0 30px;
    border-top: 1px solid #e0e0e0;
}

.link-title-row {
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.link-title {
    display: inline-block;
    font-weight: bold;
    color: #fff;
    font-size: 15px;
    background: #0056b3;
    padding: 6px 20px;
    border-radius: 3px;
}

.link-title-row::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #0056b3;
}

.link-select-row {
    display: flex;
    gap: 14px;
}

.link-group {
    flex: 1;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: visible;
    border: 1px solid #ddd;
    position: relative;
}

.link-group-title {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    position: relative;
}

.link-group-title::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
}

.link-group.open .link-group-title::after {
    transform: translateY(-50%) rotate(180deg);
}

.link-group-title:hover {
    color: #0056b3;
}

.link-group-items {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    border-bottom: none;
    z-index: 100;
}

.link-group.open .link-group-items {
    display: block;
}

.link-group-items a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #555;
    transition: all 0.15s;
}

.link-group-items a:hover {
    background: #eef5fc;
    color: #0056b3;
}

/* ========== 底部 - 蓝底信息栏 ========== */
.footer-bottom {
    background: linear-gradient(180deg, #1a5fa0, #0d3f6e);
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.8;
}

/* ========== 移动端适配（≤768px） ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    /* 顶部辅助栏 */
    .top-bar {
        font-size: 11px;
        padding: 3px 0;
    }

    .top-bar .container {
        gap: 15px;
    }

    /* 头部：logo居中，搜索框全宽 */
    .header {
        padding: 10px 0;
    }

    .header .container {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .logo-img {
        height: 35px;
    }

    .search-box {
        width: 100%;
        max-width: 320px;
        border-radius: 20px;
    }

    .search-box input {
        padding: 7px 14px;
        font-size: 13px;
    }

    .search-box button {
        padding: 0 16px;
        font-size: 13px;
    }

    /* 主体 */
    .main-content {
        gap: 8px;
        padding: 8px 0;
    }

    /* 轮播 + 资讯：上下排列 */
    .row-1 {
        grid-template-columns: 1fr;
    }

    .carousel {
        min-height: 160px;
    }

    .carousel-text h2 {
        font-size: 18px;
    }

    .carousel-text {
        bottom: 15px;
        left: 15px;
    }

    /* 三列变单列 */
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* 互动交流 */
    .interaction-icons {
        padding: 12px 5px;
    }

    .interaction-box .interaction-icons {
        gap: 20px;
    }

    /* 专家 & 荣誉 */
    .scroll-section {
        border-radius: 0;
    }

    .side-title {
        width: 38px;
        padding: 12px 4px;
        gap: 4px;
        font-size: 10px;
    }

    .side-title .title-icon {
        width: 20px;
        height: 20px;
    }

    .expert-section {
        height: 120px;
    }

    .expert-card {
        width: 65px;
    }

    .expert-card img {
        width: 58px;
        height: 70px;
    }

    .expert-card .expert-name {
        font-size: 11px;
    }

    .expert-card .expert-field {
        font-size: 9px;
    }

    .honor-section {
        height: 95px;
    }

    .honor-item {
        height: 75px;
    }

    /* 悬浮窗隐藏 */
    .floating-sidebar {
        display: none;
    }

    /* 底部 */
    .link-select-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .link-group {
        flex: 1 1 45%;
        min-width: 0;
        overflow: hidden;
    }

    .link-group-items {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        border-radius: 0;
    }

    .link-group.open .link-group-items {
        display: block;
    }

    .footer-bottom {
        font-size: 11px;
        padding: 15px 10px;
    }

    .footer-info {
        flex-direction: column;
        gap: 5px;
    }
}

/* ========== 小屏手机（≤480px） ========== */
@media (max-width: 480px) {
    .logo-img {
        height: 28px;
    }

    .carousel {
        min-height: 140px;
    }

    .carousel-text h2 {
        font-size: 16px;
    }

    .carousel-text p {
        font-size: 12px;
    }

    .carousel-arrows button {
        width: 24px;
        height: 32px;
        font-size: 14px;
    }

    .list-items li {
        font-size: 12px;
    }

    .list-items .date {
        display: none;
    }

    .section-header h3 {
        font-size: 14px;
    }

    .link-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .side-title {
        width: 34px;
        padding: 10px 3px;
        gap: 3px;
        font-size: 10px;
    }

    .side-title .title-icon {
        width: 18px;
        height: 18px;
    }

    .expert-section {
        height: 105px;
    }

    .expert-card {
        width: 55px;
    }

    .expert-card img {
        width: 50px;
        height: 60px;
    }

    .expert-card .expert-name {
        font-size: 10px;
    }

    .expert-card .expert-field {
        font-size: 8px;
    }

    .honor-section {
        height: 80px;
    }

    .honor-item {
        height: 65px;
    }
}
