/**
 * Nerd Legacy — Refinamentos visuais e correções de regressão
 * Carregado após custom-news.css. Inspirado no Pubzi, identidade NL.
 */

/* ==========================================================================
   FASE 1 — CORREÇÕES DE REGRESSÃO
   ========================================================================== */

/* --- 1. HERO — Caixa de texto alinhada ao container, não à borda --- */
.nl-hero-5 .container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.nl-hero-5 .nl-hero-inner {
    justify-content: flex-start;
    align-items: center;
}

.nl-hero-5 .nl-hero-left-content {
    flex: 0 1 auto;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Bloco de texto: alinhado à área de conteúdo, max-width controlado, respiro à esquerda */
.nl-hero-5 .hero-content {
    max-width: min(560px, 100%);
    margin-left: 0;
    margin-right: auto;
    padding: 2rem 2.25rem;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .nl-hero-5 .hero-content {
        padding: 2.25rem 2.5rem;
    }
}

@media (min-width: 992px) {
    .nl-hero-5 .hero-content {
        max-width: 520px;
        padding: 2.5rem 2.75rem;
    }
}

/* --- 2. HERO — Miniaturas fixas à direita, sem sobrepor o título --- */
.nl-hero-5 .nl-hero-right-preview {
    position: absolute !important;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    max-width: calc(100vw - 2rem);
    margin: 0;
    padding: 0;
    flex: none;
    z-index: 2;
}

.nl-hero-5 .nl-hero-right-preview .slider-container,
#hero-thumb-slider.slider-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 260px;
    align-items: flex-end;
}

/* Em tablet/mobile: miniaturas abaixo do conteúdo, sem overlap */
@media (max-width: 991px) {
    .nl-hero-5 .nl-hero-right-preview {
        position: static !important;
        transform: none;
        right: auto;
        top: auto;
        width: 100%;
        max-width: 100%;
        margin-top: 1.5rem;
    }

    .nl-hero-5 .nl-hero-right-preview .slider-container,
    #hero-thumb-slider.slider-container {
        max-width: 100%;
        align-items: stretch;
    }
}

/* --- 3. POST — Corpo do artigo SEM uppercase --- */
.news-details-section .gt-news-details-content,
.nl-post-detail .gt-news-details-content {
    text-transform: none !important;
}

.gt-news-details-body,
.nl-post-body,
.news-details-section .gt-news-details-body,
.news-details-section .nl-post-body,
.nl-post-detail .gt-news-details-body,
.nl-post-detail .nl-post-body {
    text-transform: none !important;
}

.gt-news-details-body *,
.nl-post-body *,
.gt-news-details-body p,
.nl-post-body p,
.gt-news-details-body li,
.nl-post-body li,
.gt-news-details-body span,
.nl-post-body span,
.gt-news-details-body blockquote,
.nl-post-body blockquote,
.gt-news-details-body figcaption,
.nl-post-body figcaption {
    text-transform: none !important;
}

.gt-news-details-body h1,
.gt-news-details-body h2,
.gt-news-details-body h3,
.gt-news-details-body h4,
.nl-post-body h1,
.nl-post-body h2,
.nl-post-body h3,
.nl-post-body h4 {
    text-transform: none !important;
}

/* ==========================================================================
   FASE 2 — REFINAMENTOS VISUAIS (inspirado Pubzi, identidade NL)
   ========================================================================== */

/* --- Footer: linhas animadas com accent Nerd Legacy (vermelho) --- */
.nl-footer-line-top,
.nl-footer-line.nl-footer-line-top {
    background: linear-gradient(90deg, transparent 0%, rgba(225, 29, 46, 0.2) 20%, rgba(225, 29, 46, 0.2) 80%, transparent 100%);
}
.nl-footer-line-bottom,
.nl-footer-line.nl-footer-line-bottom {
    background: linear-gradient(90deg, transparent 0%, rgba(225, 29, 46, 0.2) 20%, rgba(225, 29, 46, 0.2) 80%, transparent 100%);
}
.nl-footer-line .nl-footer-dot {
    background: var(--theme);
    box-shadow: 0 0 10px rgba(225, 29, 46, 0.4);
}

/* --- Mais Destaques: proporção de imagem fixa, sem esticar --- */
.nl-highlights-section .news-box-items-5 .news-image {
    aspect-ratio: 16/10;
    height: auto !important;
    min-height: 0;
    max-height: 220px;
}
.nl-highlights-section .news-box-items-5 .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
@media (min-width: 768px) {
    .nl-highlights-section .news-box-items-5 .news-image {
        max-height: 240px;
    }
}

/* --- Card tipo C: destaque com overlay no primeiro card de Mais Destaques --- */
.nl-highlights-section .col-lg-4:first-child .news-box-items-5.nl-card-type-c .news-image {
    min-height: 260px;
}
.nl-highlights-section .news-box-items-5.nl-card-type-c {
    position: relative;
}
.nl-highlights-section .news-box-items-5.nl-card-type-c .news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    padding: 1.5rem 1.25rem;
}
.nl-highlights-section .news-box-items-5.nl-card-type-c .news-content h3 a {
    color: #fff;
}
.nl-highlights-section .news-box-items-5.nl-card-type-c .news-content .date-list {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Hover unificado: scale + overlay + sombra --- */
.news-section-5 .news-left-items-5 .news-image img,
.news-section-5 .news-box-items-5 .news-image img,
.nl-highlights-section .news-box-items-5 .news-image img {
    transition: transform 0.4s ease;
}
.news-section-5 .news-left-items-5:hover .news-image img,
.news-section-5 .news-box-items-5:hover .news-image img,
.nl-highlights-section .news-box-items-5:hover .news-image img {
    transform: scale(1.06);
}
.nl-hero-5 .slider-container .slide.active {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.nl-hero-5 .slider-container .slide:hover img {
    transform: scale(1.05);
}

/* --- Faixa horizontal: pausa no hover --- */
.nl-news-strip-section .nl-news-strip-track {
    animation: nl-strip-scroll 50s linear infinite;
}
.nl-news-strip-section:hover .nl-news-strip-track {
    animation-play-state: paused;
}
.nl-news-strip-card:hover {
    box-shadow: 0 12px 32px rgba(225, 29, 46, 0.12);
}

/* --- Seção: harmonia de espaçamento e títulos --- */
.news-section-5.section-padding,
.nl-highlights-section.section-padding {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}
.section-title-area .section-title h6 {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}
.section-title-area .section-title h2 {
    margin-bottom: 0;
}
