/* ============================================================
   首页 M1 区域样式
   说明：采用扁平化写法，按选择器层级逐级展开（不使用 CSS 嵌套），
        属性顺序统一为：布局 → 尺寸 → 间距 → 视觉 → 文字
   ============================================================ */

/* ---------- M1 整体布局 ---------- */
.home-m1 {
 
    display: flex;
    align-items: stretch;        /* 关键：三个子项自动等高（默认值，显式写出更清晰） */
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 12px;
    border-radius: 2px;
    margin-bottom: 12px;
    min-height: 500px;           /* 容器至少 500px，内容更高时自动撑开且三者仍等高 */
    background-color: #ffffff;
}

/* ---------- 顶部左侧区域 ---------- */
.home-m1-left {
    width: 350px;
}

/* 顶部左侧轮播容器 */
.home-m1-left-swiper {
    position: relative;
    width: 350px;
    height: 350px;
    overflow: hidden;
    background-color: #1e3a8a;

    .swiper-slide {
        position: relative;

        a {
            display: block;
            width: 100%;
            height: 100%;
        }

        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border: 0;
        }

        /* 轮播标题：覆盖在图片底部 */
        .swiper-slide__title {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            padding: 8px 12px;
            font-size: 14px;
            line-height: 1.4;
            color: #fff;
            text-align: left;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
}

/* 顶部左侧广告位 */
.home-m1-left-ad {
    width: 350px;
    height: 130px;
    margin-top: 5px;
    background-color: #aaaaaa;
}

/* 通用首页广告位样式 */
.home-ad {
    display: block;
    overflow: hidden;
    background-color: #f0f0f0;
}

.home-ad img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

/* Home01：顶部左侧，位于轮播下方 */
.home-ad-home01 {
    width: 350px;
    height: 130px;
    margin-top: 5px;
}

/* Home02 / Home03 / Home04：底部横向排列的广告栏 */
.home-ads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.home-ads .home-ad {
    flex: 1 1 0;
    min-width: 0;
    height: 120px;
}

/* ---------- 顶部中间区域 ---------- */
.home-m1-middle {
    width: 650px ;
    padding: 0 12px;
    box-sizing: border-box;

    overflow-x: hidden;
    display: flex;
}

.home-m1-middle-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 单个频道分组块 */
.middle-channel-block {
    padding: 0  12px;
    border-bottom: 1px dotted #efe9df;
}

.middle-channel-block:last-child {
    border-bottom: none;
}

/* 频道大标题（红色粗体） */
.middle-channel-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: #c0392b;
    line-height: 1.4;
    margin: 8px 0 10px;
}

.middle-channel-title-link {
    color: #c0392b;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.middle-channel-title-link:hover {
    color: #a07648;
}

/* 频道标题右侧"更多"入口 */
.middle-more {
    flex: 0 0 auto;
    margin-left: 12px;
    font-size: 13px;
    font-weight: 400;
    color: #b09a7a;
    text-decoration: none;
}

.middle-more:hover {
    color: #a07648;
}

/* 频道下分类块 */
.middle-category {
    margin-bottom: 8px;
}

/* 分类小标题（频道标题下的子分类，可点击进入分类列表页） */
.middle-category-title {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: #8a6d3b;
    line-height: 1.4;
    margin: 6px 0 6px;
    padding-left: 8px;
    border-left: 3px solid #c8a96a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.middle-category-title:hover {
    color: #a07648;
}

/* 频道块容器 */
.middle-channel-block {
 
    padding-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee8e0;
}

/* 文章列表：两列网格，每行两条 */
.middle-channel-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
}

/* 单个文章条目 */
.middle-channel-item {
    list-style: none;
    line-height: 2;
    min-width: 0; /* 防止 grid 子项被内容撑破，保证省略号生效 */
}

.middle-channel-link {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    font-size: 15px;
    color: #333333;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    transition: color .15s;
}

.middle-channel-link:hover {
    color: #a07648;
}

/* 非推荐频道文章标题前的分类标签 */
.article-cate-tag {
    flex: 0 0 auto;
    display: inline-block;
    min-width: 36px;
    text-align: center;
    padding: 1px 6px;
    border-radius: 3px;
    background-color: #8a6d3b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

 
/* 标题文本：超出省略 */
.article-title-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: keep-all;
}

/* 频道首条文章：加粗、变大、变色（参考截图样式） */

.middle-featured-link {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #b5532f;
    text-decoration: none;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .15s;
}

.middle-featured-link:hover {
    color: #8c3d1f;
}

/* ---------- 顶部右侧区域（每日黄历） ---------- */
.home-m1-right {
    width: 350px;
    background-color: #f8f4ee;
}

/* ============================================================
   顶部左侧轮播（Swiper）样式
   ============================================================ */

/* 幻灯片 */
.home-m1-left-swiper .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

/* 幻灯片内的图片 */
.home-m1-left-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 幻灯片文字说明 */
.home-m1-left-swiper .slide-cap {
    font-weight: 600;
    letter-spacing: 2px;
}

/* 分页点：白色半透明，避免默认蓝色太抢眼 */
.home-m1-left-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, .5);
    opacity: 1;
}

.home-m1-left-swiper .swiper-pagination-bullet-active {
    background: #ffffff;
}

/* 左右切换按钮：默认隐藏，鼠标悬停轮播容器时才显示 */
.home-m1-left-swiper .swiper-button-prev,
.home-m1-left-swiper .swiper-button-next {
    --swiper-navigation-size: 22px;
    color: #ffffff;
    opacity: 0;
    transition: opacity .2s ease;
}

.home-m1-left-swiper:hover .swiper-button-prev,
.home-m1-left-swiper:hover .swiper-button-next {
    opacity: 1;
}

/* ============================================================
   每日黄历样式（daily-calendar）
   ============================================================ */

/* 黄历卡片容器 */
.daily-calendar {
    background-color: #faf6f0;

    padding: 24px 20px 28px;
}

/* ---------- 日期头部 ---------- */
.dc-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e0d4;
    font-size: 15px;
    color: #5a5047;
}

.dc-zodiac {
    margin-left: 8px;
    color: #a07648;
}

/* ---------- 日期数字 ---------- */
.dc-day-box {
    display: flex;
    justify-content: center;
    padding: 18px 0;
}

.dc-day-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background-color: #a07648;
    border-radius: 10px;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
}

/* ---------- 农历信息 ---------- */
.dc-lunar-info {
    text-align: center;
    padding-bottom: 14px;
}

.dc-lunar-date {
    font-size: 17px;
    font-weight: 600;
    color: #3d362f;
    margin-bottom: 6px;
}

.dc-ganzhi {
    font-size: 13px;
    color: #7a7066;
}

.dc-ganzhi span {
    margin: 0 6px;
}

.dc-animal {
    color: #a07648;
}

/* ---------- 宜忌区域 ---------- */
.dc-yiji {
    padding-top: 14px;
    border-top: 1px solid #e8e0d4;
}

.dc-yiji-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
}

.dc-yiji-item + .dc-yiji-item {
    border-top: 1px solid #efe9df;
}

/* 宜/忌 标签圆圈 */
.dc-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    line-height: 1;
}

.dc-tag-yi {
    background-color: #4caf50;
}

.dc-tag-ji {
    background-color: #e53935;
}

/* 宜/忌 文字内容 */
.dc-yiji-text {
    font-size: 13px;
    color: #5a5047;
    line-height: 1.7;
    padding-top: 3px;
}

/* ============================================================
   推荐文章列表样式
   ============================================================ */

.recommend-section {
    padding: 12px 4px;
    background-color: #ffffff;
}

.recommend-section-title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #a07648;
    margin: 4px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e0d4;
    letter-spacing: 1px;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommend-card {
    padding: 6px 4px 8px;
    border-bottom: 1px dashed #efe9df;
}

.recommend-card:last-child {
    border-bottom: none;
}

.recommend-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.5;
}

.recommend-title:hover {
    color: #a07648;
    text-decoration: underline;
}

.recommend-subitems {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recommend-subitem {
    font-size: 13px;
    color: #7a7066;
    line-height: 1.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-subitem:hover {
    color: #a07648;
    cursor: pointer;
}

/* ============================================================
   服务功能导航区（home-m2）
   ============================================================ */

/* 外容器：白色圆角卡片 + 浅阴影 */
.home-m2 {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 2px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .05);
}

/* 内部包裹 */
.service-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---------- 服务卡片（图标 + 简介，左右结构） ---------- */
/* 单卡片：左边图标，右边文字（标题上、简介下），一行 4 个 */
.service-hot-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
 
    border: 1px solid #f5f0e8;
    border-radius: 2px;
    min-height: 88px;
    background-color: #f5f5f5;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.service-hot-card:hover {
    background-color: #fffdf9;
    border-color: #efe9df;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

/* 服务图标：统一方形圆角（兼容任意比例图片） */
.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    background-color: #faf8f5;
    overflow: hidden;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 无图标时不显示占位，直接隐藏图标区 */
.service-icon-text {
    display: none;
}

/* 服务文字内容 */
.service-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-align: left;
}

.service-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-desc {
    font-size: 13px;
    color: #999999;
    line-height: 1.5;
    max-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------- 服务标签容器（图标 + 简介，1 行 × 4 列） ---------- */
.service-tags {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-tag-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

 

/* 标签卡片内的小图标 */
.service-tags .service-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background-color: #ffffff;
}

 
 
/* 响应式：平板 2 列 */
@media (max-width: 1199px) {
    .service-tag-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式：小屏 1 列 */
@media (max-width: 767px) {
    .home-m2 {
        padding: 14px 12px;
    }

    .service-tag-row {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }

    .service-hot-card {
        gap: 8px;
        padding: 10px 8px;
        min-height: 68px;
    }

    .service-icon {
        width: 48px;
        height: 48px;
    }

    .service-title {
        font-size: 15px;
    }

    .service-desc {
        line-height: 1.75;
        font-size: 12px;
    }

    .service-tags .service-icon {
        width: 40px;
        height: 40px;
    }

    .service-tags .service-title {
        font-size: 14px;
    }
}


