/* Identidade Via Mestra: rosa #E63E92, azul #325574, fundo cinza-claro (como viamestra.com.br) */
:root {
  --bg: #ecedED;
  --surface: #ffffff;
  --text: #212529;
  --muted: #5f6b76;
  --line: #d9dcdf;
  --brand: #e63e92;
  --brand-dark: #c92a78;
  --blue: #325574;
  --radius: 12px;
  --lead-bg: #325574;
  --field-bg: #ffffff;
  --head: "Signika", system-ui, sans-serif;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
/* Tema escuro (celular/computador no modo escuro): logo branco e cores ajustadas */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1c2026;
    --text: #e8eaed;
    --muted: #9ba5af;
    --line: #2d333b;
    --brand: #e63e92;
    --brand-dark: #ff7ab8;
    --blue: #a9cbe8;
    --lead-bg: #243f57;
    --field-bg: #262b33;
  }
  .card, .card:hover { box-shadow: none; }
  .tags a { background: var(--surface); }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); color: var(--blue); font-weight: 600; }

.btn, .lead button {
  display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 6px;
  padding: 8px 16px; font: 600 .95rem var(--head); cursor: pointer;
}
.btn:hover, .lead button:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }

/* Cabeçalho e rodapé */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header, .site-footer { padding: 12px max(16px, calc((100% - 1080px) / 2)); }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand span { font: 600 1.15rem var(--head); border-left: 2px solid var(--line); padding-left: 10px; }
.site-header nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-header nav a:not(.btn) { color: var(--blue); }
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .875rem; padding-block: 28px; }
.site-footer img { height: 44px; width: auto; }
.site-footer p { margin: 6px 0; }

main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.intro { padding: 40px 0 24px; }
.intro h1, .page-title { margin: 0 0 8px; font-size: 2rem; line-height: 1.2; }
.page-title { padding-top: 32px; }
.intro p { margin: 0 0 16px; color: var(--muted); max-width: 640px; }

/* Grade de posts */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding-top: 16px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s; }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.thumb { position: relative; aspect-ratio: 1; background: var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 2px 8px; border-radius: 99px; }
.card-body { padding: 12px 14px 16px; }
.card-body time { font-size: .8rem; color: var(--muted); }
.card-body h2 { font-size: 1rem; margin: 4px 0 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Post */
.post { max-width: 680px; margin: 0 auto; padding-top: 40px; }
.post h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; }
.post > time { color: var(--muted); }
/* Mídia no tamanho do feed do Instagram (~470px), centralizada acima do texto */
.media { margin: 24px auto; display: grid; gap: 12px; max-width: 470px; }
.media img, .media video { width: 100%; border-radius: var(--radius); display: block; max-height: 75vh; object-fit: contain; }
.caption { font-size: 1.075rem; }

.carousel { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: #000; outline-offset: 4px; }
.carousel .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.carousel .slide img, .carousel .slide video { border-radius: 0; }
.carousel .nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: #222; font-size: 22px; line-height: 30px; padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.carousel .nav[hidden] { display: none; }
.carousel .prev { left: 10px; }
.carousel .next { right: 10px; }
.carousel .counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 2px 9px; border-radius: 99px; }
.carousel .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.carousel .dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.carousel .dot[aria-current] { background: #fff; }
@media (hover: none) { .carousel .nav { display: none; } }

.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.tags small { color: var(--muted); }

/* Autora */
.author { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 20px; margin: 32px 0; }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author strong { font-family: var(--head); color: var(--blue); font-size: 1.1rem; }
.author p { margin: 4px 0 8px; color: var(--muted); font-size: .95rem; }

/* Captação de leads */
.lead { background: var(--lead-bg); color: #fff; border-radius: var(--radius); padding: 24px; margin: 32px auto; max-width: 680px; }
.lead h2 { color: #fff; margin: 0 0 6px; font-size: 1.35rem; }
.lead > p { margin: 0 0 16px; opacity: .9; }
.lead form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.lead label { display: grid; gap: 4px; font-size: .875rem; }
.lead input, .lead select { font: inherit; padding: 9px 11px; border-radius: 6px; border: 0; width: 100%; color: var(--text); background: #fff; }
.lead button { grid-column: 1 / -1; padding: 11px; font-size: 1rem; }
.lead .hp { display: none; }
@media (max-width: 560px) { .lead form { grid-template-columns: 1fr; } }

.hp { display: none; }

/* Comentários */
.comments { margin: 32px 0; }
.comments h2 { font-size: 1.25rem; margin-bottom: 12px; }
.comment-count { color: var(--muted); font-weight: 400; }
.comment-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.comment { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.comment-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.comment-head strong { color: var(--blue); font-family: var(--head); }
.comment-head time { color: var(--muted); font-size: .8rem; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-empty { color: var(--muted); margin: 0 0 16px; }
.comment-form { background: var(--surface); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.comment-cadastro { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment-cadastro[hidden] { display: none; }
.comment-nota { grid-column: 1 / -1; margin: 0; font-size: .9rem; color: var(--muted); }
.comment-form label { display: grid; gap: 4px; font-size: .875rem; }
.comment-form label small { color: var(--muted); }
.comment-form input, .comment-form textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: var(--field-bg); color: var(--text); }
.comment-form textarea { resize: vertical; }
.comment-form label.check { display: flex; align-items: flex-start; gap: 8px; }
.comment-form label.check input { width: auto; margin-top: 3px; }
.comment-form button[type=submit] { justify-self: start; background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font: 600 1rem var(--head); cursor: pointer; }
.comment-form button[type=submit]:hover { background: var(--brand-dark); }
.comment-form button[disabled] { opacity: .6; cursor: wait; }
.comment-perfil { margin: 0; }
.comment-status { margin: 0; color: var(--muted); font-size: .9rem; }
.comment-status:empty { display: none; }
button.link { background: none; border: 0; padding: 0; color: var(--brand-dark); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 560px) { .comment-cadastro { grid-template-columns: 1fr; } }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 32px 0 0; color: var(--muted); }
.post { padding-top: 20px; }
.pager.top { padding: 0 0 20px; font-size: .9rem; }
