/* ==========================================================================
   ATIVO online — blog article template
   article.css (carrega DEPOIS de blog.css — reaproveita tokens e header)
   ========================================================================== */

/* ===== Reading progress bar ===== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 3px;
  background: rgba(240, 241, 242, .08);
}
.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--c-gold);
  box-shadow: 0 0 8px rgba(191, 162, 107, .5);
  transition: width .1s linear;
}

/* ===== Article header ===== */

.article-header {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2rem) clamp(2rem, 4vw, 2.5rem);
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}
.article-breadcrumb a { transition: color var(--dur-s); }
.article-breadcrumb a:hover { color: var(--c-gold-soft); }

.article-header__tag {
  color: var(--c-gold);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}

.article-header__title {
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  margin-bottom: 1.2rem;
}

.article-header__excerpt {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.6rem;
}

.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-dim);
}
.article-header__meta strong { color: var(--text-light); font-weight: 600; }

/* ===== Cover image ===== */

.article-cover {
  max-width: 1000px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  padding: 0 clamp(1.5rem, 4vw, 2rem);
}
.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(191, 162, 107, .2);
}

/* ===== Layout: TOC + body ===== */

h3 {
  font-size: 1.6rem;   
  font-weight: 700; 
  margin-bottom: 16px;  
}
h2 {
  font-size: 1.9rem;   
  font-weight: 700;   
  padding-bottom: 8px;
}
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 700px);
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 2rem);
}

.article-toc {
  position: sticky;
  top: 6.5rem;
  align-self: start;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.article-toc__label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .9rem;
}

.article-toc a {
  display: block;
  font-size: .85rem;
  color: var(--text-dim);
  padding: .45rem 0 .45rem .8rem;
  border-left: 2px solid rgba(240, 241, 242, .12);
  transition: color var(--dur-s), border-color var(--dur-s);
}
.article-toc a:hover { color: var(--text-light); }
.article-toc a.is-active {
  color: var(--c-gold-soft);
  border-color: var(--c-gold);
}
/* ===== CARROSSEL ===== */
/* =========================================
   TIMELINE CAROUSEL
========================================= */

.timeline-carousel {

    --bg: #0c0c0d;
    --text: #f4f4f4;
    --muted: #999;
    --accent: #bfa26b;

    --gap: 24px;
    --card-width: 320px;
    --radius: 20px;

    width: 100%;
    padding: 50px 0;

    overflow: hidden;

    color: var(--text);
}


/* =========================================
   LINHA DE PROGRESSO
========================================= */

.timeline-progress {

    width: 100%;

    height: 1px;

    margin-bottom: 28px;

    background: rgba(255,255,255,.14);
}


.timeline-progress-bar {

    width: 0;
    height: 1px;

    background: var(--accent);

    transition:
        width .55s cubic-bezier(.22,.61,.36,1);
}


/* =========================================
   VIEWPORT
========================================= */

.timeline-viewport {
    width: 100%;
    overflow: hidden;

    cursor: grab;

    touch-action: pan-y;
}

.timeline-viewport:active {
    cursor: grabbing;
}

/* =========================================
   TRACK
========================================= */

.timeline-track {

    display: flex;

    align-items: center;

    gap: var(--gap);

    width: max-content;

    transition:
        transform .55s cubic-bezier(.22,.61,.36,1);

    will-change: transform;
}

/* =========================================
   CARD
========================================= */

.timeline-item {

    flex: 0 0 var(--card-width);

    width: var(--card-width);
}


.timeline-card {

    position: relative;

    width: 100%;

    aspect-ratio: 3 / 4;

    overflow: hidden;

    border-radius: var(--radius);

    background: #171717;

    box-shadow:
        0 15px 45px rgba(0,0,0,.25);
}

/* ===============IMAGEM=================== */
.timeline-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform .7s ease;
}
.timeline-card:hover img {
    transform: scale(1.025);
}

/* =========DEGRADÊ================ */
.timeline-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to top,
            rgba(255,255,255,.98) 0%,
            rgba(255,255,255,.90) 17%,
            rgba(255,255,255,.38) 40%,
            rgba(255,255,255,0) 65%
        );
}
/* ===========TEXTO==================== */
.timeline-card-content {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 20px;
    color: #111;
}
.timeline-card-content h3 {
    margin: 0 0 7px;
    font-size: 25px;
    line-height: 1.05;
    letter-spacing: -.025em;
}
.timeline-card-content p {
    margin: 0;
    max-width: 28ch;
    font-size: 16px;
    line-height: 1.4;
    color: #555;
}
/* ===========DATA ENTRE OS CARDS============== */
.timeline-date {
    flex: 0 0 auto;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
    white-space: nowrap;
    writing-mode: vertical-rl;
	writing-mode: vertical-rl;
    text-orientation: upright;
}
/* =================CONTROLES================ */
.timeline-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
}


.timeline-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border:
        1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition:
        border-color .2s ease,
        color .2s ease,
        opacity .2s ease;
}

.timeline-controls button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.timeline-controls button:disabled {
    opacity: .25;
    cursor: default;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

  .timeline-carousel {
        --card-width: 78vw;
        --gap: 10px;
    }

    .timeline-progress {

        margin-bottom: 20px;
    }


    .timeline-card-content {

        left: 18px;
        right: 18px;
        bottom: 18px;
    }


    .timeline-card-content h2 {

        font-size: 21px;
    }

    .timeline-date {
        width: 18px;
        font-size: 10px;
    }

    .timeline-controls {

        justify-content: flex-start;
    }

}
/* ===== Article body typography ===== */

.article-body {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(240, 241, 242, .88);
  overflow-wrap: break-word;
}

.article-body h2 {
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  margin: 2.6rem 0 1.1rem;
  scroll-margin-top: 6rem; /* compensa o header sticky ao navegar via TOC */
}

.article-body h2:first-child { margin-top: 0; }

.article-body p { margin-bottom: 1.3rem; }

.article-body ul {
  margin: 0 0 1.3rem;
  padding-left: 0;
}
.article-body ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .6rem;
  color: rgba(240, 241, 242, .82);
  font-size: 1.2rem; /* Ajuste este valor para o tamanho desejado */
  font-weight: 700;
}
.article-body ul li p {
  font-weight: 400; /* Tira o negrito (volta ao peso normal) */
  font-size: 1.05rem; /* Volta para o tamanho padrão do seu texto */
  color: rgba(240, 241, 242, .88); /* Cor padrão do seu texto */
  margin-top: 0.5rem; /* Dá um pequeno respiro entre o título e o texto */
  margin-bottom: 1.3rem; /* Mantém o padrão de espaçamento inferior */
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-gold);
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--c-gold);
  background: rgba(191, 162, 107, .06);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-light);
}
.article-body blockquote p { margin-bottom: 0; font-size: 1.1rem; }

.article-figure {
  margin: 2rem 0;
}
.article-figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(240, 241, 242, .1);
}
.article-figure figcaption {
  margin-top: .7rem;
  font-size: .82rem;
  color: var(--text-dim);
  text-align: center;
}

.article-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 32px 0;
  -webkit-overflow-scrolling: touch;
}

/* === Tabela === */
.tabela-mecanismos {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  margin: 0;
  color: #d1d1d1;
}

    .tabela-mecanismos th {
        color: #888888;
        font-weight: 500;
        padding: 16px 20px;
        border-bottom: 1px solid #333333;
        border-left: 3px solid #c8b283;
    }

    .tabela-mecanismos td {
        padding: 18px 20px;
        border-bottom: 1px solid #222222;
        transition: background-color 0.2s ease;
    }

    .tabela-mecanismos .destaque-coluna {
        font-weight: 600;
        color: #ffffff;
    }

    .tabela-mecanismos tbody tr:hover td {
        background-color: rgba(255, 255, 255, 0.02);
    }

/* Tabelas de coluna única */
.tabela-fluxo {
    width: auto !important; /* Sobrescreve a largura de 100% */
    min-width: 240px; /* Mantém um tamanho mínimo elegante no mobile */
    margin: 32px auto !important; /* Centraliza a tabela na tela e mantém o respiro vertical */
}
/* ===== Share + tags bar ===== */

.article-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  max-width: 700px;
  margin: clamp(3rem, 6vw, 4rem) auto 0;
  padding: 1.6rem clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid rgba(240, 241, 242, .1);
  border-bottom: 1px solid rgba(240, 241, 242, .1);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.article-tag {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 241, 242, .18);
  font-size: .76rem;
  color: var(--text-dim);
}

.article-share {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.article-share__label {
  font-size: .78rem;
  color: var(--text-dim);
  margin-right: .3rem;
}
.article-share__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(240, 241, 242, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: border-color var(--dur-s), color var(--dur-s), background var(--dur-s);
}
.article-share__btn:hover {
  border-color: var(--c-gold);
  color: var(--c-gold-soft);
  background: rgba(191, 162, 107, .08);
}
.article-share__btn.is-copied {
  border-color: var(--c-gold);
  color: var(--c-gold-soft);
}

/* ===== Author box ===== */

.author-box {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 700px;
  margin: clamp(2rem, 4vw, 2.5rem) auto 0;
  padding: 1.5rem clamp(1.5rem, 4vw, 2rem);
}
.author-box__mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 10px;
  border-radius: 50%;
  background: rgba(191, 162, 107, .1);
  border: 1px solid rgba(191, 162, 107, .25);
  flex-shrink: 0;
}
.author-box__name {
  font-weight: 700;
  font-family: var(--f-display);
  margin-bottom: .3rem;
}
.author-box__bio {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ===== Related posts ===== */

.related-posts {
  max-width: 1160px;
  margin: clamp(3.5rem, 7vw, 5rem) auto 0;
  padding: 0 clamp(1.5rem, 4vw, 2rem);
}

.related-posts__title {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 1.6rem;
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 1.8rem);
}

.related-post-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(240, 241, 242, .1);
  transition: border-color var(--dur-s), transform var(--dur-s) var(--ease);
}
.related-post-card:hover {
  border-color: rgba(191, 162, 107, .35);
  transform: translateY(-3px);
}
.related-post-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}
.related-post-card div { padding: 1rem 1.1rem 1.3rem; }
.related-post-card__tag {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: .5rem;
}
.related-post-card h3 {
  font-size: .96rem;
  line-height: 1.4;
}

/* ===== Responsive ===== */

@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc {
    position: relative;
    top: 0;
    max-height: none;
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(240, 241, 242, .12);
    border-radius: 14px;
  }
  .article-toc a { border-left: none; padding-left: 0; }
}

@media (max-width: 720px) {
  .related-posts__grid { grid-template-columns: 1fr; }
  .article-footer-bar { flex-direction: column; align-items: flex-start; }
}

.article-figure img {
  cursor: zoom-in;
}

/* Lightbox */
.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.article-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Imagem ampliada */
.article-lightbox img {
  display: block;

  max-width: 92vw;
  max-height: 88vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 6px;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  transform: scale(0.94);
  opacity: 0;

  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;

  cursor: zoom-out;
}

.article-lightbox.active img {
  transform: scale(1);
  opacity: 1;
}

/* Botão fechar */
.article-lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
  color: #fff;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.article-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

/* Impede rolagem da página */
body.article-lightbox-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 768px) {
  .article-lightbox {
    padding: 15px;
  }

  .article-lightbox img {
    max-width: 96vw;
    max-height: 82vh;
    border-radius: 4px;
  }

  .article-lightbox-close {
    top: 15px;
    right: 15px;

    width: 38px;
    height: 38px;

    font-size: 24px;
  }
}
