/* Barão do Grão — ajustes por página */

main#main > article.bdg-section:first-child {
  padding-top: calc(var(--bdg-header-h) + 2rem);
}

body.bdg-404-page main#main {
  padding-top: calc(var(--bdg-header-h) + 2rem);
}

.bdg-blog-list .bdg-card__media {
  aspect-ratio: 16 / 9;
}

.bdg-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bdg-border);
}

.bdg-post-nav a {
  font-weight: 700;
  text-decoration: none;
}

.bdg-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.bdg-404 h1 {
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  color: var(--bdg-gold);
  margin-bottom: 0.5rem;
}

.bdg-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.bdg-prose ul li {
  margin-bottom: 0.5rem;
}

.bdg-highlight-box {
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: var(--bdg-radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.bdg-highlight-box h3 {
  margin-bottom: 0.5rem;
}

/* WhatsApp flutuante — apenas contato.html (body.bdg-page-contato) */
.bdg-wa-float {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  text-decoration: none;
  color: var(--bdg-cream);
  animation: bdg-wa-bob 2.8s ease-in-out infinite;
}

.bdg-wa-float__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bdg-forest) 0%, #2a4a36 55%, var(--bdg-brown-deep) 100%);
  border: 2px solid var(--bdg-gold);
  box-shadow:
    0 0 0 0 rgba(197, 160, 89, 0.55),
    0 6px 24px rgba(27, 48, 34, 0.4);
  transition: transform 0.2s var(--bdg-ease), box-shadow 0.2s var(--bdg-ease);
  animation: bdg-wa-glow 2.2s ease-out infinite;
}

.bdg-wa-float:hover .bdg-wa-float__inner,
.bdg-wa-float:focus-visible .bdg-wa-float__inner {
  transform: scale(1.06);
  box-shadow:
    0 0 0 4px rgba(197, 160, 89, 0.35),
    0 8px 28px rgba(61, 43, 31, 0.35);
}

.bdg-wa-float:focus-visible {
  outline: none;
}

.bdg-wa-float:focus-visible .bdg-wa-float__inner {
  outline: 2px solid var(--bdg-gold);
  outline-offset: 4px;
}

.bdg-wa-float__pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
  border-radius: 50%;
  border: 2px solid var(--bdg-gold);
  pointer-events: none;
  animation: bdg-wa-ring 2.4s ease-out infinite;
  z-index: 0;
}

.bdg-wa-float__pulse--delay {
  animation-delay: 1.2s;
}

@keyframes bdg-wa-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes bdg-wa-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(197, 160, 89, 0.45),
      0 6px 24px rgba(27, 48, 34, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(197, 160, 89, 0.12),
      0 8px 28px rgba(27, 48, 34, 0.35);
  }
}

@keyframes bdg-wa-ring {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bdg-wa-float,
  .bdg-wa-float__inner,
  .bdg-wa-float__pulse {
    animation: none;
  }

  .bdg-wa-float__pulse {
    display: none;
  }

  .bdg-wa-float__inner {
    box-shadow: 0 6px 24px rgba(27, 48, 34, 0.4);
  }
}
