/* ===========================
   MIDAS PUBLI — BLOG CSS
   Padrão visual: idêntico ao site principal
   Fonte: Google Sans | Cores: Navy + Gold + Cream
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@300;400;500;600;700;900&display=swap');

:root {
  --gold:        #D4AF37;
  --gold-dark:   #fcd450;
  --gold-light:  #F4E4BC;
  --navy:        #0A1128;
  --navy-light:  #1C2541;
  --gray:        #3A506B;
  --white:       #FFFFFF;
  --cream:       #F8F6F1;
  --accent:      #C9A050;
  --border-gold: rgba(212, 175, 55, 0.2);

  --font-main: 'Google Sans', 'Product Sans', sans-serif;

  --max-w:      720px;
  --max-w-wide: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; height: auto; display: block; }

/* =====================
   HEADER / NAV
   ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: -.02em;
  text-decoration: none;
}

.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-main);
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { width: 100%; }

.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-cta {
  font-family: var(--font-main);
  font-size: .88rem;
  font-weight: 600;
  padding: 0.75rem 1.8rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  animation: cta-pulse 2.2s ease-in-out infinite;
}

.nav-cta:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  animation: none;
}

@keyframes cta-pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), 0 0 0 0 rgba(212, 175, 55, 0.45);
  }
  60% {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), 0 0 0 10px rgba(212, 175, 55, 0);
  }
}

/* =====================
   BREADCRUMB
   ===================== */
.breadcrumb {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 12px 2rem;
  font-family: var(--font-main);
  font-size: .78rem;
  color: var(--gray);
}

.breadcrumb a { color: var(--gray); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; color: var(--gold); }

/* =====================
   HERO — INDEX
   ===================== */
.blog-hero {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 64px 2rem 56px;
  border-bottom: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-hero-tag {
  display: inline-block;
  font-family: var(--font-main);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  background: rgba(212, 175, 55, 0.1);
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--border-gold);
}

.blog-hero h1 {
  font-family: var(--font-main);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -.03em;
  max-width: 640px;
  margin-bottom: 16px;
}

.blog-hero h1 .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 520px;
  font-weight: 400;
}

/* =====================
   GRID DE ARTIGOS
   ===================== */
.posts-grid {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 56px 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.post-card:hover::before { transform: scaleX(1); }

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(10, 17, 40, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
}

.post-card-img-link {
  display: block;
  overflow: hidden;
}

.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.post-card:hover .post-card-img {
  transform: scale(1.04);
}

.post-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--cream) 0%, #ede9e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-img-placeholder svg {
  opacity: .18;
  stroke: var(--navy);
}

.post-card-body {
  padding: 1.8rem 1.8rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card-cat {
  font-family: var(--font-main);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-card-title {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.post-card-title a {
  color: var(--navy);
  transition: color 0.3s ease;
}

.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-size: .9rem;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: .75rem;
  color: var(--gray);
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-gold);
}

.post-card-meta time { color: var(--gray); }
.dot { opacity: .4; }

.read-more {
  margin-left: auto;
  font-weight: 700;
  color: var(--gold);
  font-size: .78rem;
  letter-spacing: .02em;
  transition: color .2s;
}

.read-more:hover { color: var(--gold-dark); }

/* =====================
   ARTIGO — SINGLE
   ===================== */
.article-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 2rem 32px;
}

.article-cat {
  display: inline-block;
  font-family: var(--font-main);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  background: rgba(212, 175, 55, 0.1);
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--border-gold);
}

.article-header h1 {
  font-family: var(--font-main);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-main);
  font-size: .8rem;
  color: var(--gray);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-gold);
}

.article-meta time { color: var(--gray); }
.reading-time { display: flex; align-items: center; gap: 5px; }

.article-cover {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 40px;
}

.article-cover img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border-gold);
}

/* =====================
   CONTEÚDO DO ARTIGO
   ===================== */
.article-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 64px;
  font-size: 1.05rem;
  color: var(--navy);
}

.article-content h2 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  margin: 48px 0 16px;
  padding-top: 8px;
}

.article-content h3 {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin: 32px 0 12px;
}

.article-content p { margin-bottom: 22px; line-height: 1.8; }

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-content li { margin-bottom: 8px; }

.article-content strong { color: var(--navy); font-weight: 700; }

.article-content em { font-style: italic; color: var(--accent); }

.article-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(201, 160, 80, .3);
  transition: border-color .2s;
}

.article-content a:hover { border-bottom-color: var(--gold); }

.article-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 32px 0;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--gray);
}

.article-content code {
  background: var(--cream);
  border: 1px solid var(--border-gold);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: .88em;
  color: var(--accent);
}

.article-content pre {
  background: var(--navy);
  border: 1px solid var(--navy-light);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}

.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold-light);
}

/* Tabela */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-family: var(--font-main);
  font-size: .88rem;
  border-radius: 12px;
  overflow: hidden;
}

.article-content th {
  background: var(--navy);
  color: var(--gold);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .75rem;
}

.article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-gold);
  color: var(--navy);
  background: var(--white);
}

.article-content tr:hover td { background: rgba(212, 175, 55, 0.04); }

/* Caixa de destaque */
.highlight-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}

.highlight-box p { margin-bottom: 0; }

/* =====================
   AUTOR
   ===================== */
.author-box {
  max-width: var(--max-w);
  margin: 0 auto 64px;
  padding: 0 2rem;
}

.author-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(10, 17, 40, 0.06);
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.author-info h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.author-info .role {
  font-family: var(--font-main);
  font-size: .72rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.author-info p { font-size: .88rem; color: var(--gray); margin: 0; }

/* =====================
   CTA INLINE
   ===================== */
.cta-box {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 64px;
}

.cta-inner {
  background: var(--navy);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark), var(--gold));
}

.cta-inner h2 {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -.02em;
}

.cta-inner p {
  color: var(--gold-light);
  font-size: .95rem;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.btn-gold {
  display: inline-block;
  font-family: var(--font-main);
  font-size: .95rem;
  font-weight: 700;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  border-radius: 50px;
  letter-spacing: .02em;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  transition: all .2s;
  animation: cta-pulse 2.2s ease-in-out infinite;
}

.btn-gold:hover {
  color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
  animation: none;
}

/* =====================
   ARTIGOS RELACIONADOS
   ===================== */
.related-posts {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 48px 2rem;
  border-top: 1px solid var(--border-gold);
}

.related-posts h2 {
  font-family: var(--font-main);
  font-size: .8rem;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 40px 2rem 28px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: -.02em;
}

.footer-logo span { color: var(--gold); }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-family: var(--font-main);
  font-size: .78rem;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .2s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-family: var(--font-main);
  font-size: .75rem;
  color: var(--gold-light);
  opacity: .7;
}

/* =====================
   PROGRESS BAR (artigo)
   ===================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  z-index: 9999;
  transition: width .1s linear;
  width: 0%;
}

/* =====================
   SCROLL REVEAL
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s cubic-bezier(.22, 1, .36, 1),
              transform .65s cubic-bezier(.22, 1, .36, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* =====================
   BOTÃO FLUTUANTE WHATSAPP
   ===================== */
.fab-whatsapp {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  animation: whatsapp-pulse 2s ease-in-out infinite;
  transition: transform .3s, box-shadow .3s;
}

.fab-whatsapp:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
  animation: none;
  color: #fff;
}

.fab-whatsapp svg {
  fill: #fff;
  width: 28px;
  height: 28px;
  display: block;
}

@keyframes whatsapp-pulse {
  0%, 100% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.55);
  }
  60% {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4), 0 0 0 14px rgba(37, 211, 102, 0);
  }
}

/* =====================
   RESPONSIVO
   ===================== */
@media (max-width: 968px) {
  .nav-links { display: none; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .blog-hero { padding: 48px 1.5rem 40px; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 1.2rem; }
  .nav-cta { display: none; }
  .posts-grid { grid-template-columns: 1fr; padding: 32px 1.2rem; }
  .blog-hero { padding: 40px 1.2rem 32px; }
  .blog-hero h1 { font-size: 1.75rem; }
  .author-inner { flex-direction: column; }
  .cta-inner { padding: 28px 20px; }
  .article-header,
  .article-cover,
  .article-content,
  .author-box,
  .cta-box { padding-left: 1.2rem; padding-right: 1.2rem; }
  .fab-whatsapp { bottom: 1.2rem; left: 1.2rem; width: 48px; height: 48px; }
  .post-card-img {
    aspect-ratio: auto;
    height: auto;
    object-fit: contain;
  }
  .article-cover-img {
    aspect-ratio: auto;
    height: auto;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
