/* ==========================================================================
   ULTRA MARKETING — BLOG STYLESHEET (VANILLA / ZERO-BUILD)
   Arquitetura: CSS Grid, Flexbox, Variáveis CSS, Clamp() fluido
   Breakpoints: 1120px, 980px, 760px, 440px
   Tipografia: Família Inter WOFF2 Local com pesos variáveis
   ========================================================================== */

/* ── TIPOGRAFIA INTER LOCAL (WOFF2 VARIÁVEL) ── */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-variable.woff2') format('woff2-variations'),
       url('../fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-variable.woff2') format('woff2-variations'),
       url('../fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── DESIGN TOKENS E VARIÁVEIS (PADRÃO TEMA CLARO) ── */
:root {
  --green: #11bc01;
  --green2: #109e01;
  --green-glow: #00ff00;
  --dark: #0d0f0d;
  --dark2: #141614;
  --dark3: #1a1d1a;
  --white: #ffffff;
  --gray: #888888;
  --gray2: #555555;
  --light: #f2f3f0;
  --font: 'Inter', 'Inter Variable', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Padrão Light Theme (Regra 1: light por padrão) */
  --bg-primary: #f6f8f6;
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf1ed;
  --bg-card: #ffffff;
  --text-primary: #0f110f;
  --text-secondary: #3b423b;
  --text-muted: #626e62;
  --color-border: rgba(17, 188, 1, 0.15);
  --border: rgba(0, 0, 0, 0.08);
  --link-color: #0f110f;
  --logo-filter: brightness(0.08);

  /* Espaçamentos fluidos */
  --max-width: 1200px;
  --header-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Modo Escuro (Ativado apenas se selecionado explicitamente) */
html[data-theme="dark"]:not(.light-theme),
html:not(.light-theme) {
  /* Se não tiver a classe light-theme nem atributo light */
}

html[data-theme="dark"] {
  --bg-primary: #0d0f0d;
  --bg-secondary: #141614;
  --bg-tertiary: #1a1d1a;
  --bg-card: #141614;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #888888;
  --color-border: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --link-color: #ffffff;
  --logo-filter: none;
}

/* Forçado Claro */
html.light-theme,
html[data-theme="light"] {
  --bg-primary: #f6f8f6;
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf1ed;
  --bg-card: #ffffff;
  --text-primary: #0f110f;
  --text-secondary: #3b423b;
  --text-muted: #626e62;
  --color-border: rgba(17, 188, 1, 0.15);
  --border: rgba(0, 0, 0, 0.08);
  --link-color: #0f110f;
  --logo-filter: brightness(0.08);
}

/* ── RESET BÁSICO ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── ANNOUNCEMENT BAR ── */
.ann-bar {
  background: var(--green);
  text-align: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #0d0f0d;
  letter-spacing: 0.2px;
}

/* ── CABEÇALHO DO BLOG ── */
header.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-link img {
  height: 36px;
  width: auto;
  max-width: 220px;
  max-height: 40px;
  object-fit: contain;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--green);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background-color 0.2s;
}

.nav-dropdown-btn:hover {
  color: var(--green);
  background: rgba(17, 188, 1, 0.08);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: background-color 0.15s;
}

.nav-dropdown-item:hover {
  background: rgba(17, 188, 1, 0.08);
}

.nav-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(17, 188, 1, 0.12);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item-text {
  display: flex;
  flex-direction: column;
}

.nav-item-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.nav-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  color: var(--green);
  background: rgba(17, 188, 1, 0.1);
}

/* Botões */
.btn-green {
  background: var(--green);
  color: #0d0f0d !important;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-green:hover {
  background: var(--green2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(17, 188, 1, 0.35);
}

/* ── ÍNDICE DO BLOG (BLOG-INDEX) ── */
.blog-index {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: clamp(2.5rem, 2rem + 2vw, 4.5rem) clamp(1rem, 0.8rem + 1.5vw, 2.5rem);
}

.hero-tag {
  background: rgba(17, 188, 1, 0.1);
  color: var(--green);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(17, 188, 1, 0.2);
}

.blog-index h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  margin-bottom: 0.75rem;
  font-weight: 850;
  letter-spacing: -1.5px;
  line-height: 1.15;
}

.blog-sub {
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  margin-bottom: 3.5rem;
  max-width: 720px;
  line-height: 1.6;
}

/* Grid de Artigos */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.25rem, 1rem + 1vw, 2rem);
  margin-top: 2rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 188, 1, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.post-card-img-link {
  display: block;
  overflow: hidden;
  position: relative;
  height: 210px;
  background: var(--bg-tertiary);
}

.post-card-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-img-link img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-body time {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  display: block;
}

.post-card-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.25rem 0 0.85rem;
  line-height: 1.35;
}

.post-card-body h2 a {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.post-card-body h2 a:hover {
  color: var(--green);
}

.post-card-body p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  transition: transform 0.2s;
  margin-top: auto;
}

.read-more:hover {
  transform: translateX(4px);
}

/* ── ARTIGO DO BLOG (BLOG-POST) ── */
.blog-post {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 1.5rem + 1.8vw, 3.5rem) clamp(1rem, 0.8rem + 1.5vw, 2rem) 1rem;
}

.post-back-link {
  color: var(--green);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.25rem;
  transition: transform 0.2s;
}

.post-back-link:hover {
  transform: translateX(-3px);
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: clamp(1.85rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.25;
  margin: 0.75rem 0 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  word-break: break-word;
}

.post-meta {
  display: flex;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.post-meta strong {
  color: var(--text-primary);
}

.post-hero {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: block;
  margin-bottom: 2rem;
}

/* Conteúdo do Artigo */
.post-content {
  line-height: 1.8;
  font-size: 1.075rem;
  color: var(--text-secondary);
}

.post-content h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem);
  margin: 2.75rem 0 1rem;
  color: var(--text-primary);
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.post-content h3 {
  font-size: clamp(1.2rem, 1rem + 0.6vw, 1.45rem);
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
  font-weight: 650;
}

.post-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.post-content strong {
  color: var(--green);
}

.post-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color 0.15s;
}

.post-content a:hover {
  color: var(--text-primary);
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--green);
  font-style: italic;
  color: var(--text-primary);
  margin: 2rem 0;
  background: var(--bg-tertiary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.post-content th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 650;
}

.post-content tr:nth-child(even) {
  background: var(--bg-tertiary);
}

.post-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin: 2rem 0;
  display: block;
  object-fit: cover;
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Callout Box / Key Takeaways */
.key-takeaways {
  background: rgba(17, 188, 1, 0.07);
  border: 1px solid rgba(17, 188, 1, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2rem;
}

.key-takeaways-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.key-takeaways ul {
  margin: 0;
  list-style: none;
  padding-left: 0;
}

.key-takeaways li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.key-takeaways li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

/* ── RODAPÉ UNIFICADO ── */
footer.blog-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 50px 20px;
  margin-top: auto;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-logos img {
  height: auto;
  width: 100%;
  max-width: 220px;
  max-height: 40px;
  object-fit: contain;
  display: block;
}

.footer-tagline {
  color: var(--text-muted);
  max-width: 620px;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.footer-nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.footer-nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.15s;
}

.footer-nav-links a:hover {
  color: var(--green);
}

.footer-copy {
  color: var(--text-muted);
  opacity: 0.75;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ── BREAKPOINTS RESPONSIVOS (1120px, 980px, 760px, 440px) ── */
@media (max-width: 1120px) {
  header.site-header {
    padding: 0 28px;
  }
}

@media (max-width: 980px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  header.site-header {
    padding: 0 20px;
  }
  .hide-on-mobile {
    display: none !important;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .blog-index {
    padding: 2.5rem 1.25rem;
  }
}

@media (max-width: 440px) {
  header.site-header {
    padding: 0 14px;
  }
  .logo-link img {
    max-width: 150px;
  }
  .blog-index h1 {
    font-size: 1.85rem;
  }
}
