/* ==============================================
   Agência MBE — Theme CSS
   ============================================== */

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background-color: #131315;
  color: #e5e1e4;
  -webkit-font-smoothing: antialiased;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* Utilities */
.glass-nav {
  background: rgba(19, 19, 21, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.neon-glow {
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.45);
}

.ambient-glow {
  box-shadow: 0 0 40px rgba(195, 192, 255, 0.055);
}

.ambient-glow:hover {
  box-shadow: 0 0 60px rgba(195, 192, 255, 0.10);
}

/* Selection */
::selection {
  background-color: rgba(195, 192, 255, 0.25);
  color: #c3c0ff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #131315; }
::-webkit-scrollbar-thumb { background: #464555; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c3c0ff; }

/* ── Navigation ─────────────────────────── */
#mbe-nav { transition: all 0.3s ease; }
#mbe-nav.scrolled { box-shadow: 0 1px 40px rgba(0,0,0,0.6); }

/* Mobile menu */
#mbe-mobile-menu {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
#mbe-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Blog Card ──────────────────────────── */
.mbe-blog-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.mbe-blog-card:hover {
  transform: translateY(-4px);
}
.mbe-blog-card .card-image {
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}
.mbe-blog-card .card-image img {
  transition: transform 0.5s ease;
}
.mbe-blog-card:hover .card-image img {
  transform: scale(1.05);
}

/* ── Blog Content (single post) ─────────── */
.mbe-post-content {
  font-size: 1.075rem;
  line-height: 1.8;
  color: #c7c4d8;
}

.mbe-post-content h2,
.mbe-post-content h3,
.mbe-post-content h4 {
  color: #e5e1e4;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.mbe-post-content h2 { font-size: 1.65rem; }
.mbe-post-content h3 { font-size: 1.35rem; }

.mbe-post-content p { margin-bottom: 1.5rem; }

.mbe-post-content a {
  color: #c3c0ff;
  text-decoration: underline;
  text-decoration-color: rgba(195,192,255,0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.mbe-post-content a:hover { text-decoration-color: #c3c0ff; }

.mbe-post-content blockquote {
  border-left: 3px solid #4f46e5;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #1c1b1d;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: #e5e1e4;
}

.mbe-post-content ul,
.mbe-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.mbe-post-content ul { list-style-type: disc; }
.mbe-post-content ol { list-style-type: decimal; }
.mbe-post-content li { margin-bottom: 0.5rem; }

.mbe-post-content pre {
  background: #1c1b1d;
  border: 1px solid #464555;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.mbe-post-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  color: #c3c0ff;
  background: rgba(195,192,255,0.08);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}
.mbe-post-content pre code {
  background: none;
  color: #e5e1e4;
  padding: 0;
}

.mbe-post-content img {
  border-radius: 1rem;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 2rem auto;
  display: block;
}

.mbe-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.mbe-post-content th {
  background: #1c1b1d;
  color: #e5e1e4;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #464555;
  text-align: left;
}
.mbe-post-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(70,69,85,0.4);
  color: #c7c4d8;
}

/* ── Tags ───────────────────────────────── */
.mbe-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(70,69,85,0.4);
  color: #c7c4d8;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.mbe-tag:hover {
  border-color: rgba(195,192,255,0.5);
  color: #c3c0ff;
}

/* ── Comments ───────────────────────────── */
.comment-body {
  background: #1c1b1d;
  border: 1px solid rgba(70,69,85,0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.comment-author img { border-radius: 9999px; }

/* ── Animations ─────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease forwards; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(195,192,255,0.3); }
  70%  { box-shadow: 0 0 0 12px rgba(195,192,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(195,192,255,0); }
}
.pulse-ring { animation: pulse-ring 2s infinite; }

/* ── Pagination ─────────────────────────── */
.mbe-pagination a,
.mbe-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.mbe-pagination .current {
  background: #4f46e5;
  color: #dad7ff;
  font-weight: 700;
}
.mbe-pagination a {
  border: 1px solid rgba(70,69,85,0.3);
  color: #c7c4d8;
}
.mbe-pagination a:hover {
  border-color: rgba(195,192,255,0.5);
  color: #c3c0ff;
}

/* ── Sticky sidebar ─────────────────────── */
@media (min-width: 1024px) {
  .mbe-sidebar-sticky {
    position: sticky;
    top: 7rem;
  }
}

/* ── CTA gradient ───────────────────────── */
.mbe-cta-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #0240ac 100%);
}

/* ── Nuvem de Serviços (Hero) ───────────── */
.mbe-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: mbeFloat var(--float-dur, 6s) ease-in-out infinite var(--float-delay, 0s);
  letter-spacing: 0.01em;
}
.mbe-tag:hover {
  transform: translateY(-5px) scale(1.07) !important;
  z-index: 10;
}
/* ── Nuvem de tags — 4 tiers com contraste visual distinto ── */

/* Tier 1 — destaque: fundo sólido indigo, texto branco, glow forte */
.mbe-tag--accent {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  border: 1.5px solid rgba(196,181,253,0.5);
  color: #ffffff;
  font-size: 14px;
  padding: 12px 20px;
  box-shadow: 0 0 32px rgba(79,70,229,0.55), inset 0 1px 0 rgba(255,255,255,0.12);
  --float-dur: 7s;
}

/* Tier 2 — semi-preenchido: borda colorida, cor mais clara, glow leve */
.mbe-tag--primary {
  background: rgba(79,70,229,0.22);
  border: 1.5px solid rgba(139,92,246,0.7);
  color: #e0d9ff;
  font-size: 13px;
  padding: 10px 18px;
  box-shadow: 0 0 16px rgba(109,40,217,0.25);
  --float-dur: 5.5s;
  --float-delay: 0.8s;
}

/* Tier 3 — outline: só borda visível, fundo quase transparente */
.mbe-tag--secondary {
  background: rgba(30,27,75,0.55);
  border: 1px solid rgba(99,102,241,0.5);
  color: #a5b4fc;
  font-size: 12px;
  padding: 9px 15px;
  --float-dur: 6.5s;
}

/* Tier 4 — fantasma: fundo escuro, texto apagado — periféricos */
.mbe-tag--muted {
  background: rgba(17,16,40,0.7);
  border: 1px solid rgba(75,85,99,0.4);
  color: #6b7280;
  font-size: 11px;
  padding: 7px 13px;
  --float-dur: 8s;
}

/* Uptime — tag especial com ponto pulsante */
.mbe-tag--uptime {
  background: rgba(16,185,129,0.12);
  border: 1.5px solid rgba(52,211,153,0.45);
  color: #6ee7b7;
  font-size: 12px;
  font-family: monospace;
  padding: 8px 14px;
  box-shadow: 0 0 14px rgba(16,185,129,0.18);
  --float-dur: 9s;
  --float-delay: 1.6s;
}
.mbe-uptime-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
  animation: uptimePulse 2s ease-in-out infinite;
}
@keyframes uptimePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.7); }
  50%       { box-shadow: 0 0 0 5px rgba(52,211,153,0); }
}
@keyframes mbeFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* delay por data-delay attr via inline style */
.mbe-tag[data-delay="0.3"]  { --float-delay: 0.3s; }
.mbe-tag[data-delay="0.5"]  { --float-delay: 0.5s; }
.mbe-tag[data-delay="0.8"]  { --float-delay: 0.8s; }
.mbe-tag[data-delay="1"]    { --float-delay: 1s; }
.mbe-tag[data-delay="1.1"]  { --float-delay: 1.1s; }
.mbe-tag[data-delay="1.2"]  { --float-delay: 1.2s; }
.mbe-tag[data-delay="1.5"]  { --float-delay: 1.5s; }
.mbe-tag[data-delay="1.8"]  { --float-delay: 1.8s; }
.mbe-tag[data-delay="2"]    { --float-delay: 2s; }
.mbe-tag[data-delay="2.2"]  { --float-delay: 2.2s; }
.mbe-tag[data-delay="2.5"]  { --float-delay: 2.5s; }
.mbe-tag[data-delay="2.8"]  { --float-delay: 2.8s; }

}

/* ══════════════════════════════════════════════
   NUVEM DE TAGS — Mobile orgânico + Desktop float
   ══════════════════════════════════════════════ */

/* Float mais amplo e variado no desktop */
@keyframes mbeFloat {
  0%   { transform: translateY(0px) rotate(0deg); }
  25%  { transform: translateY(-14px) rotate(0.4deg); }
  50%  { transform: translateY(-8px) rotate(-0.3deg); }
  75%  { transform: translateY(-18px) rotate(0.2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes mbeFloatB {
  0%   { transform: translateY(0px) translateX(0px); }
  33%  { transform: translateY(-12px) translateX(4px); }
  66%  { transform: translateY(-6px) translateX(-3px); }
  100% { transform: translateY(0px) translateX(0px); }
}
@keyframes mbeFloatC {
  0%   { transform: translateY(0px) scale(1); }
  40%  { transform: translateY(-16px) scale(1.02); }
  80%  { transform: translateY(-5px) scale(0.99); }
  100% { transform: translateY(0px) scale(1); }
}

/* Alterna animações entre as tags para mais variedade */
.mbe-tag--accent  { animation-name: mbeFloatC; }
.mbe-tag--primary { animation-name: mbeFloatB; }
.mbe-tag--secondary:nth-child(odd)  { animation-name: mbeFloat; }
.mbe-tag--secondary:nth-child(even) { animation-name: mbeFloatC; }
.mbe-tag--muted:nth-child(odd)  { animation-name: mbeFloatB; }
.mbe-tag--muted:nth-child(even) { animation-name: mbeFloat; }

/* Glow pulsante no accent */
@keyframes mbeGlow {
  0%, 100% { box-shadow: 0 0 32px rgba(79,70,229,0.55), inset 0 1px 0 rgba(255,255,255,0.12); }
  50%       { box-shadow: 0 0 52px rgba(79,70,229,0.85), 0 0 80px rgba(109,40,217,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
}
.mbe-tag--accent {
  animation: mbeFloatC var(--float-dur, 7s) ease-in-out infinite var(--float-delay, 0s),
             mbeGlow 3s ease-in-out infinite;
}

/* ── Mobile: posicionamento via JS (classe .mbe-cloud-mobile-ready) ── */
.mbe-cloud-mobile-ready {
  position: relative !important;
  height: 420px !important;
  overflow: visible;
}
.mbe-cloud-mobile-ready .mbe-tag {
  position: absolute !important;
  animation: mbeFloat var(--float-dur, 6s) ease-in-out infinite var(--float-delay, 0s) !important;
}

/* Wrapper pai sem min-height no mobile */
@media (max-width: 767px) {
  .mbe-cloud-col {
    min-height: auto !important;
  }

  /* ── Tags estáticas no mobile: sem float, layout em linha ── */
  .mbe-tag,
  .mbe-tag--accent,
  .mbe-tag--primary,
  .mbe-tag--secondary,
  .mbe-tag--muted,
  .mbe-tag--uptime {
    animation: none !important;
    transform: none !important;
  }
  /* Nuvem posicionada via JS → no mobile vira flex-wrap */
  .mbe-cloud-mobile-ready {
    position: relative !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px 0 !important;
    overflow: visible !important;
    justify-content: center !important;
  }
  .mbe-cloud-mobile-ready .mbe-tag {
    position: relative !important;
    animation: none !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
  }

  /* Diagrama Ecossistema MBE Tech — versão estática no mobile */
  .mbe-ecosystem-diagram {
    display: none !important;
  }
  .mbe-eco-static-mobile {
    display: flex !important;
  }
}

/* ══════════════════════════════════════════════
   MAIS VIDA — animações globais extras
   ══════════════════════════════════════════════ */

/* Cards com lift suave no hover */
[data-reveal],
.mbe-bento-card,
.mbe-faq-item {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease;
}
.mbe-bento-card:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(195,192,255,0.12);
}

/* Pulse nos botões CTA */
@keyframes mbePulseCta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(195,192,255,0.45); }
  60%       { box-shadow: 0 0 0 14px rgba(195,192,255,0); }
}
.neon-glow {
  animation: mbePulseCta 2.8s ease-in-out infinite;
}

/* Shimmer no gradiente do hero h1 */
@keyframes mbeShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.bg-gradient-to-r.from-primary.to-secondary {
  background-size: 200% 200%;
  animation: mbeShimmer 4s ease infinite;
}

/* Reveal com bounce leve */
@keyframes fadeUpBounce {
  0%   { opacity: 0; transform: translateY(30px) scale(0.97); }
  70%  { opacity: 1; transform: translateY(-4px) scale(1.005); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.fade-up {
  animation: fadeUpBounce 0.7s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
}

/* Linha divisória animada */
@keyframes mbeLineExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.mbe-divider-animated {
  transform-origin: left;
  animation: mbeLineExpand 1.2s ease forwards;
}

/* Stats / números com glow no hover */
.mbe-stat-num {
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}
.mbe-stat-num:hover {
  text-shadow: 0 0 24px rgba(195,192,255,0.7);
  transform: scale(1.08);
}

/* Ícones de feature giram levemente no hover */
.material-symbols-outlined {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
a:hover .material-symbols-outlined,
button:hover .material-symbols-outlined {
  transform: scale(1.2) rotate(-8deg);
}

/* ══════════════════════════════════════════════
   ECOSSISTEMA MBE — bloco mobile no hero
   ══════════════════════════════════════════════ */
.mbe-ecosystem-card {
  background: rgba(28, 27, 45, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.mbe-ecosystem-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(195,192,255,0.5);
  margin-bottom: 1rem;
  text-align: center;
}

.mbe-ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.mbe-eco-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(17, 16, 40, 0.6);
  border: 1px solid rgba(75, 85, 99, 0.3);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}
.mbe-eco-item .material-symbols-outlined {
  font-size: 15px;
  color: #818cf8;
  flex-shrink: 0;
}
.mbe-eco-item--highlight {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #e0d9ff;
}
.mbe-eco-item--highlight .material-symbols-outlined {
  color: #c4b5fd;
}

.mbe-eco-uptime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: monospace;
  color: #6ee7b7;
  letter-spacing: 0.08em;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

/* ══════════════════════════════════════════════
   ECOSSISTEMA MBE — Diagrama de nós animado
   ══════════════════════════════════════════════ */
.mbe-ecosystem-diagram {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.mbe-eco-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 0;
}
.mbe-eco-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: linear-gradient(135deg, rgba(30,27,75,0.95), rgba(17,16,40,0.98));
  border: 1.5px solid rgba(99,102,241,0.55);
  border-radius: 1.25rem;
  padding: 1.1rem 1.6rem;
  text-align: center;
  box-shadow: 0 0 48px rgba(79,70,229,0.35), inset 0 1px 0 rgba(255,255,255,0.07);
  min-width: 130px;
  animation: ecoCenter 3s ease-in-out infinite;
}
@keyframes ecoCenter {
  0%,100% { box-shadow: 0 0 48px rgba(79,70,229,0.35), inset 0 1px 0 rgba(255,255,255,0.07); }
  50%      { box-shadow: 0 0 72px rgba(79,70,229,0.6),  inset 0 1px 0 rgba(255,255,255,0.1); }
}
.mbe-eco-center-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 0.25rem;
}
.mbe-eco-center-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #e0d9ff;
  letter-spacing: -0.01em;
}
.mbe-eco-node {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  background: rgba(22,21,40,0.9);
  border: 1px solid rgba(75,85,99,0.45);
  color: #c7c4d8;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
  cursor: default;
  backdrop-filter: blur(8px);
  /* JS sets top/left; animation set by JS too */
}
.mbe-eco-node .material-symbols-outlined {
  font-size: 18px;
  color: #818cf8;
  flex-shrink: 0;
  transition: color 0.3s;
}
.mbe-eco-node:hover {
  border-color: rgba(139,92,246,0.6);
  box-shadow: 0 0 20px rgba(79,70,229,0.25);
  color: #e0d9ff;
}
.mbe-eco-node:hover .material-symbols-outlined {
  color: #c4b5fd;
}

/* ══════════════════════════════════════════════
   CARROSSEL DE LOGOS — clientes (CSS puro)
   ══════════════════════════════════════════════ */
@keyframes mbe-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.mbe-logos-track-wrap {
  overflow: hidden;
  width: 100%;
}
.mbe-logos-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: mbe-marquee 28s linear infinite;
}
.mbe-logos-track-wrap:hover .mbe-logos-track {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .mbe-logos-track { animation: none; }
}
.mbe-logo-item {
  flex-shrink: 0;
  padding: 0 0.5rem;
}
.mbe-logo-img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
