/* ============================================================
   Content Hub — /guides & /news redesign (full-width, card-based)
   Namespace: chub-*  (guides-public.css legacy classes untouched)
   ============================================================ */

/* .main-content already constrains to var(--max-width) and pads 1.5rem —
   .chub just fills it (that's the whole point vs. the old 960px hub). */
.chub { width: 100%; }

/* Breadcrumbs directly above the hub */
.chub-breadcrumbs { margin: -0.75rem 0 0.75rem; font-size: 0.85rem; }
.chub-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; margin: 0; }
.chub-breadcrumbs li { display: flex; align-items: center; gap: 0.25rem; color: var(--text-muted, #7a7870); }
.chub-breadcrumbs li:not(:last-child)::after { content: '\203A'; margin-left: 0.25rem; color: var(--text-muted, #7a7870); }
.chub-breadcrumbs a { color: var(--text-dimmed, #7a7870); text-decoration: none; }
.chub-breadcrumbs a:hover { color: var(--gold, #c4a24e); text-decoration: underline; }
.chub-breadcrumbs li:last-child a { color: var(--text-primary, #e0ddd5); pointer-events: none; }

/* ── Page header ── */
.chub-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 0.5rem 0 1.35rem;
}
.chub-head__title {
    font-size: 2rem; font-weight: 700;
    color: var(--gold, #c4a24e); letter-spacing: 0.03em;
    margin: 0 0 0.3rem;
}
.chub-head__sub {
    font-size: 0.98rem; color: var(--text-dimmed, #7a7870);
    margin: 0; line-height: 1.5; max-width: 720px;
}

/* Filtered-out items: [hidden] must beat the cards' own display:flex,
   which otherwise overrides the UA's [hidden] { display:none }. */
.chub [hidden] { display: none !important; }

/* ── Category filter chips (news header) ── */
.chub-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.chub-filter__btn {
    padding: 0.4rem 0.85rem; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border-color, #2a2a35);
    background: var(--bg-panel, #13151a); color: var(--text-primary, #e0ddd5);
    font-size: 0.84rem; font-weight: 600; font-family: var(--font-body);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chub-filter__btn:hover {
    border-color: var(--gold-dark, #a37e2c);
    background: rgba(196,162,78,0.06);
    color: var(--gold, #c4a24e);
}
.chub-filter__btn--active {
    background: var(--gold, #c4a24e); border-color: var(--gold, #c4a24e);
    color: #0a0a0f;
}
.chub-filter__btn--active:hover { background: var(--gold, #c4a24e); color: #0a0a0f; }

/* ── Section header (homepage pattern: title + inline sub + action right) ── */
.chub-section { margin-bottom: 2.75rem; }
.chub-section__head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color, #2a2a35);
}
.chub-section__titlerow { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; min-width: 0; }
.chub-section__title {
    font-size: 1.35rem; font-weight: 700; margin: 0;
    color: var(--text-primary, #e0ddd5); letter-spacing: 0.02em;
}
.chub-section__title .chub-star { color: var(--gold, #c4a24e); margin-right: 0.2rem; }
.chub-section__sub { font-size: 0.85rem; color: var(--text-dimmed, #7a7870); margin: 0; }
.chub-section__action { flex-shrink: 0; white-space: nowrap; }

/* LoH variant — red accent */
.chub-section--loh .chub-section__head { border-bottom-color: rgba(212, 11, 6, 0.45); }
.chub-section--loh .chub-section__title { color: #e8b4b0; }
.chub-loh-badge {
    display: inline-block; padding: 0.14rem 0.55rem; border-radius: 4px;
    background: rgba(212, 11, 6, 0.18); border: 1px solid rgba(212, 11, 6, 0.5);
    color: #ff6b6b; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    vertical-align: 0.15em;
}

/* ── Console panel (guides landing): categories + filters as ONE framed unit,
   styled like an in-game UI panel — subtle gold frame, full-bleed divider. ── */
.chub-console {
    background: linear-gradient(180deg, #16181f 0%, #101218 100%);
    border: 1px solid rgba(196, 162, 78, 0.22);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 6px 20px rgba(0, 0, 0, 0.3);
    padding: 0.85rem 1rem;
    margin-bottom: 2.25rem;
}
.chub-console__cats { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chub-console__cat {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.85rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color, #2a2a35);
    color: var(--text-primary, #e0ddd5);
    font-size: 0.92rem; font-weight: 600; text-decoration: none;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chub-console__cat:hover {
    border-color: var(--gold-dark, #a37e2c);
    background: rgba(196, 162, 78, 0.07);
    color: var(--gold, #c4a24e);
}
.chub-console__cat-icon {
    width: 18px; height: 18px; flex-shrink: 0;
    color: var(--gold, #c4a24e); opacity: 0.9;
}
.chub-console__cat-icon svg { width: 100%; height: 100%; display: block; }
.chub-console__cat-name { white-space: nowrap; }
.chub-console__cat-count {
    font-size: 0.7rem; font-weight: 700;
    color: var(--text-dimmed, #7a7870);
}
.chub-cat__new {
    font-size: 0.58rem; font-weight: 700; color: #f87171;
    text-transform: uppercase; letter-spacing: 0.04em;
}

.chub-console__divider {
    height: 1px; margin: 0.85rem -1rem;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 162, 78, 0.3) 18%, rgba(196, 162, 78, 0.3) 82%, transparent 100%);
}

.chub-console__filters { display: flex; flex-direction: column; gap: 0.45rem; }
.chub-console__filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.chub-console__filter-label {
    flex: 0 0 auto; min-width: 8.5rem;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--text-dimmed, #7a7870);
}

/* ── Card grid ── */
.chub-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
}
.chub-card {
    display: flex; flex-direction: column;
    background: var(--bg-panel, #13151a);
    border: 1px solid var(--border-panel, #252830);
    border-radius: 10px; overflow: hidden;
    text-decoration: none; color: inherit;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.chub-card:hover {
    border-color: var(--gold-dark, #a37e2c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.chub-section--loh .chub-card:hover { border-color: rgba(212, 11, 6, 0.6); }

.chub-card__thumb {
    position: relative; aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #16181f 0%, #0a0a0f 100%);
    overflow: hidden;
}
.chub-card__thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.25s;
}
.chub-card:hover .chub-card__thumb img { transform: scale(1.04); }
.chub-card__thumb-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.8rem; color: rgba(196, 162, 78, 0.45);
}
.chub-card__badge {
    position: absolute; top: 0.5rem; left: 0.5rem; z-index: 1;
}

.chub-card__body {
    display: flex; flex-direction: column; gap: 0.3rem;
    padding: 0.7rem 0.85rem 0.8rem; flex: 1;
}
.chub-card__title {
    font-size: 0.94rem; font-weight: 600; line-height: 1.35;
    color: var(--text-primary, #e0ddd5); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.chub-card:hover .chub-card__title { color: var(--gold, #c4a24e); }
.chub-card__sub {
    font-size: 0.79rem; color: var(--text-dimmed, #7a7870); line-height: 1.4; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.chub-card__meta {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: auto; padding-top: 0.45rem;
    font-size: 0.74rem; color: var(--text-dimmed, #7a7870);
    white-space: nowrap; overflow: hidden;
}
.chub-card__meta span { overflow: hidden; text-overflow: ellipsis; }
.chub-card__meta .chub-dot { flex-shrink: 0; opacity: 0.5; }

/* ── Difficulty badge (colors match legacy guides-hub__diff) ── */
.chub-diff {
    font-size: 0.7rem; font-weight: 600;
    padding: 0.16rem 0.5rem; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.03em;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
}
.chub-diff--beginner { color: #4ade80; border: 1px solid rgba(34,197,94,0.4); }
.chub-diff--intermediate { color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
.chub-diff--advanced { color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
/* Inline (non-overlay) variant used in meta rows */
.chub-diff--flat { background: none; backdrop-filter: none; padding: 0.1rem 0.4rem; }

/* ── Compact rows with thumbnail ── */
.chub-rows {
    display: flex; flex-direction: column; gap: 1px;
    background: var(--border-color, #2a2a35);
    border: 1px solid var(--border-panel, #252830);
    border-radius: 10px; overflow: hidden;
}
.chub-row {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-panel, #13151a);
    text-decoration: none; color: inherit;
    transition: background 0.12s;
}
.chub-row:hover { background: rgba(196,162,78,0.05); }
.chub-row__thumb {
    flex: 0 0 96px; width: 96px; aspect-ratio: 16 / 9;
    border-radius: 6px; overflow: hidden;
    background: linear-gradient(135deg, #16181f 0%, #0a0a0f 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.chub-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chub-row__thumb-fallback { font-weight: 700; font-size: 1rem; color: rgba(196, 162, 78, 0.45); }
.chub-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.chub-row__title {
    font-size: 0.94rem; font-weight: 600; color: var(--text-primary, #e0ddd5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chub-row:hover .chub-row__title { color: var(--gold, #c4a24e); }
.chub-row__sub {
    font-size: 0.8rem; color: var(--text-dimmed, #7a7870);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chub-row__meta {
    flex-shrink: 0; display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.78rem; color: var(--text-dimmed, #7a7870);
}

/* ── News page: full-width magazine ── */

/* Hero story */
.chub-hero-card {
    display: flex; flex-direction: column;
    background: var(--bg-panel, #13151a);
    border: 1px solid var(--border-panel, #252830);
    border-radius: 12px; overflow: hidden;
    text-decoration: none; color: inherit;
    margin-bottom: 1rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.chub-hero-card:hover {
    border-color: var(--gold-dark, #a37e2c);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.chub-hero-card__thumb {
    position: relative; aspect-ratio: 21 / 9;
    background: linear-gradient(135deg, #16181f 0%, #0a0a0f 100%);
    overflow: hidden;
}
.chub-hero-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chub-hero-card__body { padding: 1rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }

/* Full-width top story: image left, text right (stacks below 860px) */
@media (min-width: 861px) {
    .chub-hero-card { flex-direction: row; align-items: stretch; }
    .chub-hero-card__thumb { flex: 0 0 55%; aspect-ratio: 16 / 9; }
    .chub-hero-card__body { flex: 1; justify-content: center; padding: 1.4rem 1.6rem; gap: 0.55rem; }
    .chub-hero-card__title { font-size: 1.55rem; }
    .chub-hero-card__teaser { -webkit-line-clamp: 3; }
}
.chub-hero-card__kicker {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gold, #c4a24e);
}
.chub-hero-card__title {
    font-size: 1.35rem; font-weight: 700; line-height: 1.3;
    color: var(--text-primary, #e0ddd5); margin: 0;
}
.chub-hero-card:hover .chub-hero-card__title { color: var(--gold, #c4a24e); }
.chub-hero-card__teaser {
    font-size: 0.9rem; color: var(--text-dimmed, #9a9890); line-height: 1.55; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chub-hero-card__meta {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem; color: var(--text-dimmed, #7a7870); padding-top: 0.2rem;
}

/* News grid below the hero — 3 columns full width; the BluePosts block is a
   fixed grid cell (column 3, row 1) with EXACTLY the size of one news card.
   The inner panel is absolutely positioned so its long list cannot stretch
   the row — the news cards define the height, the list scrolls inside. */
.chub-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }

.chub-bp {
    grid-column: 3; grid-row: 1;
    position: relative; min-height: 300px; min-width: 0;
}
.chub-bp .home-bluepost-col { position: absolute; inset: 0; }
.chub-bp .home-bluepost-col__list { overflow-y: auto; min-height: 0; scrollbar-width: thin; }

/* ── Create CTA ── */
.chub-cta { text-align: center; margin-top: 1.25rem; }

/* ── Empty state ── */
.chub-empty {
    text-align: center; padding: 3rem 1.5rem;
    color: var(--text-dimmed, #7a7870); font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
    .chub-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .chub-news-grid { grid-template-columns: repeat(2, 1fr); }
    .chub-bp { grid-column: 2; grid-row: 1; }
}
@media (max-width: 720px) {
    .chub-grid { grid-template-columns: repeat(2, 1fr); }
    .chub-head__title { font-size: 1.6rem; }
    .chub-row__meta .chub-row__author { display: none; }
}
@media (max-width: 520px) {
    .chub-grid { grid-template-columns: 1fr; }
    .chub-console { padding: 0.75rem 0.8rem; }
    .chub-console__divider { margin: 0.75rem -0.8rem; }
    .chub-console__filter-label { min-width: 100%; }
    .chub-news-grid { grid-template-columns: 1fr; }
    /* Single column: BluePosts back into the normal flow (after two cards) */
    .chub-bp { grid-column: auto; grid-row: auto; position: static; min-height: 0; }
    .chub-bp .home-bluepost-col { position: static; }
    .chub-bp .home-bluepost-col__list { max-height: 320px; }
    .chub-row__thumb { flex-basis: 72px; width: 72px; }
    .chub-section__head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}
