/**
 * News & Video Hub – editorial full-width layout
 */

:root {
    --news-hub-accent: var(--sp-porto, #004b9b);
    --news-hub-accent-light: var(--sp-porto-light, #e8f0fa);
    --news-hub-accent-hover: var(--sp-porto-hover, #003d7a);
}

.hub-page--blue,
.hub-page--indigo {
    --news-hub-accent: var(--sp-porto, #004b9b);
    --news-hub-accent-light: var(--sp-porto-light, #e8f0fa);
    --news-hub-accent-hover: var(--sp-porto-hover, #003d7a);
}

.hub-page--purple {
    --news-hub-accent: #0066cc;
    --news-hub-accent-light: #e8f0fa;
    --news-hub-accent-hover: #004b9b;
}

.hub-page--red {
    --news-hub-accent: var(--sp-porto, #004b9b);
    --news-hub-accent-light: var(--sp-porto-light, #e8f0fa);
    --news-hub-accent-hover: var(--sp-porto-hover, #003d7a);
}

/* Main column */
.hub-page__main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: var(--sp-content-max, 72rem);
    margin-inline: auto;
}

.hub-page__empty {
    margin: 0;
    padding: 2rem;
    text-align: center;
    color: var(--sp-ink-muted, #475569);
    background: #fff;
    border: 1px solid var(--sp-border, #dfe5ee);
    border-radius: 0.75rem;
}

/* Hero */
.hub-hero {
    background: #fff;
    border: 1px solid var(--sp-border, #dfe5ee);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.hub-hero:hover {
    box-shadow: 0 4px 20px rgba(6, 21, 43, 0.1);
}

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

@media (min-width: 1024px) {
    .hub-hero__inner {
        grid-template-columns: 1.5fr 1fr;
    }

    .hub-hero--video .hub-hero__inner {
        grid-template-columns: 1fr 1.5fr;
    }

    .hub-hero--video .hub-hero__media {
        order: 1;
    }

    .hub-hero--video .hub-hero__body {
        order: 2;
    }
}

.hub-hero__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: #eef2f7;
    overflow: hidden;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .hub-hero__media {
        aspect-ratio: auto;
        min-height: 100%;
    }
}

.hub-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hub-hero__media:hover .hub-hero__image {
    transform: scale(1.02);
}

.hub-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-ink-faint, #94a3b8);
    font-size: 0.875rem;
}

.hub-hero__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s;
}

.hub-hero__media:hover .hub-hero__play {
    background: rgba(0, 0, 0, 0.35);
}

.hub-hero__play-icon {
    width: 4rem;
    height: 4rem;
    padding: 1rem;
    border-radius: 9999px;
    background: var(--sp-porto, #004b9b);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}

.hub-hero__media:hover .hub-hero__play-icon {
    transform: scale(1.06);
}

.hub-hero__duration {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.hub-hero__body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-hero__label {
    display: inline-block;
    margin-bottom: 0.625rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--news-hub-accent);
}

.hub-hero__title {
    margin: 0;
    font-family: var(--font-heading, 'Source Serif 4', Georgia, serif);
    font-size: clamp(1.375rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--sp-ink, #0f172a);
}

.hub-hero__title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(var(--news-hub-accent), var(--news-hub-accent));
    background-size: 0% 3px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: color 0.2s, background-size 0.25s ease;
}

.hub-hero__title a:hover {
    color: var(--news-hub-accent);
    background-size: 100% 3px;
}

.hub-hero__excerpt {
    margin: 0.75rem 0 0;
    color: var(--sp-ink-muted, #475569);
    font-size: 0.9375rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--sp-ink-muted, #475569);
}

.hub-hero__meta-item {
    display: inline-flex;
    align-items: center;
}

/* Card grid */
.hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

@media (min-width: 768px) {
    .hub-grid--video {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hub-grid .sp-feed-card,
.hub-grid .hub-feed-card {
    height: 100%;
    margin-bottom: 0;
}

/* Section nav (/noticias/) */
.news-hub-section-nav {
    position: sticky;
    top: var(--sp-site-header-offset, 7.25rem);
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--sp-border, #dfe5ee);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.news-hub-section-nav__inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.news-hub-section-nav__inner::-webkit-scrollbar {
    display: none;
}

.news-hub-section-nav__group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.news-hub-section-nav__sep {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0 0.125rem;
    user-select: none;
}

.news-hub-section-nav__pill {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    background: transparent;
    color: #33415c;
    text-decoration: none;
    transition: color 0.2s, box-shadow 0.2s;
}

.news-hub-section-nav__pill:hover {
    color: var(--news-hub-accent);
    box-shadow: inset 0 -3px 0 #b9cce4;
}

.news-hub-section-nav__pill.is-active {
    color: var(--news-hub-accent);
    font-weight: 800;
    box-shadow: inset 0 -3px 0 var(--news-hub-accent);
}

/* Pagination */
.news-hub-pagination {
    margin-top: 0.5rem;
}

.news-hub-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.news-hub-pagination ul li a,
.news-hub-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-decoration: none;
    border-radius: 0.5rem;
    background: #fff;
    color: #33415c;
    border: 1px solid var(--sp-border, #dfe5ee);
    transition: all 0.2s;
}

.news-hub-pagination ul li a:hover {
    background: #eef2f7;
    border-color: var(--sp-border, #dfe5ee);
    color: var(--sp-ink, #0f172a);
}

.news-hub-pagination ul li span.current {
    background: var(--news-hub-accent);
    color: #fff;
    border-color: var(--news-hub-accent);
    font-weight: 800;
}

.news-hub-pagination ul li span.dots {
    background: transparent;
    border: none;
    color: var(--sp-ink-faint, #94a3b8);
}

/* ==========================================================================
   Hub header — faixa escura editorial (redesign 2026)
   ========================================================================== */
.hub-header {
    background: #06152b;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hub-header::after {
    content: "";
    position: absolute;
    right: -4%;
    bottom: -60%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.hub-header__inner {
    position: relative;
    z-index: 1;
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
}

.hub-header__kicker {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-family: 'Libre Franklin', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    /* Acento laranja dos hero strips do redesign (igual a Sondagens/Prognósticos). */
    color: #ff8a3d;
}

/* ==========================================================================
   Community CTA — fim do hub (gamificação, redesign 2026 Fase 3)
   ========================================================================== */
.sp-community-cta {
    background: linear-gradient(120deg, #0a4ea3, #052d5e);
    border-radius: 12px;
    padding: 2.25rem 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.sp-community-cta::after {
    content: "";
    position: absolute;
    right: -4%;
    bottom: -70%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.sp-community-cta__body {
    flex: 1;
    min-width: 280px;
    position: relative;
    z-index: 1;
}

.sp-community-cta__title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.625rem;
    font-weight: 700;
    margin: 0 0 0.375rem;
    color: #fff;
}

.sp-community-cta__text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.sp-community-cta__btn {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: #004b9b;
    font-family: 'Libre Franklin', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sp-community-cta__btn:hover { background: #e8f0fa; }

.hub-header__title {
    font-family: 'Source Serif 4', Georgia, Cambria, 'Times New Roman', serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 0.5rem;
}

.hub-header__sub {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 560px;
}

/* ==========================================================================
   Badge de categoria sobre a media + autor no meta (pixel-match News Hub)
   ========================================================================== */
.hub-hero__media,
.sp-feed-card__media {
    position: relative;
}

.hub-media-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #004b9b;
    font-family: 'Libre Franklin', ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hub-hero__media .hub-media-badge {
    top: 16px;
    left: 16px;
    height: 26px;
    padding: 0 12px;
}

.sp-feed-card__author,
.hub-hero__author {
    font-weight: 700;
    color: #33415c;
}
