/* ============================================================
   blog.css — Domus EBD Blog — CSS Completo
   Fonte: Lora (títulos) + Inter (corpo)
   ============================================================ */

/* ── Google Fonts: carregado via <link> no HTML ── */

/* ── Variáveis ──────────────────────────────────────────────── */
:root {
  --green-dark:   #1a4731;
  --green-mid:    #2d6a4f;
  --green-light:  #52b788;
  --gold:         #c9922a;
  --gold-light:   #e8b84b;
  --gold-dark:    #a87520;
  --off-white:    #faf9f6;
  --bg-subtle:    #f0ece4;
  --border:       #ddd5c8;
  --text:         #1a1a2e;
  --text-soft:    #4a5568;
  --text-muted:   #718096;
  --white:        #ffffff;

  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius:    8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 6px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 18px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --transition: 0.2s ease;

  --max-content: 760px;
  --max-site:    1160px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Utilitários ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-icon-fallback {
  width: 34px; height: 34px;
  background: var(--gold);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 700;
  color: var(--green-dark);
  flex-shrink: 0;
}
.nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}
.nav-links .btn-nav {
  background: var(--gold);
  color: var(--green-dark);
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  margin-left: 0.25rem;
  font-size: 0.84rem;
  transition: background var(--transition), transform var(--transition);
}
.nav-links .btn-nav:hover {
  background: var(--gold-light);
  color: var(--green-dark);
  transform: translateY(-1px);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--white); padding: 0.4rem;
  border-radius: 6px; transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle svg { display: block; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
}
.breadcrumb-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.breadcrumb-inner a {
  color: var(--green-mid);
  transition: color var(--transition);
}
.breadcrumb-inner a:hover { color: var(--green-dark); }
.breadcrumb-inner span.sep { opacity: 0.5; font-size: 0.75rem; }
.breadcrumb-inner span.current { color: var(--text); font-weight: 500; }

/* ============================================================
   HERO DA LISTAGEM
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.blog-hero-eyebrow {
  display: inline-block;
  background: rgba(201,146,42,0.2);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  border: 1px solid rgba(201,146,42,0.3);
}
.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 0.85rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.blog-hero p {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   FILTROS DE CATEGORIA (LISTAGEM)
   ============================================================ */
.filter-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 60px;
  z-index: 100;
}
.filter-btns {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-btns::-webkit-scrollbar { display: none; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 0.38rem 0.85rem;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--green-dark); color: var(--green-dark); }
.filter-btn.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

/* ============================================================
   GRID DE CARDS (LISTAGEM)
   ============================================================ */
.listing-section {
  padding: 2.5rem 0 4rem;
}
.posts-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26,71,49,0.2);
}
.post-card:focus-within {
  outline: 2px solid var(--green-mid);
  outline-offset: 2px;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.card-num {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.post-card h2 {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.35;
  flex: 1;
}
.post-card p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bg-subtle);
}
.card-date {
  font-size: 0.77rem;
  color: var(--text-muted);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--gold);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap var(--transition), color var(--transition);
}
.card-link:hover { color: var(--gold-dark); gap: 0.5rem; }

/* ============================================================
   BADGES DE CATEGORIA
   ============================================================ */
.tag-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 50px;
  white-space: nowrap;
}
/* Gestão de EBD → verde */
.badge-gestao     { background: #e6f0ea; color: #1a4731; }
/* Tecnologia para EBD → azul */
.badge-tecnologia { background: #e0eeff; color: #1a4789; }
/* Conteúdo Ministerial → roxo */
.badge-ministerial{ background: #f3e8ff; color: #5b21a8; }
/* Notícias e Tendências → âmbar */
.badge-noticias   { background: #fef3e0; color: #8a5e0c; }
/* Datas e Eventos → coral */
.badge-datas      { background: #ffe4e1; color: #9c2020; }

/* ============================================================
   LAYOUT DO POST INDIVIDUAL
   ============================================================ */
.post-layout {
  padding: 2.5rem 0 5rem;
}
.post-container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Meta: categoria + data + tempo */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.post-meta time {
  font-size: 0.83rem;
  color: var(--text-muted);
}
.post-meta .dot {
  width: 3px; height: 3px;
  background: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
}
.reading-time {
  font-size: 0.83rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* H1 do post */
.post-container > h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  color: var(--green-dark);
  line-height: 1.22;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

/* Lead */
.post-lead {
  font-size: 1.13rem;
  color: var(--text-soft);
  line-height: 1.8;
  border-left: 4px solid var(--gold);
  padding: 0.75rem 1.25rem;
  margin-bottom: 2.25rem;
  background: rgba(201,146,42,0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ============================================================
   CONTEÚDO DO ARTIGO (.content)
   ============================================================ */
.content h2 {
  font-family: var(--font-heading);
  font-size: 1.42rem;
  color: var(--green-dark);
  margin: 2.25rem 0 0.85rem;
  line-height: 1.3;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-subtle);
}
.content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.75rem 0 0.6rem;
  line-height: 1.35;
}
.content p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.content ul {
  list-style: none;
  margin: 0.5rem 0 1.4rem;
  padding: 0;
}
.content ul li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}
.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
}
.content ol {
  margin: 0.5rem 0 1.4rem;
  padding-left: 1.6rem;
}
.content ol li {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  padding-left: 0.35rem;
}
.content ol li::marker { color: var(--gold); font-weight: 700; }
.content strong { color: var(--green-dark); font-weight: 600; }
.content em { font-style: italic; color: var(--text-soft); }
.content a {
  color: var(--green-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.content a:hover { color: var(--green-dark); }
.content blockquote {
  background: var(--bg-subtle);
  border-left: 4px solid var(--green-light);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-soft);
}
.content hr {
  border: none;
  border-top: 2px solid var(--bg-subtle);
  margin: 2rem 0;
}

/* ============================================================
   CTA BOX
   ============================================================ */
.cta-box {
  background: var(--green-dark);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  margin-top: 3rem;
  text-align: center;
}
.cta-box h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}
.cta-box p {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
  line-height: 1.65;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.97rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-cta:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  color: var(--green-dark);
}

/* ============================================================
   NAVEGAÇÃO ENTRE POSTS (PREV / NEXT)
   ============================================================ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-subtle);
}
.post-nav-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.post-nav-item:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow-sm);
}
.post-nav-item.empty { visibility: hidden; }
.nav-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.nav-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--green-dark);
  line-height: 1.35;
}
.post-nav-item.next { text-align: right; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 0;
}
.footer-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.footer-logo a {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.footer-logo span { color: var(--gold); }
.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.87rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
}

/* ============================================================
   EMPTY / LOADING STATES
   ============================================================ */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
}
.blog-empty h3 {
  font-family: var(--font-heading);
  color: var(--green-dark);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.blog-empty p { color: var(--text-muted); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--green-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.65rem 0.75rem; }
  .nav-links .btn-nav { text-align: center; margin-left: 0; margin-top: 0.5rem; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { text-align: left; }
  .cta-box { padding: 1.65rem 1.25rem; }
}
@media (min-width: 641px) {
  .nav-toggle { display: none; }
}
