/* ============================================================
   iAPU — CSS Principal (Dark Futurístico + Neon + Mobile First)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Space+Grotesk:wght@700&display=swap');

/* ── Variáveis ──────────────────────────────────────────── */
:root {
  --bg-deep:        #0a0a1a;
  --bg-card:        rgba(255,255,255,0.04);
  --bg-glass:       rgba(255,255,255,0.06);
  --borda-glass:    rgba(255,255,255,0.08);
  --neon-cyan:      #00f0ff;
  --neon-violet:    #a855f7;
  --neon-magenta:   #f472b6;
  --neon-green:     #34d399;
  --grad-hero:      linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --grad-neon:      linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  --grad-btn:       linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  --grad-cta:       linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
  --cor-texto:      #e4e4f0;
  --cor-texto-leve: #9ca3b4;
  --cor-titulo:     #ffffff;
  --fonte-base:     'Inter', system-ui, -apple-system, sans-serif;
  --fonte-display:  'Space Grotesk', 'Inter', sans-serif;
  --raio:           14px;
  --raio-lg:        20px;
  --sombra-neon:    0 0 30px rgba(0,240,255,.12), 0 0 60px rgba(168,85,247,.08);
  --sombra-card:    0 4px 30px rgba(0,0,0,.4);
  --transicao:      .3s cubic-bezier(.4,0,.2,1);
  --max-width:      1140px;
}

/* ── Animações ──────────────────────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,240,255,.3), 0 0 25px rgba(0,240,255,.1); }
  50%      { box-shadow: 0 0 20px rgba(0,240,255,.5), 0 0 50px rgba(0,240,255,.2); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fonte-base);
  background: var(--bg-deep);
  color: var(--cor-texto);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Fundo animado com partículas gradiente */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(0,240,255,.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(168,85,247,.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 60% 80%, rgba(244,114,182,.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--raio); }
a { color: var(--neon-cyan); text-decoration: none; transition: color var(--transicao); }
a:hover { color: #fff; }

/* ── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.2rem;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: rgba(10,10,26,.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--borda-glass);
  padding: .9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: var(--fonte-display);
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--grad-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  position: relative;
}
.logo::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--grad-neon);
  border-radius: 2px;
  opacity: .5;
}
.logo:hover { opacity: .85; }
.site-header nav { display: flex; gap: .75rem; align-items: center; }
.site-header nav a {
  color: var(--cor-texto-leve);
  font-size: .92rem;
  font-weight: 600;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--transicao);
}
.site-header nav a:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0,240,255,.06);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--grad-hero);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  text-align: center;
  padding: 4rem 1.2rem 3.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 300px at 30% 60%, rgba(0,240,255,.15) 0%, transparent 70%),
    radial-gradient(circle 250px at 70% 30%, rgba(168,85,247,.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--grad-neon);
  opacity: .5;
}
.hero h1 {
  font-family: var(--fonte-display);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: .6rem;
  animation: fadeUp .8s ease;
  position: relative;
}
.hero h1 .ai-tag {
  display: inline-block;
  background: var(--grad-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: rgba(255,255,255,.7);
  font-size: 1.1rem;
  animation: fadeUp .8s ease .15s both;
  position: relative;
}
.hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.2rem;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0,240,255,.25);
  background: rgba(0,240,255,.06);
  color: var(--neon-cyan);
  font-size: .85rem;
  font-weight: 600;
  animation: fadeUp .8s ease .3s both, glow 3s ease-in-out infinite;
  position: relative;
}
.hero .hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  position: relative;
}
.hero .hero-badge .dot::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ── Filtros ────────────────────────────────────────────── */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filtros a {
  background: var(--bg-glass);
  border: 1px solid var(--borda-glass);
  border-radius: 999px;
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--cor-texto-leve);
  transition: all var(--transicao);
  backdrop-filter: blur(8px);
}
.filtros a:hover,
.filtros a.ativo {
  background: rgba(0,240,255,.1);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0,240,255,.15);
}

/* ── Posts Grid ─────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 540px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--borda-glass);
  border-radius: var(--raio-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transicao);
  animation: fadeUp .6s ease both;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,240,255,.2);
  box-shadow: var(--sombra-neon);
}
.card img,
.card .img-placeholder {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
}
.img-placeholder {
  background: linear-gradient(135deg, rgba(0,240,255,.08), rgba(168,85,247,.08));
}
.card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .5rem;
}
.card-body h2 { font-size: 1rem; line-height: 1.5; }
.card-body h2 a { color: var(--cor-titulo); font-weight: 700; }
.card-body h2 a:hover { color: var(--neon-cyan); }
.cidade { font-size: .82rem; color: var(--cor-texto-leve); }
.resumo { font-size: .88rem; color: var(--cor-texto-leve); flex: 1; }

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: rgba(168,85,247,.12);
  color: var(--neon-violet);
  border: 1px solid rgba(168,85,247,.2);
  border-radius: 999px;
  padding: .2rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Botões ─────────────────────────────────────────────── */
.btn-ver {
  display: inline-block;
  margin-top: auto;
  padding: .55rem 1.2rem;
  background: var(--grad-neon);
  color: #0a0a1a;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  transition: all var(--transicao);
  text-align: center;
}
.btn-ver:hover {
  box-shadow: 0 0 20px rgba(0,240,255,.4);
  transform: scale(1.03);
  color: #0a0a1a;
}

.btn-cta {
  display: inline-block;
  padding: .85rem 2rem;
  background: var(--grad-cta);
  color: #0a0a1a;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  transition: all var(--transicao);
  letter-spacing: .3px;
}
.btn-cta:hover {
  box-shadow: 0 0 25px rgba(52,211,153,.4);
  transform: scale(1.04);
  color: #0a0a1a;
}

/* ── Post Single ────────────────────────────────────────── */
.post-single {
  max-width: 820px;
  margin: 2.5rem auto;
  padding-bottom: 3rem;
  animation: fadeUp .6s ease;
}
.post-single h1 {
  font-family: var(--fonte-display);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 900;
  color: var(--cor-titulo);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: .88rem;
  color: var(--cor-texto-leve);
}
.img-destaque { margin-bottom: 2rem; }
.img-destaque img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--raio-lg);
  border: 1px solid var(--borda-glass);
}
.post-content {
  font-size: 1.08rem;
  line-height: 1.9;
  margin-bottom: 2rem;
  color: var(--cor-texto);
}
.post-content p { margin-bottom: 1rem; }

/* ── Galeria ────────────────────────────────────────────── */
.galeria { margin: 2.5rem 0; }
.galeria h2 {
  color: var(--cor-titulo);
  margin-bottom: 1rem;
  font-family: var(--fonte-display);
}
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
@media (min-width: 640px) { .galeria-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .galeria-grid { grid-template-columns: repeat(4, 1fr); } }
.galeria-grid figure img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--borda-glass);
  transition: all .3s;
  cursor: zoom-in;
}
.galeria-grid figure img:hover {
  transform: scale(1.04);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0,240,255,.2);
}

/* ── CTA box ────────────────────────────────────────────── */
.cta-box {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(52,211,153,.15);
  border-radius: var(--raio-lg);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle 200px at 50% 50%, rgba(52,211,153,.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-box p {
  margin-bottom: .85rem;
  font-weight: 700;
  color: var(--cor-titulo);
  position: relative;
}

/* ── Posts relacionados ─────────────────────────────────── */
.relacionados {
  padding-top: 2.5rem;
  border-top: 1px solid var(--borda-glass);
}
.relacionados h2 {
  margin-bottom: 1.25rem;
  color: var(--cor-titulo);
  font-family: var(--fonte-display);
}
.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
@media (min-width: 640px) { .relacionados-grid { grid-template-columns: repeat(4, 1fr); } }
.card-rel {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--borda-glass);
  border-radius: var(--raio);
  overflow: hidden;
  font-size: .88rem;
  color: var(--cor-texto);
  transition: all var(--transicao);
  text-align: center;
}
.card-rel:hover {
  transform: translateY(-3px);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}
.card-rel img {
  width: 100%; height: 100px;
  object-fit: cover;
  border-radius: 0;
}
.card-rel span { padding: .6rem; display: block; font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: rgba(10,10,26,.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--borda-glass);
  text-align: center;
  padding: 2rem 1rem;
  font-size: .88rem;
  margin-top: 4rem;
  color: var(--cor-texto-leve);
}
.site-footer a { color: var(--neon-cyan); }
.site-footer .footer-brand {
  font-family: var(--fonte-display);
  font-size: 1.3rem;
  font-weight: 900;
  background: var(--grad-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: .5rem;
}

/* ── Empty state ────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--cor-texto-leve);
  grid-column: 1 / -1;
}

/* ── PWA install banner ─────────────────────────────────── */
#pwa-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,10,26,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--neon-cyan);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  gap: 1rem;
  z-index: 9999;
  box-shadow: 0 -4px 30px rgba(0,240,255,.15);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
#pwa-banner.show { transform: translateY(0); }
#pwa-banner p { font-size: .92rem; font-weight: 600; }
#pwa-banner .pwa-actions { display: flex; gap: .5rem; flex-shrink: 0; }
#pwa-banner button {
  padding: .5rem 1.1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 700;
  transition: all var(--transicao);
}
#btn-pwa-instalar {
  background: var(--grad-neon);
  color: #0a0a1a;
}
#btn-pwa-instalar:hover {
  box-shadow: 0 0 15px rgba(0,240,255,.4);
}
#btn-pwa-fechar {
  background: rgba(255,255,255,.08);
  color: var(--cor-texto-leve);
  border: 1px solid var(--borda-glass);
}

/* ── Lightbox ───────────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--raio);
  border: 1px solid var(--borda-glass);
}
#lightbox-close {
  position: absolute; top: 1.2rem; right: 1.5rem;
  color: #fff; font-size: 2.2rem; cursor: pointer;
  background: none; border: none; line-height: 1;
  opacity: .7; transition: opacity var(--transicao);
}
#lightbox-close:hover { opacity: 1; }

/* ── Desktop largo ──────────────────────────────────────── */
@media (min-width: 1024px) {
  .post-single { padding: 0 1rem 3rem; }
  .hero { padding: 5rem 1.5rem 4.5rem; }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .site-header, .filtros, .relacionados, .cta-box, .site-footer, #pwa-banner { display: none; }
  .post-single { max-width: 100%; }
  .card { border: 1px solid #ccc; }
}

/* ── SEO texto home ─────────────────────────────────────── */
.seo-texto {
  margin-top: 3rem;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(0,240,255,.1);
}
.seo-texto h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 1rem;
}
.seo-texto > .container > p {
  color: var(--texto-secundario);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.seo-card {
  background: rgba(15,15,40,.6);
  border: 1px solid rgba(0,240,255,.1);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
}
.seo-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #c8d6e5;
  margin-bottom: .5rem;
}
.seo-card p {
  font-size: .85rem;
  color: var(--texto-secundario);
  line-height: 1.65;
}
.seo-rodape {
  font-size: .82rem;
  color: #556;
  line-height: 1.6;
}

/* ── Footer parceria ────────────────────────────────────── */
.footer-parceria {
  font-size: .78rem;
  color: #556;
  margin-top: .5rem;
}
.footer-parceria a {
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 600;
}
.footer-parceria a:hover {
  text-decoration: underline;
}

/* ── PWA Install Banner ─────────────────────────────────── */
#pwa-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(0,240,255,.12), rgba(168,85,247,.12));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0,240,255,.25);
  z-index: 9999;
  animation: pwa-slide-up .4s ease-out;
}
@keyframes pwa-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#pwa-banner p {
  color: #e0e0f0;
  margin: 0;
  font-size: .95rem;
}
#pwa-banner .pwa-brand {
  background: linear-gradient(135deg, #00f0ff, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn-pwa-install {
  padding: .55rem 1.4rem;
  background: linear-gradient(135deg, #00f0ff, #a855f7);
  color: #080818;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn-pwa-install:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0,240,255,.4);
}
.btn-pwa-close {
  padding: .4rem .7rem;
  background: transparent;
  border: 1px solid rgba(0,240,255,.3);
  color: #8892b0;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.btn-pwa-close:hover {
  border-color: rgba(0,240,255,.6);
  color: #e0e0f0;
}

/* ── WhatsApp Float ─────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 58px;
  height: 58px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  z-index: 9998;
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
}
.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(37,211,102,.7);
}
