/* ============================================================
   Herdei Blog — estilos custom (child theme)
   ============================================================ */

:root {
  --herdei-blue:        #43C8FD;
  --herdei-blue-deep:   #003D5B;
  --herdei-blue-mid:    #067EAE;
  --herdei-text:        #243B53;
  --herdei-muted:       #6B7C8E;
  --herdei-border:      #E5EDF2;
  --herdei-bg-soft:     #F4F8FB;
  --herdei-pink-bg:     #FCE7F3;
  --herdei-pink-text:   #BE185D;
}

/* Reset/base ------------------------------------------------ */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--herdei-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header ---------------------------------------------------- */
.herdei-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--herdei-border);
  padding: 0.875rem clamp(1rem, 4vw, 2rem);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, 0.92);
}

.herdei-header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.herdei-header-logo img {
  height: 40px !important;
  width: auto !important;
  max-width: 140px;
  object-fit: contain;
}

.herdei-header-back-link {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.herdei-header-back-link a {
  color: var(--herdei-blue-mid);
  text-decoration: none;
  transition: color .15s ease;
}

.herdei-header-back-link a:hover {
  color: var(--herdei-blue-deep);
}

.herdei-header-cta .wp-block-button__link {
  background-color: var(--herdei-blue-deep);
  color: #FFFFFF;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  transition: background-color .15s ease, transform .15s ease;
}

.herdei-header-cta .wp-block-button__link:hover {
  background-color: var(--herdei-blue-mid);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .herdei-header-back-link { display: none; }
  .herdei-header-cta .wp-block-button__link { padding: 0.5rem 1rem; font-size: 0.8125rem; }
}

/* Hero da listagem ------------------------------------------ */
.herdei-blog-hero-title {
  color: var(--herdei-blue-deep);
  margin: 0;
}

.herdei-blog-hero-tagline {
  color: var(--herdei-muted);
  margin-top: 0.75rem;
  max-width: 640px;
}

.herdei-blog-archive-eyebrow {
  margin: 0 0 0.25rem 0;
}

/* Grid de cards --------------------------------------------- */
.herdei-blog-grid.is-layout-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

@media (max-width: 1024px) {
  .herdei-blog-grid.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}

@media (max-width: 640px) {
  .herdei-blog-grid.is-layout-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

.herdei-blog-card {
  background: #FFFFFF;
  border: 1px solid var(--herdei-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.herdei-blog-card:hover {
  box-shadow: 0 12px 30px -10px rgba(67, 200, 253, 0.25);
  transform: translateY(-3px);
  border-color: var(--herdei-blue);
}

.herdei-blog-card-thumb,
.herdei-blog-card-thumb img,
.herdei-blog-card .wp-block-post-featured-image,
.herdei-blog-card .wp-block-post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.herdei-blog-card .wp-block-post-featured-image {
  aspect-ratio: 3/2;
  overflow: hidden;
}

.herdei-blog-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.herdei-blog-card:hover .wp-block-post-featured-image img {
  transform: scale(1.04);
}

.herdei-blog-card-body {
  flex: 1 1 auto;
}

.herdei-blog-card-category {
  display: inline-block;
  background: var(--herdei-pink-bg);
  color: var(--herdei-pink-text);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  margin: 0;
}

.herdei-blog-card-category a {
  color: inherit;
  text-decoration: none;
}

.herdei-blog-card-title {
  color: var(--herdei-blue-deep);
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.herdei-blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.herdei-blog-card-title a:hover {
  color: var(--herdei-blue-mid);
}

.herdei-blog-card-excerpt {
  color: var(--herdei-muted);
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.herdei-blog-card-excerpt p {
  margin: 0;
}

.herdei-blog-card-cta {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--herdei-blue-mid);
  text-decoration: none;
  border: none;
  padding: 0;
  background: transparent;
  transition: color .15s ease, transform .15s ease;
}

.herdei-blog-card-cta:hover {
  color: var(--herdei-blue-deep);
  transform: translateX(2px);
}

/* Paginação numérica ---------------------------------------- */
.herdei-blog-pagination {
  gap: 0.375rem;
  flex-wrap: wrap;
  align-items: center;
}

.herdei-blog-pagination .wp-block-query-pagination-numbers,
.herdei-blog-pagination > a,
.herdei-blog-pagination > span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.herdei-blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.625rem;
  border-radius: 8px;
  border: 1px solid var(--herdei-border);
  background: #FFFFFF;
  color: var(--herdei-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.herdei-blog-pagination .page-numbers:hover {
  border-color: var(--herdei-blue);
  color: var(--herdei-blue-deep);
}

.herdei-blog-pagination .page-numbers.current {
  background: var(--herdei-blue-deep);
  border-color: var(--herdei-blue-deep);
  color: #FFFFFF;
}

.herdei-blog-pagination .wp-block-query-pagination-previous,
.herdei-blog-pagination .wp-block-query-pagination-next {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--herdei-blue-mid);
  text-decoration: none;
}

.herdei-blog-pagination .wp-block-query-pagination-previous:hover,
.herdei-blog-pagination .wp-block-query-pagination-next:hover {
  color: var(--herdei-blue-deep);
}

/* CTA "Não encontrou o que busca?" -------------------------- */
.herdei-blog-bottom-cta {
  background: linear-gradient(135deg, #43C8FD 0%, #67D8FF 100%);
}

.herdei-blog-bottom-cta .wp-block-button__link {
  background: var(--herdei-blue-deep);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
}

.herdei-blog-bottom-cta .wp-block-button__link:hover {
  background: #00253A;
}

/* Single post ----------------------------------------------- */
.herdei-breadcrumb {
  color: var(--herdei-muted);
  margin: 0 0 1.5rem 0;
}

.herdei-breadcrumb a {
  color: var(--herdei-blue-mid);
  text-decoration: none;
}

.herdei-breadcrumb a:hover {
  color: var(--herdei-blue-deep);
  text-decoration: underline;
}

.herdei-post-meta {
  color: var(--herdei-muted);
}

.herdei-post-category {
  display: inline-block;
  background: var(--herdei-pink-bg);
  color: var(--herdei-pink-text);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.herdei-post-category a { color: inherit; text-decoration: none; }

.herdei-post-date {
  font-size: 0.8125rem;
  color: var(--herdei-muted);
  margin: 0;
}

.herdei-post-title {
  color: var(--herdei-blue-deep);
}

.herdei-post-featured img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}

.herdei-post-content {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--herdei-text);
}

.herdei-post-content h2,
.herdei-post-content h3 {
  color: var(--herdei-blue-deep);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.herdei-post-content h2 { font-size: 1.625rem; }
.herdei-post-content h3 { font-size: 1.25rem; }

.herdei-post-content p,
.herdei-post-content ul,
.herdei-post-content ol {
  margin: 0 0 1.25rem 0;
}

.herdei-post-content a {
  color: var(--herdei-blue-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.herdei-post-content a:hover {
  color: var(--herdei-blue-deep);
}

.herdei-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.herdei-post-content blockquote {
  border-left: 3px solid var(--herdei-blue);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--herdei-muted);
  font-style: italic;
}

.herdei-post-content ul,
.herdei-post-content ol {
  padding-left: 1.5rem;
}

.herdei-post-content li {
  margin-bottom: 0.5rem;
}

.herdei-back-to-blog a {
  color: var(--herdei-blue-mid);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s ease;
}

.herdei-back-to-blog a:hover {
  color: var(--herdei-blue-deep);
}

/* Footer ---------------------------------------------------- */
.herdei-footer {
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.herdei-footer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.herdei-footer-logo img {
  filter: brightness(0) invert(1) !important;
  height: 32px !important;
  width: auto !important;
}

.herdei-footer-copy,
.herdei-footer-link {
  margin: 0;
}

@media (max-width: 640px) {
  .herdei-footer-inner { flex-direction: column; text-align: center; }
}

/* 404 ------------------------------------------------------- */
.herdei-404 .wp-block-buttons { gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
