/* 全局盒模型设置 */
* {
    box-sizing: border-box;
}

/* 卡片组2核心样式（恢复图标+按钮，修复变形） */
.advanced-card-group2 {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.card2-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 5px;
}

/* 卡片容器（修复元素对齐，避免挤压） */
.card2-item {
    display: flex;
    align-items: center; /* 恢复垂直居中，确保图标/文字/按钮对齐 */
    padding: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    min-height: 100px;
    width: 100%;
    gap: 10px; /* 元素间留间隙，避免挤压 */
}

/* 恢复图标样式，确保显示正常 */
.card2-icon {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0; /* 禁止图标收缩 */
    margin-top: 0; /* 取消下移，与其他元素居中对齐 */
}

/* 文字区域（适配图标和按钮，避免溢出） */
.card2-text {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0; /* 取消下移，与图标/按钮居中 */
    padding-right: 5px;
}

/* 主标题样式 */
.card2-title {
    margin: 0 0 5px 0;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    font-weight: 600;
    max-width: 100%;
}

/* 副标题样式 */
.card2-subtitle {
    margin: 0;
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-width: 100%;
}

/* 修复按钮变形：固定尺寸+禁止收缩 */
.card2-btn {
    padding: 6px 12px; /* 调整内边距，避免过宽 */
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    flex-shrink: 0; /* 禁止按钮收缩变形 */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center; /* 按钮文字居中 */
    min-width: 60px; /* 最小宽度，避免文字过少导致变形 */
    margin-top: 0; /* 取消下移，居中对齐 */
}

/* 移动设备适配（确保所有元素不超出） */
@media (max-width: 768px) {
    .card2-grid {
        grid-template-columns: 1fr; /* 1列布局 */
        gap: 12px;
        padding: 0 10px;
    }

    .card2-item {
        padding: 12px 10px;
        gap: 8px; /* 缩小元素间隙 */
    }

    .card2-icon {
        width: 48px; /* 小屏缩小图标 */
        height: 48px;
    }

    .card2-btn {
        padding: 5px 10px; /* 小屏缩小按钮内边距 */
        font-size: 12px;
        min-width: 50px;
    }

    .card2-title {
        font-size: 15px;
    }

    .card2-subtitle {
        font-size: 12px;
    }
}

/* 超小屏适配（如手机竖屏） */
@media (max-width: 375px) {
    .advanced-card-group2 {
        padding: 10px;
    }

    .card2-item {
        padding: 10px 8px;
    }

    .card2-icon {
        width: 44px;
        height: 44px;
    }

    .card2-btn {
        min-width: 45px;
    }
}

/* 卡片组1样式（保持不变） */
.advanced-card1 {
    margin: 20px 0;
}
.card1-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    min-height: 220px;
}
.card1-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05);
}
.card1-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
}
.card1-icon {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.card1-content {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.card1-text .card1-title {
    color: white;
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
}
.card1-text .card1-subtitle {
    color: rgba(255,255,255,0.8);
    margin: 0;
    font-size: 14px;
}
.card1-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}