﻿/* =============================================
   IAPI Consultoria BLOG — blog.css v1.0
   ============================================= */

/* --- Variáveis (espelha o site principal) --- */
:root {
  --purple:    #6366f1;
  --purple-l:  #818cf8;
  --cyan:      #06b6d4;
  --green:     #10b981;
  --amber:     #f59e0b;
  --red:       #ef4444;
  --bg:        #03040c;
  --bg-card:   rgba(13,15,32,.85);
  --border:    rgba(255,255,255,.08);
  --border-l:  rgba(255,255,255,.12);
  --text:      #f1f5f9;
  --text-muted:#94a3b8;
  --font:      'Inter', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --radius:    16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }

/* --- Botões --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 50px; font-family: var(--font); font-weight: 700; font-size: .9rem; cursor: pointer; border: none; transition: all .25s ease; text-decoration: none; }
.btn--primary { background: linear-gradient(135deg, var(--purple), #4f46e5); color: #fff; box-shadow: 0 4px 24px rgba(99,102,241,.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,.5); }
.btn--lg { padding: 16px 36px; font-size: 1rem; }
.btn--outline { background: transparent; border: 1px solid var(--border-l); color: var(--text); }
.btn--outline:hover { border-color: var(--purple); color: var(--purple-l); }

/* --- Gradient text --- */
.gradient-text { background: linear-gradient(135deg, var(--purple-l), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* --- Section badge --- */
.section-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25); color: var(--purple-l); padding: 6px 18px; border-radius: 50px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 20px; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 0; transition: all .35s ease; }
.navbar.scrolled { background: rgba(3,4,12,.88); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); padding: 10px 0; }
.navbar__inner { display: flex; align-items: center; gap: 32px; }
.navbar__logo { display: flex; align-items: center; }
.navbar__logo-img { height: 90px; width: auto; object-fit: contain; }
.navbar.scrolled .navbar__logo-img { height: 48px; }
.navbar__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.navbar__links a { color: var(--text-muted); font-size: .9rem; font-weight: 500; transition: color .2s; position: relative; }
.navbar__links a:hover, .navbar__links a.active { color: #fff; }
.navbar__blog-link { color: var(--cyan) !important; border: 1px solid rgba(6,182,212,.35); border-radius: 6px; padding: 5px 14px !important; font-weight: 600 !important; transition: color .2s, background .2s, border-color .2s !important; }
.navbar__blog-link:hover { color: #fff !important; background: rgba(6,182,212,.15); border-color: var(--cyan); }
.navbar__cta { margin-left: 12px; padding: 9px 22px; font-size: .85rem; }
.navbar__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; margin-left: auto; padding: 4px; }
.navbar__toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }

/* =============================================
   BLOG HERO
   ============================================= */
.blog-hero { padding: 140px 0 80px; position: relative; overflow: hidden; text-align: center; }
.blog-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.bh-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .18; }
.bh-orb--1 { width: 500px; height: 500px; background: var(--purple); top: -100px; left: -100px; }
.bh-orb--2 { width: 400px; height: 400px; background: var(--cyan); bottom: -80px; right: -80px; }
.blog-hero__inner { position: relative; z-index: 2; }
.blog-hero__title { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 16px; }
.blog-hero__desc { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto 36px; line-height: 1.7; }

/* --- Busca --- */
.blog-search { position: relative; max-width: 520px; margin: 0 auto; }
.blog-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.blog-search input { width: 100%; padding: 16px 20px 16px 50px; background: rgba(255,255,255,.05); border: 1px solid var(--border-l); border-radius: 50px; color: var(--text); font-family: var(--font); font-size: .95rem; outline: none; transition: border-color .2s, background .2s; }
.blog-search input:focus { border-color: var(--purple); background: rgba(99,102,241,.07); }
.blog-search input::placeholder { color: var(--text-muted); }
.blog-search__results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: rgba(13,15,32,.98); border: 1px solid var(--border-l); border-radius: var(--radius); overflow: hidden; z-index: 100; display: none; }
.blog-search__results.active { display: block; }
.search-result-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; cursor: pointer; transition: background .15s; border-bottom: 1px solid var(--border); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(99,102,241,.08); }
.search-result-item__cat { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--purple-l); white-space: nowrap; padding-top: 2px; }
.search-result-item__title { font-size: .88rem; color: var(--text); }

/* =============================================
   CATEGORIAS
   ============================================= */
.categorias { padding: 0 0 40px; }
.cat-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat-btn { padding: 8px 20px; border-radius: 50px; border: 1px solid var(--border-l); background: transparent; color: var(--text-muted); font-family: var(--font); font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.cat-btn:hover { border-color: var(--purple); color: var(--purple-l); }
.cat-btn.active { background: rgba(99,102,241,.15); border-color: var(--purple); color: var(--purple-l); }

/* =============================================
   POSTS GRID
   ============================================= */
.posts-section { padding: 0 0 100px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
  backdrop-filter: blur(16px);
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(99,102,241,.3); box-shadow: 0 20px 56px rgba(99,102,241,.12); }
.post-card--featured { grid-column: 1 / -1; flex-direction: column; }

.post-card__badge {
  display: inline-block; padding: 5px 14px; border-radius: 50px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin: 24px 24px 0;
  align-self: flex-start;
}
.badge--marcas  { background: rgba(99,102,241,.12); color: var(--purple-l); border: 1px solid rgba(99,102,241,.25); }
.badge--ia      { background: rgba(6,182,212,.12);  color: var(--cyan);     border: 1px solid rgba(6,182,212,.25); }
.badge--inpi    { background: rgba(245,158,11,.12); color: var(--amber);    border: 1px solid rgba(245,158,11,.25); }
.badge--dados   { background: rgba(16,185,129,.12); color: var(--green);    border: 1px solid rgba(16,185,129,.25); }
.badge--patentes{ background: rgba(239,68,68,.12);  color: #f87171;         border: 1px solid rgba(239,68,68,.25); }

.post-card__content { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-card__cover { width: 100%; height: 180px; object-fit: cover; display: block; border-radius: 10px 10px 0 0; margin-bottom: -12px; }
.post-card--featured .post-card__cover { height: 240px; }
.post-card__meta { display: flex; gap: 16px; flex-wrap: wrap; }
.post-date, .post-time { font-size: .78rem; color: var(--text-muted); }
.post-card__title { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.post-card--featured .post-card__title { font-size: 1.4rem; }
.post-card__excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.7; flex: 1; }
.post-card__link { display: inline-flex; align-items: center; gap: 6px; color: var(--purple-l); font-size: .88rem; font-weight: 700; transition: gap .2s; margin-top: 4px; }
.post-card__link:hover { gap: 10px; }

/* Sem resultados */
.no-results { text-align: center; padding: 60px 0; color: var(--text-muted); font-size: 1.05rem; }

@media (max-width: 900px) { .posts-grid { grid-template-columns: 1fr 1fr; } .post-card--featured { grid-column: 1/-1; } }
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-card--featured { flex-direction: column; }
}

/* =============================================
   CTA BANNER
   ============================================= */
.blog-cta { background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(6,182,212,.08)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 72px 0; }
.blog-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.blog-cta__title { font-family: var(--font-head); font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800; margin-bottom: 8px; }
.blog-cta__desc { color: var(--text-muted); font-size: .95rem; }

/* =============================================
   FOOTER
   ============================================= */
.footer { padding: 60px 0 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; gap: 60px; flex-wrap: wrap; padding-bottom: 48px; }
.footer__links { display: flex; gap: 48px; }
.footer__links a { display: block; color: var(--text-muted); font-size: .88rem; margin-bottom: 10px; transition: color .2s; }
.footer__links a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid var(--border); }

/* =============================================
   WHATSAPP
   ============================================= */
.whatsapp-float { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; align-items: center; gap: 10px; background: #25D366; color: #fff; font-weight: 700; font-size: .88rem; padding: 13px 22px 13px 16px; border-radius: 50px; box-shadow: 0 6px 32px rgba(37,211,102,.45); transition: transform .28s ease; text-decoration: none; }
.whatsapp-float svg { width: 26px; height: 26px; flex-shrink: 0; }
.whatsapp-float:hover { transform: translateY(-3px); }
@media (max-width: 500px) { .whatsapp-float { padding: 13px; } .whatsapp-float span { display: none; } }

/* =============================================
   MOBILE
   ============================================= */
@media (max-width: 700px) {
  .navbar__links, .navbar__cta { display: none; }
  .navbar__toggle { display: flex; }
  .navbar__links.open { display: flex; flex-direction: column; position: fixed; top: 70px; left: 0; right: 0; background: rgba(3,4,12,.96); backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); padding: 24px; gap: 20px; z-index: 999; }
  .blog-hero { padding: 110px 0 60px; }
  .blog-cta__inner { flex-direction: column; text-align: center; }
  .footer__inner { flex-direction: column; gap: 32px; }
  .footer__links { flex-direction: column; gap: 20px; }
}

/* =============================================
   ARTIGO — LEITURA
   ============================================= */
.article-hero { padding: 130px 0 60px; border-bottom: 1px solid var(--border); }
.article-hero__inner { max-width: 760px; margin: 0 auto; }
.article-hero__back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: .85rem; margin-bottom: 28px; transition: color .2s; }
.article-hero__back:hover { color: #fff; }
.article-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.article-hero__title { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 20px; }
.article-hero__excerpt { font-size: 1.1rem; color: var(--text-muted); line-height: 1.75; }

/* Corpo do artigo */
.article-body { padding: 60px 0 80px; }
.article-content { max-width: 760px; margin: 0 auto; font-size: 1.02rem; line-height: 1.85; color: #cbd5e1; }
.article-content h2 { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--text); margin: 48px 0 18px; letter-spacing: -.02em; }
.article-content h3 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 32px 0 12px; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 20px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content a { color: var(--purple-l); text-decoration: underline; text-decoration-color: rgba(129,140,248,.3); }
.article-content a:hover { text-decoration-color: var(--purple-l); }
.article-content blockquote { border-left: 3px solid var(--purple); padding: 16px 24px; background: rgba(99,102,241,.07); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 28px 0; color: var(--text); font-style: italic; }
.article-content .highlight-box { background: rgba(6,182,212,.07); border: 1px solid rgba(6,182,212,.2); border-radius: var(--radius); padding: 24px 28px; margin: 32px 0; }
.article-content code { background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 6px; font-family: 'Courier New', monospace; font-size: .88rem; color: #a5f3fc; }

/* CTA artigo */
.article-cta { max-width: 760px; margin: 0 auto 80px; padding: 40px; background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(6,182,212,.06)); border: 1px solid rgba(99,102,241,.2); border-radius: var(--radius); text-align: center; }
.article-cta h3 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.article-cta p { color: var(--text-muted); margin-bottom: 24px; }
