/* ═══════════════════════════════════════════════
   APOSTIO — Single Post Layout (News Portal Style)
   Aplica apenas em .apostio-single-wrap
   ═══════════════════════════════════════════════ */
:root {
  --roxo: #4B2D8F; --roxo-n: #1C0D45; --roxo-c: #f2eeff;
  --verde: #39E07A; --verde-e: #22a958;
  --dourado: #D4AF37; --cinza: #555; --borda: #e5e0f5;
  --fundo: #f7f5ff; --branco: #fff;
  --radius: 10px; --radius-lg: 16px;
}
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* Reset para sobrepor Astra */
.apostio-single-wrap * { box-sizing: border-box }
.apostio-single-wrap { background: var(--fundo); font-family: 'DM Sans', sans-serif }

/* Container */
.apost-container { max-width: 1160px; margin: 0 auto; padding: 28px 20px 60px }

/* ── GRID ── */
.apost-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ── BREADCRUMB ── */
.apost-breadcrumb {
  font-size: 13px; color: var(--cinza); margin-bottom: 20px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.apost-breadcrumb a { color: var(--roxo); text-decoration: none }
.apost-breadcrumb span { color: #aaa }
.apost-breadcrumb .cat-pill {
  background: var(--roxo); color: #fff;
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: .04em;
}

/* ── HEADER DO ARTIGO ── */
.apost-header { margin-bottom: 20px }
.apost-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800; line-height: 1.15;
  color: var(--roxo-n); margin: 0 0 16px;
  letter-spacing: -.02em;
}
.apost-title em { font-style: normal; color: var(--roxo) }

/* Meta bar */
.apost-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--cinza);
  padding: 12px 0; border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda);
  margin-bottom: 20px;
}
.apost-meta .meta-author {
  display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.apost-meta .meta-author .ava {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--roxo); color: #fff;
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.apost-meta .meta-sep { color: #ccc }
.apost-meta .meta-time { display: flex; align-items: center; gap: 4px }
.apost-meta .meta-time svg { flex-shrink: 0 }

/* Share */
.apost-share { display: flex; align-items: center; gap: 8px; margin-left: auto }
.apost-share span { font-size: 12px; color: #aaa }
.apost-share a {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 13px; transition: transform .15s;
}
.apost-share a:hover { transform: scale(1.15) }
.share-wa { background: #25D366; color: #fff }
.share-tw { background: #000; color: #fff }
.share-fb { background: #1877F2; color: #fff }

/* ── IMAGEM DESTACADA ── */
.apost-thumb {
  width: 100%; aspect-ratio: 16/7; overflow: hidden;
  border-radius: var(--radius-lg); margin-bottom: 28px;
}
.apost-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: var(--radius-lg);
}

/* ── CONTEÚDO DO ARTIGO ── */
.apost-content { font-size: 16px; line-height: 1.8; color: #222 }
.apost-content p { margin-bottom: 18px }
.apost-content h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800; color: var(--roxo-n);
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--roxo);
  line-height: 1.3;
}
.apost-content h3 {
  font-family: 'Sora', sans-serif;
  font-size: 18px; font-weight: 700; color: var(--roxo-n);
  margin: 24px 0 10px;
}
.apost-content strong { color: #111; font-weight: 700 }
.apost-content a { color: var(--roxo); font-weight: 600; text-decoration: underline; text-underline-offset: 3px }
.apost-content ul, .apost-content ol { margin: 0 0 18px 24px }
.apost-content li { margin-bottom: 6px }
.apost-content blockquote {
  border-left: 4px solid var(--dourado);
  background: var(--roxo-c); padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-style: italic;
}

/* Banner in-content (vem do functions.php) */
.apost-content .apostio-mid-banner,
.apost-content .apostio-banner-bloco {
  border-radius: var(--radius-lg); overflow: hidden;
  margin: 28px 0; border: 1px solid var(--borda);
}
/* CTA verde de cupons existente no functions.php */
.apost-content .apostio-cta-bloco {
  background: linear-gradient(135deg, var(--roxo-n), var(--roxo));
  border-radius: var(--radius-lg); padding: 24px;
  text-align: center; margin: 28px 0;
}

/* ── TAGS ── */
.apost-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0 }
.apost-tags a {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--borda); background: var(--branco);
  color: var(--roxo); text-decoration: none; font-weight: 600;
  transition: background .15s;
}
.apost-tags a:hover { background: var(--roxo-c) }

/* ── ARTIGOS RELACIONADOS (footer) ── */
.apost-related { margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--borda) }
.apost-related h3 {
  font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 800;
  color: var(--roxo-n); margin-bottom: 16px;
}
.rel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px }
.rel-item {
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--radius); padding: 14px;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s, border-color .15s;
  display: block;
}
.rel-item:hover { box-shadow: 0 4px 16px rgba(75,45,143,.1); border-color: rgba(75,45,143,.3) }
.rel-item .rel-cat { font-size: 11px; font-weight: 700; color: var(--roxo); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em }
.rel-item .rel-titulo { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; color: var(--roxo-n); line-height: 1.4 }
.rel-item .rel-data { font-size: 11px; color: #aaa; margin-top: 6px }

/* ══ SIDEBAR ══ */
.apost-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 90px }

.sb-afl {
  background: var(--roxo-n); border-radius: var(--radius-lg);
  padding: 20px; text-align: center;
}
.sb-afl .sb-logo {
  width: 56px; height: 56px; background: #fff; border-radius: 12px;
  margin: 0 auto 10px; display: flex; align-items: center;
  justify-content: center; overflow: hidden; padding: 6px;
}
.sb-afl .sb-logo img { width: 100%; height: 100%; object-fit: contain }
.sb-afl h4 { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 3px }
.sb-afl .sb-promo { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 800; color: var(--dourado); margin-bottom: 3px }
.sb-afl .sb-desc { font-size: 11px; color: rgba(255,255,255,.45); margin-bottom: 14px }
.sb-afl a.sb-btn {
  display: block; background: var(--verde); color: #0d2b1a;
  font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 800;
  padding: 11px; border-radius: 8px; text-decoration: none; transition: background .15s;
}
.sb-afl a.sb-btn:hover { background: var(--verde-e); color: #fff }
.sb-afl .sb-aviso { font-size: 10px; color: rgba(255,255,255,.25); margin-top: 8px }

.sb-banner { line-height: 0; border-radius: var(--radius-lg); overflow: hidden }
.sb-banner a { display: block; line-height: 0 }
.sb-banner img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg) }

.sb-mais {
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--radius-lg); padding: 16px;
}
.sb-mais h4 {
  font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 800;
  color: var(--roxo-n); margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--borda);
}
.sb-post {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--borda); text-decoration: none; color: inherit;
}
.sb-post:last-child { border-bottom: none; padding-bottom: 0 }
.sb-post:hover .sb-post-titulo { color: var(--roxo) }
.sb-post-info { flex: 1 }
.sb-post-titulo { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--roxo-n); line-height: 1.35; transition: color .15s }
.sb-post-data { font-size: 11px; color: #aaa; margin-top: 3px }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .apost-grid { grid-template-columns: 1fr }
  .apost-sidebar { display: none }
  .rel-grid { grid-template-columns: 1fr }
  .apost-title { font-size: 26px }
}
@media (max-width: 640px) {
  .apost-share { display: none }
}

/* ── TOP CASHBACK SIDEBAR ── */
.sb-cashback {
  background: var(--branco); border: 1px solid var(--borda);
  border-radius: var(--radius-lg); padding: 16px;
}
.sb-cashback h4 {
  font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 800;
  color: var(--roxo-n); margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 2px solid var(--borda);
}
.cb-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--borda);
}
.cb-item:last-of-type { border-bottom: none }
.cb-pos {
  font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 800;
  color: var(--cinza); min-width: 16px; text-align: center;
}
.cb-logo { width: 28px; height: 28px; border-radius: 6px; overflow: hidden; flex-shrink: 0 }
.cb-logo img { width: 100%; height: 100%; object-fit: contain }
.cb-info { flex: 1; min-width: 0 }
.cb-nome { font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 700; color: var(--roxo-n) }
.cb-detalhe { font-size: 11px; color: var(--cinza) }
.cb-btn {
  font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--branco); background: var(--roxo);
  padding: 4px 10px; border-radius: 6px; text-decoration: none;
  white-space: nowrap; transition: background .15s; flex-shrink: 0;
}
.cb-btn:hover { background: var(--roxo-n) }
.cb-ver-todos {
  display: block; text-align: center; margin-top: 10px;
  font-size: 12px; font-weight: 600; color: var(--roxo);
  text-decoration: none; padding: 6px 0;
}
.cb-ver-todos:hover { text-decoration: underline }

/* Esconde imagem do post que Astra pode injetar */
.apostio-single-wrap .post-thumbnail,
.apostio-single-wrap .wp-post-image,
.apostio-single-wrap figure.wp-block-image:first-child { display: none !important }
