/*
 Theme Name:   Ashe Child
 Description:  Ashe Child Theme
 Author:       Me
 Template:     ashe
 Version:      1.0.0
*/
/* --- Hero Section --- */
.service-hero-section {
    background-size: cover;
    background-position: center;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 40px;
    color: #fff;
}
.hero-overlay {
    background: rgba(0,0,0,0.5); /* 黑色遮罩让文字更清晰 */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 20px;
}
.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* Search Bar Style */
.service-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.service-search-form input.search-field {
    border: none;
    flex-grow: 1;
    padding: 15px 25px;
    border-radius: 50px 0 0 50px;
    outline: none;
    font-size: 16px;
}
.service-search-form button.search-submit {
    background: #ff6b6b; /* 主色调，可自行修改 */
    color: #fff;
    border: none;
    padding: 0 35px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.service-search-form button.search-submit:hover {
    background: #ff4757;
}

/* --- General Section Styles --- */
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    font-weight: 600;
    color: #333;
}
.section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #ff6b6b;
    margin: 10px auto 0;
}

/* --- Categories Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    text-align: center;
}
.cat-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}
.cat-icon {
    font-size: 30px;
    margin-bottom: 10px;
}
.cat-name {
    color: #333;
    font-weight: 500;
}


/* ==========================================
   [强力修复] 分类运营板块 (Portal Box) 样式
   位置：家庭保洁、维修安装等方块区域
   ========================================== */

/* 1. 外层容器与网格布局 */
.portal-section {
    margin: 40px 0 !important;
    padding: 0 10px !important; /* 防止贴边 */
}

.portal-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 强制两列 */
    gap: 30px !important; /* 盒子之间的间距 */
    align-items: start !important; /* 顶部对齐 */
}

/* 2. 单个分类盒子 (美化重点) */
.portal-box {
    background: #ffffff !important;
    border: 1px solid #e1e4e8 !important; /* 浅灰边框 */
    border-top: 3px solid #ff6b6b !important; /* 顶部加粗红线，增加设计感 */
    border-radius: 4px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important; /* 极淡的阴影 */
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 200px !important; /* [关键] 强制最小高度，防止“暂无信息”时塌缩 */
}

/* 3. 盒子头部 (标题区) */
.portal-header {
    background-color: #f8f9fa !important; /* 浅灰底色 */
    padding: 12px 20px !important;
    border-bottom: 1px solid #eee !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.portal-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #333 !important;
}

.portal-more {
    font-size: 12px !important;
    color: #999 !important;
    text-decoration: none !important;
}
.portal-more:hover {
    color: #ff6b6b !important;
}

/* 4. 列表内容区 (修正乱掉的部分) */
.portal-list {
    padding: 10px 20px !important;
    flex-grow: 1 !important; /* 撑满剩余空间 */
    background: #fff !important;
}

/* 强制重置 ul/li 样式，去除黑点和偏移 */
.portal-list ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.portal-list li {
    list-style-type: none !important; /* 去除黑点 */
    margin: 0 !important;
    padding: 10px 0 !important;
    border-bottom: 1px dashed #f0f0f0 !important; /* 虚线分隔 */
    display: block !important;
    text-align: left !important;
}
.portal-list li:last-child {
    border-bottom: none !important;
}
/* 去除 Ashe 主题可能添加的伪元素图标 */
.portal-list li:before, 
.portal-list li:after {
    content: none !important; 
    display: none !important;
}

/* 5. 文章链接文字 */
.text-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-decoration: none !important;
    width: 100% !important;
}
.post-title {
    color: #555 !important;
    font-size: 14px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}
.text-link:hover .post-title {
    color: #ff6b6b !important;
}
.post-meta {
    font-size: 12px !important;
    color: #ccc !important;
}

/* 6. [关键] “暂无信息” 样式修正 */
.empty-cat {
    color: #999 !important;
    font-size: 13px !important;
    text-align: center !important;
    padding: 40px 0 !important; /* 增加上下留白，让它居中好看 */
    background: #fff !important;
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}

/* 7. 手机端适配 */
@media (max-width: 768px) {
    .portal-grid {
        grid-template-columns: 1fr !important; /* 手机变单列 */
        gap: 20px !important;
    }
    .portal-box {
        min-height: auto !important; /* 手机上可以不用那么高 */
    }
}

/* --- 4. 最新信息流 (Feed List) - 表格化风格 --- */
.latest-feed-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 40px;
}

/* 表头 */
.feed-header-row {
    display: flex;
    background: #f4f4f4;
    padding: 10px;
    font-size: 13px;
    color: #888;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* 列表行 */
.feed-item-row {
    display: flex;
    padding: 12px 10px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    font-size: 14px;
    transition: background 0.2s;
}
.feed-item-row:hover {
    background: #fafafa;
}

/* 列宽定义 */
.col-cat { width: 15%; color: #999; }
.col-cat a { color: #999; text-decoration: none; }
.col-title { width: 55%; font-weight: 500; }
.col-title a { color: #333; text-decoration: none; }
.col-title a:hover { color: #ff6b6b; text-decoration: underline; }
.col-area { width: 15%; color: #666; text-align: center; font-size: 13px; }
.col-time { width: 15%; color: #bbb; text-align: right; font-size: 12px; }

/* 查看全部按钮 */
.feed-more-btn-wrap {
    text-align: center;
    margin-top: 20px;
}
.btn-view-all {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 14px;
    transition: all 0.3s;
}
.btn-view-all:hover {
    background: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

/* --- 响应式适配 --- */
@media (max-width: 768px) {
    .portal-grid {
        grid-template-columns: 1fr; /* 手机端板块改为单列 */
    }
    
    /* 手机端列表隐藏非必要列 */
    .col-area, .col-time { display: none; }
    .col-cat { width: 25%; font-size: 12px; }
    .col-title { width: 75%; }
    .feed-header-row { display: none; } /* 手机端隐藏表头 */
}


/* --- SEO Box --- */
.seo-content-box {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
}
.seo-content-box h2 {
    font-size: 24px;
    margin-bottom: 15px;
}
.seo-content-box p {
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(1, 1fr); /* 手机端单列 */
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .service-search-form input.search-field {
        padding: 10px 15px;
    }
    .service-search-form button.search-submit {
        padding: 0 20px;
    }
}


/* ========== 仅在首页生效的样式 ========== */

/* 1. 隐藏 Ashe 自带的博客轮播图和三个推荐盒子 */
body.home #featured-slider,
body.home #featured-links {
    display: none !important;
}

/* 2. 隐藏 Ashe 巨大的 Logo 区域和头部图片 */
/* 如果你想保留菜单，但去掉那个巨大的 Logo 留白，用这个 */
body.home .header-logo-area,
body.home .header-image-area {
    display: none !important;
}

/* 3. 隐藏侧边栏，强制内容全宽 */
/* 这步很重要，否则你的服务卡片会被挤到左边 */
body.home .main-content {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
body.home .sidebar {
    display: none !important;
}

/* 4. 隐藏页面标题（如果有显示 "Home" 或 "首页"） */
body.home .page-header {
    display: none !important;
}

/* 5. 调整容器宽度，让 Hero 图片占满屏幕 */
/* 这一步是为了打破 Ashe 的固定宽度限制 */
body.home .main-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.home .page-content {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* 修正我们自己写的 Hero 区域，让它紧贴导航栏 */
.service-hero-section {
    margin-top: 0; /* 去掉顶部间距 */
    /* 如果导航栏遮挡了内容，可以适当增加 margin-top，比如 50px */
}

/* 1. 隐藏底部的大型社交/订阅区域 */
body.home #page-footer-top {
    display: none !important;
}

/* 2. 如果你想让底部版权条更极简（可选） */
body.home #footer-copyright {
    background: #333; /* 改成深色背景 */
    color: #fff;
    padding: 20px 0;
}
body.home #footer-copyright a {
    color: #ddd;
}


/* --- 自定义服务底部样式 --- */
/* 1. 底部容器：浅灰背景 + 强制全宽 */
.service-custom-footer {
    /* --- 颜色设置 (浅色系) --- */
    background-color: #f9f9f9 !important; /* 浅灰背景 */
    color: #555 !important;                /* 深灰文字 */
    border-top: 1px solid #eee;            /* 顶部淡淡的分隔线 */

    /* --- 强制布局修正 (黑科技) --- */
    display: block !important;
    width: 100vw !important;               /* 强制占满屏幕宽度 */
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important; /* 向左拉伸 */
    margin-right: calc(-50vw + 50%) !important;/* 向右拉伸 */
    clear: both !important;                /* 清除浮动 */
    padding: 60px 0 40px;                  /* 上下内边距 */
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}


/* 2. 内部内容限制宽度 (保持居中) */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. 网格布局 (4列) */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* 4. 标题样式 (深色) */
.footer-logo {
    font-size: 26px;
    color: #333 !important; /* 品牌名深黑 */
    margin-bottom: 20px;
    font-weight: 800;
}
.footer-title {
    font-size: 18px;
    color: #333 !important; /* 小标题深黑 */
    margin-bottom: 25px;
    position: relative;
    font-weight: 600;
    padding-bottom: 10px;
}
/* 标题下的小红线 (保留品牌特色) */
.footer-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #ff6b6b; 
}
/* 5. 文本与链接 (深灰色) */
.footer-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666 !important;
    margin-bottom: 20px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #666 !important; /* 链接默认灰色 */
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}
.footer-links a:hover {
    color: #ff6b6b !important; /* 悬停变红色 */
    padding-left: 5px;
}
/* 6. 联系方式与按钮 */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.contact-list li {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666 !important;
    display: flex;
    align-items: center;
}
.contact-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #ff6b6b;
    color: #fff !important; /* 按钮文字白色 */
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s;
}
.contact-btn:hover {
    background: #ff4757;
}
/* 7. 响应式适配 */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-title:after { left: 50%; transform: translateX(-50%); }
}


body.home #footer-copyright a {
    color: #888 !important;
}

/* 1. 隐藏 Ashe 自带的“上层底部区域” (Widget Area) */
body.home #page-footer-top {
    display: none !important;
}

/* 2. 调整 Ashe 最底部的版权条，让它和我们的新底部融合 */
/* =============================================
   版权条 (Copyright) 配色修正
   ============================================= */
body.home #footer-copyright {
    background-color: #f1f1f1 !important; /* 比上面稍微深一点的灰 */
    border-top: 1px solid #e5e5e5;
    color: #999 !important;
    padding: 20px 0;
}
body.home #footer-copyright a {
    color: #888 !important;
}
/* --- 强制修复首页底部布局 --- */

/* 1. 确保自定义底部脱离所有文档流限制 */
.service-custom-footer {
    display: block !important;
    width: 100vw !important; /* 强制占满屏幕宽度 */
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important; /* 强制冲破容器居中限制 */
    margin-right: calc(-50vw + 50%) !important;
    clear: both !important;
    float: none !important;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* 2. 调整内部容器，让内容回到中间 */
.service-custom-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. 确保主要内容区不会左右浮动 */
body.home .main-container {
    display: block !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    float: none !important;
}

/* 4. 如果 Ashe 的 page-content 有 float，清除它 */
body.home .page-content {
    width: 100% !important;
    float: none !important;
    display: block !important;
}