/* ==========================================================
   1. 全局与变量设置 (采用 ag- 前缀避免冲突)
========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ag-bg-light: #f4f7fc;
    --ag-bg-white: #ffffff;
    --ag-color-main: #333333;
    --ag-color-blue: #2b70f6;
    --ag-color-gray: #666666;
    --ag-color-light-gray: #999999;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ag-color-main);
    line-height: 1.6;
    background-color: var(--ag-bg-white);
}

.ag-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================
   2. 上半部分：机构简介文字区块
========================================================== */
.ag-intro-section {
    background-color: var(--ag-bg-light);
    padding: 80px 0 60px;
    overflow: hidden;
}

.ag-intro-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
}

.ag-title-box h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
}

.ag-desc-box {
    flex: 1;
    background: var(--ag-bg-white);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.ag-desc-box p {
    font-size: 20px;
    text-indent: 2em;
    font-weight: 500;
    color: #000000;
    margin-bottom: 10px;
    text-align: justify;
}

.ag-desc-box p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   3. 中间部分：环形业务架构图区块 (最新重构版)
========================================================== */
.ag-diagram-area {
    position: relative;
    height: 420px;
    max-width: 1000px;
    margin: 40px auto 0;
    display: flex;
    justify-content: center;
}

/* 半环形背景图 */
.ag-arc-bg {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    height: 408px;
    width: 100%;
    max-width: 711px;
    z-index: 0;
    pointer-events: none;
}

/* 核心中心点 */
.ag-core-center {
    position: absolute;
    bottom: 20px;
    top: 66%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    /* background: var(--ag-bg-white); */
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* 中心点图标 */
.ag-core-icon {
    width: 44px;
    height: 44px;
    background: url('./logo-2.png') no-repeat center;
    background-size: contain;
    margin-bottom: 10px;
}

.ag-core-center h3 {
    font-size: 20px;
    color: var(--ag-color-main);
    margin-bottom: 2px;
    font-weight: bold;
}

.ag-core-center p {
    font-size: 12px;
    font-weight: 700;
    color: var(--ag-color-main);
}

/* 周边悬浮业务卡片通用样式 */
.ag-node {
    position: absolute;
    /* background: #ffffff; */
    /* border-radius: 8px; */
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); */
    min-width: 170px;
    min-height: 64px;
    display: flex;
    align-items: center;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ag-node:hover {
    transform: translateY(-3px);
    /* box-shadow: 0 8px 25px rgba(43, 112, 246, 0.1); */
}

.ag-node-text {
    text-align: left;
}

.check-1 {
    width: 385px;
    height: 93px;
    background: url(./check-1.png) no-repeat;
    background-size: cover;
}

.check-2 {
    width: 281px;
    height: 156px;
    background: url(./check-2.png) no-repeat;
    background-size: cover;
}

.check-3 {
    width: 335px;
    height: 146px;
    background: url(./check-3.png) no-repeat;
    background-size: cover;
}

.check-4 {
    width: 336px;
    height: 152px;
    background: url(./check-4.png) no-repeat;
    background-size: cover;
}

.ag-node-text h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ag-color-blue);
    margin-bottom: 4px;
}

.ag-node-text p {
    font-size: 18px;
    font-weight: 400;
    color: var(--ag-color-light-gray);
    margin: 0;
}

.check-1-title {
    margin-top: 1vh;
    margin-left: 1vw;
}

.check-2-title {
    margin-top: 8vh;
    margin-left: 1vw;
}

.check-3-title {
    margin-top: 7vh;
    margin-left: 7vw;
}

.check-4-title {
    margin-top: 7vh;
    margin-left: 7vw;
}

/* 独立圆形图标容器 */
.ag-node-icon {
    width: 48px;
    height: 48px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(43, 112, 246, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 占位色块，替换真实图标后可删除 */
.icon-placeholder {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #a4c8ff, #4a9df8);
    border-radius: 4px;
}

/* 图标在右侧的卡片样式组合 */
.ag-card-icon-right {
    padding: 12px 40px 12px 20px;
}

.ag-card-icon-right .ag-node-icon {
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
}

/* 图标在左侧的卡片样式组合 */
.ag-card-icon-left {
    padding: 12px 20px 12px 40px;
}

.ag-card-icon-left .ag-node-icon {
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
}

/* 各节点 PC 端绝对定位排版 */
.ag-node-1 {
    top: 12%;
    left: calc(50% - 580px);
}

.ag-node-2 {
    top: 12%;
    right: calc(50% - 580px);
}

.ag-node-3 {
    top: 55%;
    left: calc(50% - 600px);
}

.ag-node-4 {
    top: 55%;
    right: calc(50% - 640px);
}

/* ==========================================================
   4. 下半部分：联系我们区块
========================================================== */
.ag-contact-section {
    background-color: var(--ag-bg-white);
    padding: 80px 0;
}

.ag-contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.ag-contact-header h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.ag-contact-header p {
    font-size: 14px;
    color: var(--ag-color-gray);
}

/* Banner 容器 */
.ag-contact-board {
    display: flex;
    background: var(--ag-bg-white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(43, 112, 246, 0.08);
    margin: 40px auto 0;
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

/* 左侧蓝色背景区 (使用 clip-path 裁切斜边) */
.ag-board-left {
    flex: 5;
    position: relative;
    display: flex;
    align-items: center;
    padding: 30px 30px 30px 220px;
    /* 左边距留给插画 */
    z-index: 2;
}

.ag-board-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #3a8cff;
    /* 主题蓝 */
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    /* 倾斜效果 */
    border-radius: 16px 0 0 16px;
    z-index: -1;
}

/* 溢出的人物插画 */
.ag-board-avatar {
    position: absolute;
    left: 30px;
    bottom: 0;
    height: 150px;
    z-index: 3;
    /* 占位图样式 */
    width: 150px;
    background: linear-gradient(135deg, #d4e4ff, #a9caff);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.ag-board-left-info {
    color: #ffffff;
}

.ag-board-left-info h3 {
    font-size: 24px;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.ag-board-left-info p {
    font-size: 14px;
    opacity: 0.85;
}

/* 右侧白色信息区 */
.ag-board-right {
    flex: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 50px 30px 20px;
}

.ag-board-right-info h4 {
    font-size: 20px;
    color: var(--ag-color-blue);
    margin-bottom: 6px;
}

.ag-board-right-info p {
    font-size: 14px;
    color: var(--ag-color-light-gray);
}

.ag-action-btn {
    background: #4fa0ff;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.ag-action-btn:hover {
    background: #2b70f6;
}

/* ==========================================================
   5. 响应式适配 (移动端 & 平板)
========================================================== */
@media (max-width: 992px) {

    /* 简介区调整 */
    .ag-intro-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .ag-title-box {
        text-align: center;
    }

    .ag-title-box h2 {
        display: inline-block;
        margin-right: 15px;
    }

    /* 架构图区平板端稍微收缩节点的横向距离 */
    .ag-node-1 {
        left: calc(50% - 300px);
    }

    .ag-node-2 {
        right: calc(50% - 300px);
    }

    .ag-node-3 {
        left: calc(50% - 340px);
    }

    .ag-node-4 {
        right: calc(50% - 340px);
    }

    /* 联系我们区调整 */
    .ag-board-left {
        padding-left: 170px;
    }

    .ag-board-avatar {
        left: 10px;
        height: 130px;
        width: 130px;
        /* 匹配占位图缩放，使用真实 img 时可去掉 width 限制 */
    }
}

@media (max-width: 768px) {
    .ag-title-box {
        text-align: center;
    }

    .ag-intro-section {
        padding: 40px 0;
    }

    /* 移动端架构图切换为单列居中布局 */
    .ag-diagram-area {
        height: auto;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        margin-top: 20px;
        padding-bottom: 20px;
    }

    /* 隐藏大背景图片 */
    .ag-arc-bg {
        display: none;
    }

    /* 核心点回到文档流 */
    .ag-core-center {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        margin-bottom: 20px;
        box-shadow: 0 10px 30px rgba(43, 112, 246, 0.1);
    }

    /* 节点卡片回到文档流堆叠显示 */
    .ag-node {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 80%;
        max-width: 280px;
        margin: 0 auto;
    }

    /* 联系我们 Banner 移动端上下堆叠 */
    .ag-contact-board {
        flex-direction: column;
        margin-top: 80px;
        /* 留出顶部人物突出的空间 */
    }

    .ag-board-left {
        padding: 60px 20px 30px;
        text-align: center;
        justify-content: center;
    }

    .ag-board-left::before {
        /* 移动端斜边改到底部 */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
        border-radius: 16px 16px 0 0;
    }

    .ag-board-avatar {
        left: 50%;
        transform: translateX(-50%);
        top: -60px;
        /* 人物在顶部溢出 */
        bottom: auto;
    }

    .ag-board-right {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }
}