.container {
    display: flex;
    min-height: 300px;
    gap: 8px;
    padding: 20px;
}

.card {
    position: relative;
    background: linear-gradient(to bottom right, #4169e1, #f8f9fa);
    border-radius: 12px;
    cursor: pointer;
    flex: 0.3;
    transition: all 0.7s cubic-bezier(0.05, 0.6, 0.4, 0.9);
    overflow: hidden;
}

/* 默认第一个展开 */
/*.card:first-child {*/
/*    flex: 1;*/
/*}*/

/* 悬浮时当前卡片展开，其他收起 */
.card:hover {
    flex: 1;
}

.container:hover .card:not(:hover) {
    flex: 0.3;
}

/* 当容器没有被悬浮时，保持第一个展开的状态 */
.container:not(:hover) .card:first-child {
    flex: 1;
}

.content {
    color: white;
    position: absolute;
    top: 20px;  /* 改为顶部定位 */
    left: 20px;
    right: 20px;
    opacity: 1;  /* 默认显示 */
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    padding: 15px;  /* 添加内边距 */
}

/* 未展开卡片隐藏内容 */
/*.card:not(:first-child):not(:hover) .content {*/
/*    opacity: 0;*/
/*}*/

.title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    /*max-width: 100%;  !* 限制文字宽度 *!*/
    /* 设置最大高度和溢出处理 */
    max-height: 200px; /* 限制最大高度为200px */
    overflow: hidden; /* 超出部分隐藏 */

    /* 多行文本溢出处理 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; /* 限制为5行 */
}
