/* ===== Global Palette ===== */
:root{
  --brand:#410D28;
  --brand-soft:#E9DCE2;
  --ink:#000000;
  --bg-page:#2e0920;
  --text:#1f2937;
  --white:#ffffff;
}

/* ===== GRID (preview) — estilo de cartão corrigido ===== */
.ebg-section{ padding: 0; background: transparent; }
.ebg-grid{ display:grid; gap:2rem; }
@media(min-width:768px){
  .ebg-grid.ebg-cols-2{ grid-template-columns: repeat(2,1fr); }
  .ebg-grid.ebg-cols-3{ grid-template-columns: repeat(3,1fr); }
}
.ebg-card{ border-radius:18px; overflow:hidden; background:#fff; box-shadow:0 10px 24px rgba(0,0,0,.14); transition:transform .25s ease, box-shadow .25s ease; }
.ebg-card:hover{ transform:translateY(-6px); box-shadow:0 18px 40px rgba(0,0,0,.18); }
.ebg-card-top{ height:220px; padding:0; background:none; }
.ebg-card-top img{ width:100%; height:100%; object-fit:cover; display:block; }
.ebg-card-body{ padding:18px 22px 16px; }
.ebg-title{ font-family:'Playfair Display', Georgia, serif; font-weight:700; font-size:1.18rem; margin:.25rem 0 .5rem; }
.ebg-title a{ color:var(--brand); text-decoration:none; }
.ebg-excerpt{ color:var(--brand); line-height:1.6; margin-bottom:.75rem; }
.ebg-readmore{ color:var(--brand); font-weight:700; text-decoration:none; }
.ebg-clamp-5{ display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.ebg-center-btn{ text-align:center; margin-top:1rem; }
.ebg-btn{ background:var(--brand); color:#fff; border-radius:999px; padding:.8rem 1.2rem; text-decoration:none; font-weight:700; display:inline-block; }
.ebg-pagination{ display:flex; gap:.5rem; justify-content:center; margin-top:1.25rem; }
.ebg-pagination a, .ebg-pagination span{ padding:.5rem .8rem; border-radius:10px; background:#fff; box-shadow:0 4px 12px rgba(0,0,0,.06); text-decoration:none; color:#111; font-weight:600; }
.ebg-pagination .current{ background: var(--brand); color:#fff; }

/* Break words to avoid overflow */
.ebg-card-body, .ebg-title, .ebg-excerpt { overflow-wrap:anywhere; word-break:break-word; }

/* Responsividade do GRID */
@media (max-width: 900px){ .ebg-card-top{ height: 180px; } }
@media (max-width: 600px){
  .ebg-card-top{ height: 150px; }
  .ebg-title{ font-size: 18px; line-height: 1.25; }
  .ebg-excerpt{ font-size: .95rem; }
  .ebg-card-body{ padding: 14px 16px 14px; }
}

/* ===== SINGLE (página do post) ===== */
body.single-post{ background: var(--bg-page) !important; font-family: 'Inter', system-ui, sans-serif; }
.ebg-single-layout{ padding:46px 16px; }
.ebg-single-container{
  max-width: 1372px; /* +40% de 980px */
  margin: 0 auto;
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
  overflow: hidden;
}
.ebg-single-header{ padding: 30px 26px 0; text-align:center; }
.ebg-single-figure{ margin: 0 auto 18px; text-align:center; }
.ebg-single-figure img{
  width: 100%;
  max-width: 980px;      /* CAP de largura da imagem no desktop */
  max-height: 560px;     /* CAP de altura */
  height: auto;
  display: inline-block;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
  object-fit: cover;
}
.ebg-single-title{
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 44px);  /* menor para não explodir */
  line-height: 1.2;
  margin: 12px auto 10px;
  font-family: 'Inter', system-ui, sans-serif;
}
.ebg-single-meta{
  display:flex; align-items:center; justify-content:center; gap:10px;
  color:#6b7280; margin-bottom: 8px; flex-wrap: wrap;
}
.meta-pill{ background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 6px 10px; font-weight: 600; }
.meta-dot{ color:#9ca3af; }

.ebg-single-content{
  padding: 22px 26px 36px;
  color: var(--text);
  line-height: 1.85;
  font-size: 1.02rem;
}
.ebg-single-content h2, .ebg-single-content h3, .ebg-single-content h4{
  color: var(--ink); font-weight: 800; font-family: 'Inter', system-ui, sans-serif;
  margin: 1.7em 0 .7em;
}
.ebg-single-content a{ color: var(--brand); text-decoration: underline; }
.ebg-divider{ border:0; border-top:1px solid #eee; margin: 28px 0 22px; }

/* CTA */
.ebg-cta{
  background: var(--brand-soft);
  border: 1px solid rgba(65,13,40,.12);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin: 26px 0 10px;
}
.ebg-cta h3{ margin:0 0 6px; font-size: 1.25rem; color: var(--ink); }
.ebg-cta p{ margin: 0 0 12px; color: var(--text); }
.ebg-cta .ebg-btn{ background: var(--brand); color: #fff; }

/* Relacionados */
.ebg-related{ margin-top: 26px; }
.ebg-related h3{ font-size: 1.25rem; margin: 0 0 12px; font-weight: 800; color: var(--ink); }
.ebg-related-grid{ display:grid; gap:16px; grid-template-columns: 1fr; }
@media(min-width: 800px){ .ebg-related-grid{ grid-template-columns: repeat(3, 1fr); } }
.rel-card{ background:#fff; border:1px solid #eee; border-radius:14px; overflow:hidden; box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.rel-thumb img{ width:100%; height:160px; object-fit:cover; display:block; }
.rel-title{ margin:10px 12px 14px; font-weight:700; font-size:1rem; }
.rel-title a{ text-decoration:none; color: var(--brand); }

/* Comentários */
.ebg-comments-wrap{ padding: 0 26px 36px; }
.comments-title, .comment-reply-title{ color: var(--ink); font-weight: 800; }
.comment-list{ list-style:none; margin: 0 0 18px; padding:0; }
.comment{ border:1px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 12px; background:#fff; }
.comment-author .avatar{ border-radius: 999px; }
.comment-meta a{ color:#6b7280; text-decoration:none; }
.comment-content{ color: var(--text); line-height: 1.7; }
.reply a{ display:inline-block; padding:6px 10px; border-radius:8px; background: var(--brand-soft); color: var(--brand); text-decoration:none; font-weight:600; }
.comment-respond label{ font-weight:600; color:#374151; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea{ width:100%; border:1px solid #e5e7eb; border-radius:10px; padding:10px 12px; font: inherit; color:#111827; background:#fff; }
.comment-respond input[type="submit"]{ background: var(--brand); color:#fff; border:0; border-radius:999px; padding:10px 18px; font-weight:700; cursor:pointer; }
.comment-respond input[type="submit"]:hover{ opacity:.92; }

/* Mobile refinado do SINGLE */
@media (max-width: 900px){
  .ebg-single-layout{ padding: 30px 12px; }
  .ebg-single-header{ padding: 20px 16px 0; }
  .ebg-single-figure img{
    max-width: 100%;
    width: 100%;
    height: 240px;
    max-height: none;
    object-fit: cover;
  }
  .ebg-single-title{ font-size: clamp(22px, 5.6vw, 30px); }
  .ebg-single-content{ font-size: .98rem; line-height: 1.7; padding: 16px; }
  .ebg-related-grid{ grid-template-columns: 1fr; }
}
