/* ==========================================================
   Blog Fernando Barra — CSS único, leve, sem frameworks
   Paleta alinhada ao site principal: azul corporativo + branco
   ========================================================== */

:root {
  --azul-escuro: #0a2540;
  --azul: #1e6feb;
  --azul-hover: #1557c0;
  --texto: #1f2937;
  --texto-suave: #55606e;
  --fundo: #ffffff;
  --fundo-suave: #f5f7fa;
  --borda: #e5e9f0;
  --max-largura: 760px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Piso de acessibilidade: foco de teclado visível em qualquer fundo.
   currentColor resolve para a cor do próprio link (azul no claro,
   azul-claro no cabeçalho/rodapé escuros), garantindo contraste. */
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}
.cta-box .botao:focus-visible,
.topo nav a.cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Respeita quem pediu menos movimento no sistema */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Cabeçalho ---------- */
.topo {
  background: var(--azul-escuro);
  color: #fff;
  padding: 0.9rem 1.25rem;
}
.topo-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topo .marca {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.topo .marca span { color: #7fb3ff; font-weight: 400; }
.topo nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.topo nav a {
  color: #d7e3f4;
  text-decoration: none;
  font-size: 0.95rem;
}
.topo nav a:hover { color: #fff; }
.topo nav a.cta {
  background: var(--azul);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}
.topo nav a.cta:hover { background: var(--azul-hover); }

/* ---------- Hero da home do blog ---------- */
.hero {
  background: linear-gradient(160deg, var(--azul-escuro) 0%, #123a6b 100%);
  color: #fff;
  padding: 3.25rem 1.25rem 0;
  overflow: hidden;
}
.hero-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: stretch;
}
.hero-texto { align-self: center; padding-bottom: 3.25rem; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.9rem; }
.hero p { color: #c3d4ea; font-size: 1.1rem; margin: 0 0 1.6rem; max-width: 30rem; }
.hero-cta {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
}
.hero-cta:hover { background: var(--azul-hover); }
.hero-foto { align-self: end; text-align: center; }
.hero-foto img { display: block; width: auto; max-width: 100%; max-height: 400px; margin: 0 auto; }

/* ---------- Container ---------- */
.container {
  max-width: var(--max-largura);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.container-largo { max-width: 1080px; }

/* ---------- Lista de artigos ---------- */
.lista-artigos { display: grid; gap: 1.5rem; }
.card-artigo {
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  background: #fff;
}
.card-artigo:hover {
  box-shadow: 0 6px 24px rgba(10, 37, 64, 0.10);
  transform: translateY(-2px);
}
.card-artigo h2 { font-size: 1.35rem; line-height: 1.35; margin-bottom: 0.4rem; }
.card-artigo h2 a { color: var(--azul-escuro); text-decoration: none; }
.card-artigo h2 a:hover { color: var(--azul); }
.card-artigo .meta { font-size: 0.85rem; color: var(--texto-suave); margin-bottom: 0.6rem; }
.card-artigo p { color: var(--texto-suave); font-size: 0.98rem; }
.card-artigo .ler-mais {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.card-artigo .ler-mais:hover { text-decoration: underline; }

/* ---------- Artigo ---------- */
article.post header { margin-bottom: 2rem; }
article.post .breadcrumb {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-bottom: 1.25rem;
}
article.post .breadcrumb a { color: var(--azul); text-decoration: none; }
article.post .breadcrumb a:hover { text-decoration: underline; }
article.post h1 {
  font-size: 2rem;
  line-height: 1.25;
  color: var(--azul-escuro);
  margin-bottom: 0.75rem;
}
article.post .meta { font-size: 0.9rem; color: var(--texto-suave); }
article.post .meta a { color: var(--azul); text-decoration: none; }

article.post h2 {
  font-size: 1.5rem;
  color: var(--azul-escuro);
  margin: 2.25rem 0 0.75rem;
  line-height: 1.3;
}
article.post h3 {
  font-size: 1.2rem;
  color: var(--azul-escuro);
  margin: 1.75rem 0 0.6rem;
}
article.post p { margin-bottom: 1.1rem; }
article.post ul, article.post ol { margin: 0 0 1.1rem 1.5rem; }
article.post li { margin-bottom: 0.4rem; }
article.post a { color: var(--azul); }
article.post img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.25rem 0;
}
article.post blockquote {
  border-left: 4px solid var(--azul);
  background: var(--fundo-suave);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--texto-suave);
}
article.post strong { color: var(--azul-escuro); }

/* ---------- Caixa CTA (palestras/treinamentos) ---------- */
.cta-box {
  background: linear-gradient(160deg, var(--azul-escuro) 0%, #123a6b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
}
.cta-box h2, .cta-box h3 { color: #fff !important; margin: 0 0 0.6rem !important; font-size: 1.4rem; }
.cta-box p { color: #c3d4ea; margin-bottom: 1.25rem; }
.cta-box .botao {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1.9rem;
  border-radius: 8px;
  font-size: 1rem;
}
.cta-box .botao:hover { background: var(--azul-hover); }

/* ---------- Caixa do autor ---------- */
.autor-box {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  background: var(--azul-escuro);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2.5rem 0 1rem;
}
.autor-box img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0;
  border: 3px solid rgba(255, 255, 255, 0.15);
}
.autor-box .nome { font-weight: 700; color: #fff; font-size: 1.2rem; }
.autor-box p { font-size: 0.92rem; color: #c3d4ea; margin: 0.35rem 0 0; }
.autor-box p em { color: #e6eefb; }
.autor-box a { color: #7fb3ff; }
.autor-box .autor-cta {
  margin-top: 0.9rem;
}
.autor-box .autor-cta a {
  font-weight: 600;
  text-decoration: none;
}
.autor-box .autor-cta a:hover { text-decoration: underline; color: #fff; }

/* ---------- Vídeo embutido (YouTube) ---------- */
.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.25rem 0 2rem;
}
.video-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* ---------- Compartilhar artigo ---------- */
.compartilhar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--borda);
}
.compartilhar .rotulo {
  font-size: 0.85rem;
  color: var(--texto-suave);
  margin-right: 0.25rem;
}
.compartilhar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--borda);
  border-radius: 8px;
  color: var(--texto-suave);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.compartilhar a:hover {
  color: var(--azul);
  border-color: var(--azul);
  background: var(--fundo-suave);
}
.compartilhar svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Artigos relacionados ---------- */
.relacionados { margin-top: 2.5rem; }
.relacionados h2 { font-size: 1.3rem; color: var(--azul-escuro); margin-bottom: 1rem; }
.relacionados ul { list-style: none; margin: 0; }
.relacionados li { margin-bottom: 0.6rem; }
.relacionados a { color: var(--azul); text-decoration: none; font-weight: 500; }
.relacionados a:hover { text-decoration: underline; }

/* ---------- Rodapé ---------- */
.rodape {
  background: var(--azul-escuro);
  color: #c3d4ea;
  margin-top: 3rem;
  padding: 2.5rem 1.25rem;
  font-size: 0.9rem;
}
.rodape-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.rodape a { color: #7fb3ff; text-decoration: none; }
.rodape a:hover { color: #fff; }
.rodape .copy { margin-top: 1.5rem; text-align: center; width: 100%; color: #8296ad; font-size: 0.82rem; }

/* ==========================================================
   Responsivo — mobile-first tuning (≤600px)
   Prioridades: navegação clara, alvos de toque ≥44px,
   CTAs largos, menos espaço desperdiçado. Sem novas cores/fontes.
   ========================================================== */
@media (max-width: 600px) {

  /* ----- Cabeçalho: marca centralizada, nav organizada, toque folgado ----- */
  .topo { padding: 0.75rem 1rem; }
  .topo-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .topo .marca { text-align: center; font-size: 1.1rem; }
  .topo nav {
    justify-content: center;
    gap: 0.25rem 0.5rem;   /* row-gap menor, itens têm padding próprio */
  }
  .topo nav a {
    padding: 0.55rem 0.7rem;      /* alvo de toque confortável */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
  }
  .topo nav a.cta { padding: 0.6rem 1.2rem; }

  /* ----- Hero: empilha texto → foto, centralizado ----- */
  .hero { padding: 2.25rem 1.25rem 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .hero-texto { align-self: auto; padding-bottom: 0; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; margin-left: auto; margin-right: auto; }
  .hero-cta { display: block; width: 100%; padding: 0.9rem 1rem; }
  .hero-foto { align-self: auto; }
  .hero-foto img { max-height: 300px; }

  /* ----- Container e cards: ganham largura útil de leitura ----- */
  .container { padding: 2rem 1.1rem; }
  .card-artigo { padding: 1.35rem 1.25rem; }
  .card-artigo h2 { font-size: 1.25rem; }
  .card-artigo .ler-mais { padding: 0.35rem 0; }  /* alvo de toque */

  /* ----- Artigo ----- */
  article.post h1 { font-size: 1.6rem; }
  article.post h2 { font-size: 1.3rem; }
  article.post blockquote { padding: 0.85rem 1rem; margin: 1.25rem 0; }

  /* ----- CTA: botão largo = alvo grande e conversão mais visível ----- */
  .cta-box { padding: 1.75rem 1.25rem; }
  .cta-box h2, .cta-box h3 { font-size: 1.25rem; }
  .cta-box .botao {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
  }

  /* ----- Caixa do autor: empilha e centraliza ----- */
  .autor-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  /* ----- Relacionados: alvos de toque maiores ----- */
  .relacionados a { display: inline-block; padding: 0.3rem 0; }

  /* ----- Compartilhar: alvos de toque 44px ----- */
  .compartilhar a { width: 44px; height: 44px; }

  /* ----- Rodapé: empilha limpo, alinhado à esquerda ----- */
  .rodape { padding: 2rem 1.25rem; }
  .rodape-inner { flex-direction: column; gap: 1.25rem; }
  .rodape a { display: inline-block; padding: 0.2rem 0; }
}
