/* =====================================================
   NEWS BLOCKS FOR WPBAKERY — CSS
   ===================================================== */

/* ---- Utilidades Gerais ---- */
.nbw-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
    margin-bottom: 8px;
}
.nbw-block-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid #e63946;
}
.nbw-block-title span {
    border-left: 4px solid;
    padding-left: 10px;
}

/* =====================================================
   BLOCO 1: CARD REVISTA
   ===================================================== */
.nbw-card-magazine {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.nbw-magazine-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}
.nbw-magazine-content {
    position: relative;
    z-index: 2;
    padding: 28px 24px;
    width: 100%;
}
.nbw-magazine-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px;
    color: #fff;
}
.nbw-magazine-title a { color: #fff; text-decoration: none; }
.nbw-magazine-title a:hover { text-decoration: underline; }
.nbw-magazine-excerpt {
    color: rgba(255,255,255,.85);
    font-size: 14px;
    margin: 0 0 12px;
    line-height: 1.5;
}
.nbw-magazine-meta { display: flex; gap: 16px; color: rgba(255,255,255,.7); font-size: 12px; }

/* =====================================================
   BLOCO 2: BREAKING NEWS
   ===================================================== */
.nbw-breaking-bar {
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}
.nbw-breaking-label {
    flex-shrink: 0;
    padding: 10px 16px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nbw-blink {
    animation: nbwBlink 1s step-start infinite;
}
@keyframes nbwBlink { 50% { opacity: 0; } }

.nbw-breaking-track {
    flex: 1;
    overflow: hidden;
    padding: 10px 0;
}
.nbw-breaking-inner {
    display: inline-flex;
    white-space: nowrap;
    animation: nbwScroll 30s linear infinite;
}
.nbw-breaking-inner:hover { animation-play-state: paused; }
.nbw-breaking-item { margin-right: 8px; }
.nbw-breaking-item a { text-decoration: none; }
.nbw-breaking-item a:hover { text-decoration: underline; }
.nbw-breaking-sep { margin-left: 8px; opacity: .4; }
@keyframes nbwScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =====================================================
   BLOCO 3: TIMELINE
   ===================================================== */
.nbw-timeline { padding: 8px 0; }
.nbw-timeline-list {
    position: relative;
    padding-left: 32px;
}
.nbw-timeline-list::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--nbw-line-color, #ddd);
}
.nbw-timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.nbw-timeline-dot {
    position: absolute;
    left: -27px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid;
    background: #fff;
}
.nbw-timeline-time {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.nbw-timeline-title {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 6px;
    line-height: 1.3;
}
.nbw-timeline-title a { color: inherit; text-decoration: none; }
.nbw-timeline-title a:hover { text-decoration: underline; }
.nbw-timeline-desc { font-size: 13px; color: #666; margin: 0; line-height: 1.5; }

/* =====================================================
   BLOCO 4: GRID MASONRY
   ===================================================== */
.nbw-masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}
.nbw-masonry-item { border-radius: 8px; overflow: hidden; }
.nbw-masonry-item.nbw-size-large {
    grid-column: span 2;
    grid-row: span 2;
}
.nbw-masonry-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.nbw-masonry-img {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 100px;
}
.nbw-masonry-body {
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
}
.nbw-masonry-title {
    font-size: 14px;
    font-weight: 700;
    margin: 6px 0 8px;
    line-height: 1.3;
    color: #222;
}
.nbw-size-large .nbw-masonry-title { font-size: 18px; }
.nbw-masonry-meta { display: flex; gap: 10px; font-size: 11px; color: #888; }
@media (max-width: 768px) {
    .nbw-masonry-grid { grid-template-columns: 1fr 1fr; }
    .nbw-masonry-item.nbw-size-large { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 480px) {
    .nbw-masonry-grid { grid-template-columns: 1fr; }
    .nbw-masonry-item.nbw-size-large { grid-column: span 1; }
}

/* =====================================================
   BLOCO 5: TICKER POR CATEGORIA
   ===================================================== */
.nbw-ticker-wrapper {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}
.nbw-ticker-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    overflow-x: auto;
}
.nbw-ticker-tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #555;
    white-space: nowrap;
    transition: all .2s;
    border-bottom: 3px solid transparent;
}
.nbw-ticker-tab.active {
    color: var(--tab-color);
    border-bottom-color: var(--tab-color);
    background: #fff;
}
.nbw-ticker-tab:hover { color: var(--tab-color); }
.nbw-ticker-panel { display: none; padding: 12px 16px; }
.nbw-ticker-panel.active { display: block; }
.nbw-ticker-list { list-style: none; margin: 0; padding: 0; }
.nbw-ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.nbw-ticker-item:last-child { border-bottom: none; }
.nbw-ticker-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.nbw-ticker-item a { color: #222; text-decoration: none; line-height: 1.4; }
.nbw-ticker-item a:hover { color: #e63946; }

/* =====================================================
   BLOCO 6: DESTAQUE + LATERAL
   ===================================================== */
.nbw-featured-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}
.nbw-featured-main { border-radius: 8px; overflow: hidden; }
.nbw-featured-img {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}
.nbw-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 55%);
}
.nbw-featured-body {
    position: relative;
    z-index: 2;
    padding: 24px;
    width: 100%;
}
.nbw-featured-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 10px;
}
.nbw-featured-excerpt { color: rgba(255,255,255,.85); font-size: 13px; margin: 0 0 10px; }
.nbw-featured-meta { display: flex; gap: 14px; font-size: 12px; color: rgba(255,255,255,.7); }

.nbw-featured-side { display: flex; flex-direction: column; gap: 12px; }
.nbw-side-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: box-shadow .2s;
}
.nbw-side-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.nbw-side-img {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}
.nbw-side-body { flex: 1; min-width: 0; }
.nbw-side-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.nbw-side-title { font-size: 13px; font-weight: 600; margin: 4px 0 6px; line-height: 1.3; color: #222; }
.nbw-side-date { font-size: 11px; color: #999; }

@media (max-width: 768px) {
    .nbw-featured-sidebar { grid-template-columns: 1fr; }
}

/* =====================================================
   BLOCO 7: CARDS HORIZONTAIS
   ===================================================== */
.nbw-horizontal-wrapper { padding: 4px 0; }
.nbw-hcard {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    align-items: flex-start;
}
.nbw-hcard--divider { border-bottom: 1px solid #eee; }
.nbw-hcard-img-wrap { flex-shrink: 0; }
.nbw-hcard-img {
    width: 160px;
    height: 110px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.nbw-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #fff;
    text-transform: uppercase;
}
.nbw-hcard-body { flex: 1; min-width: 0; }
.nbw-hcard-body .nbw-category {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    padding: 2px 8px;
    font-size: 10px;
}
.nbw-hcard-title {
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0 8px;
    line-height: 1.35;
}
.nbw-hcard-title a { color: #1a1a1a; text-decoration: none; }
.nbw-hcard-title a:hover { color: #e63946; }
.nbw-hcard-excerpt { font-size: 13px; color: #666; line-height: 1.5; margin: 0 0 8px; }
.nbw-hcard-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #999; }

@media (max-width: 480px) {
    .nbw-hcard { flex-direction: column; }
    .nbw-hcard-img { width: 100%; height: 180px; }
}
