.locs-blog {
  /* Variáveis de tema, escopo isolado */
  --bg: #ffffff;
  --surface: #f7f7f8;
  --text: #121212;
  --muted: #6b7280;
  --primary: #111827;
  --accent: #ffb703;
  --accent-2: #fb7185;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

.locs-blog[data-theme="dark"] {
  --bg: #0b0c0f;
  --surface: #121318;
  --text: #e5e7eb;
  --muted: #9aa1af;
  --primary: #e5e7eb;
  --accent: #f59e0b;
  --accent-2: #f43f5e;
  --border: #1f2937;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Reset seguro apenas dentro do escopo do blog */
.locs-blog *, .locs-blog *::before, .locs-blog *::after { box-sizing: border-box; }
.locs-blog img { display: block; max-width: 100%; height: auto; border-radius: calc(var(--radius) - 4px); }
.locs-blog a { color: inherit; text-decoration: none; }

/* Layout */
.locs-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 16px; gap: 16px; }
.locs-brand { display: flex; align-items: baseline; gap: 8px; }
.locs-logo { font-weight: 800; letter-spacing: 0.8px; font-size: 22px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.locs-subtitle { font-weight: 600; color: var(--muted); }
.locs-actions { display: flex; align-items: center; gap: 10px; }
.locs-admin-link { border: 1px solid var(--border); background: var(--surface); color: var(--primary); padding: 10px 12px; border-radius: 10px; box-shadow: var(--shadow); transition: transform 0.15s ease, background 0.2s ease; }
.locs-admin-link:hover { transform: translateY(-1px); }
.locs-theme-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--primary); padding: 10px 12px; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s ease, background 0.2s ease; }
.locs-theme-toggle:hover { transform: translateY(-1px); }
.locs-auth { border: 1px solid var(--border); background: var(--surface); color: var(--primary); padding: 10px 12px; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s ease, background 0.2s ease; }
.locs-auth:hover { transform: translateY(-1px); }

.locs-toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 12px; padding: 0 16px 12px; }
.locs-search, .locs-filter { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 12px 14px; border-radius: 12px; outline: none; }
.locs-search::placeholder { color: var(--muted); }

.locs-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 16px; }

.locs-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.locs-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12); }
.locs-card__media { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(244, 63, 94, 0.25)); }
.locs-card__content { padding: 14px 14px 4px; }
.locs-card__title { font-weight: 700; font-size: 18px; line-height: 1.3; }
.locs-card__excerpt { color: var(--muted); margin-top: 6px; font-size: 14px; }
.locs-card__meta { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 14px; color: var(--muted); font-size: 13px; }
.locs-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.locs-tag { padding: 4px 8px; border-radius: 999px; border: 1px dashed var(--border); color: var(--primary); background: rgba(251, 191, 36, 0.12); }

.locs-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px 24px; }
.locs-pagination button { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.locs-page-info { color: var(--muted); }

.locs-footer { padding: 16px; text-align: center; color: var(--muted); }

/* Modal */
.locs-modal { position: fixed; inset: 0; display: grid; place-items: center; }
.locs-modal[hidden] { display: none; }
.locs-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(2px); }
.locs-modal__content { position: relative; width: min(860px, 92vw); max-height: 84vh; overflow: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.locs-modal__close { position: absolute; right: 12px; top: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.locs-modal__meta { color: var(--muted); margin-bottom: 8px; }
.locs-modal__body { color: var(--text); }

/* Página de artigo */
.locs-article { max-width: 860px; margin: 0 auto; padding: 16px; }
.locs-article__cover { margin-bottom: 12px; }
.locs-article__title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.locs-article__meta { color: var(--muted); margin-bottom: 14px; }
.locs-article__body { color: var(--text); line-height: 1.6; }
.locs-article__body h2, .locs-article__body h3 { margin-top: 1em; }

/* Responsivo */
@media (max-width: 1024px) {
  .locs-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .locs-toolbar { grid-template-columns: 1fr; }
  .locs-posts { grid-template-columns: 1fr; }
}