/* ============================================================
   ZDIGITAL360 BLOG — CSS COMPLEMENTAR
   Estende styles.css com componentes específicos do blog
   ============================================================ */

/* ---------- BLOG INDEX ---------- */
.blog-hero {
  padding-top: calc(var(--header-h) + var(--s-12));
  padding-bottom: var(--s-12);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .blog-hero {
    padding-top: calc(var(--header-h) + var(--s-16));
    padding-bottom: var(--s-16);
  }
}

.blog-hero h1 {
  font-size: clamp(2rem, 6.5vw, 3.5rem);
  margin-bottom: var(--s-4);
}

.blog-hero .lead {
  max-width: 640px;
}

/* Featured post */
.featured-post {
  padding: var(--s-16) 0 var(--s-12);
  border-bottom: 1px solid var(--line);
}

.featured-post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8);
  align-items: center;
}

@media (min-width: 768px) {
  .featured-post-card {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--s-12);
  }
}

.featured-post-content .eyebrow-orbit {
  display: inline-block;
  margin-bottom: var(--s-3);
}

.featured-post-content h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: var(--s-4);
  line-height: 1.1;
}

.featured-post-content h2 a {
  color: var(--ink);
  transition: color var(--fast);
}

.featured-post-content h2 a:hover {
  color: var(--orbit);
}

.featured-post-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
  font-size: 13px;
  color: var(--ink-3);
}

.featured-post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-5);
}

.featured-post-visual {
  background: linear-gradient(135deg, #FAFAF7 0%, var(--orbit-faint) 100%);
  border-radius: var(--r-xl);
  padding: var(--s-10);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Lista de posts */
.posts-section {
  padding: var(--s-16) 0 var(--s-22);
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-10);
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-10) var(--s-8);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  transition: transform var(--base) var(--ease);
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card-visual {
  background: linear-gradient(135deg, #FAFAF7 0%, var(--bg-tint) 100%);
  border-radius: var(--r-lg);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-card-category {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orbit);
  font-weight: 600;
  margin-bottom: 2px;
}

.post-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}

.post-card h3 a {
  color: var(--ink);
  transition: color var(--fast);
}

.post-card h3 a:hover {
  color: var(--orbit);
}

.post-card-excerpt {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: var(--s-2);
}

.post-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-5);
}

/* ---------- POST SINGLE (Artigo individual) ---------- */
.article-hero {
  padding-top: calc(var(--header-h) + var(--s-12));
  padding-bottom: var(--s-10);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.article-hero-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: var(--s-5);
  letter-spacing: 0.02em;
}

.article-breadcrumb a {
  color: var(--ink-3);
  transition: color var(--fast);
}

.article-breadcrumb a:hover {
  color: var(--orbit);
}

.article-breadcrumb .sep {
  color: var(--ink-5);
}

.article-category {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orbit);
  font-weight: 600;
  margin-bottom: var(--s-4);
}

.article-hero h1 {
  font-size: clamp(1.875rem, 5.5vw, 3rem);
  margin-bottom: var(--s-5);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.article-deck {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: var(--s-7);
  max-width: 720px;
}

@media (min-width: 768px) {
  .article-deck {
    font-size: 19px;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orbit), var(--orbit-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.article-author-name {
  font-weight: 500;
  color: var(--ink);
}

.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-5);
}

/* Article body */
.article-body {
  padding: var(--s-12) 0;
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}

@media (min-width: 768px) {
  .article-content {
    font-size: 18px;
  }
}

.article-content > * {
  margin-bottom: var(--s-5);
}

.article-content h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: var(--s-12);
  margin-bottom: var(--s-5);
  color: var(--ink);
  padding-top: var(--s-3);
}

.article-content h3 {
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: var(--s-10);
  margin-bottom: var(--s-4);
  color: var(--ink);
}

.article-content h4 {
  font-size: 18px;
  font-weight: 500;
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}

.article-content p {
  font-size: inherit;
  line-height: inherit;
  color: var(--ink);
}

.article-content p:first-of-type::first-letter {
  /* Drop cap opcional */
}

.article-content a {
  color: var(--orbit);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--fast);
}

.article-content a:hover {
  color: var(--orbit-dark);
}

.article-content strong {
  font-weight: 600;
  color: var(--ink);
}

.article-content em {
  font-style: italic;
}

.article-content ul,
.article-content ol {
  padding-left: var(--s-6);
  margin-bottom: var(--s-5);
}

.article-content li {
  margin-bottom: var(--s-2);
  line-height: 1.65;
}

.article-content ul li::marker {
  color: var(--orbit);
}

.article-content blockquote {
  border-left: 3px solid var(--orbit);
  padding: var(--s-3) 0 var(--s-3) var(--s-5);
  margin: var(--s-7) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
}

@media (min-width: 768px) {
  .article-content blockquote {
    font-size: 22px;
    padding-left: var(--s-6);
  }
}

.article-content blockquote cite {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.article-content code {
  background: var(--bg-tint);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--ink);
}

.article-content pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  margin: var(--s-6) 0;
}

.article-content img,
.article-content figure {
  margin: var(--s-8) 0;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.article-content figcaption {
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  margin-top: var(--s-2);
  font-style: italic;
}

.article-content hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: var(--s-10) 0;
}

/* Callout boxes dentro do artigo */
.article-callout {
  background: var(--bg-soft);
  border-left: 3px solid var(--orbit);
  padding: var(--s-5);
  margin: var(--s-7) 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.article-callout.warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}

.article-callout.danger {
  border-left-color: #EF4444;
  background: #FEF2F2;
}

.article-callout.success {
  border-left-color: #10B981;
  background: #ECFDF5;
}

.article-callout strong {
  display: block;
  margin-bottom: var(--s-2);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Lead Magnet Box inline */
.lead-magnet-box {
  background: linear-gradient(135deg, var(--ink) 0%, #1a1f2e 100%);
  color: white;
  border-radius: var(--r-xl);
  padding: var(--s-8);
  margin: var(--s-10) 0;
  position: relative;
  overflow: hidden;
}

.lead-magnet-box::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.lead-magnet-content {
  position: relative;
  z-index: 1;
}

.lead-magnet-eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orbit-light);
  font-weight: 600;
  margin-bottom: var(--s-3);
}

.lead-magnet-box h3 {
  font-size: 24px;
  font-weight: 500;
  color: white;
  margin-bottom: var(--s-3);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .lead-magnet-box h3 {
    font-size: 28px;
  }
}

.lead-magnet-box p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--s-5);
  line-height: 1.55;
}

.lead-magnet-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

@media (min-width: 640px) {
  .lead-magnet-form {
    flex-direction: row;
  }
}

.lead-magnet-form input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  font-size: 15px;
  color: white;
  font-family: var(--font-sans);
  min-height: 52px;
}

.lead-magnet-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.lead-magnet-form input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--orbit-light);
}

.lead-magnet-form button {
  background: var(--orbit);
  color: white;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  min-height: 52px;
  transition: background var(--fast);
  font-family: var(--font-sans);
}

.lead-magnet-form button:hover {
  background: var(--orbit-dark);
}

.lead-magnet-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--s-3);
}

/* Table of Contents (sticky no desktop) */
.article-toc {
  display: none;
}

@media (min-width: 1280px) {
  .article-body {
    position: relative;
  }
  
  .article-toc {
    display: block;
    position: fixed;
    top: calc(var(--header-h) + var(--s-8));
    left: calc(50% + 400px);
    width: 240px;
    max-height: calc(100vh - var(--header-h) - var(--s-12));
    overflow-y: auto;
    padding-left: var(--s-6);
    border-left: 1px solid var(--line);
  }
  
  .article-toc h4 {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 600;
    margin-bottom: var(--s-3);
  }
  
  .article-toc ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
  }
  
  .article-toc li a {
    display: block;
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.4;
    padding: 4px 0;
    transition: color var(--fast);
  }
  
  .article-toc li a:hover,
  .article-toc li a.is-active {
    color: var(--orbit);
  }
}

/* Author bio no fim */
.author-bio {
  margin: var(--s-12) auto var(--s-8);
  max-width: 720px;
  padding: var(--s-8);
  background: var(--bg-soft);
  border-radius: var(--r-lg);
  display: flex;
  gap: var(--s-6);
  align-items: flex-start;
}

.author-bio-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orbit), var(--orbit-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 20px;
}

.author-bio-content h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: var(--s-1);
  color: var(--ink);
}

.author-bio-content p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: var(--s-2);
}

.author-bio-content .role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: var(--s-3);
}

/* Related posts */
.related-posts {
  padding: var(--s-16) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.related-posts h3 {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: var(--s-8);
  text-align: center;
}

/* CTA final do artigo */
.article-final-cta {
  padding: var(--s-12) 0 var(--s-16);
  text-align: center;
  border-top: 1px solid var(--line);
}

.article-final-cta-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.article-final-cta h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: var(--s-4);
}

.article-final-cta p {
  margin-bottom: var(--s-6);
  color: var(--ink-2);
}
