/* Homepage hub — HLTV-style three columns built from shadcn primitives */

.hub {
    background: hsl(var(--muted) / 0.5);
    border-bottom: 1px solid hsl(var(--border));
    padding: 32px 0 48px;
}

.hub-grid {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr) 264px;
    align-items: start;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hub-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.hub-col--left,
.hub-col--right {
    position: sticky;
    top: 88px;
}

/* ── Ranking ── */
.hub-rank-list {
    margin: 0;
    padding: 0 8px;
    list-style: none;
}

.hub-rank-row {
    display: grid;
    grid-template-columns: 22px 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: background-color 0.12s ease;
}

a.hub-rank-row:hover,
a.hub-rank-row:focus-visible {
    background: hsl(var(--accent));
}

.hub-rank-num {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
}

.hub-rank-row.is-gold .hub-rank-num { color: #b45309; }
.hub-rank-row.is-silver .hub-rank-num { color: #64748b; }
.hub-rank-row.is-bronze .hub-rank-num { color: #9a5b2b; }

.hub-rank-row img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: hsl(var(--muted));
}

.hub-rank-name {
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-rank-score {
    min-width: 28px;
    padding: 1px 8px;
    border-radius: 999px;
    background: hsl(var(--secondary));
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hub-rank-row.is-gold .hub-rank-score {
    background: #fef3c7;
    color: #92400e;
}

/* ── Events ── */
.hub-event-list {
    margin: 0;
    padding: 0 8px 8px;
    list-style: none;
}

.hub-event-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--foreground));
    text-decoration: none;
}

.hub-event-row:hover,
.hub-event-row:focus-visible {
    background: hsl(var(--accent));
}

.hub-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 52px;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--background));
}

.hub-event-month {
    font-size: 10px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hub-event-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hub-event-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hub-event-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

/* ── News ── */
.hub-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hub-lead {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hub-lead-card {
    display: flex;
    flex-direction: column;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--sh-shadow);
    overflow: hidden;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-lead-card:hover,
.hub-lead-card:focus-visible {
    border-color: hsl(240 5% 75%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.hub-lead-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: hsl(var(--muted));
    overflow: hidden;
}

.hub-lead-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hub-lead-card:hover .hub-lead-media img {
    transform: scale(1.03);
}

.hub-lead-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}

.hub-lead-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.hub-news-list {
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.hub-news-list > li + li {
    border-top: 1px solid hsl(var(--border));
}

.hub-news-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: background-color 0.12s ease;
}

.hub-news-row:hover,
.hub-news-row:focus-visible {
    background: hsl(var(--accent));
}

.hub-news-thumb {
    display: block;
    width: 64px;
    height: 44px;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--muted));
    overflow: hidden;
}

.hub-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-news-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.hub-news-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.hub-news-cat {
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--foreground));
}

/* ── Right column ── */
.hub-video {
    border-radius: 0;
}

.hub-spotlight-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px 4px;
    text-align: center;
}

.hub-spotlight-body img {
    width: 88px;
    height: 88px;
    margin-bottom: 8px;
    border-radius: 50%;
    object-fit: cover;
    background: hsl(var(--muted));
    box-shadow: 0 0 0 3px hsl(var(--background)), 0 0 0 5px #f59e0b;
}

.hub-spotlight-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hub-spotlight-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 14px 0 0;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
}

.hub-spotlight-stats > div {
    padding: 8px;
}

.hub-spotlight-stats > div + div {
    border-left: 1px solid hsl(var(--border));
}

.hub-spotlight-stats dt {
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hub-spotlight-stats dd {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.hub-cta {
    gap: 8px;
    padding: 18px 16px 16px;
    background: linear-gradient(180deg, hsl(var(--background)), hsl(var(--muted)));
}

.hub-cta .sh-btn {
    margin-top: 6px;
}

/* ── Responsive ── */
@media (max-width: 1199.98px) {
    .hub-grid {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .hub-col--right {
        position: static;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .hub-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 16px;
    }

    .hub-col--left {
        position: static;
        order: 2;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .hub-col--center { order: 1; }
    .hub-col--right { order: 3; }
}

@media (max-width: 575.98px) {
    .hub {
        padding: 20px 0 32px;
    }

    .hub-lead {
        grid-template-columns: 1fr;
    }

    .hub-news-row {
        grid-template-columns: 56px minmax(0, 1fr);
        padding: 10px 12px;
    }

    .hub-news-thumb {
        width: 56px;
        height: 40px;
    }

    .hub-news-meta {
        display: none;
    }
}

/* ── Designer pass ── */
.hub-rank-head {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 8px;
    padding: 0 8px 6px;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hub-rank-head span:first-child {
    text-align: center;
}

.hub-rank-list {
    padding-top: 6px;
}

.hub-video {
    max-height: 420px;
    background: hsl(var(--muted));
}

.hub-video.is-portrait {
    width: auto;
    height: 420px;
    margin: 0 auto;
}

.hub-news-thumb,
.hub-lead-media {
    position: relative;
}

.hub-news-thumb.is-empty::after,
.hub-lead-media.is-empty::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.hub-news-cat {
    font-size: 11px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

.hub-news-meta .sh-muted {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* Legacy category blocks below the hub — same heading language */
.body-index-page .hub ~ .container .section-title {
    border-bottom: 0 !important;
    margin-bottom: 16px;
}

.body-index-page .hub ~ .container .section-title .title {
    background: none !important;
    padding: 0 !important;
}

.body-index-page .hub ~ .container .section-title .title-text {
    font-family: var(--sh-font) !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    letter-spacing: -0.025em;
}

.body-index-page .hub ~ .container {
    padding-top: 48px;
}

.images-only-thumb.is-empty {
    display: block;
    min-height: 240px;
    height: 100%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.1-3.1a2 2 0 0 0-2.8 0L6 21'/%3E%3C/svg%3E") center / 32px no-repeat,
        hsl(var(--muted));
    border: 1px solid hsl(var(--border));
}
