/* Smart Grid System for Capability Content (V2 - PPT Style) */

/* 重置 cap-body 基础样式 */
.cap-body {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

/* 智能网格容器 - 类似 Certifications 的布局 */
.smart-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* 网格项卡片 */
.smart-grid-item {
    background: white;
    border: 1px solid #eee; /* 增加边框 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.smart-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* 图片区域 */
.smart-grid-img-wrapper {
    width: 100%;
    height: 240px; /* 统一高度 */
    overflow: hidden;
    position: relative;
    background-color: #f8f9fb;
    border-bottom: 1px solid #eee;
}

.smart-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保填满 */
    transition: transform 0.6s ease;
}

.smart-grid-item:hover .smart-grid-img {
    transform: scale(1.1);
}

/* 遮罩层效果 (类似 Certifications) */
.smart-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smart-grid-item:hover .smart-grid-overlay {
    opacity: 1;
}

.smart-grid-overlay i {
    color: white;
    font-size: 32px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-grid-item:hover .smart-grid-overlay i {
    transform: scale(1);
}

/* 文本内容区域 */
.smart-grid-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center; /* 居中对齐，更像画廊 */
}

.smart-grid-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smart-grid-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 纯文本段落样式（底部详情） */
.cap-text-block {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.text-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.text-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    border-left: 4px solid var(--brand-red, #E60012);
    padding-left: 15px;
}

.text-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .smart-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .smart-grid-container {
        grid-template-columns: 1fr;
    }
    .smart-grid-img-wrapper {
        height: 220px;
    }
}
