/* PC端样式 - 默认样式 */
.card-group-container {
    padding: 2rem 1rem;
    max-width: 100%;
    margin: 0 auto;
}

.page-body {
    width: 100%;
}

.card-group-header {
    text-align: center;
    margin-bottom: 2rem;
}
.card-group-title {
    margin: 0;
    line-height: 1.2;
}
.card-group-subtitle {
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

/* 卡片网格 */
.card-group-content {
    row-gap: 1.5rem;
}

/* 单个卡片 */
.card-item {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff; /* fallback */
}
.card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* 图片区域 */
.card-image img {
    transition: transform 0.3s ease;
}
.card-item:hover .card-image img {
    transform: scale(1.03);
}

/* 信息区 */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 标题与副标题 */
.card-title {
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.card-subtitle {
    flex: 1;
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* 按钮统一样式 */
.card-button,
.card-group-button {
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    width: auto;
}
.card-button:hover,
.card-group-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* 底部按钮区 */
.card-group-footer {
    margin-top: 2.5rem;
}

/* 图文组样式 */
.img-txt-group-container {
    padding: 3rem 1rem;
    max-width: 100%;
    margin: 0 auto;
}

.img-txt-group-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* 左文右图布局 */
.img-txt-group-wrapper.leftTextRightImg {
    flex-direction: row;
}

/* 左图右文布局 */
.img-txt-group-wrapper.leftImgRightText {
    flex-direction: row-reverse;
}

.img-txt-group-text,
.img-txt-group-image {
    flex: 1;
}

.img-txt-group-text {
    padding: 2rem;
}

.img-txt-group-main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.img-txt-group-theme-text {
    margin-bottom: 2rem;
    font-weight: 600;
}

.img-txt-group-category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.img-txt-group-category-item {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.img-txt-group-category-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.img-txt-group-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 1rem;
    cursor: pointer;
}
.img-txt-group-category-icon-text{
    display: flex;
    align-items: center;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.img-txt-group-expand-icon{
    transition: transform 0.3s ease;
}

.img-txt-group-category-icon {
    width: 24px;
    height: 24px;
}

.img-txt-group-category-text {
    font-weight: 500;
    flex: 1;
}

.img-txt-group-category-content {
    background-color: #f9fafb;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.img-txt-group-category-content.expanded {
        max-height: 500px;
    opacity: 1;
}

.img-txt-group-category-expand {
    padding: 1rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
}

@media (max-width: 768px) {
    /* ===== 全局容器 ===== */
    .card-group-container {
        width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .page-body {
        width: 100%;
        padding: 0;
    }

    /* ===== 头部标题区 ===== */
    .card-group-header {
        text-align: center;
        margin-bottom: 24px;
    }

    .card-group-title {
        margin: 0;
        line-height: 1.25;
        font-weight: 700;
    }

    .card-group-subtitle {
        margin: 8px 0 0;
        line-height: 1.45;
        opacity: 0.85;
    }

    /* ===== 卡片网格 ===== */
    .card-group-content {
        display: grid;
        width: 98%;
        margin: 0 auto;
        gap: 5px;   /* 统一卡片间距 */
    }

    /* ===== 单卡片 ===== */
    .card-item {
        display: flex;
        flex-direction: column;
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    /* 移动端无 hover，保留点击反馈 */
    .card-item:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    /* ===== 图片区 ===== */
    .card-image img {
        width: 100%;
        height: auto;
        display: block;
        transition: transform 0.3s ease;
    }

    /* ===== 信息区 ===== */
    .card-info {
        flex: 1;
        padding: 16px 5px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .card-title {
        margin: 0 0 8px;
        line-height: 1.3;
        font-weight: 600;
    }

    .card-subtitle {
        flex: 1;
        margin: 0 0 16px;
        line-height: 1.5;
        opacity: 0.9;
    }

    /* ===== 按钮通用 ===== */
    .card-button,
    .card-group-button {
        display: inline-block;
        padding: 10px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background-color 0.25s ease, transform 0.2s ease;
        cursor: pointer;
    }

    .card-button:active,
    .card-group-button:active {
        transform: translateY(-1px);
        filter: brightness(1.1);
    }

    /* ===== 底部按钮区 ===== */
    .card-group-footer {
        margin-top: 20px;
        padding: 10px 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* 图文组样式 */
    .img-txt-group-container {
        padding: 3rem 1rem;
        max-width: 100%;
        margin: 0 auto;
    }

    .img-txt-group-wrapper {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }

    /* 左文右图布局 */
    .img-txt-group-wrapper.leftTextRightImg {
        flex-direction: column-reverse;
    }

    /* 左图右文布局 */
    .img-txt-group-wrapper.leftImgRightText {
        flex-direction: column;
    }

    .img-txt-group-text {
        flex:unset;
        padding: 20px;
    }

    .img-txt-group-main-image {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }

    .img-txt-group-theme-text {
        margin-bottom: 20px;
        font-weight: 600;
    }

    .img-txt-group-category-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .img-txt-group-category-item {
        background-color: #f9fafb;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        transition: box-shadow 0.3s ease;
    }

    .img-txt-group-category-item:hover {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .img-txt-group-category-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #ffffff;
        padding: 20px 25px;
        cursor: pointer;
    }
    .img-txt-group-category-icon-text{
        display: flex;
        align-items: center;
        align-items: center;
        gap: 1rem;
        cursor: pointer;
    }

    .img-txt-group-expand-icon{
        transition: transform 0.3s ease;
    }

    .img-txt-group-category-icon {
        width: 24px;
        height: 24px;
    }

    .img-txt-group-category-text {
        font-weight: 500;
    }

    .img-txt-group-category-content {
        background-color: #f9fafb;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }
    
    .img-txt-group-category-content.expanded {
            max-height: 500px;
            opacity: 1;
        }

    .img-txt-group-category-expand {
        padding: 20px;
        background-color: #f3f4f6;
        border-radius: 0.25rem;
    }
}