/* =========================================================
 * Sontian News List - Elementor Widget Styles
 * ========================================================= */

.sontian-news-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- 列表 ---------- */
.sontian-news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* ---------- 单项 ---------- */
.sontian-news-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    box-sizing: border-box;
}

.sontian-news-item:nth-child(even) {
    background-color: #f5f5f5;
}

.sontian-news-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* ---------- 图片 ---------- */
.sontian-news-item__image {
    flex: 0 0 auto;
    display: block;
    width: 300px;
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #e8e8e8;
}

.sontian-news-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.sontian-news-item:hover .sontian-news-item__image img {
    transform: scale(1.05);
}

/* ---------- 标题区域 ---------- */
.sontian-news-item__body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    padding: 20px 40px;
    min-width: 0;
}

.sontian-news-item__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
    word-break: break-word;
}

.sontian-news-item__title a {
    color: #0B7B4E;
    text-decoration: none;
    transition: color 0.25s ease;
    display: inline-block;
}

.sontian-news-item__title a:hover {
    color: #085c3a;
    text-decoration: none;
}

/* ---------- 日期区域 ---------- */
.sontian-news-item__date {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 20px 30px;
    min-width: 90px;
    text-align: right;
    line-height: 1.2;
}

.sontian-news-item__day {
    font-size: 44px;
    font-weight: 500;
    color: #0B7B4E;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 8px;
}

.sontian-news-item__ym {
    font-size: 14px;
    color: #999999;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* ---------- 空状态 ---------- */
.sontian-news-empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* ---------- 分页 ---------- */
.sontian-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    font-size: 14px;
}

.sontian-pagination a,
.sontian-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sontian-pagination a:hover {
    background-color: #0B7B4E;
    border-color: #0B7B4E;
    color: #ffffff;
}

.sontian-pagination span.current {
    background-color: #0B7B4E;
    border-color: #0B7B4E;
    color: #ffffff;
    cursor: default;
    font-weight: 500;
}

.sontian-pagination span.dots {
    border: none;
    background: transparent;
    cursor: default;
    min-width: 24px;
    padding: 0 4px;
}

.sontian-pagination span.disabled {
    color: #bbb;
    cursor: not-allowed;
    opacity: 0.6;
}

.sontian-pagination__prev,
.sontian-pagination__next {
    padding: 0 18px;
}

/* =========================================================
 * 响应式 - 平板
 * ========================================================= */
@media (max-width: 1024px) {
    .sontian-news-item__image {
        width: 240px;
        height: 160px;
    }
    .sontian-news-item__body {
        padding: 16px 24px;
    }
    .sontian-news-item__title {
        font-size: 16px;
    }
    .sontian-news-item__day {
        font-size: 36px;
    }
    .sontian-news-item__date {
        padding: 16px 20px;
        min-width: 80px;
    }
}

/* =========================================================
 * 响应式 - 手机
 * ========================================================= */
@media (max-width: 767px) {
    .sontian-news-list {
        gap: 12px;
    }

    .sontian-news-item {
        flex-wrap: wrap;
        align-items: stretch;
    }

    /* 图片占满左侧，缩小尺寸 */
    .sontian-news-item__image {
        width: 120px;
        height: 100px;
        flex: 0 0 120px;
    }

    /* 标题占据右侧剩余空间 */
    .sontian-news-item__body {
        flex: 1 1 auto;
        padding: 10px 14px;
        order: 2;
        min-width: 0;
        width: calc(100% - 120px);
    }

    .sontian-news-item__title {
        font-size: 14px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 日期放在底部，横排右对齐 */
    .sontian-news-item__date {
        flex: 0 0 100%;
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        align-items: baseline;
        gap: 8px;
        padding: 6px 14px 10px;
        order: 3;
        min-width: 0;
        border-top: 1px dashed rgba(0, 0, 0, 0.06);
    }

    .sontian-news-item__day {
        font-size: 22px;
        margin-bottom: 0;
    }

    .sontian-news-item__ym {
        font-size: 12px;
    }

    /* 分页缩小 */
    .sontian-pagination {
        gap: 6px;
        margin-top: 24px;
        font-size: 13px;
    }

    .sontian-pagination a,
    .sontian-pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
    }

    .sontian-pagination__prev,
    .sontian-pagination__next {
        padding: 0 10px;
    }
}

/* =========================================================
 * 响应式 - 小屏手机（隐藏过多页码可用JS，这里只调样式）
 * ========================================================= */
@media (max-width: 400px) {
    .sontian-news-item__image {
        width: 100px;
        height: 90px;
        flex: 0 0 100px;
    }
    .sontian-news-item__body {
        width: calc(100% - 100px);
        padding: 8px 12px;
    }
    .sontian-news-item__title {
        font-size: 13px;
    }
    .sontian-news-item__day {
        font-size: 20px;
    }
}
