/**
 * 声网彩色图片卡片小部件样式
 * 
 * @since 1.0.0
 */

/* 主容器 */
.sw_colorful_image_card_wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.sw_colorful_image_card_container {
    width: 100%;
}

/* 网格布局 */
.sw_colorful_image_card_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

/* 卡片项目 */
.sw_colorful_image_card_item {
    display: flex;
    flex-direction: column;
    padding: 48px 32px;
    border-radius: 12px;
    background: linear-gradient(0deg, #A320CF 0%, #000306 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 当设置了背景图时，覆盖默认背景 */
.sw_colorful_image_card_item[style*="background-image"] {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.sw_colorful_image_card_item:hover {
    transform: translateY(-4px);
}

/* 内容区域 - 第一行 */
.sw_colorful_image_card_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

/* 文字区域 */
.sw_colorful_image_card_text {
    flex: 1;
    color: #ffffff;
    font-size: 36px;
    line-height: 44px;
    font-weight: 400;
    margin: 0;
}

/* 图片区域 */
.sw_colorful_image_card_image {
    flex-shrink: 0;
    width: 330px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw_colorful_image_card_image img {
    width: 100%;
    height: auto;
    max-width: 330px;
    border-radius: 8px;
    object-fit: contain;
}

/* 图片占位符 */
.sw_colorful_image_card_placeholder {
    width: 330px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw_colorful_image_card_placeholder span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
}

/* 按钮区域 - 第二行 */
.sw_colorful_image_card_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* 按钮样式 - 白色按钮样式 */
.sw_colorful_image_card_buttons .sw-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sw_colorful_image_card_buttons .sw_button.sw-button-white {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 160px;
    width: auto;
    height: 58px;
    padding: 0 10px 0 24px;
    background: #ffffff;
    color: #181F27;
    border: 1px solid #ffffff;
    border-radius: 58px;
    text-decoration: none;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow: hidden;
}

/* 按钮文字 */
.sw_colorful_image_card_buttons .sw_button_text {
    flex: 1;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* 圆形箭头按钮 */
.sw_colorful_image_card_buttons .sw_button_arrow {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--sw-color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.sw_colorful_image_card_buttons .sw_button_arrow svg {
    width: 15px;
    height: 12px;
    stroke: #ffffff;
    transition: transform 0.3s ease;
}

.sw_colorful_image_card_buttons .sw_button:hover {
    background: var(--sw-color-primary);
    color: var(--sw-color-white);
    border-color: var(--sw-color-primary);
}

.sw_colorful_image_card_buttons .sw_button:hover .sw_button_arrow {
    background: var(--sw-color-white);
}

.sw_colorful_image_card_buttons .sw_button:hover .sw_button_arrow svg {
    color: var(--sw-color-primary);
}



/* 响应式设计 */

/* 中等屏幕设备 (max-width: 1200px) */
@media (max-width: 1200px) {
    .sw_colorful_image_card_content {
        gap: 20px;
    }
    
    .sw_colorful_image_card_text {
        font-size: 32px;
        line-height: 40px;
    }
    
    .sw_colorful_image_card_image {
        width: 280px;
    }
    
    .sw_colorful_image_card_image img {
        max-width: 280px;
    }
    
    .sw_colorful_image_card_placeholder {
        width: 280px;
        height: 170px;
    }
    
    .sw_colorful_image_card_buttons {
        gap: 6px;
    }
    
    .sw_colorful_image_card_buttons .sw_button.sw-button-white {
        min-width: 140px;
        width: auto;
        height: 48px;
        font-size: 14px;
        line-height: 20px;
        padding: 0 6px 0 16px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow {
        width: 36px;
        height: 36px;
        margin-left: 6px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow svg {
        width: 13px;
        height: 10px;
    }
}

/* 平板设备 (max-width: 1024px, min-width: 769px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .sw_colorful_image_card_item {
        padding: 32px 24px;
    }
    
    .sw_colorful_image_card_content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 24px;
        gap: 20px;
    }
    
    .sw_colorful_image_card_image {
        width: 250px;
        order: -1; /* 图片显示在最上面 */
    }
    
    .sw_colorful_image_card_image img {
        max-width: 250px;
    }
    
    .sw_colorful_image_card_placeholder {
        width: 250px;
        height: 150px;
    }
    
    .sw_colorful_image_card_text {
        font-size: 28px;
        line-height: 36px;
        margin: 0;
        order: 0; /* 文字显示在图片下面 */
    }
    
    .sw_colorful_image_card_buttons {
        justify-content: center;
    }
    
    .sw_colorful_image_card_buttons .sw_button.sw-button-white {
        min-width: 150px;
        width: auto;
        height: 46px;
        font-size: 13px;
        line-height: 19px;
        padding: 0 5px 0 15px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow {
        width: 34px;
        height: 34px;
        margin-left: 5px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow svg {
        width: 12px;
        height: 9px;
    }
}

/* 中型移动设备 (max-width: 768px, min-width: 481px) */
@media (max-width: 768px) and (min-width: 481px) {
    .sw_colorful_image_card_grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .sw_colorful_image_card_item {
        padding: 24px 16px;
    }
    
    .sw_colorful_image_card_content {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        margin-bottom: 20px;
        gap: 16px;
    }
    
    .sw_colorful_image_card_text {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 0;
    }
    
    .sw_colorful_image_card_image {
        width: 100%;
        max-width: 300px;
        order: -1; /* 图片在上面 */
    }
    
    .sw_colorful_image_card_image img {
        max-width: 100%;
    }
    
    .sw_colorful_image_card_placeholder {
        width: 100%;
        max-width: 300px;
        height: 180px;
    }
    
    .sw_colorful_image_card_buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        max-width: 340px; /* 调整宽度以适应两个按钮 */
        margin: 0 auto 10px; /* 确保按钮区域居中 */
    }
    
    .sw_colorful_image_card_buttons .sw_button.sw-button-white {
        width: 160px; /* 增加按钮宽度，确保内容不会太拥挤 */
        height: 50px;
        font-size: 14px;
        line-height: 20px;
        padding: 0 6px 0 18px;
        flex: 0 0 auto; /* 防止按钮被压缩 */
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow {
        width: 36px;
        height: 36px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow svg {
        width: 12px;
        height: 9px;
    }
}

/* 通用移动设备样式 (max-width: 768px) - 基础样式 */
@media (max-width: 768px) {
    .sw_colorful_image_card_grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .sw_colorful_image_card_item {
        padding: 24px 16px;
    }
    
    .sw_colorful_image_card_content {
        flex-direction: column;
        margin-bottom: 20px;
        gap: 16px;
    }
    
    .sw_colorful_image_card_text {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 0;
    }
    
    .sw_colorful_image_card_image {
        width: 100%;
        max-width: 300px;
        order: -1; /* 图片在上面 */
    }
    
    .sw_colorful_image_card_image img {
        max-width: 100%;
    }
    
    .sw_colorful_image_card_placeholder {
        width: 100%;
        max-width: 300px;
        height: 180px;
    }
}

/* 小屏移动设备 (max-width: 480px) */
@media (max-width: 480px) {
    .sw_colorful_image_card_item {
        padding: 20px 12px;
    }
    
    .sw_colorful_image_card_text {
        font-size: 20px;
        line-height: 28px;
    }
    
    .sw_colorful_image_card_image {
        max-width: 250px;
    }
    
    .sw_colorful_image_card_placeholder {
        max-width: 250px;
        height: 150px;
    }
    
    .sw_colorful_image_card_buttons {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .sw_colorful_image_card_buttons .sw_button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .sw_colorful_image_card_buttons .sw_button.sw-button-white {
        width: 120px;
        height: 42px;
        font-size: 12px;
        line-height: 18px;
        padding: 0 3px 0 20px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow {
        width: 35px;
        height: 35px;
    }
    
    .sw_colorful_image_card_buttons .sw_button_arrow svg {
        width: 10px;
        height: 8px;
    }
} 