/* ========================================
   KuaiPaoCloud - 基础设施页面样式
   ======================================== */

/* ---------- 页面 Banner ---------- */
.page-banner {
    position: relative;
    padding: calc(var(--nav-height) + 80px) 24px 80px;
    background: var(--bg-darker);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 60px 60px;
}

.banner-content-simple {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--text-secondary); transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--accent); }

.page-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

/* ---------- 通用区块 ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-section-alt); }

.section-header { text-align: center; margin-bottom: 56px; }

.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-divider {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin: 0 auto 16px;
    border-radius: 1px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- 地图 ---------- */
.infra-map-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.infra-map-container {
    width: 100%;
    max-width: 900px;
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.china-map {
    width: 100%;
    height: auto;
}

.map-node {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.map-node circle:first-child {
    animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

.map-node.node-core circle:first-child {
    animation: pulse-ring-core 2s ease-out infinite;
}

@keyframes pulse-ring-core {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.map-node text {
    font-family: var(--font-sans);
    transition: fill 0.2s ease;
}

.map-node:hover text {
    fill: var(--accent-light) !important;
}

.map-connections line {
    animation: dash-flow 8s linear infinite;
}

@keyframes dash-flow {
    to { stroke-dashoffset: -40; }
}

.map-legend {
    display: flex;
    gap: 28px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-core { background: #4a9b7f; box-shadow: 0 0 6px rgba(74,155,127,0.4); }
.legend-node { background: #5cb89a; }

.legend-line {
    width: 24px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(74,155,127,0.6) 0 4px, transparent 4px 8px);
}

/* ---------- 数据中心卡片 ---------- */
.dc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.dc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}

.dc-card:hover {
    border-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.dc-card.dc-core {
    border-color: rgba(74, 155, 127, 0.3);
}

.dc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dc-card-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.dc-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(74, 155, 127, 0.1);
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid rgba(74, 155, 127, 0.2);
}

.dc-badge-core {
    background: rgba(74, 155, 127, 0.2);
    border-color: rgba(74, 155, 127, 0.4);
    color: var(--accent);
}

.dc-image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: #0d0d0d;
    border: 1px solid var(--border);
}

.dc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.dc-card:hover .dc-image img {
    opacity: 1;
}

.dc-specs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.dc-spec {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.spec-label {
    font-size: 12px;
    color: var(--text-muted);
}

.spec-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.dc-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---------- 网络架构 ---------- */
.network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.net-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
}

.net-card:hover {
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

.net-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 155, 127, 0.08);
    border: 1px solid rgba(74, 155, 127, 0.15);
    border-radius: var(--radius);
    color: var(--accent);
    margin-bottom: 16px;
}

.net-icon svg { width: 20px; height: 20px; }

.net-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.net-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.net-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.net-list li {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 14px;
    position: relative;
}

.net-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

/* ---------- 规格表格 ---------- */
.specs-table-wrap {
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 700px;
}

.specs-table thead {
    background: #151515;
}

.specs-table th {
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-light);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.specs-table td {
    padding: 13px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.specs-table tbody tr:last-child td {
    border-bottom: none;
}

.specs-table tbody tr:hover {
    background: rgba(74, 155, 127, 0.03);
}

.specs-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ---------- 滚动揭示 ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .dc-grid { grid-template-columns: 1fr; }
    .network-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .page-banner { padding: calc(var(--nav-height) + 56px) 20px 56px; }
    .page-title { font-size: 28px; }

    .infra-map-container { padding: 16px; }

    .map-legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .network-grid { grid-template-columns: 1fr; }

    .dc-card { padding: 24px 20px; }
    .dc-image { height: 140px; }

    .specs-table th, .specs-table td { padding: 10px 14px; }
}

@media (max-width: 480px) {
    .breadcrumb { font-size: 12px; }
    .page-subtitle { font-size: 14px; }
}
