/* Mundo das Fábulas — castelo e mascote. Carregado depois de identidade.css. */

/* Logo do topo: o castelo ao lado do nome */
.tdb-logo-img.mdf-marca-logo{width:auto!important;height:62px!important;max-height:62px!important;object-fit:contain}

/* Abertura da página inicial: a logo completa no lugar da foto */
.mdf-hero-marca{text-align:center}
.mdf-hero-marca img{display:inline-block;width:auto;height:auto;max-width:100%;max-height:240px}

/* Mascote nas caixas do artigo */
.mdf-resumo,.mdf-moral{position:relative;padding-right:150px!important;min-height:150px}
.mdf-resumo:after,.mdf-moral:after{content:"";position:absolute;right:18px;bottom:12px;width:112px;height:calc(100% - 24px);max-height:190px;
  background:no-repeat center bottom/contain}
.mdf-resumo:after{background-image:url(mascote-lendo.webp)}
.mdf-moral:after{background-image:url(mascote-comemorando.webp)}

/* Títulos antes dos blocos: a mascote pequena ao lado do título */
.td-post-content h2:has(+ .mdf-destaque):before,
.td-post-content h2:has(+ .mdf-pdfs:not(.mdf-destaque)):before,
.td-post-content h2:has(+ .mdf-lista):before,
.td-post-content h2:has(+ .mdf-faq):before{content:"";display:inline-block;width:44px;height:84px;margin:0 10px 0 0;vertical-align:middle;
  background:no-repeat center bottom/contain}
.td-post-content h2:has(+ .mdf-destaque):before{background-image:url(mascote-apontando.webp)}
.td-post-content h2:has(+ .mdf-pdfs:not(.mdf-destaque)):before{background-image:url(mascote-abracando-livro.webp)}
.td-post-content h2:has(+ .mdf-lista):before{background-image:url(mascote-lapis.webp)}
.td-post-content h2:has(+ .mdf-faq):before{background-image:url(mascote-pensando.webp)}

@media (max-width:767px){
  .tdb-logo-img.mdf-marca-logo{height:46px!important;max-height:46px!important}
  /* no celular a logo fica pequena, no canto, ao lado do título */
  .mdf-hero-marca{position:absolute;top:0;right:0}
  .mdf-hero-marca img{max-height:104px}
  .mdf-hero-titulo{padding-right:80px}
  .mdf-resumo,.mdf-moral{padding-right:104px!important}
  .mdf-resumo:after,.mdf-moral:after{right:10px;width:80px;max-height:140px}
  .td-post-content h2:has(+ .mdf-destaque):before,
  .td-post-content h2:has(+ .mdf-pdfs:not(.mdf-destaque)):before,
  .td-post-content h2:has(+ .mdf-lista):before,
  .td-post-content h2:has(+ .mdf-faq):before{width:34px;height:64px}
}
