/**
 * Artigo do blog — layout editorial premium
 */

.article-page {
  --article-max: 73.75rem;
  --article-content: 51.25rem;
  --article-sidebar: 20rem;
  --article-gap: 2.25rem;
  --article-text: #1e293b;
  --article-muted: #475569;
  --article-surface: #f8fafc;
  --article-gradient: linear-gradient(135deg, #0b1220 0%, #152238 55%, #0f1a2e 100%);
  --article-accent: #00c8ff;
  --article-btn-gradient: linear-gradient(135deg, #00b8f0 0%, #3b82f6 45%, #a855f7 100%);
  background: var(--article-surface);
  scroll-behavior: smooth;
}

/* Hero (reuso do padrão pillar) */
.c-pillar-hero--article {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--article-gradient);
}

/* Sobrescreve h1/h2/a globais (main.css) que forçavam texto escuro */
.c-pillar-hero--article .c-pillar-hero__title,
.c-pillar-hero--article .article-hero__title,
.c-pillar-hero--article h1 {
  color: #fff !important;
}

.c-pillar-hero--article .c-pillar-hero__eyebrow,
.c-pillar-hero--article .article-hero__category {
  color: #7ddcff !important;
}

.c-pillar-hero--article .c-pillar-hero__desc,
.c-pillar-hero--article .article-hero__excerpt {
  color: rgb(255 255 255 / 0.9) !important;
}

.c-pillar-hero--article .article-hero__meta,
.c-pillar-hero--article .article-hero__meta a,
.c-pillar-hero--article .c-pillar-hero__breadcrumb-list,
.c-pillar-hero--article .c-pillar-hero__breadcrumb-list a {
  color: rgb(255 255 255 / 0.82) !important;
}

.c-pillar-hero--article .article-hero__meta a:hover,
.c-pillar-hero--article .c-pillar-hero__breadcrumb-list a:hover {
  color: #fff !important;
}

.c-pillar-hero--article .c-pillar-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.c-pillar-hero--article .c-pillar-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.c-pillar-hero--article .c-pillar-hero__glow--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -80px;
  background: rgb(0 200 255 / 0.35);
}

.c-pillar-hero--article .c-pillar-hero__glow--2 {
  width: 360px;
  height: 360px;
  right: -60px;
  bottom: -100px;
  background: rgb(45 212 191 / 0.22);
}

.article-hero__inner {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  padding-top: calc(var(--site-header-height, 7rem) + clamp(1.75rem, 4vw, 2.75rem));
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.article-hero__title {
  max-width: 34rem;
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}

.article-hero__excerpt {
  max-width: 52ch;
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
  color: rgb(255 255 255 / 0.84);
}

.article-hero__category {
  margin: 0 0 0.75rem;
}

.c-pillar-hero--article .c-pillar-hero__breadcrumb {
  display: inline-flex;
  margin-bottom: 1rem;
}

.c-pillar-hero--article .c-pillar-hero__breadcrumb-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0.35rem 0.75rem;
  list-style: none;
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 0.82);
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
}

.c-pillar-hero--article .c-pillar-hero__breadcrumb-list a {
  color: inherit;
  text-decoration: none;
}

.c-pillar-hero--article .c-pillar-hero__breadcrumb-list a:hover {
  color: #fff;
}

.c-pillar-hero--article .c-pillar-hero__breadcrumb-list li:not(:last-child)::after {
  content: "›";
  margin-left: 0.15rem;
  opacity: 0.65;
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.78);
}

.article-hero__meta a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-hero__media {
  margin: 0;
}

.article-hero__image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.28);
}

@media (min-width: 900px) {
  .article-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

/* Layout principal */
.article-page__body {
  padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem);
}

.article-layout {
  display: grid;
  gap: var(--article-gap);
  max-width: var(--article-max);
}

.article-layout__main {
  min-width: 0;
}

@media (min-width: 1100px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) var(--article-sidebar);
    align-items: start;
  }
}

.article-content-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 10px 40px rgb(15 23 42 / 0.06);
}

/* Tipografia editorial */
.article-content {
  color: var(--article-text);
  font-size: clamp(1.0625rem, 1.6vw, 1.125rem);
  line-height: 1.78;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.article-content h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: clamp(1.2rem, 2vw, 1.375rem);
  line-height: 1.3;
  color: #0f172a;
}

.article-content h4 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.0625rem;
  color: #0f172a;
}

.article-content p,
.article-content ul,
.article-content ol {
  margin: 0 0 1.15rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35rem;
}

.article-content li + li {
  margin-top: 0.45rem;
}

.article-content a {
  color: #1558a8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--article-accent);
}

.article-content strong {
  font-weight: 700;
  color: #0f172a;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #1558a8;
  border-radius: 0 0.75rem 0.75rem 0;
  background: #f1f5f9;
  color: var(--article-muted);
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 0.875rem;
}

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgb(15 23 42 / 0.1);
}

/* Boxes editoriais */
.article-content .article-note,
.article-content .article-tip,
.article-content .article-warning,
.article-content .article-checklist,
.article-content .article-summary-box,
.article-content .cr-article-cta {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  border-left: 4px solid #1558a8;
  border-radius: 0 0.875rem 0.875rem 0;
  background: rgb(21 88 168 / 0.06);
}

.article-content .article-warning {
  border-left-color: #d97706;
  background: rgb(217 119 6 / 0.08);
}

/* Tabelas */
.article-table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 0.875rem;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.article-content th,
.article-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(15 23 42 / 0.08);
  text-align: left;
}

.article-content thead th {
  background: #0f2744;
  color: #fff;
  font-weight: 600;
}

.article-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* FAQ */
.article-faq {
  margin: 2rem 0;
}

.article-faq__item {
  margin-bottom: 0.75rem;
  border: 1px solid rgb(15 23 42 / 0.1);
  border-radius: 0.875rem;
  background: #fff;
  overflow: hidden;
}

.article-faq__question {
  padding: 1rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  color: #0f172a;
}

.article-faq__question::-webkit-details-marker {
  display: none;
}

.article-faq__answer {
  padding: 0 1.15rem 1rem;
  color: var(--article-muted);
}

/* Sidebar */
.article-sidebar__inner {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1100px) {
  .article-sidebar__inner {
    position: sticky;
    top: 1.5rem;
  }
}

.article-toc,
.article-sidebar-related {
  padding: 1.25rem;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
}

.article-toc__title,
.article-sidebar-related__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.article-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc__list li + li {
  margin-top: 0.5rem;
}

.article-toc__list a {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--article-muted);
  text-decoration: none;
  line-height: 1.45;
  font-size: 0.9375rem;
}

.article-toc__list a:hover {
  color: #1558a8;
}

.article-toc__num {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(21 88 168 / 0.1);
  color: #1558a8;
  font-size: 0.75rem;
  font-weight: 700;
}

.article-sidebar-cta {
  padding: 1.25rem;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 1rem;
  background: linear-gradient(135deg, #0b1220 0%, #152238 55%, #0f1a2e 100%);
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.12);
  color: #fff;
}

.article-sidebar-cta__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff !important;
}

.article-sidebar-cta__text {
  margin: 0 0 1rem;
  color: rgb(255 255 255 / 0.88) !important;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.article-sidebar-cta .article-btn--primary {
  color: #fff !important;
  text-decoration: none !important;
}

.article-sidebar-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-sidebar-related__list li + li {
  margin-top: 0.75rem;
}

.article-sidebar-related__post-title {
  color: #0f172a;
  font-weight: 600;
  line-height: 1.45;
}

/* CTAs */
.article-cta-mid {
  margin: 2rem 0;
}

.article-cta-mid__inner {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 1rem;
  background: var(--article-gradient);
  color: #fff;
  text-align: center;
}

.article-cta-mid__title,
.article-cta-mid h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: #fff !important;
}

.article-cta-mid__text {
  margin: 0 0 1.25rem;
  color: rgb(255 255 255 / 0.9) !important;
  line-height: 1.65;
}

.article-cta-mid .article-btn--primary {
  color: #fff !important;
  text-decoration: none !important;
}

.article-cta-final {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: #fff;
  border-top: 1px solid rgb(15 23 42 / 0.08);
}

.article-cta-final__inner {
  text-align: center;
}

.article-cta-final__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #0f172a;
}

.article-cta-final__text {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  color: var(--article-muted);
  line-height: 1.7;
}

.article-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-btn--primary {
  color: #fff !important;
  background: var(--article-btn-gradient);
  box-shadow: 0 8px 24px rgb(59 130 246 / 0.28);
  text-decoration: none !important;
}

.article-btn--primary:hover,
.article-btn--primary:focus-visible {
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}

.article-btn--lg {
  padding: 0.9rem 1.6rem;
}

/* Relacionados */
.article-related {
  margin-top: 2rem;
}

.article-related__title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  color: #0f172a;
}

.article-related__grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .article-related__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
}

.article-related-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.article-related-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-related-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.15rem 1.15rem;
}

.article-related-card__category {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1558a8;
}

.article-related-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.article-related-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.article-related-card__link {
  margin-top: auto;
  font-weight: 700;
  color: #1558a8;
  text-decoration: none;
}

@media (max-width: 1099px) {
  .article-sidebar {
    order: -1;
  }

  .article-sidebar__inner {
    position: static;
  }
}

/* Byline + meta do hero */
.article-hero__byline {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: rgb(255 255 255 / 0.85) !important;
}

.article-hero__byline a {
  color: #7ddcff !important;
  font-weight: 700;
  text-decoration: none;
}

.article-hero__byline a:hover {
  text-decoration: underline;
}

.article-hero__meta {
  align-items: center;
  gap: 0.35rem 0.85rem;
}

.article-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-hero__meta-item:not(:first-child)::before {
  content: "·";
  margin-right: 0.85rem;
  opacity: 0.55;
}

.article-hero__meta-item time {
  font-weight: 600;
  color: #fff !important;
}

.article-hero__meta-icon {
  color: #7ddcff;
  flex: none;
}

/* Caixa "Sobre o autor" (E-E-A-T) */
.article-author-box {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--article-surface);
}

.article-author-box__card {
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid rgb(15 23 42 / 0.08);
  border-top: 3px solid var(--article-accent);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.06);
}

.article-author-box__avatar {
  flex: none;
}

.article-author-box__avatar img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgb(0 200 255 / 0.25);
}

.article-author-box__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.article-author-box__name {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
  color: #0f172a;
}

.article-author-box__name a {
  color: #0f172a;
  text-decoration: none;
}

.article-author-box__name a:hover {
  color: #1558a8;
}

.article-author-box__role {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1558a8;
}

.article-author-box__bio {
  margin: 0 0 1rem;
  color: var(--article-muted);
  line-height: 1.7;
}

.article-author-box__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #0a66c2;
  text-decoration: none;
}

.article-author-box__linkedin:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .article-author-box__card {
    flex-direction: column;
    text-align: left;
  }

  .article-author-box__avatar img {
    width: 72px;
    height: 72px;
  }
}

/* Página de arquivo do autor */
.ip--author .author-profile__card {
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgb(15 23 42 / 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.06);
}

.ip--author .author-profile__avatar img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgb(0 200 255 / 0.25);
}

.ip--author .author-profile__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ip--author .author-profile__role {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1558a8;
}

.ip--author .author-profile__bio {
  margin: 0 0 1rem;
  color: #475569;
  line-height: 1.7;
  max-width: 60ch;
}

.ip--author .author-profile__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #0a66c2;
  text-decoration: none;
}

.ip--author .author-profile__linkedin:hover {
  text-decoration: underline;
}

.ip--author .author-posts {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.ip--author .author-posts__title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  color: #0f172a;
}

@media (max-width: 600px) {
  .ip--author .author-profile__card {
    flex-direction: column;
  }

  .ip--author .author-profile__avatar img {
    width: 96px;
    height: 96px;
  }
}
