﻿/* Homepage — Premium landing styles */
.page-home {
    --home-grad: linear-gradient(135deg, #047857 0%, #10b981 35%, #059669 70%, #34d399 100%);
    --home-grad-soft: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.06) 100%);
    --home-accent: #6ee7b7;
    --home-glow: rgba(16, 185, 129, 0.45);
}

/* ===== Hero header overlay ===== */
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) {
    background: rgba(15, 17, 28, 0.35);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .logo-text,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .logo-tagline,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .nav-link,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-admin {
    color: rgba(255, 255, 255, 0.92) !important;
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .nav-pills {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .nav-link:hover,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search-input,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search-input::placeholder,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search-icon,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search-kbd {
    color: rgba(255, 255, 255, 0.88);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-search-kbd {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .header-admin {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .theme-toggle,
.frontend-body:has(.page-home) .site-header:not(.is-scrolled) .nav-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ===== Hero ===== */
.home-hero {
    position: relative;
    margin-top: calc(-1 * var(--header-h));
    padding: calc(var(--header-h) + 72px) 0 100px;
    overflow: hidden;
    color: #fff;
    min-height: clamp(640px, 88vh, 920px);
    display: flex;
    flex-direction: column;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.home-hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--home-grad);
}

.home-hero-mesh {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(52, 211, 153, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(52, 211, 153, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 60% 20%, rgba(96, 165, 250, 0.15) 0%, transparent 50%);
}

.home-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 15%, transparent 72%);
}

.home-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    animation: homeGlowPulse 8s ease-in-out infinite alternate;
}

.home-hero-glow--1 {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -100px;
    background: #34d399;
    opacity: 0.5;
}

.home-hero-glow--2 {
    width: 400px;
    height: 400px;
    bottom: -80px;
    right: -60px;
    background: #34d399;
    opacity: 0.4;
    animation-delay: -3s;
}

.home-hero-glow--3 {
    width: 280px;
    height: 280px;
    top: 40%;
    right: 30%;
    background: #34d399;
    opacity: 0.25;
    animation-delay: -5s;
}

@keyframes homeGlowPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.35; }
    100% { transform: scale(1.12) translate(12px, -8px); opacity: 0.55; }
}

.home-hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    flex: 1;
}

.home-hero-content {
    max-width: none;
    text-align: left;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px 7px 12px;
    margin-bottom: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
}

.home-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--home-accent);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
    animation: homeBadgePulse 2s ease-in-out infinite;
}

@keyframes homeBadgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.85); }
}

.home-hero-title {
    margin: 0 0 20px;
}

.home-hero-title-main {
    display: block;
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #fff;
}

.home-hero-accent {
    display: block;
    margin-top: 10px;
    font-size: clamp(22px, 3.2vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #6ee7b7 0%, #34d399 45%, #a7f3d0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero-desc {
    margin: 0 0 32px;
    max-width: 520px;
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

/* Search */
.home-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    padding: 7px 7px 7px 20px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: box-shadow 0.3s, transform 0.3s;
}

.home-search:focus-within {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32), 0 0 0 2px rgba(52, 211, 153, 0.4);
    transform: translateY(-2px);
}

.home-search-icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.home-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text);
    padding: 12px 0;
}

.home-search-input::placeholder {
    color: var(--text-muted);
}

.home-search-clear {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.home-search-clear:hover {
    background: var(--border);
}

.home-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 12px 22px;
    border: none;
    border-radius: 12px;
    background: var(--home-grad);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.home-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45);
}

.home-hot-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    justify-content: flex-start;
}

.home-hot-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

.home-hot-tag {
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.home-hot-tag:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    text-decoration: none !important;
}

.home-btn--primary {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.home-btn--primary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.home-btn--ghost {
    color: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
}

.home-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.home-btn--outline {
    color: var(--text) !important;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.home-btn--white {
    color: #047857 !important;
    background: #fff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.home-btn--white:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

/* Hero visual */
.home-hero-visual {
    position: relative;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-float-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: homeRingSpin 30s linear infinite;
}

.home-float-ring::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

@keyframes homeRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.home-float-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.home-float-core-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.home-float-core-label {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 0.04em;
}

.home-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
    animation: homeFloat 6s ease-in-out infinite;
}

.home-float-card--1 {
    top: 12%;
    left: 0;
    animation-delay: 0s;
}

.home-float-card--2 {
    top: 8%;
    right: 0;
    animation-delay: -2s;
}

.home-float-card--3 {
    bottom: 14%;
    left: 8%;
    animation-delay: -4s;
}

@keyframes homeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.home-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--home-grad-soft);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.home-float-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-float-info strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.home-float-info span {
    font-size: 11px;
    color: var(--text-muted);
}

/* 首页侧栏增强 */
.page-home .home-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.page-home .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.page-home .sidebar-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* ===== 左右双栏主体 ===== */
.home-body-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 32px 20px 48px;
}

.home-main {
    min-width: 0;
}

/* Stats bar（右栏顶部） */
.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.home-stat {
    text-align: center;
    padding: 18px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform 0.25s, box-shadow 0.25s;
}

.home-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.home-stat-num {
    display: block;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    background: var(--home-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-stat-label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ===== Sections ===== */
.home-section {
    padding: 88px 0;
}

.home-section--compact {
    padding: 0 0 40px;
}

.home-section--tight {
    padding-top: 0;
}

.home-section--news {
    padding: 88px 0 64px;
    background: var(--home-grad-soft);
}

.home-main .home-section-head {
    text-align: left;
    max-width: none;
    margin: 0 0 24px;
}

.home-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.home-section-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-section-head h2 {
    margin: 14px 0 14px;
    font-size: clamp(28px, 3.8vw, 42px);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--text);
    line-height: 1.15;
}

.home-section-head p {
    margin: 0;
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.home-grid {
    display: grid;
    gap: 14px;
    align-items: stretch;
}

.home-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 统一卡片：分类 / 工具完全同尺寸（覆盖 frontend.css 的 .tool-card） */
.page-home .home-card,
.page-home .home-cat-card,
.page-home .home-tool-card,
.page-home .tool-card.home-tool-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    height: 84px;
    min-height: 84px;
    max-height: 84px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text) !important;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.page-home .home-card:hover,
.page-home .home-cat-card:hover,
.page-home .home-tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.1);
}

.page-home .home-tool-card.is-hidden,
.page-home .tool-card.is-hidden {
    display: none !important;
}

.page-home .home-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    transition: transform 0.25s;
}

.page-home .home-cat-icon {
    background: var(--home-grad-soft);
    font-weight: 700;
    color: var(--primary);
}

.page-home .home-tool-icon {
    background: rgba(16, 185, 129, 0.08);
}

.page-home .home-card:hover .home-card-icon {
    transform: scale(1.05);
}

.page-home .home-cat-card:hover .home-cat-icon {
    background: var(--home-grad);
    color: #fff;
}

.page-home .home-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.page-home .home-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-home .home-card-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category sections */
.home-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.home-category-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-category-index {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.home-category-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.home-category-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-subtle);
}

.category-section {
    scroll-margin-top: calc(var(--header-h) + 20px);
}

.category-section.is-hidden {
    display: none !important;
}

/* Features */
/* News (homepage section) */
.home-news {
    padding: 0;
}

.home-news-footer {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.home-news-empty {
    text-align: center;
    padding: 48px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: 16px;
}

.home-news-empty p {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 15px;
}

.home-news-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary) !important;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.2s;
}

.home-news-more:hover {
    border-color: var(--primary);
    transform: translateX(2px);
}

.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.home-news-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text) !important;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.home-news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.08);
}

.home-news-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.04em;
}

.home-news-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.home-news-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.home-news-read {
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* Search empty */
.home-search-empty {
    text-align: center;
    padding: 56px 20px;
}

.home-search-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.home-search-empty p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 15px;
}

/* CTA */
.home-cta {
    position: relative;
    margin: 0 20px 56px;
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
}

.home-cta-bg {
    position: absolute;
    inset: 0;
    background: var(--home-grad);
}

.home-cta-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(52, 211, 153, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(52, 211, 153, 0.25) 0%, transparent 50%);
}

.home-cta-inner {
    position: relative;
    z-index: 1;
    padding: 72px 32px;
    text-align: center;
}

.home-cta h2 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.home-cta p {
    margin: 0 0 28px;
    font-size: 17px;
    opacity: 0.9;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Reveal animation */
.page-home.is-ready .reveal:not(.in) {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.page-home .reveal.in {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .home-body-layout {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 20px;
    }

    .home-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .home-body-layout {
        grid-template-columns: 1fr;
    }

    .page-home .home-sidebar {
        position: static;
        max-height: none;
    }

    .page-home .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px;
        overflow: visible;
    }

    .page-home .sidebar-item {
        width: auto;
        margin-bottom: 0;
        padding: 8px 12px;
    }

    .page-home .sidebar-text {
        white-space: nowrap;
    }

    .home-hero-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .home-hero-content {
        text-align: center;
    }

    .home-hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .home-search {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hot-tags,
    .home-hero-actions {
        justify-content: center;
    }

    .home-hero-visual {
        height: 300px;
        max-width: 400px;
        margin: 0 auto;
    }

}

@media (max-width: 640px) {
    .home-hero {
        padding: calc(var(--header-h) + 48px) 0 64px;
        min-height: auto;
    }

    .home-hero-visual {
        display: none;
    }

    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-section {
        padding: 64px 0;
    }

    .home-grid--3 {
        grid-template-columns: 1fr;
    }

    .home-search {
        flex-wrap: wrap;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .home-search-btn {
        width: 100%;
        justify-content: center;
    }

    .home-cta {
        margin: 0 16px 40px;
    }

    .home-cta-inner {
        padding: 48px 20px;
    }

    .home-news-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
html[data-theme="dark"] .home-search {
    background: rgba(31, 35, 41, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .home-float-card {
    background: var(--bg-card);
}

html[data-theme="dark"] .frontend-body:has(.page-home) .site-header:not(.is-scrolled) {
    background: rgba(10, 12, 18, 0.65);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .home-stat {
    box-shadow: none;
}

html[data-theme="dark"] .home-stat:hover {
    box-shadow: var(--shadow-md);
}
