/* =========================================================
 * 双知科技主题 - 样式清理 & 冲突覆盖
 * 加载顺序：最后加载，覆盖前面的冲突样式
 * 版本：2.0.0
 * ========================================================= */

/* ---------------------------------------------------------
 * 1. 浮动按钮统一样式
 * --------------------------------------------------------- */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 40vh;
    left: auto;
    top: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: auto;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}

.floating-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #e8edf2;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 4px 4px 8px #c8cdd2, -4px -4px 8px #ffffff;
    color: #1a2a6c;
    text-decoration: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.floating-btn:hover {
    box-shadow: inset 4px 4px 8px #c8cdd2, inset -4px -4px 8px #ffffff;
    transform: scale(0.96);
}

.floating-btn svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.floating-btn:hover svg {
    transform: scale(1.1);
}

.floating-btn .btn-label {
    display: none;
}

.floating-backtop-btn {
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: all 0.3s ease;
}
.floating-backtop-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .floating-buttons {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        padding: 8px 20px;
        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        background: #fffffff0;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -2px 10px rgba(0, 41, 83, 0.13);
    }

    .floating-btn {
        width: 45px;
        height: 45px;
    }

    .floating-btn svg {
        width: 18px;
        height: 18px;
    }

    .floating-btn .btn-label {
        display: block;
        font-size: 10px;
        margin-top: 2px;
        font-weight: 600;
        line-height: 1;
    }

    .floating-backtop-btn {
        display: none;
    }

    body {
        padding-bottom: 70px !important;
    }
}

/* ---------------------------------------------------------
 * 2. 联系弹窗层级
 * --------------------------------------------------------- */
.contact-modal           { z-index: 10001; }
.contact-modal-overlay   { z-index: 1; }
.contact-modal-content   { z-index: 2; }
.floating-nav-menu       { z-index: 9999; }
.nav-menu-overlay        { z-index: 9998; }

/* ---------------------------------------------------------
 * 3. 服务图标统一
 * --------------------------------------------------------- */
.service-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #1a2a6c;
    background: #e8edf2;
    box-shadow: 6px 6px 12px #c8cdd2, -6px -6px 12px #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover .service-icon {
    box-shadow: inset 4px 4px 8px #c8cdd2, inset -4px -4px 8px #ffffff;
    transform: scale(1.05);
}
.services-grid-4 .service-card .service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .service-icon,
    .services-grid-4 .service-card .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
}

/* ---------------------------------------------------------
 * 4. 标签切换按钮统一
 * --------------------------------------------------------- */
.product-tabs .tab-item,
.news-tabs .news-tab,
.solution-tabs .tab-item {
    padding: 12px 28px;
    background: #e8edf2;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 4px 4px 8px #c8cdd2, -4px -4px 8px #ffffff;
    color: #1a2a5a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.product-tabs .tab-item:hover,
.product-tabs .tab-item.active,
.news-tabs .news-tab:hover,
.news-tabs .news-tab.active,
.solution-tabs .tab-item:hover,
.solution-tabs .tab-item.active {
    background: #1a2a6c;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(26, 42, 108, 0.35);
    transform: translateY(-2px);
}

.product-panels, .news-panels, .solution-panels { position: relative; }
.product-panel, .news-panel, .solution-panel     { display: none; }

.product-panel.active,
.news-panel.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

/* 行业方案面板用 flex 恢复左右布局 */
.solution-panel.active {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: stretch;
    background: #e8edf2;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 8px 8px 16px #c8cdd2, -8px -8px 16px #ffffff;
    padding: 40px;
    animation: fadeInUp 0.4s ease;
}
.solution-panel .panel-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.solution-panel .panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    min-width: 0;
}
.solution-panel .panel-right .panel-image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

@media (max-width: 992px) {
    .solution-panel.active { flex-direction: column; padding: 30px; }
    .solution-panel .panel-right { min-height: 200px; }
}
@media (max-width: 768px) {
    .product-tabs .tab-item,
    .news-tabs .news-tab,
    .solution-tabs .tab-item {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
    .solution-panel.active { padding: 20px; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
 * 5. 新闻列表 4 列网格
 * --------------------------------------------------------- */
.news-panels .news-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 10px;
}
@media (max-width: 1200px) {
    .news-panels .news-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 900px) {
    .news-panels .news-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 576px) {
    .news-panels .news-list { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------------------------------------------------------
 * 6. 文章内容图片居中
 * --------------------------------------------------------- */
.news-content img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 20px auto !important;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ---------------------------------------------------------
 * 7. 分页器统一
 * --------------------------------------------------------- */
.pager .pagination,
.pagination-container .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #e8edf2;
    color: #1a2a5a;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 3px 3px 6px #c8cdd2, -3px -3px 6px #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.pager .page-numbers:hover {
    background: #1a2a6c;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 42, 108, 0.3);
}
.pager .page-numbers.current {
    background: linear-gradient(135deg, #1a2a6c, #3a5a9a);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 42, 108, 0.4);
    cursor: default;
}

/* ---------------------------------------------------------
 * 8. 滚动条
 * --------------------------------------------------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #e8edf2; border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background: #c8cdd2;
    border-radius: 10px;
    box-shadow: inset 2px 2px 4px #b0b8c0, inset -2px -2px 4px #ffffff;
}

/* ---------------------------------------------------------
 * 9. 弹窗打开时禁止背景滚动
 * --------------------------------------------------------- */
body.modal-open { overflow: hidden !important; }

/* ---------------------------------------------------------
 * 10. 首页模块间距修复（合作流程 → 为什么选择）
 * --------------------------------------------------------- */
.topic-pricing-section { padding-bottom: 40px !important; }
.trust-section         { padding-top: 40px !important; }
.topic-pricing-section .pricing-flow-section { margin-bottom: 0 !important; }
.topic-pricing-section .services-header,
.trust-section .services-header { margin-bottom: 30px; }

@media (max-width: 768px) {
    .topic-pricing-section { padding-bottom: 20px !important; }
    .trust-section         { padding-top: 20px !important; }
}

/* ---------------------------------------------------------
 * 11. PC 端主菜单居中
 * --------------------------------------------------------- */
@media (min-width: 1001px) {
    .music_43_4962_bg.head_nav { position: relative; }
    .music_43_4963            { position: static !important; }

    .music_43_4980 {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        flex-direction: row !important;
        z-index: 10;
    }

    .nave-l > .logo { position: relative; z-index: 11; }
    .nave-r {
        position: relative;
        z-index: 11;
        margin-left: auto;
    }

    .music_43_4981 { margin-right: 30px; }
    .music_43_4981:last-child { margin-right: 0; }
}

/* ---------------------------------------------------------
 * 12. Banner 地域标识
 * --------------------------------------------------------- */
.banner-region {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #c7e0f0;
    opacity: 0.85;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .banner-region { font-size: 0.8rem; margin-top: 15px; }
}

/* ---------------------------------------------------------
 * 13. H1 / H2 Banner 视觉统一
 * --------------------------------------------------------- */
.banner-title,
h2.banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0px 3px 6px rgb(137 217 255 / 40%), 0 1px 2px rgb(255 255 255 / 20%);
    font-family: "Source Han Sans CN", sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 50%, #e6f3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}
@media (max-width: 1200px) {
    .banner-title, h2.banner-title { font-size: 3rem; }
}
@media (max-width: 768px) {
    .banner-title, h2.banner-title { font-size: 2.5rem; margin-bottom: 15px; }
}
@media (max-width: 480px) {
    .banner-title, h2.banner-title { font-size: 2rem; margin-bottom: 12px; }
}