/* ============================================================
   Fluxando — Blog Styles
   Depende de: ../css/style.css (carregar antes)
   Dark theme override for blog pages
   ============================================================ */

/* ---------- Dark theme override for blog ---------- */
:root {
  --bg:          #030d18;
  --bg-2:        #051525;
  --bg-3:        #071e38;
  --bg-card:     rgba(5, 21, 37, 0.8);
  --bg-glass:    rgba(255, 255, 255, 0.03);
  --accent:      #22d3ee;
  --accent-2:    #0ea5e9;
  --accent-warm: #f59e0b;
  --accent-glow: rgba(34, 211, 238, 0.2);
  --text:        #f0f6ff;
  --text-2:      #8baac8;
  --text-3:      #4a6080;
  --border:      rgba(34, 211, 238, 0.08);
  --border-2:    rgba(255, 255, 255, 0.04);
  --border-glow: rgba(34, 211, 238, 0.25);
}

body { background: var(--bg); color: var(--text); }

/* Nav e footer herdados de style.css — sem overrides paralelos */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-2);
  background: var(--bg-2);
}
.breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-3);
}
.breadcrumb__inner a { color: var(--text-3); transition: color var(--transition); }
.breadcrumb__inner a:hover { color: var(--accent); }
.breadcrumb__inner span { color: var(--text-2); }
.breadcrumb__sep { color: var(--text-3); }

/* Compensação do nav fixo (68px) para todas as páginas do blog */
body > main { padding-top: 68px; }

/* ---------- Blog Listing Grid ---------- */
.blog-listing { padding: 2.5rem 0 3rem; background: var(--bg-2); }
.blog-listing__title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}
.blog-listing__grid {
  display: grid; gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .blog-listing__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-listing__grid { grid-template-columns: repeat(3, 1fr); } }

/* Blog listing card (enhanced) */
.bl-card {
  display: flex; flex-direction: column;
  background: var(--bg-glass); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); backdrop-filter: blur(8px);
  text-decoration: none; color: inherit;
}
.bl-card:hover { transform: translateY(-6px); border-color: var(--border-glow); box-shadow: 0 24px 60px rgba(34,211,238,0.07); }
.bl-card__thumb {
  height: 200px; overflow: hidden; position: relative;
  background: var(--gradient, linear-gradient(135deg, #020810, #0a1628));
  flex-shrink: 0;
}
.bl-card__thumb-inner {
  position: absolute; inset: 0;
  background: var(--gradient, linear-gradient(135deg, #020810, #0a1628));
  transition: transform 0.6s var(--ease-fluid);
  display: flex; align-items: center; justify-content: center;
}
.bl-card:hover .bl-card__thumb-inner { transform: scale(1.04); }
.bl-card__thumb-icon {
  font-size: 3rem; opacity: 0.3;
  filter: drop-shadow(0 0 20px rgba(34,211,238,0.5));
}
.bl-card__top-bar {
  height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0; transition: var(--transition);
}
.bl-card:hover .bl-card__top-bar { opacity: 1; }
.bl-card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }
.bl-card__meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--text-3); }
.bl-card__tag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: rgba(34,211,238,0.07); border: 1px solid rgba(34,211,238,0.15);
  padding: 0.2em 0.7em; border-radius: 999px;
}
.bl-card h2 {
  font-size: clamp(1rem, 2.5vw, 1.15rem); color: var(--text);
  transition: color var(--transition); line-height: 1.35; font-weight: 700;
  letter-spacing: -0.015em; margin: 0;
}
.bl-card:hover h2 { color: var(--accent); }
.bl-card p { font-size: 0.88rem; flex: 1; margin: 0; }
.bl-card__read {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem;
  font-size: 0.83rem; font-weight: 700; color: var(--accent);
  transition: gap var(--transition);
}
.bl-card:hover .bl-card__read { gap: 0.7rem; }

/* ---------- Post Page ---------- */
.post {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--bg);
}
.post__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}
@media (min-width: 1024px) {
  .post__layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; }
}

/* Post header */
.post__header { margin-bottom: 2.5rem; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.post__tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); background: rgba(34,211,238,0.07); border: 1px solid rgba(34,211,238,0.15);
  padding: 0.3em 0.9em; border-radius: 999px;
}
.post__date { font-size: 0.8rem; color: var(--text-3); }
.post__author { font-size: 0.8rem; color: var(--text-3); }
.post__author a { color: var(--accent); }
.post__header h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.9rem); line-height: 1.15;
  margin-bottom: 1.25rem; letter-spacing: -0.03em;
}
.post__header .post__lead {
  font-size: clamp(1rem, 2vw, 1.12rem); color: var(--text-2); line-height: 1.75;
  max-width: 72ch; border-left: 3px solid var(--accent);
  padding-left: 1.25rem; margin-bottom: 0;
}
.post__divider {
  height: 1px; background: var(--border); margin: 2rem 0;
}

/* Article body */
.post__body { font-size: clamp(0.96rem, 2vw, 1.02rem); color: var(--text-2); line-height: 1.8; }
.post__body h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem); color: var(--text); font-weight: 800;
  letter-spacing: -0.02em; margin: 3rem 0 1rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-2);
}
.post__body h2:first-child { margin-top: 0; }
.post__body h3 {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem); color: var(--text); font-weight: 700;
  letter-spacing: -0.015em; margin: 2rem 0 0.75rem;
}
.post__body p { margin-bottom: 1.25rem; }
.post__body ul, .post__body ol {
  padding-left: 0; margin-bottom: 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.post__body ul li, .post__body ol li {
  padding-left: 1.5rem; position: relative; font-size: 0.97rem; color: var(--text-2);
}
.post__body ul li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}
.post__body ol { counter-reset: item; }
.post__body ol li { counter-increment: item; }
.post__body ol li::before {
  content: counter(item); position: absolute; left: 0;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.78rem;
  font-weight: 800; color: var(--accent);
}
.post__body strong { color: var(--text); font-weight: 700; }
.post__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: color var(--transition); }
.post__body a:hover { color: var(--accent-2); }
.post__body code {
  font-family: 'Courier New', monospace; font-size: 0.88em;
  background: rgba(34,211,238,0.07); border: 1px solid rgba(34,211,238,0.12);
  padding: 0.1em 0.5em; border-radius: 4px; color: var(--accent);
}
.post__body pre {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; overflow-x: auto; margin-bottom: 1.5rem;
}
.post__body pre code { background: none; border: none; padding: 0; font-size: 0.9rem; color: var(--accent); }

/* Tip/Warning boxes */
.tip-box, .warn-box, .check-box {
  padding: 1.25rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.tip-box {
  background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.18);
}
.warn-box {
  background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.2);
}
.check-box {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2);
}
.tip-box__icon, .warn-box__icon, .check-box__icon {
  font-size: 1.25rem; flex-shrink: 0; line-height: 1.5;
}
.tip-box__body, .warn-box__body, .check-box__body { flex: 1; }
.tip-box__body strong, .warn-box__body strong, .check-box__body strong {
  display: block; font-size: 0.82rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.4rem;
}
.tip-box__body strong { color: var(--accent); }
.warn-box__body strong { color: #fbbf24; }
.check-box__body strong { color: #10b981; }
.tip-box p, .warn-box p, .check-box p { font-size: 0.9rem; margin: 0; }

/* Checklist */
.checklist {
  display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem;
}
.checklist li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.9rem 1.25rem; background: var(--bg-glass);
  border: 1px solid var(--border-2); border-radius: var(--radius);
  font-size: 0.93rem; color: var(--text-2); padding-left: 1.25rem;
}
.checklist li::before { display: none; }
.checklist li .ck-icon {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(34,211,238,0.3);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.checklist li .ck-icon::after {
  content: ''; width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
}

/* Stat highlight */
.stat-highlight {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 900;
  font-size: 2rem; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-highlight small { font-size: 0.9rem; font-weight: 700; }

/* Post CTA */
.post-cta {
  margin: 3rem 0 0;
  padding: 2.5rem; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(34,211,238,0.06), rgba(245,158,11,0.03));
  border: 1px solid rgba(34,211,238,0.18);
  text-align: center;
}
.post-cta h3 { font-size: clamp(1.1rem, 2.5vw, 1.3rem); margin-bottom: 0.75rem; }
.post-cta p { font-size: 0.93rem; max-width: 52ch; margin-inline: auto; margin-bottom: 1.5rem; }
.post-cta .btn { margin-inline: auto; }

/* Sidebar */
.post__sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-box {
  background: var(--bg-glass); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.sidebar-box h4 {
  font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 1rem;
}
.toc__list { display: flex; flex-direction: column; gap: 0.4rem; }
.toc__list a {
  font-size: 0.85rem; color: var(--text-3); padding: 0.4rem 0.75rem;
  border-left: 2px solid var(--border-2); transition: var(--transition);
  display: block;
}
.toc__list a:hover { color: var(--accent); border-color: var(--accent); background: rgba(34,211,238,0.04); }

/* Related posts */
.related-posts { padding: clamp(3rem, 6vw, 5rem) 0; background: var(--bg-2); }
.related-posts h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); margin-bottom: 2rem; }
.related-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

/* Author box */
.author-box {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.5rem; background: var(--bg-glass); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); margin-top: 3rem;
}
.author-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(245,158,11,0.08));
  border: 1.5px solid rgba(34,211,238,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 900; font-size: 1rem;
  color: var(--accent);
}
.author-info { flex: 1; }
.author-info strong { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 0.2rem; }
.author-info span { display: block; font-size: 0.78rem; color: var(--accent); margin-bottom: 0.5rem; }
.author-info p { font-size: 0.85rem; margin: 0; }

/* ---------- Post Mobile Responsiveness ---------- */

/* Grid child must not overflow its column */
.post__main { min-width: 0; }

/* All post text must wrap properly */
.post__body {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Inline code must not push layout wider */
.post__body code {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Tables inside posts must scroll, not expand */
.post__body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

/* Images/embeds must stay contained */
.post__body img,
.post__body iframe,
.post__body video {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  /* Reduce box padding on mobile */
  .tip-box, .warn-box, .check-box {
    padding: 1rem 1rem;
    gap: 0.75rem;
  }

  /* Checklist items tighter on mobile */
  .checklist li {
    padding: 0.75rem 0.9rem;
    gap: 0.6rem;
  }

  /* Post CTA less padded on mobile */
  .post-cta {
    padding: 1.5rem 1.25rem;
  }

  /* Author box compact on mobile */
  .author-box {
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  /* Sidebar boxes less padded */
  .sidebar-box {
    padding: 1.25rem;
  }

  /* FAQ items inside posts */
  .post__body .faq__item summary {
    padding: 1rem 1rem;
  }

  /* Stat highlight smaller on mobile */
  .stat-highlight {
    font-size: 1.5rem;
  }
}
