/*
Theme Name: Kadence Child - GAV Digital
Template: kadence
Version: 2.0
Description: Tema filho customizado GAV Digital Blog
*/

/* =============================================
   VARIÁVEIS GLOBAIS
============================================= */
:root {
  --cor-navy: #0d1526;
  --cor-navy-hover: #1a2540;
  --cor-branco: #ffffff;
  --cor-fundo: #ffffff;
  --cor-fundo-alt: #f8f7f4;
  --cor-dourado: #c9a447;
  --cor-dourado-escuro: #a88530;
  --cor-preto: #111111;
  --cor-texto: #1a1a1a;
  --cor-cinza: #666666;
  --cor-cinza-claro: #f2f2f2;
  --cor-borda: #e8e8e8;
  --fonte-serif: 'Playfair Display', Georgia, serif;
  --fonte-titulo: 'Cormorant Garamond', Georgia, serif;
  --fonte-sans: 'Inter', system-ui, sans-serif;
  --max-width: 1200px;
  --max-width-post: 740px;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-sans);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--fonte-serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75em;
  color: var(--cor-preto);
}

p { margin: 0 0 1.5em; }

/* =============================================
   HEADER PRINCIPAL (navy escuro)
============================================= */
.site-header {
  background: var(--cor-navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}

/* Logo */
.site-branding {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-branding .custom-logo {
  height: 40px;
  width: auto;
}

.site-branding .custom-logo-link {
  display: flex;
  align-items: center;
}

.site-title {
  font-family: var(--fonte-titulo);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cor-branco);
  margin: 0;
}

.site-title a { color: var(--cor-dourado); }
.site-title a:hover { color: var(--cor-dourado-escuro); }

/* Nav do header */
.main-navigation { flex: 1; display: flex; justify-content: center; }

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-navigation ul li a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.main-navigation ul li a:hover {
  color: var(--cor-branco);
  background: rgba(255,255,255,0.08);
}

/* Botões do header */
.header-cta {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--cor-dourado);
  color: var(--cor-navy) !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 6px;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--cor-dourado-escuro); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--cor-branco) !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: var(--cor-branco);
  background: rgba(255,255,255,0.08);
}

/* =============================================
   NAV SECUNDÁRIA (categorias do blog)
============================================= */
.blog-nav {
  background: var(--cor-branco);
  border-bottom: 1px solid var(--cor-borda);
}

.blog-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.blog-nav-inner::-webkit-scrollbar { display: none; }

.blog-nav-inner a {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cor-cinza);
  padding: 14px 20px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.blog-nav-inner a:hover,
.blog-nav-inner a.active {
  color: var(--cor-preto);
  border-bottom-color: var(--cor-dourado);
}

.blog-nav-inner .blog-nav-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cor-preto);
  padding: 14px 20px 14px 0;
  border-right: 1px solid var(--cor-borda);
  margin-right: 8px;
  white-space: nowrap;
}

/* =============================================
   HOMEPAGE — HERO SECTION
============================================= */
.home-hero-section {
  text-align: center;
  padding: 64px 24px 48px;
  background: var(--cor-fundo);
}

.home-hero-section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--cor-preto);
  margin: 0 0 12px;
  font-family: var(--fonte-sans);
}

.home-hero-section h2 em {
  font-family: var(--fonte-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--cor-dourado);
}

.home-hero-section p {
  font-size: 1rem;
  color: var(--cor-cinza);
  margin: 0 auto;
  max-width: 560px;
}

/* =============================================
   HOMEPAGE — GRID DE POSTS
============================================= */
.home-posts-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}

/* Card de post */
.post-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--cor-branco);
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

.post-card-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cor-cinza-claro);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Badge de categoria */
.post-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cor-dourado-escuro);
  border: 1.5px solid var(--cor-dourado);
  padding: 3px 10px;
  border-radius: 4px;
  width: fit-content;
}

.post-card h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 700;
  color: var(--cor-preto);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card h3 a:hover { color: var(--cor-dourado-escuro); }

.post-card .post-meta {
  font-size: 0.8rem;
  color: var(--cor-cinza);
  margin-top: auto;
}

/* Botão do card */
.post-card-btn {
  display: block;
  background: var(--cor-dourado);
  color: var(--cor-navy) !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  padding: 12px 20px;
  margin: 0;
  transition: background 0.15s ease;
}

.post-card-btn:hover { background: var(--cor-dourado-escuro); }

/* =============================================
   ARTIGO — SINGLE POST
============================================= */
.single .site-main {
  max-width: var(--max-width-post);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--cor-borda);
}

.article-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cor-dourado-escuro);
  border: 1.5px solid var(--cor-dourado);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.entry-title,
.single .entry-title {
  font-family: var(--fonte-sans);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 24px;
  letter-spacing: -0.5px;
  color: var(--cor-preto);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--cor-cinza);
  flex-wrap: wrap;
}

.article-meta .author { font-weight: 600; color: var(--cor-preto); }
.article-meta .sep { color: var(--cor-borda); }

/* Imagem destacada */
.post-thumbnail,
.single .post-thumbnail {
  margin: 0 0 40px;
  border-radius: 8px;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}

/* Conteúdo */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #222;
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2.5em 0 0.75em;
  color: var(--cor-preto);
}

.entry-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2em 0 0.6em;
}

.entry-content p { margin: 0 0 1.6em; }

.entry-content ul, .entry-content ol {
  padding-left: 1.5em;
  margin: 0 0 1.6em;
}

.entry-content li { margin-bottom: 0.5em; }

.entry-content blockquote {
  border-left: 3px solid var(--cor-dourado);
  margin: 2em 0;
  padding: 16px 24px;
  background: #fdf9ef;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: #333;
}

.entry-content strong { color: var(--cor-preto); }

.entry-content a {
  color: var(--cor-dourado-escuro);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Barra de leitura */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--cor-dourado);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--cor-navy);
  color: var(--cor-branco);
  padding: 56px 32px 32px;
}

.footer-inner { max-width: var(--max-width); margin: 0 auto; }

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 28px;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand .site-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cor-branco);
  margin-bottom: 10px;
}

.footer-brand .footer-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
  max-width: 280px;
  line-height: 1.65;
}

.footer-links { display: flex; gap: 56px; }

.footer-col h4 {
  font-family: var(--fonte-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin: 0 0 18px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}

.footer-col ul li a:hover { color: var(--cor-dourado); }

.footer-bottom {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* =============================================
   RESPONSIVO
============================================= */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }
  .main-navigation { display: none; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .home-posts-section { padding-left: 20px; padding-right: 20px; }
  .footer-links { gap: 32px; }
}

@media (max-width: 520px) {
  .posts-grid { grid-template-columns: 1fr; }
  .home-hero-section { padding: 40px 20px 32px; }
  .single .site-main { padding: 32px 20px 64px; }
  .footer-top { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 28px; }
}
