/* ==============================================
   News Banner for Elementor — Editorial Style
   v2.0 — Totalmente responsivo via Elementor
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Variáveis de design ───────────────────────── */
.nbe-banner {
  --nbe-red:        #e50000;
  --nbe-black:      #111111;
  --nbe-dark-gray:  #333333;
  --nbe-mid-gray:   #555555;
  --nbe-light-gray: #888888;
  --nbe-white:      #ffffff;
  --nbe-divider:    #e8e8e8;
  --nbe-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --nbe-font-sans:  'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --nbe-ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────── */
.nbe-banner *,
.nbe-banner *::before,
.nbe-banner *::after { box-sizing: border-box; }

.nbe-banner {
  display: block;
  position: relative;
  font-family: var(--nbe-font-sans);
  overflow: hidden;
  background: var(--nbe-white);
}

/* Link wrapper cobre o banner inteiro */
.nbe-banner .nbe-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ═══════════════════════════════════════════════
   IMAGEM
   ═══════════════════════════════════════════════ */
.nbe-image-wrap {
  position: relative;
  width: 100%;
  height: 420px;          /* default desktop — sobrescrito pelo Elementor */
  overflow: hidden;
  background: #1a1a1a;
  flex-shrink: 0;
}

.nbe-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s var(--nbe-ease);
}

.nbe-link:hover .nbe-image { transform: scale(1.04); }

/* Overlay gradiente */
.nbe-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(0,0,0,0.22) 65%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   ÁREA DE CONTEÚDO
   ═══════════════════════════════════════════════ */
.nbe-content-wrap {
  position: relative;
  padding: 28px 32px;     /* default — sobrescrito pelo Elementor */
  text-align: center;
  background: var(--nbe-white);
}

/* Linha vermelha decorativa (stacked e side) */
.nbe-layout--stacked .nbe-content-wrap::before,
.nbe-layout--side    .nbe-content-wrap::before {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--nbe-red);
  margin: 0 auto 18px;
}

/* Quando alinhamento à esquerda, linha vai à esquerda */
.nbe-content-wrap[style*="text-align: left"]::before,
.nbe-content-wrap[style*="text-align:left"]::before {
  margin-left: 0;
}

/* ═══════════════════════════════════════════════
   CATEGORIA
   ═══════════════════════════════════════════════ */
.nbe-category {
  /* Defaults — todos sobrescritos pelo painel Elementor */
  display: inline-block;
  font-family: var(--nbe-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nbe-red);
  margin: 0 0 12px 0;
  padding: 0;
  line-height: 1;
}

/* ═══════════════════════════════════════════════
   TÍTULO
   ═══════════════════════════════════════════════ */
.nbe-title {
  /* Defaults — sobrescritos pelo painel Elementor */
  font-family: var(--nbe-font-serif);
  font-size: 38px;
  font-weight: 900;
  line-height: 1.13;
  letter-spacing: -0.02em;
  color: var(--nbe-black);
  margin: 0 0 14px 0;
  padding: 0;
  transition: color 0.25s var(--nbe-ease);
}

.nbe-title em { font-style: italic; }

.nbe-link:hover .nbe-title { color: var(--nbe-red); }

/* ═══════════════════════════════════════════════
   SUBTÍTULO / EXCERPT
   ═══════════════════════════════════════════════ */
.nbe-subtitle {
  /* Defaults — sobrescritos pelo painel Elementor */
  font-family: var(--nbe-font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--nbe-mid-gray);
  margin: 0 auto 18px;  /* auto = centraliza por padrão */
  padding: 0;
  max-width: 520px;     /* sobrescrito pelo controle Largura Máxima */
  width: 100%;
}

.nbe-subtitle em { font-style: italic; }

/* ═══════════════════════════════════════════════
   META — AUTOR / DATA / LEITURA
   ═══════════════════════════════════════════════ */
.nbe-meta {
  /* Defaults — sobrescritos pelo painel Elementor */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;   /* sobrescrito pelo controle Alinhamento da Meta */
  gap: 6px 10px;
  font-family: var(--nbe-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nbe-light-gray);
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--nbe-divider);
}

.nbe-sep   { color: var(--nbe-divider); font-weight: 300; }
.nbe-author,
.nbe-date,
.nbe-read-time { white-space: nowrap; }

/* ═══════════════════════════════════════════════
   LAYOUT: OVERLAY
   ═══════════════════════════════════════════════ */
.nbe-layout--overlay { background: transparent; }

.nbe-layout--overlay .nbe-image-wrap {
  height: auto;
  min-height: 380px;
}

.nbe-layout--overlay .nbe-overlay {
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.45) 50%,
    rgba(0,0,0,0.04) 100%
  );
}

.nbe-layout--overlay .nbe-content-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: transparent;
  padding: 32px 36px;
}

.nbe-layout--overlay .nbe-category  { color: #ff6b6b; }
.nbe-layout--overlay .nbe-title     { color: var(--nbe-white); }
.nbe-layout--overlay .nbe-subtitle  { color: rgba(255,255,255,0.82); }
.nbe-layout--overlay .nbe-meta      {
  color: rgba(255,255,255,0.55);
  border-top-color: rgba(255,255,255,0.18);
}
.nbe-layout--overlay .nbe-sep       { color: rgba(255,255,255,0.22); }
.nbe-layout--overlay .nbe-link:hover .nbe-title { color: #ffd0d0; }

/* ═══════════════════════════════════════════════
   LAYOUT: LADO A LADO
   ═══════════════════════════════════════════════ */
.nbe-layout--side .nbe-link {
  display: flex;
  align-items: stretch;
}

.nbe-layout--side .nbe-image-wrap {
  flex: 0 0 50%;
  height: auto !important;  /* altura livre no modo side */
  min-height: 280px;
}

.nbe-layout--side .nbe-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.nbe-layout--side .nbe-content-wrap::before { margin-left: 0; }
.nbe-layout--side .nbe-meta                 { justify-content: flex-start; }
.nbe-layout--side .nbe-subtitle             { margin-left: 0; margin-right: 0; }

/* ═══════════════════════════════════════════════
   RESPONSIVO — ESTRUTURAL
   (tamanhos de fonte controlados pelo Elementor)
   ═══════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {

  /* Side → vira empilhado */
  .nbe-layout--side .nbe-link          { flex-direction: column; }
  .nbe-layout--side .nbe-image-wrap    { flex: none; width: 100%; min-height: 260px; }
  .nbe-layout--side .nbe-content-wrap  { text-align: center; }
  .nbe-layout--side .nbe-content-wrap::before { margin-left: auto; margin-right: auto; }
  .nbe-layout--side .nbe-meta          { justify-content: center; }
  .nbe-layout--side .nbe-subtitle      { margin-left: auto; margin-right: auto; }

  /* Overlay min-height menor */
  .nbe-layout--overlay .nbe-image-wrap { min-height: 300px; }
}

/* ── Mobile (≤ 767px) ── */
@media (max-width: 767px) {

  /* Padding padrão menor */
  .nbe-content-wrap { padding: 20px 18px !important; }

  /* Overlay: menos altura mínima */
  .nbe-layout--overlay .nbe-image-wrap { min-height: 240px; }
  .nbe-layout--overlay .nbe-content-wrap { padding: 20px 18px; }

  /* Linha decorativa à esquerda no mobile */
  .nbe-layout--stacked .nbe-content-wrap::before { margin-left: 0; }
}

/* ── Mobile pequeno (≤ 480px) ── */
@media (max-width: 480px) {
  .nbe-meta { gap: 4px 8px; }
}

/* ═══════════════════════════════════════════════
   ESTADO VAZIO (editor)
   ═══════════════════════════════════════════════ */
.nbe-no-post {
  padding: 24px;
  border: 2px dashed #ccc;
  text-align: center;
  color: #999;
  font-family: sans-serif;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   ANIMAÇÃO DE ENTRADA
   ═══════════════════════════════════════════════ */
@keyframes nbe-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nbe-category { animation: nbe-fade-up 0.45s ease both; }
.nbe-title    { animation: nbe-fade-up 0.5s  0.06s ease both; }
.nbe-subtitle { animation: nbe-fade-up 0.5s  0.12s ease both; }
.nbe-meta     { animation: nbe-fade-up 0.5s  0.18s ease both; }

/* Respeita preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .nbe-category,
  .nbe-title,
  .nbe-subtitle,
  .nbe-meta,
  .nbe-image { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════
   CUSTOMIZAÇÃO FÁCIL VIA CSS CUSTOM
   Sobrescreva no CSS Global do Elementor / tema:
   .nbe-banner { --nbe-red: #0057ff; }
   ═══════════════════════════════════════════════ */
