/**
 * 官网首页样式
 * 响应式布局：PC端 + 手机端自适应
 *
 * @package Appliance_Fault_Theme
 * @version 1.0.1
 */

/* ============================================
   全宽布局覆盖
   官网首页需要突破主题的 1200px 容器限制
   ============================================ */
body.page-template-homepage #page,
body.page-template-homepage .page-wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

/* 覆盖 responsive.css 中 PC 端模拟手机容器的限制 */
@media screen and (min-width: 1025px) {
    body.page-template-homepage .page-wrapper {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
    }

    body.page-template-homepage .site-header {
        max-width: 100%;
        left: 0;
        transform: none;
    }
}

body.page-template-homepage .homepage-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.page-template-homepage .site-header .container {
    max-width: 100%;
    padding: 0 40px;
}

/* 官网页面隐藏顶部header，Hero自带导航效果 */
body.page-template-homepage .site-header {
    position: absolute;
    background: transparent;
    box-shadow: none;
    border-bottom: none;
}

body.page-template-homepage .site-header.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

body.page-template-homepage .site-header .site-title a,
body.page-template-homepage .site-header .custom-logo-link {
    color: #fff;
}

body.page-template-homepage .site-header.scrolled .site-title a,
body.page-template-homepage .site-header.scrolled .custom-logo-link {
    color: var(--color-primary, #6366f1);
}

/* ============================================
   手机端 APP 打开提示浮层
   ============================================ */
.mobile-app-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.app-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.app-banner-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6366f1;
}

.app-banner-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.app-banner-text strong {
    font-size: 14px;
    color: #0f172a;
    line-height: 1.3;
}

.app-banner-text span {
    font-size: 12px;
    color: #94a3b8;
}

.app-banner-open {
    flex-shrink: 0;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.app-banner-open:hover {
    background: var(--color-primary-dark, #4f46e5);
}

.app-banner-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

body.has-mobile-banner .site-header {
    top: 52px;
}

/* ============================================
   通用容器
   ============================================ */
.hp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.homepage-main {
    min-height: 100vh;
}

/* ============================================
   Hero 区域
   ============================================ */
.hp-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(160deg, var(--hero-primary, #4f46e5) 0%, #6366f1 25%, #8b5cf6 50%, #a855f7 75%, #c084fc 100%);
    background-size: cover;
    background-position: center;
    width: 100%;
}

.hp-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.15);
    z-index: 1;
}

.hp-hero-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.hp-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.hp-hero-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    top: -100px;
    left: -100px;
}

.hp-hero-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(168, 85, 247, 0.3);
    bottom: -50px;
    right: -50px;
}

.hp-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hp-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    width: 100%;
}

.hp-hero-text {
    flex: 1;
    color: #fff;
}

.hp-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hp-hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0 0 32px 0;
    line-height: 1.6;
    font-weight: 400;
}

.hp-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 按钮 */
.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.hp-btn-primary {
    background: #fff;
    color: var(--hero-primary, #4f46e5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.hp-btn-outline {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.hp-btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

/* 手机模型 */
.hp-hero-visual {
    flex-shrink: 0;
    width: 280px;
}

.hp-phone-mockup {
    position: relative;
    width: 260px;
    height: 500px;
    background: #0f172a;
    border-radius: 36px;
    padding: 12px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    margin: 0 auto;
}

.hp-phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #0f172a;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.hp-phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 24px;
    padding: 40px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.hp-phone-header {
    text-align: center;
    margin-bottom: 4px;
}

.hp-phone-app-name {
    font-size: 14px;
    font-weight: 600;
    color: #4f46e5;
}

.hp-phone-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hp-phone-search span {
    font-size: 12px;
    color: #94a3b8;
}

.hp-phone-result {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    animation: hpSlideIn 0.6s ease both;
}

.hp-phone-result:nth-child(3) { animation-delay: 0.1s; }
.hp-phone-result:nth-child(4) { animation-delay: 0.3s; }
.hp-phone-result:nth-child(5) { animation-delay: 0.5s; }

.hp-phone-code {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.hp-phone-desc {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

@keyframes hpSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   统计数据
   ============================================ */
.hp-stats {
    background: #fff;
    padding: 60px 0;
    border-bottom: 1px solid #f1f5f9;
}

.hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.hp-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hp-stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-primary, #6366f1);
    line-height: 1.2;
}

.hp-stat-suffix {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary-light, #818cf8);
}

.hp-stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ============================================
   功能特性
   ============================================ */
.hp-features {
    padding: 80px 0;
    background: #f8fafc;
}

.hp-section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.hp-section-desc {
    text-align: center;
    font-size: 15px;
    color: #64748b;
    margin: 0 0 48px 0;
}

.hp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hp-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.hp-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.1);
    border-color: #c7d2fe;
}

.hp-feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 14px;
    color: #6366f1;
}

.hp-feature-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.hp-feature-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   使用流程
   ============================================ */
.hp-howto {
    padding: 80px 0;
    background: #fff;
}

.hp-howto-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.hp-step {
    text-align: center;
    max-width: 220px;
    position: relative;
}

.hp-step-number {
    position: absolute;
    top: -12px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.hp-step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 16px;
    color: #6366f1;
}

.hp-step-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.hp-step-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.hp-step-connector {
    display: flex;
    align-items: center;
    padding-top: 36px;
    flex-shrink: 0;
}

/* ============================================
   APP 下载
   ============================================ */
.hp-download {
    padding: 80px 0;
    background: linear-gradient(160deg, #4f46e5 0%, #6366f1 25%, #8b5cf6 50%, #a855f7 75%, #c084fc 100%);
    color: #fff;
    width: 100%;
}

.hp-download-inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hp-download-text {
    flex: 1;
}

.hp-download-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 12px 0;
}

.hp-download-desc {
    font-size: 15px;
    opacity: 0.9;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.hp-download-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hp-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.hp-download-android {
    background: #fff;
    color: #0f172a;
}

.hp-download-android:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hp-download-ios {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.hp-download-ios:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hp-download-btn-text {
    display: flex;
    flex-direction: column;
}

.hp-download-btn-small {
    font-size: 11px;
    opacity: 0.7;
    line-height: 1.2;
}

.hp-download-btn-big {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.hp-download-coming {
    font-size: 15px;
    opacity: 0.8;
}

.hp-download-qr {
    flex-shrink: 0;
}

.hp-qr-wrapper {
    width: 180px;
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.hp-qr-wrapper canvas {
    display: block;
    border-radius: 4px;
}

.hp-qr-label {
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.hp-qr-fallback {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   页脚
   ============================================ */
.hp-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 48px 0 24px;
    width: 100%;
}

.hp-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.hp-footer-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 8px 0 0 0;
}

.hp-footer-links,
.hp-footer-quick {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hp-footer-links a,
.hp-footer-quick a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.hp-footer-links a:hover,
.hp-footer-quick a:hover {
    color: #fff;
}

.hp-footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.hp-footer-copy,
.hp-footer-icp {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0;
}

.hp-footer-icp a {
    color: #64748b;
    text-decoration: none;
}

.hp-footer-icp a:hover {
    color: #94a3b8;
}

/* ============================================
   响应式 - 平板
   ============================================ */
@media (max-width: 1024px) {
    .hp-hero-inner {
        padding: 60px 24px;
        gap: 40px;
    }

    .hp-hero-title {
        font-size: 2.2rem;
    }

    .hp-hero-visual {
        width: 220px;
    }

    .hp-phone-mockup {
        width: 220px;
        height: 420px;
    }

    .hp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-download-inner {
        gap: 40px;
    }

    .hp-qr-wrapper {
        width: 150px;
        padding: 10px;
    }
}

/* ============================================
   响应式 - 手机
   ============================================ */
@media (max-width: 768px) {
    /* Hero */
    .hp-hero {
        min-height: auto;
        padding-top: 60px;
    }

    .hp-hero-inner {
        flex-direction: column;
        text-align: center;
        padding: 48px 20px 40px;
        gap: 32px;
    }

    .hp-hero-title {
        font-size: 1.8rem;
    }

    .hp-hero-subtitle {
        font-size: 1rem;
    }

    .hp-hero-actions {
        justify-content: center;
    }

    .hp-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .hp-hero-visual {
        width: 200px;
    }

    .hp-phone-mockup {
        width: 200px;
        height: 380px;
        border-radius: 28px;
        padding: 10px;
    }

    .hp-phone-screen {
        border-radius: 20px;
        padding: 32px 12px 12px;
    }

    .hp-phone-code {
        font-size: 11px;
        padding: 3px 8px;
    }

    .hp-phone-desc {
        font-size: 11px;
    }

    /* 统计 */
    .hp-stats {
        padding: 40px 0;
    }

    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .hp-stat-number {
        font-size: 1.8rem;
    }

    .hp-stat-suffix {
        font-size: 1.2rem;
    }

    /* 功能特性 */
    .hp-features {
        padding: 48px 0;
    }

    .hp-section-title {
        font-size: 1.4rem;
    }

    .hp-features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hp-feature-card {
        padding: 24px 20px;
        display: flex;
        align-items: flex-start;
        gap: 16px;
    }

    .hp-feature-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 0;
    }

    .hp-feature-title {
        font-size: 15px;
    }

    .hp-feature-desc {
        font-size: 13px;
    }

    /* 使用流程 */
    .hp-howto {
        padding: 48px 0;
    }

    .hp-howto-steps {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .hp-step-connector {
        padding-top: 0;
        transform: rotate(90deg);
    }

    .hp-step {
        max-width: 260px;
    }

    .hp-step-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
    }

    /* 下载 */
    .hp-download {
        padding: 48px 0;
    }

    .hp-download-inner {
        flex-direction: column;
        text-align: center;
    }

    .hp-download-title {
        font-size: 1.5rem;
    }

    .hp-download-btns {
        justify-content: center;
    }

    .hp-download-qr {
        display: none;
    }

    /* 页脚 */
    .hp-footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .hp-footer-links,
    .hp-footer-quick {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   响应式 - 小屏手机
   ============================================ */
@media (max-width: 400px) {
    .hp-hero-title {
        font-size: 1.5rem;
    }

    .hp-hero-visual {
        width: 180px;
    }

    .hp-phone-mockup {
        width: 180px;
        height: 340px;
    }

    .hp-stats-grid {
        gap: 16px;
    }

    .hp-stat-number {
        font-size: 1.5rem;
    }

    .hp-download-btn {
        padding: 12px 18px;
    }
}
