/* 图文卡片2 Widget 样式 */
.sw_image_card_2_wrapper {
    width: 100%;
    padding: 0;
    margin: 0;
}

.sw_image_card_2_container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 主标题样式 */
.sw_image_card_2_main_title {
    font-size: 48px;
    line-height: 56px;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 48px;
    text-align: center;
    margin-top: 0;
}

/* 卡片网格布局 */
.sw_image_card_2_grid {
    display: grid;
    gap: 16px;
    justify-content: center;
    align-items: stretch;
}

/* 根据卡片数量调整布局 */
.sw_image_card_2_grid.sw-cards-count-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sw_image_card_2_grid.sw-cards-count-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sw_image_card_2_grid.sw-cards-count-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sw_image_card_2_grid.sw-cards-count-1 {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
    gap: 16px;
}

/* 卡片项样式 */
.sw_image_card_2_item {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 16px;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 图片容器样式 */
.sw_image_card_2_image {
    width: 100%;
    height: 192px; /* 默认高度，会被JavaScript动态调整 */
    border-radius: 12.8px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: height 0.3s ease; /* 平滑过渡效果 */
}

/* 占位符样式 */
.sw_image_card_2_placeholder {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* 继承父容器(.sw_image_card_2_image)的高度 */
}

.sw_image_card_2_image img,
.sw_image_card_2_placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12.8px;
}

.sw_image_card_2_placeholder_content {
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 内容区域样式 */
.sw_image_card_2_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

/* 卡片标题样式 */
.sw_image_card_2_item_title {
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: #333333;
    margin: 0 0 8px 0;
}

/* 卡片描述样式 */
.sw_image_card_2_item_description {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #666666;
    margin-top: 8px;
    flex: 1;
}

/* 按钮包装器样式 */
.sw_image_card_2_button_wrapper {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 按钮样式 */
.sw_image_card_2_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 20px;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sw_image_card_2_button:hover {
    opacity: 0.8;
    transform: translateX(2px);
}

.sw_image_card_2_button svg {
    width: 26px;
    height: 20px;
    display: block;
}

/* 平板设备响应式 */
@media (max-width: 1024px) {
    .sw_image_card_2_main_title {
        font-size: 36px;
        line-height: 44px;
        margin-bottom: 36px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-4,
    .sw_image_card_2_grid.sw-cards-count-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-1 {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 16px;
    }
    
    .sw_image_card_2_item {
        padding: 12px;
    }
    
    .sw_image_card_2_image {
        height: 348px;
    }
    
    .sw_image_card_2_content {
        padding: 12px;
    }
    
    .sw_image_card_2_button_wrapper {
        margin-top: 32px;
    }
}

/* 手机设备响应式 */
@media (max-width: 768px) {
    .sw_image_card_2_main_title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 24px;
    }
    
    .sw_image_card_2_grid {
        gap: 12px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-4,
    .sw_image_card_2_grid.sw-cards-count-3,
    .sw_image_card_2_grid.sw-cards-count-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-1 {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .sw_image_card_2_button_wrapper {
        margin-top: 32px;
    }
}

/* 超小屏幕设备 */
@media (max-width: 480px) {
    
    .sw_image_card_2_main_title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 20px;
    }
    
    .sw_image_card_2_grid.sw-cards-count-4, 
    .sw_image_card_2_grid.sw-cards-count-3, 
    .sw_image_card_2_grid.sw-cards-count-2,
    .sw_image_card_2_grid.sw-cards-count-1 {
        grid-template-columns: 1fr;
    }

    .sw_image_card_2_image {
        height: 234px;
    }

    .sw_image_card_2_item_title {
        font-size: 18px;
    }
}

/* JavaScript加载完成后的样式 */
.sw_image_card_2_wrapper.sw-images-loaded .sw_image_card_2_image {
    /* 图片加载完成后的额外样式 */
}