/*
 * Rezeta Newspaper Mode CSS
 * Clean and lightweight
 */

:root {
    --nw-primary: #1a1a1a;
    --nw-secondary: #555555;
    --nw-border: #e0e0e0;
    --nw-font-heading: var(--rezeta-heading-font);
    --nw-font-body: var(--rezeta-body-font);
    --nw-bg: #ffffff;
    --nw-hover: #0056b3;
}

.newspaper-wrapper {
    background: var(--nw-bg);
    color: var(--nw-primary);
    font-family: var(--nw-font-body);
    line-height: 1.6;
}

.nw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography Reset for NW Mode */
.newspaper-wrapper h1, .newspaper-wrapper h2, .newspaper-wrapper h3, .newspaper-wrapper h4, .newspaper-wrapper h5, .newspaper-wrapper h6 {
    font-family: var(--nw-font-heading);
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--nw-primary);
}

.newspaper-wrapper a {
    color: var(--nw-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.newspaper-wrapper a:hover {
    color: var(--nw-hover);
}

.newspaper-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Section Common */
.nw-section {
    padding: 40px 0;
    border-bottom: 2px solid var(--nw-primary);
}

.nw-section:last-child {
    border-bottom: none;
}

.nw-section-title-wrap {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--nw-border);
    padding-bottom: 10px;
}

.nw-section-title {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Meta Data */
.nw-meta {
    font-size: 12px;
    color: var(--nw-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Base Post Card */
.nw-post {
    margin-bottom: 20px;
}
.nw-post img {
    margin-bottom: 15px;
    object-fit: cover;
    width: 100%;
}
.nw-post h2 { font-size: 22px; }
.nw-post h3 { font-size: 18px; }
.nw-post h4 { font-size: 16px; line-height: 1.4; }
.nw-post p { font-size: 14px; color: var(--nw-secondary); margin-bottom: 0; }

/* Grid Layouts */
.nw-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Bloco 1: Destaques */
.nw-destaques-grid {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1fr;
    gap: 40px;
}

.nw-hero-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.nw-sidebar-title {
    text-transform: uppercase;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--nw-border);
    padding-bottom: 10px;
}

.nw-em-alta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nw-em-alta-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.nw-em-alta-list .nw-number {
    font-family: var(--nw-font-heading);
    font-size: 32px;
    font-style: italic;
    color: var(--nw-border);
    line-height: 1;
}

.nw-em-alta-list a {
    font-size: 16px;
    font-family: var(--nw-font-heading);
    font-weight: 700;
}

/* Bloco 2: Seção 1 (Agricultura) */
.nw-sec1-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}
.nw-sec1-main-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.nw-sec1-main-links .nw-title-link {
    font-family: var(--nw-font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.nw-sec1-main-links .nw-title-link:nth-last-child(1),
.nw-sec1-main-links .nw-title-link:nth-last-child(2) {
    border-bottom: none;
    padding-bottom: 0;
}
.nw-sec1-subgrid {
    display: block;
}
.nw-sec1-list ul {
    list-style: none;
    padding: 0; margin: 0;
}
.nw-sec1-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.nw-sec1-list li:last-child { border-bottom: none; }
.nw-sec1-list a {
    font-family: var(--nw-font-heading);
    font-size: 16px;
}

/* Bloco 3: Seção 3 (Sidebar + Principal) */
.nw-sec3-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 50px;
}

.nw-sidebar-list { margin-top: 30px; }
.nw-horizontal-small a {
    display: flex;
    gap: 15px;
    align-items: center;
}
.nw-horizontal-small img {
    width: 80px;
    height: 80px;
    margin-bottom: 0;
}
.nw-horizontal-small h4 { margin: 0; font-size: 14px; }

.nw-read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--nw-bg);
    background: var(--nw-primary);
    padding: 5px 10px;
}

.nw-main-list .nw-horizontal-large {
    border-bottom: 1px solid var(--nw-border);
    padding-bottom: 30px;
    margin-bottom: 30px;
}
.nw-main-list .nw-horizontal-large:last-child {
    border-bottom: none; margin-bottom: 0; padding-bottom: 0;
}
.nw-flex-link {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.nw-flex-link .nw-content { flex: 1; }
.nw-flex-link .nw-thumb { flex: 1; }
.nw-flex-link .nw-thumb img { margin-bottom: 0; }

/* Bloco 5: Seção Mais */
.nw-sec5-grid {
    display: grid;
    grid-template-columns: 55% calc(45% - 40px);
    gap: 40px;
}
.nw-sec5-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.nw-flex-align-center {
    align-items: center;
    gap: 20px;
}

/* Footer Cols */
.nw-foot-col {
    border-top: 4px solid var(--nw-primary);
    padding-top: 20px;
}
.nw-foot-title {
    font-family: var(--nw-font-body);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.nw-foot-list {
    list-style: none; padding: 0; margin: 0;
    margin-top: 20px;
}
.nw-foot-list li { margin-bottom: 15px; border-bottom: 1px solid #f0f0f0; padding-bottom: 15px; }
.nw-foot-list li:last-child { border-bottom: none; padding-bottom: 0; }
.nw-foot-list a { 
    font-family: var(--nw-font-heading);
    font-size: 15px; 
    font-weight: 700;
    color: var(--nw-text); 
}

/* SINGLE POST */
.nw-single-wrapper {
    padding: 60px 0;
}

.nw-single-container {
    max-width: 1200px;
}

.nw-back-btn-wrap {
    margin-bottom: 30px;
}

.nw-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--nw-secondary);
    border: 1px solid var(--nw-border);
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nw-back-btn:hover {
    color: var(--nw-primary);
    border-color: var(--nw-primary);
}

.nw-single-header {
    text-align: center;
    margin-bottom: 40px;
}

.nw-single-category a {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--nw-secondary);
    display: inline-block;
    margin-bottom: 15px;
}

.nw-single-title {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.nw-single-excerpt p {
    font-size: 20px;
    color: var(--nw-secondary);
    font-style: italic;
    margin-bottom: 20px;
}

.nw-single-meta {
    font-size: 14px;
    color: var(--nw-secondary);
    border-top: 1px solid var(--nw-border);
    border-bottom: 1px solid var(--nw-border);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nw-single-thumbnail {
    margin-bottom: 40px;
}
.nw-thumb-caption {
    font-size: 12px;
    color: var(--nw-secondary);
    text-align: right;
    margin-top: 5px;
}

.nw-single-content {
    font-size: 18px;
    line-height: 1.8;
}

.nw-single-content p {
    margin-bottom: 25px;
}

.nw-single-content h2, .nw-single-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.nw-single-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--nw-border);
}

.nw-single-tags a {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 12px;
    font-size: 12px;
    text-transform: uppercase;
    margin-right: 5px;
    border-radius: 3px;
}

.nw-comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--nw-primary);
}

/* Related Posts Carousel (CSS Scroll Snap) */
.nw-related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--nw-border);
}

.nw-related-title {
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.nw-carousel-container {
    width: 100%;
    overflow: hidden;
}

.nw-carousel-wrapper {
    position: relative;
}

.nw-carousel-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: var(--nw-primary);
    color: var(--nw-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.nw-carousel-arrow:hover { opacity: 1; }
.nw-carousel-prev { left: -45px; }
.nw-carousel-next { right: -45px; }

@media (max-width: 1024px) {
    .nw-carousel-arrow {
        display: none !important;
    }
}

.nw-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.nw-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.nw-carousel-item {
    flex: 0 0 calc(33.333% - 14px);
    scroll-snap-align: start;
    min-width: 220px;
}

.nw-carousel-4 .nw-carousel-item {
    flex: 0 0 calc(25% - 15px);
}

.nw-sec2 .nw-carousel-item img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
}
}
.nw-carousel-item img {
    border-radius: 4px;
}

/* Responsiveness */
@media (max-width: 991px) {
    .nw-row-4 { grid-template-columns: repeat(2, 1fr); }
    .nw-destaques-grid { grid-template-columns: 1fr; }
    .nw-dest-col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .nw-sec1-grid { grid-template-columns: 1fr; }
    .nw-sec3-grid { grid-template-columns: 1fr; }
    .nw-sec5-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .nw-row-4 { grid-template-columns: 1fr; }
    .nw-dest-col-2 { grid-template-columns: 1fr; }
    .nw-hero-subgrid { grid-template-columns: 1fr; }
    .nw-sec5-subgrid { grid-template-columns: 1fr; }
    .nw-single-title { font-size: 32px; }
    .nw-flex-link { flex-direction: column-reverse; gap: 15px; }
    .nw-flex-link .nw-thumb { width: 100%; flex: 1; }
    .nw-flex-align-center { align-items: flex-start; }
    .nw-sec1-main-links .nw-title-link { font-size: 18px; color: #111; }
    .nw-sec1-list a { font-size: 18px; color: #111; }
}

/* Filtro de Categorias e Paginação (Grid Pages) */
.nw-category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}
.nw-cat-pill {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    color: var(--nw-text);
    border-radius: 20px;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.nw-cat-pill:hover {
    background: #e0e0e0;
}
.nw-cat-pill.active {
    background: var(--nw-primary);
    color: var(--nw-bg);
}

.nw-pagination {
    margin-top: 50px;
    text-align: center;
}
.nw-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}
.nw-pagination li a,
.nw-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #f5f5f5;
    color: var(--nw-text);
    border-radius: 4px;
    transition: all 0.3s ease;
}
.nw-pagination li a:hover {
    background: #e0e0e0;
}
.nw-pagination li span.current {
    background: var(--nw-primary);
    color: var(--nw-bg);
}

/* ==========================================
   Publicidade (Banners Laterais Randômicos)
   ========================================= */
.nw-side-ad {
    position: fixed;
    top: 150px;
    z-index: 1000;
    display: none; /* Escondido por padrão em telas menores */
}
.nw-side-ad img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.nw-side-ad img:hover {
    transform: translateY(-5px);
}

/* Telas médias/grandes (Notebooks): Banner menor para caber na tela */
@media (min-width: 1500px) and (max-width: 1799px) {
    .nw-side-ad {
        display: block;
        width: 180px;
    }
    .nw-side-ad-left {
        left: calc(50% - 600px - 230px);
    }
    .nw-side-ad-right {
        right: calc(50% - 600px - 230px);
    }
}

/* Telas enormes (Monitores Full HD/4K): Banner gigante e mais descolado do conteúdo */
@media (min-width: 1800px) {
    .nw-side-ad {
        display: block;
        width: 260px;
    }
    .nw-side-ad-left {
        left: calc(50% - 600px - 330px);
    }
    .nw-side-ad-right {
        right: calc(50% - 600px - 330px);
    }
}

/* ==========================================
   Bloco 0: Ticker / Marquee
   ========================================= */
.nw-ticker-section {
    padding-top: 25px;
    padding-bottom: 0;
    border-bottom: none; /* Removed the thick line below */
}
.nw-ticker-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.nw-ticker-label {
    background: #3b99fc; /* Cor azul de destaque */
    color: #fff;
    font-family: var(--nw-font-body);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 15px;
}
.nw-ticker-carousel {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
}
.nw-ticker-container {
    flex: 1;
    overflow: hidden;
}
.nw-ticker-track {
    display: flex;
    gap: 30px;
}
.nw-ticker-group {
    display: flex;
    gap: 30px;
    flex-shrink: 0;
    min-width: 100%;
    animation: nwMarquee 35s linear infinite;
    justify-content: space-around;
}
.nw-ticker-container:hover .nw-ticker-group {
    animation-play-state: paused;
}
@keyframes nwMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% - 30px)); }
}
.nw-ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--nw-primary);
    white-space: nowrap;
    flex: 0 0 auto;
    max-width: 400px;
}
.nw-ticker-item:hover {
    color: var(--nw-hover);
}
.nw-ticker-thumb {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
}
.nw-ticker-title {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--nw-font-heading);
}
@media (max-width: 768px) {
    .nw-ticker-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .nw-ticker-label {
        text-align: center;
        padding: 10px 15px;
    }
    .nw-ticker-carousel {
        padding: 10px 15px;
    }
}

/* ==========================================
   Carrossel Automático de Banners
   ========================================= */
.nw-mobile-ad.nw-ad-carousel {
    position: relative;
}
.nw-ad-carousel a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    display: block;
}
.nw-ad-carousel a.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}
.nw-mobile-ad {
    display: none;
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
}
@media (max-width: 1024px) {
    .nw-mobile-ad {
        display: block;
    }
}
