/**
 * 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: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

/* Hero */
.hub-hero {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

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

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

    .hub-hero--video .hub-hero__inner {
        grid-template-columns: 7fr 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: #f3f4f6;
    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: #9ca3af;
    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: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.hub-hero__title {
    margin: 0;
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    font-size: clamp(1.375rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}

.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: #6b7280;
    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: #6b7280;
}

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

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

@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;
}

/* Community CTA */
.hub-community-cta {
    margin-top: 0.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--news-hub-accent-light);
    background: linear-gradient(135deg, #fff 0%, var(--sp-surface-muted, #f4f7fb) 100%);
}

.hub-community-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hub-community-cta__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.hub-community-cta__title {
    margin: 0;
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.hub-community-cta__text {
    margin: 0.35rem 0 0;
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.5;
}

.hub-community-cta__btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Section nav (/noticias/) */
.news-hub-section-nav {
    position: sticky;
    top: var(--sp-site-header-offset, var(--sp-header-offset, 7.25rem));
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    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;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.news-hub-section-nav__pill:hover {
    background: var(--news-hub-accent-light);
    color: var(--news-hub-accent-hover);
}

.news-hub-section-nav__pill.is-active {
    background: var(--news-hub-accent);
    color: #fff;
}

/* 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: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0.5rem;
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.news-hub-pagination ul li a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

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

.news-hub-pagination ul li span.dots {
    background: transparent;
    border: none;
    color: #9ca3af;
}
