/* ═══════════════════════════════════════════
   CAMPINAS NEWS BR — Article Template
   /news/style.css  (compartilhado entre todos os artigos)
═══════════════════════════════════════════ */

/* ── Tokens (mesmos da LP) ── */
:root {
  --yellow: #f5c500;
  --yellow-dk: #c9a000;
  --green: #8dc63f;
  --text: #0d0d0d;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f7f7f5;
  --border: #e5e7eb;
  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;
  --max-read: 720px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   READING PROGRESS BAR
═══════════════════════════════════════════ */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--green) 100%);
  z-index: 1001;
  width: 0%;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
  flex-shrink: 0;
}
.header-back:hover {
  color: var(--text);
}

.header-logo img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--pill);
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
  flex-shrink: 0;
}
.header-cta:hover {
  background: var(--yellow);
  color: var(--text);
}

/* ═══════════════════════════════════════════
   ARTICLE WRAPPER
═══════════════════════════════════════════ */
.article-wrap {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 52px 24px 80px;
}

/* ── Category ── */
.article-cat {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--pill);
  margin-bottom: 20px;
}

/* ── Title ── */
.article-title {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 20px;
}

/* ── Subtitle / deck ── */
.article-subtitle {
  font-size: 1.05rem;
  color: #374151;
  line-height: 1.65;
  margin-bottom: 28px;
  padding-left: 16px;
  border-left: 3px solid var(--yellow);
  font-weight: 400;
}

/* ── Byline ── */
.article-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.byline-left {
  display: flex;
  align-items: center;
  gap: 12px;

  display: none; /* desativado por enquanto, pois não temos avatar do autor */
}

.byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  /* border: 2px solid var(--yellow); */
  flex-shrink: 0;
}

.byline-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.byline-author {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.byline-info {
  font-size: 0.77rem;
  color: var(--muted);
}

/* ── Share buttons ── */
.share-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--pill);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.1s;
  white-space: nowrap;
}
.share-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.share-btn:hover {
  transform: translateY(-1px);
}
.share-btn--wa:hover {
  border-color: #25d366;
  background: #25d366;
  color: #fff;
}
.share-btn--x:hover {
  border-color: #000;
  background: #000;
  color: #fff;
}
.share-btn--copy:hover {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}
.share-btn--copy.copied {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

/* ═══════════════════════════════════════════
   SUMÁRIO ACCORDION
═══════════════════════════════════════════ */
.summary-box {
  background: #fffde7;
  border: 1.5px solid #e8c800;
  border-radius: var(--radius);
  margin-bottom: 40px;
  overflow: hidden;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  gap: 12px;
}

.summary-header-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.summary-icon {
  font-size: 1rem;
}

.summary-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.summary-box.open .summary-chevron {
  transform: rotate(180deg);
}

.summary-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.summary-box.open .summary-body {
  max-height: 500px;
}

.summary-list {
  padding: 4px 20px 20px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-list li {
  font-size: 0.87rem;
  line-height: 1.6;
  color: #374151;
  padding-left: 18px;
  position: relative;
}

.summary-list li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow-dk);
  position: absolute;
  left: 0;
  top: 0.48em;
  flex-shrink: unset;
}

/* ── Imagem de destaque ── */
.article-hero-img {
  margin-bottom: 40px;
}

.article-hero-img img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
}

.article-hero-img figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}

/* ═══════════════════════════════════════════
   ARTICLE BODY
═══════════════════════════════════════════ */
.article-body {
  font-size: 1.05rem;
  line-height: 1.88;
  color: #1f2937;
}

.article-body p {
  margin-bottom: 1.6em;
}

.article-body h2 {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 2.4em 0 0.8em;
  color: var(--text);
  line-height: 1.3;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
}

.article-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: var(--text);
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: var(--text);
}

/* ── Pull quote / blockquote ── */
.pull-quote {
  border-left: 4px solid var(--yellow);
  padding: 8px 0 8px 20px;
  margin: 2em 0;
  font-size: 1.05rem;
  font-style: italic;
  color: #374151;
  font-weight: 500;
  line-height: 1.7;
}

.pull-quote cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

/* ── Embed interativo (Flourish, Datawrapper, etc.) ── */
.article-embed {
  margin: 40px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.article-embed iframe {
  display: block;
  width: 100%;
  border: none;
}
.article-embed-caption {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 16px 10px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 2em 0;
}

.stat-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 0 !important;
}

/* ═══════════════════════════════════════════
   INLINE CTA (meio do artigo)
═══════════════════════════════════════════ */
.inline-cta {
  background: var(--text);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 2.4em 0;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.inline-cta::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(245, 197, 0, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.inline-cta-text {
  flex: 1;
}

.inline-cta-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.inline-cta-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.inline-cta-btn {
  flex-shrink: 0;
  background: var(--yellow);
  color: #000;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background 0.2s;
  position: relative;
  z-index: 1;
}
.inline-cta-btn:hover {
  background: var(--yellow-dk);
}

/* ═══════════════════════════════════════════
   TAGS
═══════════════════════════════════════════ */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2.5em;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 5px 13px;
  cursor: default;
}
.tag:hover {
  background: var(--bg-alt);
  color: var(--muted);
  border-color: var(--border);
}

/* ═══════════════════════════════════════════
   END CTA (fim do artigo)
═══════════════════════════════════════════ */
.end-cta {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--green) 100%);
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
  margin-top: 3em;
}

.end-cta-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 12px;
}

.end-cta-title {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.end-cta-sub {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.55);
  max-width: 380px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* ── Pill form (artigos) ── */
.pill-form {
  max-width: 420px;
  margin: 0 auto;
}

.pill-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 5px 5px 18px;
  transition:
    box-shadow 0.25s,
    border-color 0.25s,
    background 0.25s;
}
.pill-wrap:focus-within {
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
  border-color: var(--text);
  background: #fff;
}

.pill-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}
.pill-input::placeholder {
  color: rgba(0, 0, 0, 0.38);
}

.pill-btn {
  flex-shrink: 0;
  background: var(--text);
  color: var(--yellow);
  border: none;
  border-radius: var(--pill);
  padding: 11px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.pill-btn:hover {
  background: #222;
}
.pill-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.form-msg {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
}
.form-msg.ok {
  color: #166534;
}
.form-msg.err {
  color: #991b1b;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.article-footer {
  background: #0d0d0d;
  padding: 40px 24px 36px;
  text-align: center;
}

.footer-logo-art {
  height: 38px;
  width: auto;
  margin: 0 auto 10px;
  object-fit: contain;
}

.footer-tagline-art {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
  line-height: 1.5;
}

.footer-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yellow);
  transition: color 0.2s;
}
.footer-back-home:hover {
  color: #fff;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .article-wrap {
    padding: 32px 18px 64px;
  }
  .article-title {
    letter-spacing: -0.02em;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .inline-cta {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  .inline-cta-btn {
    width: 100%;
    text-align: center;
    padding: 13px;
  }
  .article-byline {
    gap: 12px;
  }
  .share-btn span {
    display: none;
  }
  .share-btn {
    padding: 7px 10px;
  }
  .header-cta span {
    display: none;
  }
  .header-cta {
    padding: 9px 14px;
  }
  .end-cta {
    padding: 32px 20px;
  }
}

@media (max-width: 400px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

/* ── Timeline de cronologia ── */
.article-timeline {
  margin: 40px 0;
  position: relative;
}
.article-timeline::before {
  content: '';
  position: absolute;
  left: 88px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--yellow-dk), var(--border));
}
.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0 24px;
  margin-bottom: 28px;
  position: relative;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-date {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--yellow-dk);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: right;
  padding-top: 2px;
  line-height: 1.3;
}
.timeline-dot {
  position: absolute;
  left: 82px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--yellow-dk);
  box-shadow: 0 0 0 3px var(--bg);
  z-index: 1;
}
.timeline-item.timeline-highlight .timeline-dot {
  background: #ef4444;
  border-color: #b91c1c;
  width: 16px;
  height: 16px;
  left: 81px;
  top: 3px;
}
.timeline-item.timeline-highlight .timeline-date {
  color: #b91c1c;
}
.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.timeline-item.timeline-highlight .timeline-content {
  border-color: #fca5a5;
  background: #fff5f5;
}
:root[data-theme='dark'] .timeline-item.timeline-highlight .timeline-content,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light'])
    .timeline-item.timeline-highlight
    .timeline-content {
    background: #2d1515;
    border-color: #7f1d1d;
  }
}
.timeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.4;
}
.timeline-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 540px) {
  .article-timeline::before {
    left: 64px;
  }
  .timeline-item {
    grid-template-columns: 64px 1fr;
    gap: 0 16px;
  }
  .timeline-date {
    font-size: 0.66rem;
  }
  .timeline-dot {
    left: 58px;
  }
  .timeline-item.timeline-highlight .timeline-dot {
    left: 57px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  .read-progress {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════
   EMAIL GATE
═══════════════════════════════════════════ */
.gate-content {
  position: relative;
}

/* Estado bloqueado: mostra apenas um trecho borrado como "peek" */
.gate-content.locked {
  max-height: 160px;
  overflow: hidden;
}

/* Fade na borda inferior do peek */
.gate-content.locked::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.gate-content.locked > *:not(.gate-overlay) {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

/* Overlay: position fixed para sair do overflow: hidden do pai */
.gate-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 0;
}

.gate-box {
  max-width: 460px;
  width: 100%;
  text-align: center;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.gate-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow-dk);
  margin-bottom: 8px;
}

.gate-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.gate-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Estado desbloqueado */
.gate-content.unlocked {
  max-height: none;
  overflow: visible;
}
.gate-content.unlocked::after {
  display: none;
}
.gate-content.unlocked > * {
  filter: none !important;
  user-select: auto !important;
  pointer-events: auto !important;
}
