/* ============================================================================
   ESCRITOS.CSS — Blog da psicanalista
   Código morto removido: .auth-bar, .btn-google, .profile-bar, .like-btn,
   .comments-section, .comment-*, .profile-page, .profile-edit-card,
   .avatar-upload, .activity-section, .editor-overlay, .editor-modal,
   .editor-field, .editor-field-row, .editor-toggle, .editor-actions
   (todos esses pertenciam a versão anterior com login de usuários — removidos)
============================================================================ */

/* ── BOTÃO KEY (acesso admin — discreto no nav) ── */
.btn-admin-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  opacity: 0.3;
  transition: opacity 0.25s, background 0.25s;
}
.btn-admin-login:hover {
  opacity: 0.75;
  background: var(--secondary);
}
.btn-admin-login svg {
  width: 18px;
  height: 18px;
  color: var(--primary-dark);
}

/* ── ADMIN BAR (visível só para admin logada) ── */
.admin-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.admin-bar.visible { display: flex; }
.admin-bar .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.admin-bar .label svg { width: 18px; height: 18px; color: var(--accent-dark); }

/* Botão "Novo post" dentro da admin-bar */
.admin-bar .btn {
  white-space: nowrap;
}

/* ── HERO DO BLOG ── */
.blog-hero {
  padding-top: clamp(120px, 16vh, 170px);
  padding-bottom: 48px;
  text-align: center;
}
.blog-hero .section-head { margin-bottom: 0; }

/* ── FEED DE POSTS ── */
.container-narrow { max-width: 640px; }
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── CARD DE POST ── */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.post-card-draft-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 100px;
  z-index: 2;
}

/* Ações admin sobrepostas no card */
.post-card-admin-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.post-card-admin-actions button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s;
}
.post-card-admin-actions button:hover { background: #fff; }
.post-card-admin-actions svg { width: 15px; height: 15px; color: var(--primary-dark); }
.post-card-admin-actions .delete-btn svg { color: #B5453A; }

/* Header do card (avatar + nome + data) */
.post-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 6px;
}
.post-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-card-header-info { display: flex; flex-direction: column; }
.post-card-author { font-weight: 700; font-size: 0.9rem; color: var(--primary-dark); }
.post-card-date  { font-size: 0.74rem; color: var(--gray); }

/* Link clicável do card */
.post-card-link { display: block; text-decoration: none; color: inherit; }

.post-card-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--secondary);
  margin-top: 10px;
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-card-body {
  padding: 14px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.post-card-body h3 { font-size: 1.15rem; line-height: 1.25; color: var(--primary-dark); }
.post-card-excerpt { font-size: 0.9rem; opacity: 0.75; }

/* ── ESTADO VAZIO ── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--gray);
}
.empty-state svg { width: 44px; height: 44px; margin: 0 auto; opacity: 0.4; }

/* ── POST INDIVIDUAL ── */
.post-detail { padding-top: clamp(110px, 15vh, 160px); padding-bottom: 80px; }
.post-detail-header { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.post-detail-header .post-card-date { display: block; margin-bottom: 10px; }

.post-detail-cover {
  max-width: 960px;
  margin: 0 auto 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 8;
}
.post-detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-detail-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.82;
}
.post-detail-content p         { opacity: 0.88; margin-bottom: 1.2em; }
.post-detail-content h2,
.post-detail-content h3        { margin: 1.4em 0 0.6em; }
.post-detail-content a         { color: var(--accent-dark); text-decoration: underline; }
.post-detail-content img       { border-radius: var(--radius-sm); margin: 1.4em 0; max-width: 100%; }
.post-detail-content ul,
.post-detail-content ol        { margin: 0 0 1.2em 1.4em; opacity: 0.88; }
.post-detail-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 1.2em 0;
  font-style: italic;
  opacity: 0.8;
}

.post-detail-actions {
  max-width: 720px;
  margin: 36px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 12px;
}
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
}
.back-to-blog svg { width: 17px; height: 17px; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--primary-dark);
  color: #fff;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(14, 51, 64, 0.22);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .post-detail-actions { flex-direction: column; align-items: flex-start; }
  .admin-bar { flex-direction: column; align-items: stretch; }
  .post-card-body { padding: 12px 14px 16px; }
  .post-card-header { padding: 14px 14px 4px; }
}