/* 图文列表容器 */
.image-text-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px; /* 每个图文项之间的间距 */
    padding: 15px 0;
}

/* 单个图文项 - 核心布局：文字左、图片右 + 限高100px */
.image-text-item {
    display: flex;
    align-items: center; /* 垂直居中对齐内容 */
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px; /* 微调内边距，适配限高 */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    height: 100px; /* 强制限高100px */
    box-sizing: border-box; /* 内边距计入高度，避免总高度超过100px */
    overflow: hidden; /* 隐藏超出高度的内容 */
}

/* 文字内容区域 - 适配限高 */
.text-content {
    flex: 1; /* 占剩余所有宽度 */
    min-width: 300px; /* 保证小屏不挤压文字 */
    height: 100%; /* 继承父容器高度 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 文字垂直居中 */
    overflow: hidden; /* 隐藏超出的文字 */
}

/* 标题图标样式 */
.title-icon {
    display: inline-block;
    margin-right: 8px;
    color: #e8603c; /* 图标颜色和主题色一致 */
    font-size: 0.9em;
}

/* 为不同的标题图标添加随机样式（通过nth-child实现） */
.image-text-item:nth-child(1) .title-icon::before {
    content: "\f0e5"; /* Font Awesome 图标代码：信封 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
.image-text-item:nth-child(2) .title-icon::before {
    content: "\f15c"; /* Font Awesome 图标代码：历史书 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
.image-text-item:nth-child(3) .title-icon::before {
    content: "\f236"; /* Font Awesome 图标代码：民宿 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* 标题样式 - 适配图标 */
.text-content h2 {
    font-size: 1.1em; /* 缩小标题字号，适配限高 */
    font-weight: bold;
    color: #e8603c;
    margin-bottom: 5px; /* 缩小标题和正文间距 */
    line-height: 1.3;
    white-space: nowrap; /* 标题单行显示 */
    overflow: hidden;
    text-overflow: ellipsis; /* 标题超出显示省略号 */
    display: flex;
    align-items: center; /* 图标和标题文字垂直居中 */
}

/* 段落样式 - 仅第一行缩进2个字符，第二行不缩进 */
.text-content p {
    color: #666;
    line-height: 1.6;
    font-size: 0.9em;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 正文最多显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-indent: 2em; /* 仅第一行缩进2个字符 */
    white-space: normal; /* 关键：取消pre-line，避免换行符导致每行都缩进 */
}

.text-content a {
    color: inherit; /* 继承标题颜色，去掉默认链接色 */
    text-decoration: none;
}

.text-content a:hover h2 {
    color: #d8502c; /* hover时标题变色 */
}
.text-content a:hover .title-icon {
    color: #d8502c; /* hover时图标同步变色 */
}

/* 图片内容区域 - 适配限高 */
.image-content {
    flex: 0 0 80px; /* 图片宽度适配100px高度，略小于高度避免挤压 */
    height: 80px; /* 图片高度80px，和100px父容器保持视觉平衡 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.image-content img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，裁剪多余部分 */
    display: block; /* 去掉图片底部空白 */
}

/* 移动端适配（768px以下） */
@media only screen and (max-width: 768px) {
    .image-text-item {
        flex-direction: column; /* 移动端改为上下布局 */
        gap: 8px; /* 缩小间距 */
        padding: 10px;
        height: auto; /* 移动端取消固定高度，自适应内容 */
        min-height: 150px; /* 保证移动端最小高度，避免内容拥挤 */
    }

    .image-content {
        flex: 0 0 100%; /* 图片占满宽度 */
        height: 120px; /* 移动端图片高度自适应 */
    }

    .text-content {
        min-width: unset; /* 取消最小宽度限制 */
        height: auto; /* 取消高度限制 */
    }

    .text-content h2 {
        font-size: 1.1em;
        white-space: normal; /* 移动端标题恢复换行 */
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        /* 移动端标题图标适配 */
        display: flex;
        align-items: flex-start;
    }
    .title-icon {
        margin-top: 2px; /* 移动端图标微调 */
    }

    .text-content p {
        font-size: 0.95em;
        -webkit-line-clamp: 3; /* 移动端正文显示3行 */
        text-indent: 2em; /* 移动端仍保持仅第一行缩进 */
        white-space: normal;
    }
}

/* 小屏手机适配（480px以下） */
@media only screen and (max-width: 480px) {
    .image-text-item {
        padding: 8px;
        min-height: 120px;
    }

    .image-content {
        height: 100px;
    }
    .text-content p {
        text-indent: 1.5em; /* 小屏第一行缩进略减小，提升体验 */
    }
}