/**
 * Portal de Adesões — blog (/blog/)
 * Cores: #1A3A6B (navy), #2358A8 (azul médio), #EBF3FB (fundo suave)
 */

.pab-top-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(16, 42, 67, 0.06);
  position: sticky;
  top: 0;
  z-index: 99;
}

body.admin-bar .pab-top-bar {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .pab-top-bar {
    top: 46px;
  }
}

.pab-top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pab-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.pab-logo {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.pab-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pab-nav a {
  color: #1a3a6b;
  text-decoration: none;
  text-transform: uppercase;
}

.pab-nav a:hover {
  color: #2358a8;
  text-decoration: underline;
}

/* Hero / banner institucional
   A imagem do carrossel do portal traz texto próprio; camadas escuras evitam “fantasma” legível. */
.pab-hero {
  position: relative;
  isolation: isolate;
  background-color: #102a43;
  background-image:
    linear-gradient(
      105deg,
      rgba(16, 42, 67, 0.97) 0%,
      rgba(16, 42, 67, 0.94) 38%,
      rgba(16, 42, 67, 0.9) 55%,
      rgba(16, 42, 67, 0.88) 100%
    ),
    linear-gradient(to bottom, rgba(16, 42, 67, 0.25), rgba(16, 42, 67, 0.55)),
    var(--pab-hero-bg, none);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 2.5rem 1.25rem 3rem;
}

.pab-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

/* Hero: marca + texto + faixa de banners do portal */
.pab-hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 768px) {
  .pab-hero-layout {
    grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
    gap: 2.25rem;
    align-items: start;
  }
}

.pab-hero-brand-card {
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  padding: 1.35rem 1.5rem 1.5rem;
  text-align: center;
}

.pab-hero-brand-link {
  display: block;
  line-height: 0;
}

.pab-hero-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
}

.pab-hero-tagline {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #dbeafe;
  margin: 1rem 0 0;
}

.pab-hero-copy {
  min-width: 0;
}

.pab-hero-banners {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 700px) {
  .pab-hero-banners {
    grid-template-columns: 1fr;
  }
}

.pab-hero-banners a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  line-height: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.pab-hero-banners a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

.pab-hero-banners img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  object-position: center;
}

/* Listagem de posts (temas de bloco): cartões e imagem em destaque */
body.pab-blog-index .wp-block-post-template.is-flex-container,
body.pab-blog-index .wp-block-post-template {
  gap: 1.75rem !important;
}

body.pab-blog-index .wp-block-post {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.5rem;
  background: #fafbfd;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04);
}

body.pab-blog-index .wp-block-post-featured-image {
  margin-bottom: 0.75rem;
}

body.pab-blog-index .wp-block-post-featured-image img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 220px;
}

body.pab-blog-index .wp-block-post-title a {
  color: #1a3a6b;
  text-decoration: none;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
}

body.pab-blog-index .wp-block-post-title a:hover {
  color: #2358a8;
  text-decoration: underline;
}

body.pab-blog-index .wp-block-post-excerpt,
body.pab-blog-index .wp-block-post-excerpt p {
  color: #374151;
  line-height: 1.6;
}

.pab-hero-eyebrow {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c8dcf4;
  margin: 0 0 0.75rem;
}

.pab-hero-title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #fff;
}

.pab-hero-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: #e2e8f0;
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.pab-hero-cta {
  display: inline-flex;
  align-items: center;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: #1a3a6b;
  color: #fff !important;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.pab-hero-cta:hover {
  background: #2358a8;
  color: #fff !important;
}

/* Fallback: tema que ainda renderiza o título da listagem como h1 (sem bloco core) */
body.pab-blog-index .wp-block-query-title,
body.pab-blog-index .archive-title,
body.pab-blog-index .page-header .page-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Esconde título duplicado "BlogPa" / nome do site no cabeçalho do tema bloco */
body.pab-branding-active .wp-block-site-title,
body.pab-branding-active header .wp-block-site-title,
body.pab-branding-active .wp-site-blocks > .wp-block-group:first-child .wp-block-site-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Temas clássicos: título no header */
body.pab-branding-active .site-title:not(.pab-hero-title),
body.pab-branding-active #site-title a {
  clip: rect(0, 0, 0, 0) !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.screen-reader-text,
.pab-skip-banner.screen-reader-text {
  position: absolute;
  left: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.pab-skip-banner:focus {
  position: fixed;
  left: 8px;
  top: 40px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #1a3a6b;
  color: #fff;
  clip: auto;
}
