/* Navbar */

.navbar {
  backdrop-filter: saturate(120%) blur(6px);
  background-color: transparent !important;
  color: rgb(94, 49, 94);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  z-index: 1000;
  box-shadow: none;
  transition: background-color 0.3s ease;
}

.navbar .nav-link {
  color: rgb(189, 180, 180) !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.navbar .nav-link:hover { color: #ff9800 !important; }
.logo {
  color: #ff9800;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,152,0,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero padrão (desktop e telas grandes) */
.topo-capa {
  position: relative;
  background: url('/imagens/posts/post3/foto-post3-1920x1280.avif') center/cover no-repeat;
  min-height: 60vh;
  padding-top: 6rem; /* compensa navbar fixa */
  color: #fff;
}

.topo-capa .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1;
}

.topo-capa .conteudo-capa {
  max-width: 800px;   /* limita largura do texto */
  margin: 0 auto;     /* centraliza */
  z-index: 1;         /* garante que fique acima da imagem */
}

/* Torna a foto “de fundo” sem participar do flex */
.topo-capa picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.topo-capa picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topo-capa .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1;
}

/* Garante que o texto fique acima da overlay */
.topo-capa .conteudo-capa {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

/* Garantir que o texto continue justificado e sem hifenização */
#texto-completo main p,
#texto-completo main ul,
#texto-completo main li {
  text-align: justify;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -moz-hyphens: none !important;
}

/* ===== Legibilidade do texto no main ===== */
#texto-completo main {
  max-width: 72ch;
  line-height: 1.75;
  font-size: 1.05rem;
  color: #222;
}

/* Parágrafos */
#texto-completo main p {
  margin: 0 0 1.1rem;
  text-align: justify;      /* mude para left se preferir */
  hyphens: auto;
}

/* Cabeçalhos */
#texto-completo h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: .2px;
}
#texto-completo h3 {
  font-size: clamp(1.25rem, 1rem + .8vw, 1.5rem);
  margin-top: 1.75rem;
  margin-bottom: .5rem;
}

/* Listas */
#texto-completo ul { padding-left: 1.25rem; margin-bottom: 1rem; }
#texto-completo li { margin: .4rem 0; }
#texto-completo ul li::marker { color: #4e2a84; font-weight: 700; }

/* Compensar navbar fixa ao rolar para IDs */
#texto-completo [id] { scroll-margin-top: 88px; }

/* Separador sutil */
.hr-soft {
  height: 1px; border: 0; margin: 1.5rem 0;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
}

/* Intro destacada (opcional) */
.lead-intro {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #2a2a2a;
}

/* Menu lateral (desktop) */
.sticky-menu .nav-link {
  color: #444;
  padding: .45rem 0;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}
.sticky-menu .nav-link:hover,
.sticky-menu .nav-link:focus {
  color: #4e2a84;
  text-decoration: none;
}

/* Kicker opcional */
.subtle-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  color: #6c63a6;
  margin-bottom: .25rem;
}


/* Menu lateral sticky */
.sticky-menu {
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.sticky-menu .nav-link {
  color: #333;
  padding: .5rem 0;
  border-bottom: 1px solid #eee;
}

.sticky-menu .nav-link:hover {
  color: #4e2a84;
}

/* Accordion Sumário Mobile */
#sumarioAccordion .accordion-button {
  background-color: #f8f9fa;
  font-weight: 600;
  font-size: 1rem;
}

#sumarioAccordion .accordion-body a {
  display: block;
  padding: .4rem 0;
  color: #4e2a84;
  text-decoration: none;
}

/* Garantir que o accordion/collapse feche quando não estiver .show */
.collapse:not(.show) { display: none; }
.accordion-collapse.collapse:not(.show) { display: none; }

#sumarioAccordion .accordion-body a:hover {
  text-decoration: underline;
}

/* ===== Cards "Posts Relacionados" com fundo colorido e texto branco ===== */
.card {
  border-radius: 14px;            /* bordas suaves */
  overflow: hidden;               /* impede que o fundo vaze nas curvas */
  border: none;                   /* remove bordas padrão */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* sombra leve */
  background-color: transparent !important;  /* sem cor no container */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.22);
}

/* Imagem superior se ajusta às curvas */
.card-img-top {
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  display: block;
  width: 100%;
  height: auto;
}

/* Corpo do card colorido */
.card-body {
  padding: 1.25rem;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* ===== Cores individuais dos cards ===== */
.card-primary .card-body {
  background-color: #0d6efd; /* azul */
  color: #fff !important;
}
.card-warning .card-body {
  background-color: #ff9800; /* laranja */
  color: #fff !important;
}
.card-success .card-body { 
  background-color: #198754; /* verde */
  color: #fff !important; 
}
.card-danger .card-body {
  background-color: #dc3545; /* vermelho */
  color: #fff !important;
}

/* Texto branco em todos os elementos dentro do card */
.card .card-body h3,
.card .card-body p,
.card .card-body small,
.card .card-body .card-text {
  color: #fff !important;
}

/* Neutraliza o text-dark no link pai */
.card a.text-dark,
.card a.text-dark * {
  color: inherit !important;
}

/* Badges translúcidas e legíveis sobre fundo colorido */
.card .badge {
  background-color: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  font-weight: 600;
}

.text-muted { color: #555 !important; }

/* Responsividade */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 60%;
    max-width: 150px;
    max-height: 90vh; /* altura quase total da tela */
    height: auto; /* permite expandir conforme o conteúdo */
    background-color: #ffffff;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    margin-top: 0;
    border-radius:10px;  
  }

  /* Telas médias (tablets, até 991px) */
@media (max-width: 991px) {
  .topo-capa {
    background-image: url('/imagens/posts/post3/foto-post3-1280x853.avif');
  }
}

@media (max-width: 768px) {
  .topo-capa { min-height: 60vh; padding-top: 5rem; }
  .topo-capa h1 { font-size: 1.6rem; }
  .topo-capa p { font-size: 1rem; }
}

/* Telas pequenas (smartphones, até 576px) */
@media (max-width: 576px) {
  .topo-capa {
    background-image: url('/imagens/posts/post3/foto-post3-640x427.avif');
    min-height: 50vh; /* pode reduzir a altura no mobile */
  }
}

  .navbar-collapse.show {
    transform: translateX(0);
  }
}

  .navbar-collapse.show .nav-link {
  color: #333 !important;
}

@media (max-width: 991.98px) {
  .sticky-menu { display: none; }
}
@media (min-width: 992px) {
  #sumarioAccordion { display: none; }
}

/****** Área base dos anúncios *****/
.ad-slot { margin: 24px auto; }
.ad-slot .ad-box {
  background: #f7f7f7;
  border-radius: 10px;
  border: 1px solid #eee;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  overflow: hidden;
}

/* Banners maiores (hero/rodapé) */
.ad-banner .ad-box {
  /* 970x250 desktop; ajusta altura por proporção e evita CLS */
  max-width: 970px;
  min-height: 320px;
  aspect-ratio: 970 / 250;
  margin-left: auto; margin-right: auto;
}

/* Sidebar: largura realista e altura controlada */
.ad-sidebar .ad-box {
  max-width: 300px;       /* sidebar comum */
  /*min-width: 600px;       /* sidebar larga */
  width: 100%;
  aspect-ratio: 300 / 600;/* define altura do container sem “estourar” */
  min-height: 0;          /* zera qualquer herança */
  margin-left: auto; margin-right: auto;
}

/* “Native” / recomendados */
.ad-native .ad-box {
  max-width: 680px;
  width: 100%;
  aspect-ratio: 680 / 200;
}

/* In-article (entre parágrafos) – retângulo médio */
.ad-inarticle .ad-box {
  max-width: 336px;
  width: 100%;
  aspect-ratio: 300 / 250;
  min-width: unset;
  border-radius: 8px;
}

/* Garanta que qualquer iframe se adapte ao box */
.ad-slot .ad-box iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* Ajustes Responsivos */
@media (max-width: 768px) {
  .ad-banner .ad-box { max-width: 100%; aspect-ratio: 320 / 100; } /* ex: 320x100 */
  .ad-sidebar { display: none; } /* some no mobile */
}

/* Newsletter */
.newsletter-section {
  background-color: #f8f9fa;
  padding: 3rem 1rem;
  margin-top: 4rem;
  border-radius: 10px;
  text-align: center;
}

.newsletter-section input[type="email"] {
  max-width: 400px;
  margin: 0 auto;
}
