/* blog.components.css — Featured Banner, Search+Filter Bar, Horizontal Cards & Sidebar */

/* --- Buttons --- */
.gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--blog-gradient);
    color: var(--blog-accent-fg);
    border: 1px solid transparent;
    border-radius: var(--blog-radius-full);
    padding: 0.62rem 1.45rem;
    font-weight: 600;
    font-size: var(--blog-font-size-sm);
    line-height: 1.25;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(99, 128, 255, 0.34);
    transition: transform var(--blog-transition-fast), box-shadow var(--blog-transition-fast), filter var(--blog-transition-fast), border-color var(--blog-transition-fast);
}

.gh-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 28px rgba(107, 138, 253, 0.48);
    color: var(--blog-accent-fg);
}

.gh-btn.ghost {
    background: var(--blog-surface-elevated);
    border: 1px solid var(--blog-border);
    color: var(--blog-text);
    box-shadow: none;
}

.gh-btn.ghost:hover {
    border-color: var(--blog-border-strong);
    color: var(--blog-accent);
    background: var(--dropdown-hover);
    box-shadow: none;
}

.gh-btn.danger {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    box-shadow: none;
}

.gh-btn.danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.gh-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* --- Chips & Pills (Readable 14px Floor) --- */
.gh-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius-full);
    padding: 0.34rem 0.92rem;
    font-size: var(--blog-font-size-xs);
    font-weight: 500;
    line-height: 1.3;
    color: var(--blog-text-muted);
    background: var(--blog-surface-elevated);
    text-decoration: none;
    transition: all var(--blog-transition-fast);
    white-space: nowrap;
}

.gh-chip:hover {
    border-color: var(--blog-border-strong);
    color: var(--blog-text);
    background: var(--dropdown-hover);
}

.gh-chip.ghost {
    color: #9dc0ff;
    border-color: rgba(107, 138, 253, 0.34);
    background: rgba(94, 164, 255, 0.16);
    font-weight: 600;
}

[data-theme="light"] .gh-chip.ghost,
[data-theme="holographic"] .gh-chip.ghost {
    color: var(--blog-accent);
    background: rgba(79, 110, 247, 0.12);
}

.gh-chip.outline {
    background: rgba(20, 25, 50, 0.45);
}

[data-theme="light"] .gh-chip.outline,
[data-theme="holographic"] .gh-chip.outline {
    background: rgba(255, 255, 255, 0.72);
}

.gh-chip.active {
    background: var(--pill-active-bg);
    border-color: var(--pill-active-border);
    color: var(--blog-text);
    font-weight: 600;
    box-shadow: 0 0 16px rgba(107, 138, 253, 0.22);
}

/* ==========================================================================
   Full-Width Featured Recommendation Banner (matches 参考图.png)
   ========================================================================== */
.gh-featured-banner {
    position: relative;
    border-radius: var(--blog-radius-lg);
    border: 1px solid var(--blog-border-strong);
    background-color: #111530;
    background-image:
        linear-gradient(90deg, rgba(16, 20, 44, 0.96) 0%, rgba(16, 20, 44, 0.88) 44%, rgba(16, 20, 44, 0.32) 72%, rgba(16, 20, 44, 0.08) 100%),
        url('/images/featured-globe-art.jpg');
    background-size: cover;
    background-position: right center;
    padding: 2.15rem 2.5rem;
    margin-bottom: 1.65rem;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    display: flex;
    align-items: center;
    min-height: 248px;
}

.gh-featured-banner:hover {
    border-color: var(--primary-color);
    box-shadow: var(--blog-shadow-hover);
}

.gh-featured-inner {
    position: relative;
    z-index: 2;
    max-width: 660px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gh-featured-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.3rem 0.9rem;
    border-radius: var(--blog-radius-full);
    background: rgba(139, 109, 255, 0.24);
    border: 1px solid rgba(167, 139, 250, 0.48);
    color: #dcd6ff;
    font-size: var(--blog-font-size-xs);
    font-weight: 600;
}

.gh-featured-title {
    font-size: clamp(1.65rem, 2.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
}

.gh-featured-title a {
    color: inherit;
}

.gh-featured-title a:hover {
    color: #b4cbff;
}

.gh-featured-excerpt {
    font-size: 1.03rem;
    line-height: 1.72;
    color: #c8d2ef;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-featured-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem 1.5rem;
    margin-top: 0.35rem;
}

.gh-featured-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    color: #aebae0;
    font-size: var(--blog-font-size-xs);
}

.gh-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

/* ==========================================================================
   Unified Search Bar + Inline Filter Pill Row (Reference Mockup)
   ========================================================================== */
.gh-search-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.gh-search-box {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--blog-input-bg);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    padding: 0 1rem;
    height: 50px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color var(--blog-transition-fast), box-shadow var(--blog-transition-fast);
}

.gh-search-box:focus-within {
    border-color: var(--blog-border-strong);
    box-shadow: 0 0 0 3px var(--blog-accent-soft);
}

.gh-search-box i {
    color: var(--blog-text-muted);
    font-size: 1rem;
}

.gh-search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--blog-text);
    font-size: 0.98rem;
    outline: none;
}

.gh-search-box input::placeholder {
    color: var(--blog-text-muted);
}

.gh-kbd-badge {
    font-family: var(--blog-font-mono);
    font-size: 0.8125rem;
    color: var(--blog-text-muted);
    background: var(--blog-surface-elevated);
    border: 1px solid var(--blog-border);
    border-radius: 7px;
    padding: 0.15rem 0.5rem;
    flex-shrink: 0;
}

.gh-search-submit {
    border-radius: 14px;
    padding: 0 1.65rem;
    height: 50px;
    font-size: 0.98rem;
    flex-shrink: 0;
}

.gh-filter-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.gh-filter-sep {
    width: 1px;
    height: 20px;
    background: var(--blog-border);
    margin: 0 0.35rem;
}

.gh-filter-label {
    font-size: var(--blog-font-size-xs);
    color: var(--blog-text-muted);
    font-weight: 500;
}

.gh-archive-extra {
    display: none;
}

.gh-archive-extra.show {
    display: inline-flex;
}

/* Legacy Search Form for /blog/search */
.gh-search-form {
    display: flex;
    align-items: center;
    background: var(--blog-input-bg);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    overflow: hidden;
    height: 50px;
}

.gh-search-form input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0 1.15rem;
    color: var(--blog-text);
    font-size: 1rem;
    outline: none;
    height: 100%;
}

.gh-search-form button {
    width: 56px;
    flex-shrink: 0;
    height: 100%;
    border: none;
    background: var(--blog-gradient);
    color: var(--blog-accent-fg);
    cursor: pointer;
    font-size: 1rem;
}

/* ==========================================================================
   Horizontal Editorial Post Card (Thumbnail + Content + Circular → Arrow)
   ========================================================================== */
.gh-post-card {
    background: var(--blog-surface);
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius-md);
    padding: 1.25rem 1.45rem;
    box-shadow: var(--blog-shadow);
    display: flex;
    align-items: center;
    gap: 1.45rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--blog-transition-normal), border-color var(--blog-transition-normal), box-shadow var(--blog-transition-normal);
}

.gh-post-card:hover {
    border-color: var(--blog-border-strong);
    transform: var(--card-transform, translateY(-3px));
    box-shadow: var(--blog-shadow-hover);
}

.gh-post-thumb {
    width: 214px;
    height: 134px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    background: var(--blog-surface-elevated);
}

.gh-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--blog-transition-slow);
}

.gh-post-card:hover .gh-post-thumb img {
    transform: scale(1.05);
}

.gh-post-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
}

.gh-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    color: var(--blog-text-muted);
    font-size: var(--blog-font-size-xs);
}

.gh-post-meta a {
    color: var(--blog-text-muted);
    font-weight: 500;
}

.gh-post-meta a:hover {
    color: var(--blog-accent);
}

.gh-post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.gh-post-title {
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.gh-post-title a {
    color: var(--blog-text);
    transition: color var(--blog-transition-fast);
}

.gh-post-title a:hover {
    color: var(--blog-accent);
}

.gh-post-excerpt {
    color: var(--blog-text-muted);
    font-size: 0.98rem;
    line-height: 1.68;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-card-arrow-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blog-border);
    background: var(--blog-surface-elevated);
    color: var(--blog-text-muted);
    transition: all var(--blog-transition-fast);
}

.gh-post-card:hover .gh-card-arrow-btn {
    background: var(--blog-gradient);
    border-color: transparent;
    color: var(--blog-accent-fg);
    transform: translateX(3px);
    box-shadow: 0 6px 18px rgba(107, 138, 253, 0.36);
}

/* ==========================================================================
   Right Sidebar Cards (About + Categories + Ruled Archive List)
   ========================================================================== */
.gh-about-card {
    position: relative;
    overflow: hidden;
}

.gh-about-card::after {
    content: "";
    position: absolute;
    right: -32px;
    bottom: -36px;
    width: 170px;
    height: 140px;
    background: radial-gradient(circle, rgba(107, 138, 253, 0.32) 0%, transparent 72%);
    pointer-events: none;
}

.gh-about-text {
    position: relative;
    z-index: 1;
    color: var(--blog-text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
    margin: 0;
    word-break: break-word;
}

.gh-about-text p {
    margin: 0 0 0.65rem;
    white-space: pre-line;
}

.gh-about-text p:last-child,
.gh-about-text ul:last-child,
.gh-about-text ol:last-child {
    margin-bottom: 0;
}

.gh-about-text a {
    color: var(--blog-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-about-text ul,
.gh-about-text ol {
    margin: 0.45rem 0 0.65rem;
    padding-left: 1.25rem;
}

.gh-about-text code {
    font-size: 0.88em;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: var(--blog-surface-elevated);
}

.gh-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gh-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.95rem;
    border-radius: 12px;
    color: var(--blog-text);
    font-size: var(--blog-font-size-sm);
    font-weight: 500;
    border: 1px solid var(--blog-border);
    background: var(--blog-surface-elevated);
    transition: all var(--blog-transition-fast);
}

.gh-category-list a:hover,
.gh-category-list a.active {
    background: var(--pill-active-bg);
    color: var(--blog-text);
    border-color: var(--pill-active-border);
}

.gh-cat-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.gh-cat-label i {
    color: var(--blog-accent);
}

.gh-cat-count {
    min-width: 28px;
    height: 26px;
    padding: 0 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--blog-font-size-xs);
    font-weight: 600;
    color: var(--blog-text);
    background: rgba(107, 138, 253, 0.2);
    border-radius: var(--blog-radius-full);
}

.gh-archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.gh-archive-list li {
    border-bottom: 1px solid var(--blog-border);
}

.gh-archive-list li:last-child {
    border-bottom: none;
}

.gh-archive-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.68rem 0.25rem;
    color: var(--blog-text);
    font-size: var(--blog-font-size-sm);
    transition: color var(--blog-transition-fast), padding-left var(--blog-transition-fast);
}

.gh-archive-list a:hover,
.gh-archive-list a.active {
    color: var(--blog-accent);
    padding-left: 0.35rem;
}

.gh-archive-list a span.cnt {
    color: var(--blog-text-muted);
    font-size: var(--blog-font-size-xs);
}

.gh-sidebar-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    font-size: var(--blog-font-size-sm);
    font-weight: 600;
    color: var(--blog-accent);
}

.gh-sidebar-more-link:hover {
    color: var(--blog-accent-secondary);
}
