/* ============================================================
   EMILLY PAIXÃO — Estilos específicos de artigos
   Depende de styles.css (deve ser carregado antes)
   ============================================================ */

/* ── Mini-hero das páginas internas ───────────────────────── */
.page-hero {
  background: radial-gradient(120% 80% at 60% -10%, var(--navy-soft) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 64px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 2; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 26px;
}
.breadcrumb a { color: rgba(255,255,255,0.6); transition: color .3s; }
.breadcrumb a:hover { color: var(--champagne); }
.breadcrumb span { color: rgba(255,255,255,0.35); }

.page-hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4.5vw, 54px);
  color: var(--white);
  margin: 0 0 16px;
  max-width: 22ch;
  line-height: 1.16;
}
.page-hero .lead { color: rgba(255,255,255,0.7); }
.page-hero .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.page-hero .cat-badge {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid rgba(207,162,79,0.5);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne);
}
.page-hero .meta-info {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── Filtros de categoria ─────────────────────────────────── */
.filter-bar {
  padding: 36px 0 0;
  border-bottom: 1px solid var(--gray);
  background: var(--white);
  position: sticky;
  top: var(--header-h);
  z-index: 40;
}
.filter-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar .wrap::-webkit-scrollbar { display: none; }

.filter-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a6a6c;
  cursor: pointer;
  white-space: nowrap;
  transition: color .3s var(--ease), border-color .3s var(--ease);
  margin-bottom: -1px;
}
.filter-btn:hover { color: var(--navy); }
.filter-btn.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 500; }

/* ── Grid de listagem ─────────────────────────────────────── */
.artigos-section { padding-block: clamp(60px, 8vw, 100px); background: var(--gray-warm); }
.artigos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
}

.artigo-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  position: relative;
}
.artigo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -30px rgba(33,53,85,0.22);
  border-color: rgba(207,162,79,0.4);
}
.artigo-card .card-img {
  aspect-ratio: 16/9;
  background:
    repeating-linear-gradient(135deg, rgba(33,53,85,0.04) 0 12px, rgba(33,53,85,0.07) 12px 24px),
    var(--gray-warm);
  position: relative;
  overflow: hidden;
}
.artigo-card .card-img::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--gold-metal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.artigo-card:hover .card-img::after { transform: scaleX(1); }
.artigo-card .card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.artigo-card .destaque-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--navy);
  color: var(--champagne);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid rgba(207,162,79,0.4);
}

.artigo-card .card-body {
  padding: clamp(22px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.artigo-card .card-cat {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 12px;
}
.artigo-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.26;
  margin: 0 0 14px;
  color: var(--navy);
}
.artigo-card .card-resumo {
  font-size: 14px;
  color: #6a6a6c;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.artigo-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--gray);
}
.artigo-card .card-date { font-size: 12px; color: #9a9a9c; letter-spacing: 0.06em; }
.artigo-card .card-link {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: gap .3s var(--ease), color .3s var(--ease);
}
.artigo-card .card-link:hover { gap: 12px; color: var(--gold-mid); }
.artigo-card .card-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* Estado vazio */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9a9a9c;
  font-size: 15px;
}

/* ── Artigo individual ────────────────────────────────────── */
.article-layout {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--gray-warm);
}
.article-layout .wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

/* Corpo do artigo */
.article-body {
  background: var(--white);
  padding: clamp(32px, 4vw, 56px);
  border: 1px solid var(--gray);
}
.article-body .article-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.18;
  color: var(--navy);
  margin: 0 0 28px;
}
.article-body .article-divider {
  width: 48px; height: 1px;
  background: var(--gold-mid);
  margin: 0 0 32px;
}
.article-body .prose { font-size: 16.5px; line-height: 1.82; color: var(--charcoal); }
.article-body .prose p { margin: 0 0 1.4em; }
.article-body .prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--navy);
  margin: 2em 0 0.7em;
  line-height: 1.3;
}
.article-body .prose ul, .article-body .prose ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.article-body .prose li { margin-bottom: 0.6em; }
.article-body .prose strong { font-weight: 500; color: var(--navy); }
.article-body .prose em { font-style: italic; color: var(--charcoal); }
.article-body .article-disclaimer {
  margin-top: 2em;
  padding: 16px 20px;
  border-left: 2px solid var(--gold-mid);
  background: var(--paper);
  font-size: 13px;
  color: #7a7a7c;
  font-style: italic;
  line-height: 1.65;
}

/* Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 28px; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray);
  padding: 28px;
}
.sidebar-card h4 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray);
}
.author-card .author-name {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 6px;
}
.author-card .author-oab { font-size: 12px; color: #9a9a9c; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.author-card p { font-size: 13.5px; color: #6a6a6c; line-height: 1.65; margin: 0 0 18px; }
.author-card .btn { font-size: 12px; padding: 12px 20px; width: 100%; justify-content: center; }

.related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.related-list li { border-bottom: 1px solid var(--gray); padding: 14px 0; }
.related-list li:last-child { border-bottom: none; padding-bottom: 0; }
.related-list a { display: flex; flex-direction: column; gap: 5px; }
.related-list .rel-cat { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.related-list .rel-title { font-family: var(--serif); font-size: 16px; color: var(--navy); line-height: 1.3; transition: color .3s; }
.related-list a:hover .rel-title { color: var(--gold-mid); }
.related-list .rel-date { font-size: 11px; color: #9a9a9c; }

/* ── Seção Artigos Recentes na home ──────────────────────── */
.artigos-home { padding-block: clamp(72px, 10vw, 120px); background: var(--paper); }
.artigos-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.2vw, 28px);
  margin-top: clamp(40px, 5vw, 60px);
}
.artigos-home-cta { text-align: center; margin-top: 48px; }

/* ── Admin Panel ──────────────────────────────────────────── */
.admin-page { background: #f0ede8; min-height: 100vh; font-family: var(--sans); }
.admin-lock {
  position: fixed; inset: 0;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.admin-lock-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(207,162,79,0.3);
  padding: 52px 48px;
  width: min(420px, 90vw);
  text-align: center;
}
.admin-lock-box .monogram { width: 36px; height: 48px; margin: 0 auto 22px; }
.admin-lock-box h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 26px;
  color: var(--white);
  margin: 0 0 6px;
}
.admin-lock-box p { font-size: 13px; color: rgba(255,255,255,0.5); margin: 0 0 32px; }
.admin-lock-box input[type=password] {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(207,162,79,0.3);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  padding: 14px 18px;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color .3s;
  margin-bottom: 16px;
}
.admin-lock-box input[type=password]:focus { border-color: var(--gold-light); }
.admin-lock-box .btn-gold { width: 100%; justify-content: center; padding: 16px; }
.admin-lock-box .err-msg { font-size: 12px; color: #e08070; margin-top: 12px; display: none; }
.admin-lock-box .err-msg.show { display: block; }

.admin-header {
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(207,162,79,0.2);
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  position: sticky; top: 0; z-index: 50;
}
.admin-header .brand-name {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
}
.admin-header .brand-name small { color: var(--champagne); font-size: 0.68em; display: block; margin-top: 3px; }
.admin-header .admin-actions { display: flex; gap: 14px; align-items: center; }
.admin-header .admin-actions a,
.admin-header .admin-actions button {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); background: none; border: none; cursor: pointer;
  padding: 6px 0; transition: color .3s;
}
.admin-header .admin-actions a:hover,
.admin-header .admin-actions button:hover { color: var(--champagne); }

.admin-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid rgba(207,162,79,0.15);
  background: var(--navy);
  padding-inline: var(--gutter);
  overflow-x: auto;
}
.admin-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.55);
  font-family: var(--sans); font-size: 12.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 20px; cursor: pointer; white-space: nowrap;
  transition: color .3s, border-color .3s;
  margin-bottom: -1px;
}
.admin-tab:hover { color: rgba(255,255,255,0.85); }
.admin-tab.active { color: var(--champagne); border-bottom-color: var(--gold-light); }

.admin-content { padding: clamp(28px, 4vw, 48px) var(--gutter); max-width: 1100px; margin: 0 auto; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Tabela de artigos */
.artigos-table { width: 100%; border-collapse: collapse; background: var(--white); }
.artigos-table th {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); font-weight: 400; text-align: left;
  padding: 14px 16px; border-bottom: 1px solid var(--gray);
  background: var(--paper);
}
.artigos-table td { padding: 16px; border-bottom: 1px solid var(--gray); font-size: 14px; color: var(--charcoal); vertical-align: middle; }
.artigos-table tr:last-child td { border-bottom: none; }
.artigos-table tr:hover td { background: var(--gray-warm); }
.artigos-table .td-titulo { font-family: var(--serif); font-size: 16px; color: var(--navy); max-width: 280px; }
.artigos-table .td-titulo small { display: block; font-family: var(--sans); font-size: 12px; color: #9a9a9c; margin-top: 3px; }
.artigos-table .td-actions { display: flex; gap: 10px; white-space: nowrap; }
.artigos-table .td-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 10px; transition: color .3s, background .3s;
}
.td-actions .btn-edit { color: var(--navy); }
.td-actions .btn-edit:hover { color: var(--white); background: var(--navy); }
.td-actions .btn-del  { color: #c25b43; }
.td-actions .btn-del:hover { color: var(--white); background: #c25b43; }
.td-actions .btn-star { color: var(--gold); font-size: 16px; }
.td-actions .btn-star.off { color: #ccc; }

/* Admin form */
.admin-form-card { background: var(--white); border: 1px solid var(--gray); padding: clamp(28px, 3.5vw, 48px); }
.admin-form-card h3 { font-family: var(--serif); font-size: 26px; color: var(--navy); margin: 0 0 28px; font-weight: 400; }
.admin-field { margin-bottom: 26px; }
.admin-field label {
  display: block; font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 9px; font-weight: 400;
}
.admin-field input[type=text],
.admin-field input[type=date],
.admin-field select,
.admin-field textarea {
  width: 100%; font-family: var(--sans); font-size: 15px;
  color: var(--charcoal); padding: 12px 14px;
  border: 1px solid var(--gray); background: var(--gray-warm);
  transition: border-color .3s; outline: none;
}
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus { border-color: var(--gold); background: var(--white); }
.admin-field textarea { resize: vertical; min-height: 120px; }
.admin-field textarea.conteudo { min-height: 260px; font-family: monospace; font-size: 13px; }
.admin-field .field-hint { font-size: 12px; color: #9a9a9c; margin-top: 7px; }
.admin-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.admin-check { display: flex; align-items: center; gap: 12px; }
.admin-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); }
.admin-check label { font-size: 14px; color: var(--navy); letter-spacing: 0.06em; margin: 0; text-transform: none; }

.admin-form-actions { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.admin-form-actions .btn { padding: 14px 28px; }
.admin-success { padding: 14px 18px; background: rgba(128,80,24,0.08); border: 1px solid rgba(128,80,24,0.3); color: var(--navy); font-size: 14px; margin-bottom: 20px; display: none; }
.admin-success.show { display: block; }

/* Preview do conteúdo */
.content-preview {
  border: 1px solid var(--gray);
  background: var(--white);
  padding: 24px 28px;
  font-size: 15px; line-height: 1.8; color: var(--charcoal);
  margin-top: 10px; display: none;
  max-height: 400px; overflow-y: auto;
}
.content-preview.show { display: block; }
.content-preview h3 { font-family: var(--serif); color: var(--navy); font-size: 20px; margin: 1.4em 0 0.6em; }
.content-preview .article-disclaimer {
  padding: 12px 16px; border-left: 2px solid var(--gold-mid);
  background: var(--paper); font-size: 13px; color: #7a7a7c; font-style: italic; margin-top: 1.4em;
}

/* ── Responsivo artigos ───────────────────────────────────── */
@media (max-width: 1024px) {
  .artigos-grid { grid-template-columns: repeat(2, 1fr); }
  .artigos-home-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout .wrap { grid-template-columns: 1fr; }
  .article-sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1 1 280px; }
  .admin-form-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .artigos-grid { grid-template-columns: 1fr; }
  .artigos-home-grid { grid-template-columns: 1fr; }
  .admin-form-row { grid-template-columns: 1fr; }
  .filter-bar { top: 72px; }
}
