/* ============================================ */
/* BoraVida - Custom Styles                     */
/* Complementary to Tailwind CSS CDN            */
/* ============================================ */

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

[x-cloak] {
  display: none !important;
}

/* ---- Smooth fade-in on load ---- */
body {
  opacity: 0;
  animation: fadeIn 0.4s ease-out 0.1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ---- WhatsApp pulse animation ---- */
@keyframes pulseSlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
}

.animate-pulse-slow {
  animation: pulseSlow 2.5s ease-in-out infinite;
}

/* ---- Hero background Ken Burns ---- */
#hero > div:first-child > img {
  animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.08) translate(-1%, -1%);
  }
}

/* ---- Credibility bar counter effect ---- */
#credibilidade .grid > div {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.5s ease-out forwards;
}

#credibilidade .grid > div:nth-child(1) { animation-delay: 0.1s; }
#credibilidade .grid > div:nth-child(2) { animation-delay: 0.2s; }
#credibilidade .grid > div:nth-child(3) { animation-delay: 0.3s; }
#credibilidade .grid > div:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Service card hover lift ---- */
#servicos .group:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ---- Step circles glow on hover ---- */
#como-funciona .group:hover > div:first-child {
  box-shadow: 0 0 30px rgba(151, 198, 194, 0.4);
}

/* ---- FAQ accordion collapse plugin for Alpine ---- */
[x-collapse] {
  overflow: hidden;
}

/* ---- Active nav link highlight (optional JS enhancement) ---- */
header nav a.active-link {
  color: #4A6058;
  position: relative;
}

header nav a.active-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4A6058;
  border-radius: 1px;
}

/* ---- Scroll-triggered reveal (managed by IntersectionObserver in JS) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Selection color ---- */
::selection {
  background: #97C6C2;
  color: #1F2122;
}

/* ---- Scrollbar styling (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F0F0F0;
}

::-webkit-scrollbar-thumb {
  background: #7D8D87;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4A6058;
}

/* ---- Print styles ---- */
@media print {
  header, footer, #whatsapp-float, .fixed {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  section {
    page-break-inside: avoid;
  }
}
