/* News — Product Finder layout (10015.io style) */
html { overflow-x: hidden !important; overflow-y: auto !important; }

body.news-finder-page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    background: #f4f6f8 !important;
    color: #1a1f36 !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden !important;
    max-width: 100vw;
}

.news-finder-page .technex-footer {
    position: relative !important;
    flex-shrink: 0 !important;
    margin-top: auto !important;
    background: #f4f6f8 !important;
}

.news-finder-main {
    flex: 1 1 auto;
    width: 100%;
    padding: 20px 16px 48px;
    box-sizing: border-box;
}

.news-finder-shell {
    max-width: 1320px;
    margin: 0 auto;
}

/* Hero / search */
.news-finder-hero {
    margin-bottom: 24px;
}

.news-finder-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.news-finder-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.news-finder-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5b5ff8, #6323ec);
    color: #fff;
    flex-shrink: 0;
}

.news-finder-logo svg { width: 20px; height: 20px; }

.news-finder-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1f36;
}

.news-finder-beta {
    font-size: 11px;
    font-weight: 600;
    color: #5b5ff8;
    background: rgba(91, 95, 248, 0.1);
    border: 1px solid rgba(91, 95, 248, 0.25);
    border-radius: 6px;
    padding: 2px 7px;
    line-height: 1.4;
}

.news-finder-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.news-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    white-space: nowrap;
}

.news-btn-primary {
    background: #5b5ff8;
    color: #fff;
    border-color: #5b5ff8;
}

.news-btn-primary:hover { background: #4a4ed6; transform: translateY(-1px); }

.news-btn-ghost {
    background: #fff;
    color: #5b5ff8;
    border-color: #d0d7de;
}

.news-btn-ghost:hover { background: #f6f8fa; border-color: #5b5ff8; }

.news-finder-search {
    position: relative;
    max-width: 560px;
}

.news-finder-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #8b949e;
    pointer-events: none;
}

.news-finder-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 40px 11px 42px;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #1a1f36;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.news-finder-search-input:focus {
    border-color: #5b5ff8;
    box-shadow: 0 0 0 3px rgba(91, 95, 248, 0.15);
}

.news-finder-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #57606a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.news-finder-search-clear:hover { background: #f0f3f6; color: #1a1f36; }

/* Layout */
.news-finder-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.news-finder-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-filter-block {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.news-filter-heading {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #57606a;
}

.news-filter-heading-tags { color: #5b5ff8; }

/* Category nav */
.news-category-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-cat-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #424a5c;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.news-cat-btn:hover {
    background: #f6f8fa;
    border-color: #eaeef2;
}

.news-cat-btn.active {
    background: rgba(91, 95, 248, 0.08);
    border-color: rgba(91, 95, 248, 0.35);
    color: #5b5ff8;
    font-weight: 600;
}

.news-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f0f3f6;
    color: #57606a;
    flex-shrink: 0;
}

.news-cat-icon svg { width: 16px; height: 16px; }

.news-cat-btn.active .news-cat-icon {
    background: rgba(91, 95, 248, 0.15);
    color: #5b5ff8;
}

/* Tags */
.news-tags-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.news-tag-btn {
    padding: 5px 10px;
    border: 1px solid #e3e8ef;
    border-radius: 999px;
    background: #fff;
    color: #57606a;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.12s;
}

.news-tag-btn:hover {
    border-color: #5b5ff8;
    color: #5b5ff8;
}

.news-tag-btn.active {
    background: #5b5ff8;
    border-color: #5b5ff8;
    color: #fff;
}

/* Trending sidebar */
.news-trending-list { display: flex; flex-direction: column; gap: 0; }

.news-trend-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
    text-decoration: none;
    color: inherit;
}

.news-trend-item:last-child { border-bottom: none; padding-bottom: 0; }

.news-trend-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1f36;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-trend-meta {
    font-size: 11px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-trend-meta svg { width: 13px; height: 13px; }

/* Card grid */
.news-finder-content { min-width: 0; }

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.news-finder-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    cursor: pointer;
}

.news-finder-card:hover {
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
    transform: translateY(-2px);
}

.news-finder-card .technex-post-link {
    pointer-events: none;
    color: inherit;
    text-decoration: none;
}

.news-finder-card .feed-like-btn {
    pointer-events: auto;
    cursor: pointer;
}

.news-card-media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1117, #161b22);
    text-decoration: none;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-finder-card:hover .news-card-media img { transform: scale(1.03); }

.news-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b949e;
    font-size: 13px;
    font-weight: 500;
    padding: 16px;
    text-align: center;
    box-sizing: border-box;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
    gap: 8px;
}

.news-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.news-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.news-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1f36;
    flex: 1;
    min-width: 0;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card-title a:hover { color: #5b5ff8; }

.news-card-tagline {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #8b949e;
    line-height: 1.4;
}

.news-card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #57606a;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.news-card-tag {
    font-size: 11px;
    font-weight: 500;
    color: #5b5ff8;
    background: rgba(91, 95, 248, 0.08);
    border-radius: 6px;
    padding: 3px 8px;
}

.news-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.news-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #8b949e;
}

.news-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.news-card-meta svg { width: 13px; height: 13px; }

.news-card-visit {
    font-size: 12px;
    font-weight: 600;
    color: #5b5ff8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.news-card-visit:hover { text-decoration: underline; }

.news-card-like {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.news-card-like.liked { color: #cf222e; }

.news-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: #57606a;
    font-size: 14px;
    margin: 0;
}

.news-results-count {
    font-size: 13px;
    color: #8b949e;
    margin: 0 0 14px;
}

.news-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.news-pagination .page-btn-custom {
    min-width: 36px;
    height: 36px;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #fff;
    color: #424a5c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.news-pagination .page-btn-custom.active {
    background: #5b5ff8;
    border-color: #5b5ff8;
    color: #fff;
}

.news-pagination .page-btn-custom:hover:not(.active) {
    border-color: #5b5ff8;
    color: #5b5ff8;
}

/* Mobile category strip */
.news-mobile-cats {
    display: none;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.news-mobile-cats::-webkit-scrollbar { display: none; }

.news-mobile-cat {
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid #e3e8ef;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.news-mobile-cat.active {
    background: #5b5ff8;
    border-color: #5b5ff8;
    color: #fff;
}

@media (max-width: 1100px) {
    .news-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .news-finder-layout { grid-template-columns: 1fr; }

    .news-finder-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .news-trending-block { grid-column: 1 / -1; }

    .news-category-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .news-cat-btn { width: auto; flex: 1 1 calc(50% - 4px); min-width: 120px; }
}

@media (max-width: 640px) {
    .news-finder-main { padding: 12px 12px 32px; }

    .news-finder-sidebar {
        display: none;
    }

    .news-mobile-cats { display: flex; }

    .news-card-grid { grid-template-columns: 1fr; gap: 16px; }

    .news-finder-hero-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .news-finder-hero-actions { width: auto; }

    .news-finder-hero-actions .news-btn { flex: none; }

    .news-finder-search { max-width: none; }
}
