/* =====================================================================
   Blog CSS – Suez Imobiliária
   Autor: você :)
   Arquivo: /assets/css/blog.css
   Objetivo: estilos do blog (lista e post), com foco em responsividade.
   ===================================================================== */

/* ---------------------------------------------------------------------
   VARIÁVEIS E BASE
   --------------------------------------------------------------------- */
:root{
  --wrap: 1080px;              /* largura máxima do conteúdo */
  --bg: #ffffff;
  --ink: #111111;              /* cor principal do texto */
  --muted: #6b7280;            /* texto secundário */
  --line: #e5e7eb;             /* linhas/bordas sutis */
  --brand: #111111;            /* cor da marca */
  --acc: #0ea5e9;              /* cor de destaque (se quiser usar) */
}

/* reset simples */
* { box-sizing: border-box; }

body.blog-body{
  margin: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,sans-serif;
  color: var(--ink);
  background: #fafafa;
}

/* ---------------------------------------------------------------------
   TOPO / BREADCRUMB
   --------------------------------------------------------------------- */
.site-top { background:#fff; border-bottom:1px solid var(--line); }
.site-top .wrap { max-width:var(--wrap); margin:0 auto; padding:18px 16px; }

.brand { font-weight:700; color:var(--brand); text-decoration:none; }

.crumbs { margin-top:6px; color:var(--muted); font-size:14px; }
.crumbs a { color:var(--muted); text-decoration:none; }
.crumbs span { margin:0 6px; }

/* ---------------------------------------------------------------------
   CONTAINERS / GRID
   --------------------------------------------------------------------- */
.wrap { max-width:var(--wrap); margin:0 auto; padding:0 16px; }

/* grid principal: conteúdo + sidebar */
.grid {
  display:grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap:28px;
  margin:24px auto;
}

/* em telas menores a sidebar cai abaixo do conteúdo */
@media (max-width:1000px){
  .grid { grid-template-columns:1fr; }
}

/* ---------------------------------------------------------------------
   CABEÇALHO DE PÁGINA / BUSCA
   --------------------------------------------------------------------- */
.page-title { margin:8px 0 6px; }

.searchbar { display:flex; gap:8px; margin-top:12px; }
.searchbar input{
  flex:1; padding:10px 12px;
  border:1px solid var(--line); border-radius:8px;
}
.searchbar button{
  padding:10px 14px; border-radius:8px;
  border:1px solid var(--brand); background:var(--brand);
  color:#fff; cursor:pointer;
}

/* ---------------------------------------------------------------------
   LISTAGEM – CARDS
   --------------------------------------------------------------------- */
.content { min-width:0; } /* evita overflow quando há longas palavras */
.empty{
  padding:32px; border:1px dashed var(--line); border-radius:12px;
  color:var(--muted); text-align:center;
}

/* grade de cartões */
.cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
@media (max-width: 940px){ .cards{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px){ .cards{ grid-template-columns:1fr; } }

/* cartão */
.card{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  overflow:hidden; display:flex; flex-direction:column;
}

/* thumb do card com proporção de vídeo */
.card .thumb{ display:block; aspect-ratio:16/9; background:#f6f6f6; }
.card .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

.card-body{ padding:14px; }
.card-title{ margin:0 0 6px; font-size:18px; line-height:1.2; }
.card-title a{ text-decoration:none; color:var(--ink); }
.meta{ color:var(--muted); font-size:13px; }
.excerpt{ margin:8px 0 12px; color:#333; }

.readmore{
  display:inline-block; padding:8px 12px; border:1px solid var(--ink);
  border-radius:8px; text-decoration:none; color:var(--ink);
}
.readmore:hover{ background:#111; color:#fff; }

/* paginação */
.pagi{ display:flex; gap:8px; justify-content:center; margin:24px 0; }
.pagi a{
  border:1px solid var(--line); border-radius:8px; padding:8px 12px;
  text-decoration:none; color:var(--ink); background:#fff;
}
.pagi a.on{ background:#111; color:#fff; border-color:#111; }

/* ---------------------------------------------------------------------
   POST – CABEÇALHO, CONTEÚDO, CAPA
   --------------------------------------------------------------------- */
.post-head h1 { margin:0 0 6px; font-size:32px; }
.post-head .subtitle { margin:0 0 8px; color:#374151; }

/* barra de compartilhamento “horizontal” (se usada acima do post) */
.post .share{ display:flex; gap:10px; align-items:center; margin:12px 0 4px; }
.post .share a, .post .share button{
  border:1px solid var(--line); background:#fff; border-radius:8px;
  padding:8px 10px; color:#111; text-decoration:none; cursor:pointer;
}

/* texto do post */
.post-content{
  font-size:18px; line-height:1.7; color:#222; margin-top:14px;
}

/* ====== IMAGENS DENTRO DO CONTEÚDO – RESPONSIVAS DE VERDADE ======
   1) width:100% força ocupar a largura do container
   2) max-width:100% garante que nunca passe de 100%
   3) height:auto mantém proporção
   4) !important vence estilos inline salvos pelo TinyMCE
------------------------------------------------------------------------ */
.post-content img,
.post-content figure img,
.post-content .mce-content-body img{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
}

/* se o TinyMCE gravar width/height ou style inline, forçamos novamente */
.post-content img[width],
.post-content img[height],
.post-content img[style*="width"],
.post-content img[style*="height"]{
  width:100% !important;
  height:auto !important;
  max-width:100% !important;
}

/* títulos, códigos e detalhes dentro do post */
.post-content h2{ margin-top:28px; }
.post-content pre{
  background:#0b1020; color:#d1d5db; padding:16px;
  border-radius:10px; overflow:auto;
}

/* figuras e legendas */
.post-content figure{ margin:1rem 0; }
.post-content figcaption{
  font-size:.875rem; color:#6c757d; text-align:center; margin-top:.5rem;
}

/* capa do post (imagem grande) */
.post-cover{ margin:0 0 1rem; }
.post-cover img{
  display:block;
  width:100% !important;   /* ocupa 100% da largura disponível */
  height:auto !important;  /* mantém proporção */
  /* Se quiser um estilo “cinematográfico”, troque as 2 linhas acima por:
     height: min(60vh, 520px) !important;
     object-fit: cover !important; */
}

/* classe opcional para imagens sem margens laterais (full-bleed) */
.post-content img.img-wide,
.post-content .img-wide img{
  width:100% !important;
  max-width:none !important;
  height:auto !important;
  display:block;
}

/* ---------------------------------------------------------------------
   CAIXAS DO EDITOR (nota / sucesso / aviso / erro)
   --------------------------------------------------------------------- */
.note{ padding:12px 14px; border-radius:10px; margin:14px 0; }
.note.info{ background:#e0f2fe; color:#075985; }
.note.success{ background:#dcfce7; color:#166534; }
.note.warning{ background:#fff7ed; color:#9a3412; }
.note.danger{ background:#fee2e2; color:#991b1b; }

/* separador + autor (use se precisar) */
.sep{ border:none; border-top:1px solid var(--line); margin:24px 0; }
.author-box{ display:flex; gap:14px; align-items:center; }
.author-box img{ width:56px; height:56px; border-radius:50%; object-fit:cover; }

/* relacionados em miniatura (cards menores) */
.cards.mini{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.cards.mini .card-title{ font-size:15px; }

/* ---------------------------------------------------------------------
   SIDEBAR (busca + recentes)
   --------------------------------------------------------------------- */
.sidebar .box{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:14px; margin-bottom:18px;
}

.mini-search{ display:flex; gap:8px; }
.mini-search input{
  flex:1; padding:8px 10px; border:1px solid var(--line); border-radius:8px;
}
.mini-search button{
  padding:8px 12px; border-radius:8px; border:1px solid var(--ink); background:#fff;
}

.recent{
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:12px;
}
.recent li{ display:flex; gap:10px; }
.rthumb{ flex:0 0 64px; display:block; aspect-ratio:1/1; border-radius:8px; overflow:hidden; background:#f3f4f6; }
.rthumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.rtit{ color:#111; text-decoration:none; }

/* ---------------------------------------------------------------------
   RODAPÉ
   --------------------------------------------------------------------- */
.site-foot{ border-top:1px solid var(--line); margin-top:28px; background:#fff; }
.site-foot .wrap{ max-width:var(--wrap); margin:0 auto; padding:18px 16px; color:var(--muted); }

/* ---------------------------------------------------------------------
   COMPARTILHAMENTO – estilos “pílula” (inline)
   (estes são os botões que você habilitou abaixo do conteúdo)
   --------------------------------------------------------------------- */
.share-inline{
  display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0;
}
.share-inline b{ margin-right:6px; }
.share-inline a,
.share-inline button{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px;
  border:1px solid #e5e5e5; border-radius:999px;
  text-decoration:none; color:#111; background:#fff; font-size:14px;
  cursor:pointer; transition:.15s ease;
}
.share-inline a:hover,
.share-inline button:hover{ background:#111; color:#fff; border-color:#111; }

.share-inline .whats { border-color:#25D366; }
.share-inline .face  { border-color:#1877F2; }
.share-inline .x     { border-color:#000; }
.share-inline .in    { border-color:#0A66C2; }
.share-inline .mail  { border-color:#777; }

/* Variante com “pílulas” maiores, caso use: */
.share-row{ display:flex; flex-wrap:wrap; gap:8px; }
.share-pill{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid #e5e5e5; background:#fff; color:#111;
  border-radius:999px; padding:8px 12px; font-size:14px;
  text-decoration:none; cursor:pointer; transition:.15s ease;
}
.share-pill .ico{ display:inline-flex; align-items:center; line-height:0; }
.share-pill:hover{ background:#111; color:#fff; border-color:#111; }
.share-pill.whats{ border-color:#25D366; }
.share-pill.face { border-color:#1877F2; }
.share-pill.tw   { border-color:#000; }
.share-pill.in   { border-color:#0A66C2; }
.share-pill.mail { border-color:#777; }
@media (max-width:640px){ .share-row{ gap:10px; } }

/* ---------------------------------------------------------------------
   EMBEDS RESPONSIVOS (YouTube, Maps, etc.)
   --------------------------------------------------------------------- */
.embed,
.post-content .embed{
  position:relative; width:100%; max-width:100%;
  aspect-ratio:16 / 9;          /* fallback moderno ao padding-hack */
  background:#000; border-radius:8px; overflow:hidden; margin:1rem 0;
}
.embed iframe,
.post-content iframe{
  position:absolute; inset:0; width:100%; height:100%; border:0;
}

/* ---------------------------------------------------------------------
   TABELAS DO TINYMCE (scroll horizontal em telas pequenas)
   --------------------------------------------------------------------- */
.post-content table{ width:100%; border-collapse:collapse; display:block; overflow-x:auto; }
.post-content table th,
.post-content table td{ border:1px solid #e5e7eb; padding:.5rem .75rem; }

/* ---------------------------------------------------------------------
   AJUSTES FINOS PARA IMAGENS EM LISTAS (thumbs)
   --------------------------------------------------------------------- */
.cards .thumb img{
  display:block; width:100%; height:100%;
  object-fit:cover; /* mantém o crop bonito nas thumbs */
}

/* =====================================================================
   FIM
   ===================================================================== */
