/* 业主落地页通用样式(2026-09-19):首页首屏、发需求页、AI 估价页共用。
   Vivian 的要求:字大、偏粗、不密,手机优先;按钮高度 ≥48px;左右留 16px;任何宽度都不能横向滚动。 */

:root {
    --lp-orange: #FF6E30;
    --lp-orange-dark: #E85A1E;
    --lp-orange-soft: #FFF3EC;
    --lp-text: #1d1d1f;
    --lp-text-2: #4a4a4a;
    --lp-line: #e3e3e3;
}

/* 兜底:防止任何子元素把页面撑出横向滚动 */
html { overflow-x: hidden; }
body { max-width: 100%; overflow-x: clip; }

/* ---------- 按钮 ---------- */
.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 24px;
    border-radius: 14px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s ease, transform .1s ease;
    box-sizing: border-box;
}
.lp-btn:active { transform: scale(.98); }
.lp-btn-main {
    background: var(--lp-orange);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 110, 48, .35);
}
.lp-btn-main:hover { background: var(--lp-orange-dark); color: #fff; }
.lp-btn-sub {
    background: #fff;
    color: var(--lp-text);
    border-color: #d6d6d6;
    min-height: 52px;
    font-size: 17px;
}
.lp-btn-sub:hover { border-color: var(--lp-orange); color: var(--lp-orange-dark); }
.lp-btn[disabled], .lp-btn.is-busy { opacity: .6; cursor: default; box-shadow: none; }
.lp-ai-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #06B6D4 100%); /* 与 App AI 徽标同色 */
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .5px;
}

/* ---------- 首页首屏 ---------- */
.home-hero {
    background: linear-gradient(180deg, #FFF6F0 0%, #ffffff 100%);
    padding: 28px 0 28px;
}
.home-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 6.4vw, 40px);
    line-height: 1.25;
    font-weight: 900;
    color: var(--lp-text);
    letter-spacing: -.2px;
}
.home-hero-lead {
    margin: 0 0 20px;
    font-size: clamp(18px, 4.6vw, 22px);
    line-height: 1.5;
    font-weight: 600;
    color: var(--lp-text-2);
    max-width: 640px;
}
.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.home-hero-actions .lp-btn-main { min-width: 280px; }
.home-hero-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.home-hero-points li {
    position: relative;
    padding-left: 26px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lp-text-2);
    line-height: 1.5;
}
.home-hero-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 14px;
    height: 8px;
    border-left: 3px solid #1f9d55;
    border-bottom: 3px solid #1f9d55;
    transform: rotate(-45deg);
}

/* ---------- 三步 ---------- */
.home-steps { padding: 32px 0 36px; background: #fff; border-top: 1px solid #f1f1f1; }
.home-steps-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 900;
    color: var(--lp-text);
}
.home-steps-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.home-steps-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #FAFAFA;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 18px 16px;
}
.home-step-no {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lp-orange);
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-steps-list h3 { margin: 4px 0 6px; font-size: 19px; font-weight: 800; color: var(--lp-text); }
.home-steps-list p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--lp-text-2); }
.home-steps-seo { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: #666; }
.home-steps-cta { min-width: 280px; }

/* ---------- 首页案例区状态(加载中 / 暂时无法加载 + 重试 / 暂无内容) ---------- */
.cases-status {
    grid-column: 1 / -1;
    padding: 36px 16px;
    text-align: center;
}
.cases-status p { margin: 0 0 14px; font-size: 17px; font-weight: 600; color: #666; }
.cases-status .cases-retry { min-height: 48px; padding: 0 28px; font-size: 16px; font-weight: 700; }

/* ---------- 手机底部常驻 CTA ---------- */
.lp-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    transform: translateY(110%);
    transition: transform .2s ease;
    display: none;
}
.lp-sticky-cta .lp-btn { width: 100%; }
.lp-sticky-cta.show { transform: translateY(0); }

/* 首页:特性卡片网格原来用 repeat(2,1fr),长英文单词会把卡片撑出屏幕(375 宽下右边界 388) */
.features-grid.features-grid--alt > * { min-width: 0; }
.feature-card h3, .feature-card p { overflow-wrap: anywhere; }

@media (max-width: 992px) {
    .features-grid.features-grid--alt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .home-hero { padding: 20px 0 22px; }
    .home-hero .container, .home-steps .container { padding-left: 16px; padding-right: 16px; }
    .home-hero-actions { flex-direction: column; gap: 10px; }
    .home-hero-actions .lp-btn, .home-steps-cta { width: 100%; min-width: 0; }
    .home-hero-points { flex-direction: column; gap: 6px; }
    .home-steps-list { grid-template-columns: 1fr; gap: 12px; }
    .lp-sticky-cta { display: block; }
    /* 首页各区块左右统一留 16px(原来 8–9px,贴边) */
    .cases-section .container, .features-section .container, .faq-section .container,
    .contact-merged .container { padding-left: 16px; padding-right: 16px; }
    .features-grid.features-grid--alt { padding: 0; }
    /* 案例分类标签:居中 + 横向滚动时最左边那个会被切掉且滑不回去,手机上改为靠左 */
    .cases-categories { justify-content: flex-start; gap: 10px; padding: 0; }
    /* 特性卡片左右滑入动画的起始帧是 translateX(±30px),动画期间右列卡片伸出屏幕外 → 手机上去掉 */
    .feature-card, .feature-card:nth-child(even) { animation: none; }
}

/* 2026-09-19 已登录用户首页直接从内容开始(class 由 index.html <head> 里的脚本加) */
.bb-member .home-hero,
.bb-member .home-steps,
.bb-member .lp-sticky-cta,
.bb-member .features-section,
.bb-member .faq-section {
    display: none !important;
}
.bb-member .cases-section {
    padding-top: 16px;
}

/* 2026-09-19 AI 估价按钮与 App 统一:App 首页「AI 估价」徽标、估价页主按钮都是 靛蓝→紫→青 渐变、白字 */
.lp-btn-ai {
    background: linear-gradient(90deg, #4F46E5 0%, #7C3AED 55%, #06B6D4 100%);
    color: #fff;
    border-color: transparent;
    min-height: 52px;
    font-size: 17px;
    box-shadow: 0 6px 18px rgba(6, 182, 212, .30);
}
.lp-btn-ai:hover { color: #fff; filter: brightness(1.05); }
.lp-btn-ai .lp-ai-tag { background: rgba(255, 255, 255, .25); }

/* 2026-09-19 首页「三步拿到报价」和分类标签之间原来叠了约 100px 的上下留白(36 + 48 + 间距),
   信息流还没加载出来时空的 .cases-grid 又撑出 200px,看着像大图没加载出来。收紧。 */
.home-steps { padding-bottom: 20px; }
.home-steps + .cases-section { padding-top: 8px; }
.cases-grid:empty { min-height: 0; }

/* 2026-09-19 手机端首页信息流一行两个(和 App 首页的两列瀑布流一致;Vivian 要求)。
   只作用于首页的信息流(.cases-section 内),搜索页等不受影响。 */
@media (max-width: 768px) {
    .cases-section .cases-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 12px;
    }
    .cases-section .case-card { min-height: 0; }
    .cases-section .case-card .img-wrap { height: auto; aspect-ratio: 3 / 4; }
    .cases-section .case-info { padding: 10px 10px 12px; }
    .cases-section .case-info h3 {
        font-size: 15px;
        line-height: 1.35;
        margin: 0 0 8px;
        font-weight: 700;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .cases-section .case-meta { gap: 6px; }
    .cases-section .case-meta .author-avatar { width: 22px; height: 22px; }
    .cases-section .case-meta .author-name {
        font-size: 13px;
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .cases-section .case-meta .like-count { font-size: 13px; }
    .cases-section .content-type-label { font-size: 12px; padding: 2px 8px; }
}
