/* =========================================
   Capabilities Page Specific Styles
   ========================================= */

/* 1. Page Header (Hero) - 覆盖式设计 */
.cap-header {
    position: relative;
    height: 450px; /* 适中高度 */
    display: flex;
    align-items: center;
    background: url('../images/家庭文化4.png') center/cover no-repeat fixed; /* 视差效果 */
    margin-bottom: 2rem;
    overflow: hidden;
}

.cap-header-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* 渐变遮罩：左侧深色以突出文字，右侧透明 */
    background: linear-gradient(90deg, rgba(26, 32, 44, 0.9) 0%, rgba(26, 32, 44, 0.7) 50%, rgba(51, 128, 200, 0.2) 100%);
    z-index: 1;
}

.cap-header-content {
    position: relative;
    z-index: 2;
    color: white;
    padding-top: 40px;
}

.cap-badge {
    display: inline-block;
    background: rgba(51, 128, 200, 0.3);
    border: 1px solid rgba(51, 128, 200, 0.5);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    color: #63b3ed;
    text-transform: uppercase;
}

.cap-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.cap-title .highlight {
    color: #63b3ed; /* 更亮的蓝色适配深色背景 */
    position: relative;
    display: inline-block;
}

.cap-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px; left: 0; width: 100%; height: 8px;
    background: rgba(51, 128, 200, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.cap-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
    max-width: 600px;
}

/* 2. Stats Grid (Bento Style) */
.cap-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 24px;
    margin-top: -60px; /* 负边距上移，产生重叠层级感 */
    position: relative;
    z-index: 10;
}

.cap-stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cap-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(51, 128, 200, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

/* 主卡片跨两列 */
.cap-stat-card.main-stat {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240, 249, 255, 0.9));
    position: relative;
    overflow: hidden;
}

.stat-icon-wrapper {
    width: 50px; height: 50px;
    background: rgba(51, 128, 200, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
}
.stat-icon-wrapper.green { background: rgba(0, 200, 83, 0.1); color: var(--accent-color); }
.stat-icon-wrapper svg { width: 28px; height: 28px; }

.stat-info h3 { font-size: 1rem; color: var(--text-sub); margin-bottom: 0.5rem; font-weight: 500; }
.stat-number-group { display: flex; align-items: baseline; gap: 4px; margin-bottom: 0.5rem; }
.stat-counter { font-family: 'JetBrains Mono', monospace; font-size: 2.5rem; font-weight: 700; color: var(--text-main); }
.stat-unit { font-size: 1rem; color: var(--text-light); font-weight: 600; }
.stat-info p { font-size: 0.85rem; color: var(--text-light); }

/* 3. Tech Tabs */
.bg-light-glass {
    background: rgba(248, 250, 252, 0.5); /* 极淡的背景区分 */
    border-top: 1px solid rgba(255,255,255,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tech-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tech-tab-btn {
    padding: 12px 28px;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.tech-tab-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tech-tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(51, 128, 200, 0.3);
    border-color: var(--primary-color);
}

/* Tab Contents */
.tab-content { display: none; opacity: 0; transform: translateY(10px); transition: all 0.4s ease; }
.tab-content.active { display: block; opacity: 1; transform: translateY(0); }

.equipment-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.equip-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.equip-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: rgba(51, 128, 200, 0.2);
}

.equip-img-box {
    height: 220px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.equip-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.equip-card:hover .equip-img-box img { transform: scale(1.05); }

.equip-tag {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.equip-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.equip-info h3 { font-size: 1.25rem; margin-bottom: 1rem; color: rgb(12,107,176); }

.specs-list {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

.spec-item { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--text-sub); }
.spec-item strong { font-size: 1rem; color: var(--text-main); font-family: 'JetBrains Mono'; margin-top: 2px; }

.equip-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* 4. Process Timeline */
/* 流程序号样式 */
.process-flow-section {
    margin-top: 3rem;
    margin-bottom: 2rem;
    position: relative;
}

.flow-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a96 100%);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(43, 108, 176, 0.25);
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.flow-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(43, 108, 176, 0.35);
}

.process-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 24px 12px; /* 缩小整体间距 */
    margin-top: 2rem;
}

.process-line {
    position: absolute;
    top: 70px; /* 图标中心位置 */
    left: 50px;
    right: 50px;
    height: 2px;
    background: repeating-linear-gradient(to right, #e2e8f0 0, #e2e8f0 10px, transparent 10px, transparent 20px);
    z-index: 0;
}

.process-node {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 18%; /* 稍微缩小节点宽度以容纳中间分组 */
}

.node-icon {
    width: 60px; height: 60px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.node-icon svg { width: 28px; height: 28px; }

.process-node:hover .node-icon {
    border-color: var(--primary-color);
    color: white;
    background: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 10px 25px rgba(51, 128, 200, 0.3);
}

.process-node h4 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 0.5rem; font-weight: 600; }
.process-node p { font-size: 0.9rem; color: var(--text-light); }

/* 中间虚线分组（材料选型 / 结构优化 / 成型方式） */
/* 中间三项独立垂直堆叠（用于第二流程的中心三节点） */
.process-middle-stack {
    position: absolute;
    left: 40%;
    transform: translateX(-50%);
    top: -24px; /* 抬起以与时间线对齐 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1;
}
.process-middle-box {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.process-middle-box .mid-svg { width:18px; height:18px; stroke-width:1.6; color: rgba(255,255,255,0.95); }

.process-middle-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}
.process-middle-circle svg { width:30px; height:30px; stroke-width:1.6; color: #fff; }
.process-middle-circle .circle-text {
    display: block;
    font-size: 0.88rem;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.process-middle-connector {
    position: absolute;
    left: 40%;
    transform: translateX(-50%);
    top: 10px;
    height: 112px; /* 连接三项的虚线高度 */
    border-left: 2px dotted rgba(51,128,200,0.45);
    z-index: 0;
}

@media (max-width: 992px) {
    .process-node { width: 22%; }
    .process-center-group { top: -28px; padding: 10px 14px; }
    .process-center-connector { left: calc(50% - 120px); width: 240px; }
}

@media (max-width: 768px) {
    .process-timeline { flex-direction: column; gap: 1.5rem; padding-left: 18px; }
    .process-line { width: 2px; height: 100%; top: 0; left: 46px; right: auto; }
    .process-center-group { position: relative; left: auto; transform: none; top: 0; }
    .process-center-connector { display: none; }
}

/* 5. Certificate Card - Revised Structure */
.cert-glass-card {
    background: linear-gradient(120deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 确保左右分布 */
    gap: 3rem; /* 增加间距 */
    box-shadow: var(--shadow-lg);
}

/* 左侧文字块，占据剩余空间 */
.cert-info-block {
    flex: 1;
}

/* 右侧图片块，固定宽度，不收缩 */
.cert-icon-block {
    flex-shrink: 0;
    width: 140px; /* 稍微加大尺寸 */
    height: 180px;
    border: 5px solid white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: rotate(3deg); /* 向右倾斜 */
    transition: transform 0.3s ease;
}
.cert-icon-block:hover { transform: rotate(0) scale(1.05); }
.cert-thumb { width: 100%; height: 100%; object-fit: cover; }

.cert-text h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-main); }
.cert-text p { color: var(--text-sub); margin-bottom: 0.5rem; }
.cert-desc { margin-top: 1rem; font-size: 0.95rem; line-height: 1.6; max-width: 650px; }

.cert-badge-group { display: flex; gap: 10px; margin-top: 1.5rem; }
.cert-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #b45309;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .cap-stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
    .cap-stat-card.main-stat { grid-column: span 2; }
}

@media (max-width: 768px) {
    .cap-header { height: 350px; }
    .cap-title { font-size: 2rem; }
    .cap-stats-grid { grid-template-columns: 1fr; }
    .cap-stat-card.main-stat { grid-column: span 1; }
    
    .process-timeline { flex-direction: column; gap: 2rem; padding-left: 20px; }
    .process-line { width: 2px; height: 100%; top: 0; left: 49px; right: auto; background: repeating-linear-gradient(to bottom, #e2e8f0 0, #e2e8f0 10px, transparent 10px, transparent 20px); }
    .process-node { width: 100%; display: flex; text-align: left; align-items: center; gap: 20px; }
    .node-icon { margin: 0; }
    
    /* Certificate Card Mobile - Stacked, Image on Top */
    .cert-glass-card {
        flex-direction: column-reverse; /* 反向堆叠，使HTML中靠后的图片显示在上方 */
        text-align: center;
        gap: 2rem;
    }
    .cert-icon-block {
        transform: rotate(0); /* 移动端取消倾斜 */
        margin-bottom: 0;
    }
    .cert-desc { margin-left: auto; margin-right: auto; }
    .cert-badge-group { justify-content: center; }
}

/* 6. Certificate Carousel - 轮播样式 */
.cert-carousel-wrapper {
    position: relative;
    width: 100%;
}

.cert-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.cert-carousel-item {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

.cert-carousel-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    top: auto;
    left: auto;
}

/* 轮播控制按钮 */
.cert-carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 20;
    pointer-events: none;
}

.cert-carousel-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(51, 128, 200, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    pointer-events: all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cert-carousel-btn:hover {
    background: rgba(51, 128, 200, 0.15);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(51, 128, 200, 0.25);
}

.cert-carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* 轮播指示器点 */
.cert-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
    padding-bottom: 1rem;
}

.cert-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(51, 128, 200, 0.2);
    border: 2px solid rgba(51, 128, 200, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.cert-dot:hover {
    background: rgba(51, 128, 200, 0.4);
}

.cert-dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    width: 36px;
    border-radius: 6px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cert-carousel-btn {
        width: 40px;
        height: 40px;
        border-width: 1.5px;
    }
    .cert-carousel-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .cert-carousel-controls {
        padding: 0 10px;
    }
}