/* HiDownload homepage landing — matches modern mockup */
:root {
    --hd-green: #22c55e;
    --hd-green-dark: #16a34a;
    --hd-green-light: #dcfce7;
    --hd-text: #1f2937;
    --hd-muted: #6b7280;
    --hd-border: #e5e7eb;
    --hd-bg-soft: #f9fafb;
}

body.home-landing-page {
    background: #fff;
    color: var(--hd-text);
    padding-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
}

/* 内容较少时撑满剩余高度，把版权 footer 顶到视口底部 */
body.home-landing-page .landing-page-content,
body.home-landing-page .home-landing {
    flex: 1 0 auto;
}

body.home-landing-page .footer {
    margin-top: auto;
    flex-shrink: 0;
    background: var(--hd-bg-soft);
    border-top: 1px solid var(--hd-border);
    padding: 1.25rem;
    text-align: center;
}

.home-nav {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--hd-border) !important;
}

.home-nav .home-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 992px) {
    .home-nav .home-nav-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .home-nav .navbar-collapse {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        flex: 1 1 auto;
    }

    .home-nav .home-nav-links {
        flex-direction: row;
        align-items: center;
        margin-right: auto;
    }

    .home-nav .home-nav-links .nav-link {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    .home-nav .home-nav-right {
        flex-direction: row;
        align-items: center;
        margin-left: auto !important;
        flex-shrink: 0;
    }
}

@media (max-width: 991.98px) {
    .home-nav .home-nav-links,
    .home-nav .home-nav-right {
        width: 100%;
    }

    .home-nav .home-nav-right {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--hd-border);
    }
}

/* Override legacy green lang select on landing/tutorials pages */
body.home-landing-page #langList {
    background-color: #fff !important;
    color: var(--hd-text) !important;
    border: 1px solid var(--hd-border) !important;
}

body.home-landing-page #langList:hover {
    background-color: var(--hd-bg-soft) !important;
    color: var(--hd-text) !important;
}

/* ——— Tutorials page (same visual system as /en) ——— */
.tutorials-page-wrap {
    padding-top: 76px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.tutorials-layout {
    display: flex;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    gap: 0;
    align-items: stretch;
}

.tutorial-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--hd-bg-soft);
    border: 1px solid var(--hd-border);
    border-radius: 12px 0 0 12px;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.tutorial-sidebar h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0.5rem;
    color: var(--hd-text);
}

.tutorial-tree {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.tutorial-tree ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0.25rem 0 0.5rem;
}

.tutorial-tree li {
    margin: 0.15rem 0;
}

.tutorial-tree strong {
    display: block;
    font-size: 0.9rem;
    color: var(--hd-text);
    margin: 0.75rem 0 0.35rem 0.25rem;
}

.tutorial-tree a {
    display: block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: var(--hd-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1.35;
}

.tutorial-tree a:hover {
    color: #fff;
    background-color: var(--hd-green);
}

.tutorial-tree li.active > a {
    color: #fff !important;
    background-color: var(--hd-green);
    font-weight: 600;
}

.tutorial-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-top: 1px solid var(--hd-border);
    border-bottom: 1px solid var(--hd-border);
    padding: 1.75rem 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.tutorial-article {
    max-width: 820px;
    color: var(--hd-text);
    line-height: 1.7;
}

.tutorial-article h1,
.tutorial-article h2,
.tutorial-article h3 {
    color: var(--hd-text);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.tutorial-article h1 { font-size: 1.75rem; }
.tutorial-article h2 { font-size: 1.35rem; }
.tutorial-article h3 { font-size: 1.15rem; }

.tutorial-article p,
.tutorial-article li {
    color: var(--hd-muted);
    font-size: 1rem;
}

.tutorial-article a {
    color: var(--hd-green-dark);
    text-decoration: underline;
}

.tutorial-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.tutorial-tags {
    width: 220px;
    flex-shrink: 0;
    background: var(--hd-bg-soft);
    border: 1px solid var(--hd-border);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.tutorial-tags h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem 0.25rem;
}

.tutorial-tags ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-tag-pill {
    display: inline-block;
    background: var(--hd-green-light);
    color: var(--hd-green-dark);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.2rem 0.2rem 0.2rem 0;
}

@media (max-width: 991.98px) {
    .tutorials-layout {
        flex-direction: column;
        padding: 0 0.75rem 1.5rem;
    }

    .tutorial-sidebar,
    .tutorial-main,
    .tutorial-tags {
        width: 100%;
        max-height: none;
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }
}

.home-nav .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--hd-text) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-nav .navbar-brand span.phoenix {
    color: var(--hd-green);
    font-weight: 600;
}

.home-nav .nav-link {
    color: var(--hd-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 1rem !important;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.home-nav .nav-link:hover,
.home-nav .nav-link:focus {
    color: #fff !important;
    background-color: var(--hd-green);
    text-decoration: none;
}

.home-nav .nav-link.active {
    color: #fff !important;
    background-color: var(--hd-green);
}

.home-nav .btn-download-nav {
    background: var(--hd-green);
    color: #fff !important;
    border-radius: 8px;
    padding: 0.45rem 1rem !important;
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.home-nav .btn-download-nav:hover {
    background: var(--hd-green-dark);
    color: #fff !important;
}

.home-nav #langList {
    border: 1px solid var(--hd-border);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
    max-width: 120px;
}

.home-landing {
    padding-top: 76px;
}

.landing-page-content {
    padding-top: 76px;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2.5rem;
}

.purchase-security-notes {
    margin-top: 2rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--hd-border);
}

.purchase-security-notes img {
    display: block;
    margin-bottom: 1rem;
}

.purchase-security-notes p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--hd-muted);
    font-size: 0.95rem;
}

.purchase-security-notes p:last-child {
    margin-bottom: 0;
}

/* Hero */
.home-hero {
    padding: 3rem 0 2rem;
}

.home-hero .badge-hero {
    display: inline-block;
    background: var(--hd-green-light);
    color: var(--hd-green-dark);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.home-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--hd-text);
}

.home-hero h1 .text-green {
    color: var(--hd-green);
}

.home-hero .hero-lead {
    font-size: 1.1rem;
    color: var(--hd-muted);
    line-height: 1.65;
    max-width: 540px;
    margin-bottom: 1.5rem;
}

.home-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    color: var(--hd-muted);
}

.home-hero-pills span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-hero-pills svg {
    color: var(--hd-green);
    flex-shrink: 0;
}

.home-hero-cta .btn-primary-hd {
    background: var(--hd-green);
    border-color: var(--hd-green);
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.35rem;
    border-radius: 8px;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.home-hero-cta .btn-primary-hd:hover {
    background: var(--hd-green-dark);
    border-color: var(--hd-green-dark);
}

.home-hero-cta .btn-outline-hd {
    border: 1px solid var(--hd-border);
    color: var(--hd-text);
    font-weight: 600;
    padding: 0.65rem 1.35rem;
    border-radius: 8px;
    background: #fff;
}

.home-hero-cta .btn-outline-hd:hover {
    border-color: var(--hd-green);
    color: var(--hd-green-dark);
}

.home-hero-meta {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--hd-muted);
}

.home-hero-meta a {
    color: var(--hd-green-dark);
}

.home-hero-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Stats bar */
.home-stats {
    background: var(--hd-bg-soft);
    border-top: 1px solid var(--hd-border);
    border-bottom: 1px solid var(--hd-border);
    padding: 1.75rem 0;
}

.home-stats .stat-item {
    text-align: center;
}

.home-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hd-text);
}

.home-stats .stat-label {
    font-size: 0.875rem;
    color: var(--hd-muted);
    margin-top: 0.15rem;
}

.home-stats .stat-icon {
    color: var(--hd-green);
    margin-bottom: 0.35rem;
}

/* Section common */
.home-section {
    padding: 4rem 0;
}

.home-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.home-section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.home-section-header p {
    color: var(--hd-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Feature cards */
.feature-card-hd {
    background: #fff;
    border: 1px solid var(--hd-border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card-hd:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.feature-card-hd .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.feature-card-hd h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card-hd p {
    font-size: 0.9rem;
    color: var(--hd-muted);
    margin: 0;
    line-height: 1.55;
}

.icon-green { background: #dcfce7; color: var(--hd-green-dark); }
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-purple { background: #ede9fe; color: #7c3aed; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-teal { background: #ccfbf1; color: #0d9488; }
.icon-gray { background: #f3f4f6; color: #4b5563; }

/* How it works */
.home-how {
    background: var(--hd-bg-soft);
}

.step-card-hd {
    text-align: center;
    padding: 1rem;
}

.step-card-hd .step-num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--hd-green);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-card-hd h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-card-hd p {
    color: var(--hd-muted);
    font-size: 0.95rem;
    max-width: 280px;
    margin: 0 auto;
}

/* Protocol chips */
.protocol-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 76px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--hd-border);
    border-radius: 10px;
    background: #fff;
    margin: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hd-text);
    box-sizing: border-box;
    vertical-align: top;
    line-height: 1.2;
}

.protocol-chip small {
    display: block;
    font-weight: 500;
    color: var(--hd-muted);
    font-size: 0.7rem;
    min-height: 0.95rem;
    line-height: 0.95rem;
    margin-top: 0.2rem;
}

.protocols-wrap {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

/* Testimonials */
.testimonial-card-hd {
    background: #fff;
    border: 1px solid var(--hd-border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.testimonial-card-hd .stars {
    color: #fbbf24;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.testimonial-card-hd .quote {
    font-size: 0.95rem;
    color: var(--hd-text);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.testimonial-card-hd .author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-card-hd .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hd-green-light);
    color: var(--hd-green-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.testimonial-card-hd .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-card-hd .author-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.testimonial-card-hd .author-role {
    font-size: 0.8rem;
    color: var(--hd-muted);
}

/* SEO bottom (FAQ, guides) */
.home-seo-bottom {
    background: #fff;
    border-top: 1px solid var(--hd-border);
    padding: 3rem 0;
}

.home-seo-bottom .seo-content-section {
    margin-top: 0;
    padding-top: 0;
    border: none;
}

.home-faq .card {
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 991px) {
    .home-hero {
        text-align: center;
    }
    .home-hero .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }
    .home-hero-pills {
        justify-content: center;
    }
    .home-hero-visual {
        margin-top: 2rem;
    }
}
