*, *::before, *::after { box-sizing: border-box; }

.search-page {
    min-height: 100vh;
    background: #f3f4f6;
    padding-bottom: 80px;
}

/* ─────────────────────────────────────────────────────────── *
 * HERO                                                        *
 * ───────────────────────────────────────────────────────── */
.search-hero {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 36px 20px 28px;
}

.search-hero-inner {
    max-width: 860px;
    margin: 0 auto;
}

.search-hero-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-hero-label::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: #ff6b00;
    border-radius: 2px;
    flex-shrink: 0;
}

.search-hero-form {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-hero-form:focus-within {
    border-color: #ff6b00;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

.search-hero-icon {
    display: flex;
    align-items: center;
    padding: 0 16px 0 20px;
    color: #ff6b00;
    flex-shrink: 0;
}

.search-hero-icon svg {
    width: 22px;
    height: 22px;
}

.search-hero-input {
    flex: 1;
    padding: 18px 12px 18px 0;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #111827;
    border: none;
    outline: none;
    background: transparent;
    min-width: 0;                   /* prevent overflow in flex */
}

.search-hero-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-hero-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: auto 6px auto 0;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.search-hero-clear:hover {
    background: #fee2e2;
    color: #ef4444;
}

.search-hero-clear.visible {
    display: flex;
}

.search-hero-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8f3d 100%);
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.search-hero-btn:hover  { filter: brightness(1.08); }
.search-hero-btn:active { transform: scale(0.98); }

.search-hero-btn svg {
    width: 18px;
    height: 18px;
}

/* ─────────────────────────────────────────────────────────── *
 * FILTERS BAR                                                 *
 * ───────────────────────────────────────────────────────── */
.search-filters-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
    position: sticky;
    top: 100px;         /* below site header — adjust if needed */
    z-index: 50;
}

.search-filters-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.search-filters-inner::-webkit-scrollbar { display: none; }

.filter-group {
    display: flex;
    align-items: center;
    padding: 12px 0;
    flex-shrink: 0;
}

.filter-group + .filter-group {
    border-left: 1px solid #e5e7eb;
    margin-left: 16px;
    padding-left: 16px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-right: 10px;
    white-space: nowrap;
}

.filter-pills {
    display: flex;
    gap: 6px;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
}

.filter-pill:hover {
    border-color: #ff6b00;
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.04);
}

.filter-pill.active {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8f3d 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────── *
 * BREADCRUMB                                                  *
 * ───────────────────────────────────────────────────────── */
.search-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.search-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.search-breadcrumb a:hover      { color: #ff6b00; }
.search-breadcrumb-sep          { color: #d1d5db; }
.search-breadcrumb-current      { color: #374151; font-weight: 600; }

/* ─────────────────────────────────────────────────────────── *
 * MAIN LAYOUT                                                 *
 * ───────────────────────────────────────────────────────── */
.search-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 0;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

/* ─────────────────────────────────────────────────────────── *
 * RESULTS HEADER                                              *
 * ───────────────────────────────────────────────────────── */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.results-count strong {
    color: #111827;
    font-weight: 700;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-sort-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.sort-select {
    padding: 7px 32px 7px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #111827;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.sort-select:focus { border-color: #ff6b00; }

/* ─────────────────────────────────────────────────────────── *
 * ARTICLE CARD                                                *
 * ───────────────────────────────────────────────────────── */
.article-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 200px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    -webkit-tap-highlight-color: transparent;
}

.article-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.article-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;               /* prevent text overflow */
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.article-card-date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

.article-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    letter-spacing: -0.3px;
    transition: color 0.2s;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-card-title { color: #ff6b00; }

.article-card-title mark {
    background: rgba(255, 107, 0, 0.15);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

.article-card-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-excerpt mark {
    background: rgba(255, 107, 0, 0.12);
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
}

.article-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.article-card-tag {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.article-card-image {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    /* lock aspect */
    aspect-ratio: auto;
}

.article-card-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.article-card-image-placeholder svg {
    width: 36px;
    height: 36px;
    color: #d1d5db;
}

/* ─────────────────────────────────────────────────────────── *
 * EMPTY / INITIAL STATE                                       *
 * ───────────────────────────────────────────────────────── */
.empty-state {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 64px 32px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.empty-state-icon svg { width: 32px; height: 32px; color: #9ca3af; }

.empty-state-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.empty-state-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 28px;
}

.empty-state-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.empty-state-suggestions-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.empty-state-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.empty-state-tag {
    padding: 9px 18px;
    border-radius: 24px;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.empty-state-tag:hover {
    border-color: #ff6b00;
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
}

.initial-state {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 52px 36px;
}

.initial-state-heading {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.initial-state-heading svg { color: #ff6b00; flex-shrink: 0; }

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.trending-item {
    padding: 14px 16px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.trending-item:hover {
    background: rgba(255, 107, 0, 0.06);
    border-color: #ff6b00;
    color: #ff6b00;
    transform: translateY(-2px);
}

.trending-item-hash {
    font-size: 16px;
    color: #ff6b00;
    font-weight: 800;
    line-height: 1;
}

/* ─────────────────────────────────────────────────────────── *
 * SIDEBAR                                                     *
 * ───────────────────────────────────────────────────────── */
.search-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: calc(100px + 49px + 24px); /* header + filters bar + gap */
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.search-sidebar::-webkit-scrollbar       { width: 4px; }
.search-sidebar::-webkit-scrollbar-track { background: transparent; }
.search-sidebar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.sidebar-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.sidebar-card-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card-header svg { color: #ff6b00; width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-card-body { padding: 14px 18px; }

.sidebar-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.sidebar-tag {
    padding: 6px 13px;
    border: 1.5px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-tag:hover,
.sidebar-tag.active {
    border-color: #ff6b00;
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.05);
}

.sidebar-categories { display: flex; flex-direction: column; gap: 2px; }

.sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-category-link:hover          { background: #f3f4f6; color: #ff6b00; }
.sidebar-category-link.active         { background: rgba(255,107,0,0.08); color: #ff6b00; font-weight: 600; }

/* ─────────────────────────────────────────────────────────── *
 * PAGINATION                                                  *
 * ───────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #e5e7eb;
    color: #374151;
    background: #fff;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.page-btn:hover           { border-color: #ff6b00; color: #ff6b00; background: rgba(255,107,0,0.04); }
.page-btn.active          { background: linear-gradient(135deg, #ff6b00 0%, #ff8f3d 100%); border-color: transparent; color: #fff; }
.page-btn.disabled        { opacity: 0.4; pointer-events: none; }
.page-btn-arrow svg       { width: 16px; height: 16px; }
.page-ellipsis            { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 14px; }

/* ══════════════════════════════════════════════════════════ *
 *  RESPONSIVE BREAKPOINTS                                    *
 * ══════════════════════════════════════════════════════════ */

/* ── ≤ 1280px — tighten sidebar ─────────────────────────── */
@media (max-width: 1280px) {
    .search-layout {
        grid-template-columns: 1fr 260px;
        gap: 22px;
    }
}

/* ── ≤ 1024px — single-column, hide sidebar ─────────────── */
@media (max-width: 1024px) {
    .search-layout {
        grid-template-columns: 1fr;
        padding: 24px 20px 0;
    }

    .search-sidebar { display: none; }

    /* Compact filters label on mid screens */
    .filter-label { display: none; }

    .filter-group + .filter-group {
        margin-left: 10px;
        padding-left: 10px;
    }
}

/* ── ≤ 768px — tablet ────────────────────────────────────── */
@media (max-width: 768px) {
    /* Hero */
    .search-hero {
        padding: 24px 16px 20px;
    }

    .search-hero-label {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .search-hero-input {
        font-size: 16px;       /* prevents iOS zoom */
        padding: 16px 10px 16px 0;
    }

    .search-hero-icon {
        padding: 0 12px 0 16px;
    }

    .search-hero-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Filters */
    .search-filters-bar {
        padding: 0 12px;
        top: 81px;
    }

    .filter-group {
        padding: 10px 0;
    }

    .filter-pill {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* Breadcrumb */
    .search-breadcrumb {
        padding: 12px 16px 0;
        font-size: 12px;
    }

    /* Layout */
    .search-layout {
        padding: 20px 16px 0;
        gap: 20px;
    }

    /* Article card: thumbnail moves to right column, smaller */
    .article-card {
        grid-template-columns: 1fr 140px;
        border-radius: 14px;
        margin-bottom: 14px;
    }

    .article-card-body {
        padding: 16px 16px;
        gap: 8px;
    }

    .article-card-title {
        font-size: 15px;
    }

    .article-card-excerpt {
        font-size: 13px;
    }

    .article-card-image-placeholder {
        min-height: 120px;
    }

    /* Results header */
    .results-count { font-size: 13px; }

    /* Empty / initial */
    .empty-state {
        padding: 48px 20px;
    }

    .initial-state {
        padding: 36px 24px;
    }

    .trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .trending-item {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Pagination */
    .pagination {
        gap: 5px;
        margin-top: 28px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .page-ellipsis {
        width: 36px;
        height: 36px;
    }
}

/* ── ≤ 640px — large phone ───────────────────────────────── */
@media (max-width: 640px) {
    /* Hero: hide button text, keep icon */
    .search-hero-btn span { display: none; }
    .search-hero-btn      { padding: 0 16px; }

    /* Article card: fully stacked */
    .article-card {
        grid-template-columns: 1fr;
        margin-bottom: 12px;
    }

    .article-card-image {
        height: 180px;
        order: -1;
        width: 100%;
    }

    .article-card-image-placeholder { min-height: 180px; }

    .article-card-body {
        padding: 14px 16px;
    }

    .article-card-title {
        font-size: 16px;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .article-card-tags {
        gap: 4px;
    }

    .article-card-tag {
        font-size: 11px;
        padding: 2px 8px;
    }

    /* Results header: stack sort below count */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Empty state */
    .empty-state {
        padding: 40px 16px;
        border-radius: 16px;
    }

    .empty-state-title    { font-size: 18px; }
    .empty-state-desc     { font-size: 14px; }
    .empty-state-tag      { padding: 7px 14px; font-size: 13px; }

    /* Initial state */
    .initial-state         { padding: 28px 16px; border-radius: 16px; }
    .initial-state-heading { font-size: 17px; }

    .trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .page-ellipsis { display: none; }

    .page-btn {
        min-width: 34px;
        height: 34px;
        border-radius: 8px;
        font-size: 13px;
    }
}

/* ── ≤ 480px — small phone ───────────────────────────────── */
@media (max-width: 480px) {
    .search-page { padding-bottom: 56px; }

    .search-layout { padding: 16px 12px 0; }

    /* Thinner hero */
    .search-hero {
        padding: 18px 12px 16px;
    }

    .search-hero-label { margin-bottom: 10px; }

    .search-hero-form  { border-radius: 12px; }

    .search-hero-input {
        font-size: 15px;
        padding: 14px 8px 14px 0;
    }

    .search-hero-icon svg  { width: 18px; height: 18px; }
    .search-hero-icon      { padding: 0 10px 0 14px; }

    .search-hero-clear {
        width: 32px;
        height: 32px;
    }

    /* Filters: even more compact */
    .search-filters-bar    { padding: 0 8px; }

    .filter-pill {
        padding: 5px 10px;
        font-size: 12px;
    }

    .filter-group + .filter-group {
        margin-left: 8px;
        padding-left: 8px;
    }

    /* Breadcrumb */
    .search-breadcrumb { padding: 10px 12px 0; font-size: 11px; }

    /* Article card */
    .article-card { border-radius: 12px; margin-bottom: 10px; }
    .article-card-image { height: 160px; }
    .article-card-image-placeholder { min-height: 160px; }

    .article-card-body  { padding: 12px 14px; gap: 7px; }
    .article-card-title { font-size: 15px; }
    .article-card-excerpt { font-size: 13px; }

    /* Empty state */
    .empty-state-icon  { width: 60px; height: 60px; margin-bottom: 18px; }
    .empty-state-icon svg { width: 26px; height: 26px; }

    /* Initial */
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Results count: wrap nicely */
    .results-count { font-size: 12px; }

    /* Sort select: full width */
    .sort-select { width: 100%; }
    .results-sort { width: 100%; justify-content: space-between; }
}

/* ── ≤ 360px — very small phone ─────────────────────────── */
@media (max-width: 360px) {
    .search-hero-input { font-size: 14px; }

    .article-card-title { font-size: 14px; }

    .filter-pill {
        font-size: 11px;
        padding: 4px 9px;
    }

    /* On tiny screens the period filter overflows; hide label again */
    .search-filters-bar { padding: 0 6px; }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .trending-item {
        padding: 10px 12px;
        font-size: 12px;
    }

    .page-btn {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ── Large screens ≥ 1440px ──────────────────────────────── */
@media (min-width: 1440px) {
    .search-hero-inner { max-width: 960px; }

    .search-layout {
        max-width: 1360px;
        grid-template-columns: 1fr 320px;
        padding: 36px 32px 0;
        gap: 32px;
    }

    .search-breadcrumb {
        max-width: 1360px;
        padding: 20px 32px 0;
    }

    .search-filters-inner { max-width: 1360px; }

    .article-card {
        grid-template-columns: 1fr 240px;
    }

    .article-card-title { font-size: 18px; }
}

/* ── Touch-device optimisations ──────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover-lift on touch (prevents sticky hover state) */
    .article-card:hover,
    .trending-item:hover {
        transform: none;
        box-shadow: none;
        border-color: #e5e7eb;
    }

    /* Larger tap targets */
    .filter-pill  { padding: 8px 16px; }
    .sidebar-tag  { padding: 9px 16px; }
    .page-btn     { min-width: 44px; height: 44px; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
    .search-filters-bar,
    .search-hero-btn,
    .search-hero-clear,
    .search-sidebar,
    .pagination { display: none !important; }

    .search-layout { grid-template-columns: 1fr; }

    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        grid-template-columns: 1fr;
    }

    .article-card-image { display: none; }
}