:root {
  --shb-blue-950: #041225;
  --shb-blue-900: #071a33;
  --shb-blue-800: #0a2850;
  --shb-blue-600: #145da0;
  --shb-yellow: #ffb800;
  --shb-white: #ffffff;
  --shb-radius: 16px;
  --shb-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

body:not(.shb-light-mode) {
  background: var(--shb-blue-950) !important;
}

body:not(.shb-light-mode) main,
body:not(.shb-light-mode) .site-content {
  background: transparent !important;
}

body.shb-light-mode,
body.shb-light-mode main,
body.shb-light-mode .site-content {
  background: var(--shb-white) !important;
}

.site-header .custom-logo-link,
.site-header .site-logo {
  position: relative;
  isolation: isolate;
  border-radius: 50%;
}

.site-header .custom-logo-link::after,
.site-header .site-logo::after {
  content: '';
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 230, 112, .95), rgba(255, 184, 0, .45) 42%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.site-header .custom-logo-link.shb-logo-energizada img,
.site-header .site-logo.shb-logo-energizada img {
  animation: shb-logo-spin .82s cubic-bezier(.2, .8, .2, 1);
}

.site-header .custom-logo-link.shb-logo-energizada::after,
.site-header .site-logo.shb-logo-energizada::after {
  animation: shb-logo-light .82s ease-out;
}

@keyframes shb-logo-spin {
  0% { transform: rotate(0deg) scale(1); }
  38% { transform: rotate(190deg) scale(1.12); }
  74% { transform: rotate(330deg) scale(1.06); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes shb-logo-light {
  0%, 100% { opacity: 0; transform: scale(.7); }
  38% { opacity: 1; transform: scale(1.65); }
  70% { opacity: .65; transform: scale(1.25); }
}

.shb-voce-sabia-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffc400, #ff8a00) !important;
  color: #161006 !important;
  box-shadow: 0 0 0 0 rgba(255, 184, 0, .55);
  animation: shb-curiosity-pulse 2.6s ease-in-out infinite;
}

.shb-voce-sabia-btn::after {
  content: '';
  position: absolute;
  top: -80%;
  left: -45%;
  width: 32%;
  height: 260%;
  background: rgba(255, 255, 255, .7);
  transform: rotate(24deg);
  animation: shb-curiosity-shine 3.4s ease-in-out infinite;
}

@keyframes shb-curiosity-pulse {
  0%, 72%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 0 rgba(255, 184, 0, .35); }
  80% { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 0 10px rgba(255, 184, 0, 0); }
  88% { transform: translateY(0) scale(1); }
  94% { transform: translateY(-1px) rotate(-1deg); }
}

@keyframes shb-curiosity-shine {
  0%, 55% { left: -45%; opacity: 0; }
  65% { opacity: .8; }
  82%, 100% { left: 125%; opacity: 0; }
}

.category-nav .shb-todas-materias-link {
  border-color: rgba(255, 184, 0, .7) !important;
  color: var(--shb-yellow) !important;
}

body .category-nav { background: var(--shb-blue-900) !important; }
body.shb-light-mode .category-nav { background: #f7f9fc !important; }
body.shb-light-mode .category-nav a { color: #071a33 !important; }
body.shb-light-mode .category-nav .shb-todas-materias-link { color: #775000 !important; }

/* A busca deve sempre mostrar contexto, e não apenas a imagem destacada. */
.search-results .news-card {
  height: auto !important;
  min-height: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--shb-blue-900) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: var(--shb-radius) !important;
}

.search-results .news-card-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: none !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
}

.search-results .news-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.search-results .news-card-content {
  position: static !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  padding: 18px 18px 20px !important;
  background: transparent !important;
}

.search-results .news-card-title,
.search-results .news-card-title a,
.search-results .news-card-excerpt {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: #f4f8ff !important;
}

.search-results .news-card-title {
  margin: 7px 0 10px !important;
  font-size: clamp(1.05rem, 2vw, 1.3rem) !important;
  line-height: 1.25 !important;
}

.search-results .news-card-excerpt {
  margin: 0 !important;
  color: #b9c8db !important;
  line-height: 1.55 !important;
}

.search-results .news-card-meta {
  color: var(--shb-yellow) !important;
}

.shb-light-mode.search-results .news-card {
  background: #ffffff !important;
  border-color: #dce4ef !important;
  box-shadow: 0 10px 28px rgba(14, 38, 68, .08) !important;
}

.shb-light-mode.search-results .news-card-title,
.shb-light-mode.search-results .news-card-title a {
  color: #071a33 !important;
}

.shb-light-mode.search-results .news-card-excerpt {
  color: #53657b !important;
}

.shb-curiosidades,
.shb-arquivo {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto 80px;
}

.shb-experiencia-page .page-header { display: none; }
.shb-experiencia-page .page-content > .shb-container { max-width: 1240px !important; }
.shb-experiencia-page .page-content { padding-top: 8px; }

body.shb-light-mode .shb-curiosidades-hero h1,
body.shb-light-mode .shb-arquivo-header h1 { color: #fff !important; }
body.shb-light-mode .shb-curiosidades-hero p,
body.shb-light-mode .shb-arquivo-header p { color: #d7e5f6 !important; }
body.shb-light-mode .shb-eyebrow { color: #ffcf4d !important; }
body.shb-light-mode .site-header .custom-logo-link { background: var(--shb-blue-900); }

.shb-curiosidades-hero,
.shb-arquivo-header {
  padding: clamp(34px, 6vw, 72px);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 184, 0, .25), transparent 34%),
    linear-gradient(135deg, #0b3260, #041225 68%);
  box-shadow: var(--shb-shadow);
}

.shb-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--shb-yellow);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.shb-curiosidades-hero h1,
.shb-arquivo-header h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: .98;
}

.shb-curiosidades-hero p,
.shb-arquivo-header p {
  max-width: 760px;
  margin: 0;
  color: #d7e5f6;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.shb-curiosidades-grid,
.shb-materias-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.shb-curiosidade-card,
.shb-materia-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: var(--shb-radius);
  color: #f5f8fc;
  background: var(--shb-blue-900);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
}

.shb-curiosidade-card {
  display: block;
  padding: 30px;
  text-decoration: none;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.shb-curiosidade-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 184, 0, .75);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.shb-curiosidade-icone {
  display: block;
  margin-bottom: 18px;
  font-size: 2.25rem;
}

.shb-curiosidade-card h2,
.shb-materia-card h2 {
  margin: 0 0 10px;
  color: inherit;
}

.shb-curiosidade-card p,
.shb-materia-card p {
  margin: 0;
  color: #b9c8db;
  line-height: 1.58;
}

.shb-light-mode .shb-curiosidade-card,
.shb-light-mode .shb-materia-card {
  border-color: #dce4ef;
  color: #071a33;
  background: #fff;
}

.shb-light-mode .shb-curiosidade-card p,
.shb-light-mode .shb-materia-card p {
  color: #53657b;
}

.shb-arquivo-filtros {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(200px, .42fr) auto;
  gap: 12px;
  margin: 28px 0;
}

.shb-arquivo-filtros input,
.shb-arquivo-filtros select,
.shb-arquivo-filtros button {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  padding: 0 16px;
  color: #f5f8fc;
  background: var(--shb-blue-900);
}

.shb-arquivo-filtros button {
  border: 0;
  padding-inline: 26px;
  font-weight: 800;
  color: #151005;
  background: var(--shb-yellow);
  cursor: pointer;
}

.shb-light-mode .shb-arquivo-filtros input,
.shb-light-mode .shb-arquivo-filtros select {
  border-color: #d6e0ec;
  color: #071a33;
  background: #fff;
}

.shb-materia-imagem {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--shb-blue-800);
}

.shb-materia-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.shb-materia-card:hover .shb-materia-imagem img {
  transform: scale(1.045);
}

.shb-sem-imagem {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--shb-yellow);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.shb-materia-conteudo {
  padding: 18px 18px 22px;
}

.shb-materia-meta {
  margin-bottom: 7px;
  color: var(--shb-yellow);
  font-size: .82rem;
}

.shb-materia-card h2 {
  font-size: 1.12rem;
  line-height: 1.3;
}

.shb-materia-card h2 a {
  color: inherit;
  text-decoration: none;
}

.shb-paginacao {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.shb-paginacao .page-numbers {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  padding: 7px 12px;
  color: inherit;
  text-decoration: none;
}

.shb-paginacao .current {
  border-color: var(--shb-yellow);
  color: #151005;
  background: var(--shb-yellow);
}

@media (max-width: 900px) {
  .shb-curiosidades-grid,
  .shb-materias-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Contém as camadas dos cards no conteúdo, abaixo do cabeçalho e do menu. */
body > main, body > .site-content {
  position: relative !important;
  z-index: 0 !important;
  isolation: isolate;
}

body .site-header {
  z-index: 10002 !important;
  isolation: isolate;
}

body .site-header,
body .site-header .header-main,
body .site-header.has-background {
  background: var(--shb-blue-950) !important;
}

body.shb-light-mode .site-header,
body.shb-light-mode .site-header .header-main,
body.shb-light-mode .site-header.has-background {
  background: #fff !important;
}

.site-header .site-logo:empty { display: none !important; }

@media (min-width: 1025px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    position: relative;
  }
  .site-header .custom-logo-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    margin: 0 !important;
    width: 125px !important;
    height: 125px !important;
  }
  .site-header .header-search {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    max-width: none !important;
  }
  .site-header .header-nav {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    gap: 16px;
    padding-right: 58px;
  }
  .site-header .theme-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 1024px) {
  body.shb-mobile-menu-open { overflow: hidden !important; }
  body.shb-mobile-menu-open .site-header .category-nav { display: none !important; }
  .site-header .header-inner { position: relative; min-height: 82px; display: flex !important; align-items: center; }
  .site-header .header-search, .site-header .header-nav { display: none !important; }
  .site-header .custom-logo-link {
    position: absolute !important;
    top: 50%;
    left: 50%;
    z-index: 3;
    margin: 0 !important;
    transform: translate(-50%, -50%);
  }
  .site-header .custom-logo {
    width: 74px !important;
    height: 74px !important;
    object-fit: contain;
  }
  .site-header .theme-toggle { margin-left: auto !important; order: 2; }
  .site-header .mobile-menu-toggle { position: relative; z-index: 4; display: flex !important; order: -1; margin-right: auto; }
  body.shb-mobile-menu-open .mobile-menu { display: block !important; }
  body .mobile-menu {
    position: fixed !important;
    top: var(--shb-menu-top, 99px) !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10001 !important;
    height: calc(100dvh - var(--shb-menu-top, 99px)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 20px 0 36px !important;
    background: var(--shb-blue-950) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
  }
  body.admin-bar .mobile-menu {
    top: var(--shb-menu-top, 145px) !important;
    height: calc(100dvh - var(--shb-menu-top, 145px)) !important;
  }
  body.shb-light-mode .mobile-menu { background: #fff !important; }
  .mobile-menu .shb-todas-materias-link {
    color: var(--shb-yellow) !important;
    border: 1px solid var(--shb-yellow);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
  }
  .mobile-menu .shb-voce-sabia-btn { display: block; text-align: center; }
  body.shb-light-mode .mobile-menu .shb-todas-materias-link { color: #775000 !important; }
  .search-results .news-card { min-width: 0 !important; }
}

.shb-light-mode .shb-materia-meta,
.shb-light-mode.search-results .news-card-meta { color: #806000 !important; }

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stat-card { min-width: 0 !important; flex-wrap: wrap; gap: 8px !important; padding: 14px !important; }
  .stat-card > div { min-width: 0; }
  .stat-value { font-size: clamp(1rem, 4.3vw, 1.5rem) !important; overflow-wrap: anywhere; }
  .shb-curiosidades, .shb-arquivo { width: min(calc(100% - 20px), 1180px); margin-top: 20px; }
  .shb-curiosidades-grid, .shb-materias-grid, .shb-arquivo-filtros { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .shb-curiosidades-grid,
  .shb-materias-grid {
    grid-template-columns: 1fr;
  }
}

.shb-skip-link { position: fixed; top: -120px; left: 16px; z-index: 100000; padding: 14px 20px; background: #ffca28; color: #041225; font-weight: 800; border-radius: 8px; }
.shb-skip-link:focus { top: 12px; }
.podcast-widget .podcast-spotify { background: #1ed760 !important; color: #041225 !important; font-weight: 700; }
.podcast-widget .podcast-spotify:hover { background: #58eb8d !important; color: #041225 !important; }
.shb-home-intro { padding: 24px 0 4px; }
.shb-home-intro .shb-eyebrow { margin: 0 0 5px; }
.shb-home-intro h1 { font-size: clamp(1.65rem, 3.3vw, 2.6rem); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.035em; }
.shb-home-intro p:last-child { margin: 0; color: var(--shb-muted); font-size: 1rem; }
.shb-explore-section { padding: 32px 0; }
.shb-explore-section h2, .shb-about-compact h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.2; margin-bottom: 20px; }
.shb-explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.shb-explore-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--shb-border); border-radius: 16px; background: var(--shb-card); color: var(--shb-text); text-decoration: none; }
.shb-explore-card > span { color: var(--shb-gold); font-size: 2rem; }
.shb-explore-card h3 { margin: 12px 0 8px; font-size: 1.4rem; }
.shb-explore-card p { color: var(--shb-muted); line-height: 1.65; margin: 0 0 20px; }
.shb-explore-card strong { margin-top: auto; color: var(--shb-gold); }
.shb-explore-card:hover, .shb-explore-card:focus-visible { border-color: var(--shb-gold); }
.shb-about-compact { padding: 32px 0; border-top: 1px solid var(--shb-border); }
.shb-about-compact p { max-width: 76ch; line-height: 1.75; color: var(--shb-muted); }
.shb-topic-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.shb-topic-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--shb-border); border-radius: 9px; color: var(--shb-text); text-decoration: none; font-size: .95rem; }
.shb-topic-links a:hover, .shb-topic-links a:focus-visible { border-color: var(--shb-gold); }
.shb-archive-cta { margin-top: 24px; }
.news-filters a.filter-btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.single-article .entry-content { font-size: 1.125rem; line-height: 1.8; overflow-wrap: break-word; }
.single-article .entry-content > p { margin-bottom: 1.3em; }
.single-article .entry-content h2, .single-article .entry-content h3 { scroll-margin-top: 210px; line-height: 1.3; }
.shb-toc { margin: 24px 0; border: 1px solid var(--shb-border); border-radius: 12px; background: var(--shb-card); }
.shb-toc summary { padding: 14px 18px; cursor: pointer; font-weight: 700; color: var(--shb-text); }
.shb-toc nav { padding: 0 18px 12px; }
.shb-toc ol { padding-left: 24px; margin: 0; }
.shb-toc li { padding: 4px 0; font-size: 1rem; line-height: 1.5; }
.shb-toc a { display: inline-block; padding: 4px 0; color: var(--shb-text); text-decoration: underline; text-underline-offset: 3px; }
.shb-reading-links { padding: 22px 0; margin: 30px 0 12px; border-top: 1px solid var(--shb-border); }
.shb-reading-links .shb-editorial-note { font-size: .875rem; line-height: 1.6; color: var(--shb-muted); margin: 20px 0 0; }
body.shb-light-mode .shb-explore-card strong, body.shb-light-mode .shb-explore-card > span { color: #805700; }
body.shb-light-mode .shb-home-intro .shb-eyebrow { color: #805700; }
@media (max-width: 768px) {
  .shb-home-intro { padding-top: 18px; }
  .shb-home-intro h1 { max-width: 23ch; }
  .shb-explore-grid { grid-template-columns: 1fr; }
  .shb-explore-section, .shb-about-compact { padding: 24px 0; }
  .single-article .entry-content { font-size: 1.0625rem; line-height: 1.8; }
  .single-article .entry-content h2, .single-article .entry-content h3 { scroll-margin-top: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .custom-logo-link,
  .site-header .site-logo,
  .site-header .custom-logo-link img,
  .site-header .custom-logo-link::after,
  .shb-voce-sabia-btn,
  .shb-voce-sabia-btn::after,
  .shb-materia-imagem img,
  .shb-curiosidade-card {
    animation: none !important;
    transition: none !important;
  }
}
