/**
 * Nerd Legacy — Polish frontend
 * Corrige overflow de imagens, harmoniza layout e melhora estética.
 * Skills: frontend-design, brand-guidelines
 */

/* ==========================================================================
   1. IMAGENS — Evitar overflow e manter proporções
   ========================================================================== */

/* Post: imagem de capa */
.nl-post-cover,
.gt-details-image.nl-post-cover,
.news-details-section .gt-details-image,
.nl-post-detail .gt-details-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.nl-post-cover img,
.gt-details-image.nl-post-cover img,
.news-details-section .gt-details-image img,
.nl-post-detail .gt-details-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Post body: imagens no conteúdo do artigo */
.nl-post-body img,
.gt-news-details-body img,
.news-details-section .gt-news-details-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 1rem 0;
}
.nl-post-body figure img,
.gt-news-details-body figure img {
    margin: 0;
}
.nl-post-body figure,
.gt-news-details-body figure {
    margin: 1.5rem 0;
    max-width: 100%;
}
.nl-post-body figure figcaption,
.gt-news-details-body figure figcaption {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* Categoria: cards gt-gaming-card-item-5 */
.nl-category-page .gt-gaming-card-item-5 .gt-gaming-image {
    aspect-ratio: 16/10;
    min-height: 180px;
    max-height: 240px;
}
.nl-category-page .gt-gaming-card-item-5 .gt-gaming-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Index-5, home: todos os cards de notícias */
.news-section-5 .news-image img,
.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,
.news-section .news-box-items .thumb img,
.gaming-exciting-section .gaming-image img {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.news-section-5 .news-image,
.news-section-5 .news-left-items-5 .news-image,
.news-section-5 .news-box-items-5 .news-image {
    overflow: hidden;
    aspect-ratio: 16/10;
}

/* Hero index-5: slide imagens */
.hero-section.hero-5 .slider-container .slide img {
    max-width: 100%;
    object-fit: cover;
}
.hero-section.hero-5 .slide.active img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Blocos por categoria (gt-trending-match) */
.gt-trending-match-items-2 .gt-match-logo img.gt-match-thumb {
    max-width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: cover;
}
.gt-trending-match-items-2 .gt-match-logo {
    overflow: hidden;
    max-width: 200px;
}

/* Sidebar relacionados */
.gt-related-posts img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   2. TIPOGRAFIA E ESPAÇAMENTO — Harmonia editorial
   ========================================================================== */

.nl-post-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.nl-post-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}
.nl-post-body {
    font-size: 1.05rem;
    line-height: 1.75;
}
.nl-post-body p {
    margin-bottom: 1rem;
}
.nl-post-body h2, .nl-post-body h3, .nl-post-body h4 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}
.nl-post-body blockquote {
    border-left: 4px solid var(--theme);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Categoria: título e cards */
.nl-category-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}
.nl-category-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
}
.nl-category-banner {
    padding: 3rem 0 2rem;
}

/* ==========================================================================
   3. CONTAINER E LAYOUT — Evitar conteúdo colado na borda
   ========================================================================== */

.container {
    max-width: 1140px;
}
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Paginação mais legível e harmoniosa */
.pagination {
    gap: 0.5rem;
}
.pagination .page-item .page-link {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s, border-color 0.2s;
}
.pagination .page-item .page-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--theme);
    color: var(--theme);
}
.pagination .page-item.active .page-link {
    background: var(--theme);
    border-color: var(--theme);
    color: #fff;
}

/* ==========================================================================
   4. CARDS E HOVER — Transições suaves
   ========================================================================== */

.nl-category-page .gt-gaming-card-item-5 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nl-category-page .gt-gaming-card-item-5:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Breadcrumb post */
.nl-post-breadcrumb {
    min-height: 140px;
    display: flex;
    align-items: center;
}

/* Review box: visual mais refinado */
.nl-review-box {
    border-radius: 12px;
    overflow: hidden;
}
.nl-review-box-inner {
    padding: 1.25rem 1.5rem;
}

/* ==========================================================================
   5. NOTÍCIAS / ARCHIVE — Consistência com categoria
   ========================================================================== */

.nl-noticias-page .gt-gaming-card-item-5 .gt-gaming-image {
    aspect-ratio: 16/10;
    min-height: 180px;
    max-height: 240px;
}
.nl-noticias-page .gt-gaming-card-item-5 .gt-gaming-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* iframes no corpo do post (YouTube, etc.) */
.nl-post-body iframe,
.gt-news-details-body iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
}
