/* ==========================================================================
   Blog CSS — complementa Bootstrap 5 + styles.min.css do site principal
   ========================================================================== */

/* ---------- Footer (classes usadas no site principal mas sem CSS externo) ---- */
.site-footer {
  background: var(--neutral, #111827);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-badge {
  display: inline-block;
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #94a3b8 !important;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff !important;
}

.footer-contact p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.footer-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* ---------- Navbar fixes --------------------------------------------------- */
.nav-toggle-checkbox { display: none; }
.nav-toggle { display: none; }
.nav-menu { gap: 0.75rem; }
.navbar .nav-cta { margin-left: 1rem; }

@media (max-width: 991px) {
  .nav-toggle {
    display: block;
    cursor: pointer;
    padding: 0.5rem;
  }
  .hamburger,
  .hamburger::before,
  .hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--neutral, #111827);
    border-radius: 2px;
    position: relative;
    transition: 0.3s;
  }
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
  }
  .hamburger::before { top: -7px; }
  .hamburger::after { top: 7px; }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 0.75rem;
  }
  .nav-toggle-checkbox:checked + .nav-toggle + .nav-menu {
    display: flex;
  }
  .navbar .navbar-brand { flex: 0 0 auto; }
  .navbar .nav-cta { margin-left: 0; margin-top: 0.5rem; text-align: center; }
}

/* ---------- Floating WhatsApp ---------------------------------------------- */
.floating-whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: #fff;
}

/* ---------- Blog list (index /blog/) --------------------------------------- */
.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e9ecef;
}

.blog-list li:last-child {
  border-bottom: none;
}

.blog-list a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary, #0b5ed7);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-list a:hover {
  color: var(--primary-700, #084c9e);
  text-decoration: underline;
}

.blog-list .post-date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
  margin-top: 0.25rem;
}

/* ---------- Article page --------------------------------------------------- */
.blog-article {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius, 10px);
  box-shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
  max-width: 800px;
  margin: 0 auto;
}

.blog-article .article-header {
  border-bottom: 2px solid var(--primary, #0b5ed7);
  padding-bottom: 1rem;
}

.blog-article .article-header h1 {
  color: var(--neutral, #111827);
  font-size: 2rem;
  margin-top: 0;
}

.blog-article .article-tags .badge {
  font-size: 0.8rem;
  margin-right: 0.3rem;
}

.blog-article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.blog-article blockquote {
  border-left: 4px solid var(--primary, #0b5ed7);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--muted, #6b7280);
  font-style: italic;
}

.blog-article pre {
  background: #f1f5f9;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

.blog-article code {
  background: #f1f5f9;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-article pre code {
  background: none;
  padding: 0;
}

/* ---------- Responsive ----------------------------------------------------- */
@media (max-width: 768px) {
  .blog-article {
    padding: 1.25rem;
  }
  .blog-article .article-header h1 {
    font-size: 1.5rem;
  }
}

/* ---------- Accessibility -------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--primary, #0b5ed7);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Body layout (flex for sticky footer) --------------------------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}
