/* EllevaClub — artigos: tema alinhado ao site principal (Montserrat / Cormorant / Tenor) */

:root {
  --gold: #BFA463;
  --gold-light: #D4B97A;
  --gold-dim: #A69160;
  --page-bg: #1B1B1B;
  --card-bg: #242424;
  --card-bg-elevated: #2a2a2a;
  --border: rgba(191, 164, 99, 0.15);
  --border-strong: rgba(191, 164, 99, 0.35);
  --text-primary: #F5F0E8;
  --text-secondary: #D4CDC0;
  --text-muted: #9A948A;
  --header-bg: rgba(27, 27, 27, 0.92);
  --noise-opacity: 0.025;
  --footer-bg: #161616;
  --btn-primary-fg: #1B1B1B;
}

html[data-theme="light"] {
  color-scheme: light;
  --gold: #9A7B3A;
  --gold-light: #B8944A;
  --gold-dim: #7A6129;
  --page-bg: #FAF8F5;
  --card-bg: #FFFFFF;
  --card-bg-elevated: #F4F1EB;
  --border: rgba(154, 123, 58, 0.2);
  --border-strong: rgba(154, 123, 58, 0.42);
  --text-primary: #1C1A16;
  --text-secondary: #3D3A34;
  --text-muted: #5C574E;
  --header-bg: rgba(250, 248, 245, 0.92);
  --noise-opacity: 0.04;
  --footer-bg: #E8E4DC;
  --btn-primary-fg: #1C1A16;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  background: var(--page-bg);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
.page-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3,
.article-card h2 {
  font-family: "Montserrat", sans-serif;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold);
}

/* ── Topo / header (alinhado à home: tema claro = barra creme legível) ── */
.artigos-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html[data-theme="light"] .artigos-header {
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: saturate(1.15) blur(14px);
  -webkit-backdrop-filter: saturate(1.15) blur(14px);
  border-bottom: 1px solid rgba(154, 123, 58, 0.22);
  box-shadow: 0 4px 18px rgba(28, 26, 22, 0.07);
}

.artigos-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top))
    max(3.75rem, calc(1.25rem + 42px), env(safe-area-inset-right)) 1rem
    max(1.25rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.artigos-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.artigos-logo svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.artigos-logo-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.artigos-logo-text span {
  color: var(--gold);
  font-weight: 300;
}

.artigos-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.artigos-nav a {
  font-family: "Tenor Sans", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.artigos-nav a:hover,
.artigos-nav a[aria-current="page"] {
  color: var(--gold);
}

.artigos-btn-site {
  font-family: "Tenor Sans", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border-strong);
  padding: 0.55rem 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.artigos-btn-site:hover {
  background: var(--gold);
  color: var(--btn-primary-fg);
}

@media (max-width: 720px) {
  .artigos-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .artigos-nav {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Tema flutuante */
.theme-fab-artigos {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(24, 24, 22, 0.85);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 1.1rem;
  line-height: 1;
}

html[data-theme="light"] .theme-fab-artigos {
  border-color: rgba(154, 123, 58, 0.38);
  background: rgba(255, 255, 255, 0.65);
  color: var(--gold-dim);
}

.theme-fab-artigos-ico {
  display: block;
  line-height: 1;
}

/* SVG logo — cor do traço */
.artigos-header .artigos-logo svg path[stroke="#BFA463"] {
  stroke: var(--gold) !important;
}

/* ── Página índice de artigos (classes articles-* / article-card) ── */
body.artigos-index main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

body.artigos-index .page-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

body.artigos-index .lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 100%;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.articles-toolbar {
  background: linear-gradient(165deg, rgba(191, 164, 99, 0.08) 0%, var(--card-bg) 42%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 1.35rem 1.5rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .articles-toolbar {
  box-shadow: 0 12px 40px rgba(28, 26, 22, 0.06);
}

.search-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.articles-search {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.65rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.articles-search::placeholder {
  color: var(--text-muted);
}

.articles-search:hover {
  border-color: var(--border-strong);
}

.articles-search:focus {
  border-color: rgba(191, 164, 99, 0.55);
  box-shadow: 0 0 0 3px rgba(191, 164, 99, 0.12);
}

html[data-theme="light"] .articles-search:focus {
  box-shadow: 0 0 0 3px rgba(154, 123, 58, 0.15);
}

.search-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 2px;
  line-height: 1.45;
}

.search-hint em {
  color: var(--gold-dim);
  font-style: normal;
  font-weight: 500;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.suggestion-chip {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--page-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.suggestion-chip:hover,
.suggestion-chip:focus-visible {
  border-color: var(--border-strong);
  color: var(--gold-light);
  background: rgba(191, 164, 99, 0.06);
  outline: none;
}

html[data-theme="light"] .suggestion-chip:hover {
  background: rgba(154, 123, 58, 0.08);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.filter-label {
  font-family: "Tenor Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 2px;
}

@media (min-width: 560px) {
  .filter-label {
    width: auto;
    margin-bottom: 0;
    margin-right: 4px;
  }
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-chip {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.filter-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(191, 164, 99, 0.18), rgba(191, 164, 99, 0.08));
  border-color: var(--border-strong);
  color: var(--gold-light);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.result-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.clear-filters {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clear-filters:hover {
  color: var(--gold);
}

.clear-filters:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: none;
}

.articles-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .article-card:hover {
  box-shadow: 0 8px 28px rgba(28, 26, 22, 0.08);
}

.article-card-thumb {
  display: block;
  min-height: 140px;
  background: var(--page-bg);
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 140px;
}

.article-card-body {
  padding: 1.35rem 1.25rem;
}

.article-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}

.article-card h2 a {
  color: var(--text-primary);
}

.article-card h2 a:hover {
  color: var(--gold-light);
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-card-body p:not(.meta) {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "Tenor Sans", sans-serif;
}

.article-card.is-hidden {
  display: none;
}

.empty-hint {
  text-align: center;
  padding: 3rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-secondary);
  background: linear-gradient(180deg, rgba(191, 164, 99, 0.06) 0%, var(--card-bg) 55%);
  max-width: 520px;
  margin: 2rem auto 0;
}

.empty-hint i {
  font-size: 2.25rem;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 1rem;
  display: block;
}

.empty-hint strong {
  color: var(--text-primary);
  font-weight: 600;
}

.empty-hint.is-visible {
  display: block;
}

.articles-grid + .empty-hint {
  display: none;
}

.articles-grid + .empty-hint.is-visible {
  display: block;
}

body.artigos-index > footer {
  text-align: center;
  padding: 2rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}

@media (max-width: 640px) {
  .article-card {
    grid-template-columns: 1fr;
  }
  .article-card-thumb {
    min-height: 160px;
    max-height: 200px;
  }
  .article-card-thumb img {
    min-height: 160px;
    max-height: 200px;
  }
  body.artigos-index .page-title {
    font-size: 1.85rem;
  }
}

/* ── Artigo interno ── */
.artigo-main,
body.artigo-interno > main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.artigo-main article header,
body.artigo-interno > main article header {
  margin-bottom: 1.75rem;
}

.artigo-main article h1,
body.artigo-interno > main article h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.read-time {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: "Tenor Sans", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.75;
}

.quick-answer {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.35rem;
  margin: 1.75rem 0;
}

.quick-answer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.quick-answer strong {
  color: var(--text-primary);
}

.prose {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.prose h2,
.prose h3 {
  text-align: left;
}

.prose h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  margin: 2.25rem 0 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.prose h3 {
  font-size: 1.08rem;
  margin: 1.5rem 0 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: var(--text-primary);
}

.prose p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem 1.2rem;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.prose th {
  background: var(--card-bg);
  color: var(--gold-light);
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}

.cta-inline {
  display: inline-block;
  margin: 1.25rem 0;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--btn-primary-fg) !important;
  font-weight: 600;
  border-radius: 8px;
  font-family: "Tenor Sans", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cta-inline:hover {
  filter: brightness(1.05);
  color: var(--btn-primary-fg) !important;
}

.article-hero {
  margin: 0 0 1.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

html[data-theme="light"] .article-hero img,
html[data-theme="light"] .article-card-thumb img {
  filter: brightness(0.84) saturate(0.92) contrast(1.05);
}

.related-guides-section {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.related-section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.related-premium-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: -0.35rem 0 1.25rem;
  line-height: 1.5;
}

.related-guides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-guides-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.related-guides-link:hover {
  border-color: var(--border-strong);
  background: var(--card-bg-elevated);
}

.related-guides-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--page-bg);
}

.related-guides-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-guides-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: 1.2rem;
}

.related-guides-text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.related-guides-link--all .related-guides-text {
  color: var(--gold-light);
}

.site-footer {
  text-align: center;
  padding: 1.75rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}

.site-footer a {
  color: var(--gold-light);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .related-guides-thumb {
    width: 72px;
    height: 40px;
  }
  .related-guides-link {
    gap: 10px;
    padding: 10px 12px;
  }
  .related-guides-text {
    font-size: 0.9rem;
  }
}
