/* =====================================================================
   components.css — estilos dos componentes compartilhados do site
   Navbar, Rodapé e Botão flutuante do WhatsApp.
   Marcação gerada por assets/js/components.js (não duplicar nos HTMLs).
   ===================================================================== */

:root {
  --navbar-bg: #0a0c1a;
  --navbar-text: #f0f0f0;
  --navbar-gold: #cba776;
  --footer-bg-bar: #222346;
  --footer-bg-bottom: #2b2c48;
  --whatsapp-green: #25d366;
}

/* =========================================
   NAVBAR
   Home: nasce transparente e fica sólida ao rolar (.scrolled).
   Páginas internas: <body data-navbar="solid"> já começa sólida.
========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  box-shadow: none;
  padding: 15px 0;
  transition: all 0.4s ease-in-out;
}

.navbar.scrolled {
  background-color: var(--navbar-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar-logo {
  width: 90px;
  height: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
}

.navbar-links a {
  color: var(--navbar-text);
  text-decoration: none;
  margin-left: 25px;
  font-weight: 300;
  font-family: 'Inter', 'Open Sans', sans-serif;
  transition: color 0.3s ease;
  font-size: 1rem;
}

.navbar-links a:hover,
.navbar-links a[aria-current="page"] {
  color: var(--navbar-gold);
}

/* Menu mobile (hamburger) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--navbar-gold);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--navbar-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  .navbar-links.open {
    transform: translateX(0);
  }

  .navbar-links a {
    margin: 15px 0;
    font-size: 1.5rem;
  }

  /* Animação do hamburger para "X" */
  .menu-toggle.open .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  body.no-scroll {
    overflow: hidden;
  }
}

/* =========================================
   RODAPÉ — barra de contatos
========================================= */
.footer-contact-bar {
  background-color: var(--footer-bg-bar);
  padding: 40px 0;
  color: #f0f0f0;
}

.footer-contact-bar .containerfooter {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.footer-bar-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-bar-item i {
  color: var(--navbar-gold);
  font-size: 1.3rem;
  width: 25px;
  text-align: center;
}

.footer-bar-item a,
.footer-bar-item span {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.footer-bar-item a:hover {
  color: var(--navbar-gold);
}

/* Selo de avaliação do Google */
.footer-bar-item.google-rating {
  color: #f0f0f0;
  text-decoration: none;
  cursor: pointer;
}

.google-rating__icon {
  margin-right: 12px;
  background: #fff;
  padding: 4px;
  border-radius: 50%;
}

.google-rating__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.google-rating__score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.google-rating__score {
  font-weight: 700;
  font-size: 1.2rem;
}

.google-rating__stars {
  color: #fabb05;
  font-size: 0.9rem;
  display: flex;
  gap: 2px;
}

.google-rating__link-text {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.9;
  text-decoration: underline;
}

/* =========================================
   RODAPÉ — barra de copyright
========================================= */
.footer-bottom {
  background-color: var(--footer-bg-bottom);
  padding: 20px 0;
  color: #a0a0a0;
  font-size: 0.85rem;
}

.footer-bottom .containerfooter {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom .credit a {
  color: var(--navbar-gold);
  text-decoration: none;
  font-weight: 500;
}

.footer-bottom .credit a:hover {
  text-decoration: underline;
}

/* =========================================
   BOTÃO FLUTUANTE DO WHATSAPP
   Começa "fechado" (só o ícone, com pulso discreto).
   components.js adiciona .is-open ao rolar a página e a mensagem se abre.
========================================= */
.floating-whatsapp {
  position: fixed;
  bottom: 65px;
  right: 25px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  min-width: 60px;
  padding: 0 16px;
  border-radius: 30px;
  overflow: hidden;
  background: #2fe479;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: whatsapp-pulse 2.4s ease-out infinite;
}

.floating-whatsapp i {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.floating-whatsapp span {
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width 0.55s ease, margin-left 0.55s ease, opacity 0.35s ease 0.1s;
}

.floating-whatsapp.is-open {
  padding: 0 22px 0 16px;
  animation: none;
}

.floating-whatsapp.is-open span {
  max-width: 260px;
  margin-left: 10px;
  opacity: 1;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0.55);
  }

  70% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 18px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-whatsapp {
    animation: none;
  }

  .floating-whatsapp,
  .floating-whatsapp span {
    transition: none;
  }
}

/* =========================================
   INDICADOR DE CARREGAMENTO (spinner)
   Uso: <div class="sna-loader" role="status"> ... </div>
   ou JS: container.innerHTML = SNA.loaderHTML('Carregando...')
========================================= */
.sna-loader {
  grid-column: 1 / -1;
  /* ocupa a linha inteira quando está dentro de um grid */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
  color: #a0a0a0;
  font-size: 0.95rem;
}

.sna-loader__spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(203, 167, 118, 0.25);
  border-top-color: var(--navbar-gold);
  border-radius: 50%;
  animation: sna-spin 0.9s linear infinite;
}

.sna-loader__hint {
  font-size: 0.8rem;
  opacity: 0.75;
}

.sna-loader-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
}

.sna-loader-error button {
  margin-top: 14px;
  padding: 10px 22px;
  border: 1px solid var(--navbar-gold);
  border-radius: 30px;
  background: transparent;
  color: var(--navbar-gold);
  font: inherit;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.sna-loader-error button:hover {
  background: var(--navbar-gold);
  color: var(--navbar-bg);
}

@keyframes sna-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sna-loader__spinner {
    animation-duration: 2.4s;
  }
}

/* =========================================
   RESPONSIVIDADE DO RODAPÉ E DO WHATSAPP
========================================= */
@media (max-width: 768px) {
  .footer-bar-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-bar-item {
    justify-content: center;
    text-align: center;
  }

  .footer-bottom .containerfooter {
    flex-direction: column;
    justify-content: center;
  }

  .floating-whatsapp {
    right: 16px;
    bottom: 20px;
    height: 56px;
    min-width: 56px;
    font-size: 0.9rem;
  }

  .floating-whatsapp.is-open span {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .footer-bar-item {
    justify-content: flex-start;
    text-align: left;
  }
}