/* ==================================================================
   Sul Redes TI — estilos e animações complementares ao Tailwind
   ================================================================== */

/* ---------- Animações de entrada (reveladas por IntersectionObserver) */
[data-anim] {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
[data-anim="up"] { transform: translateY(40px); }
[data-anim="left"] { transform: translateX(-30px); }
[data-anim="right"] { transform: translateX(30px); }
[data-anim="scale"] { transform: scale(0); }
[data-anim].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Animação dos títulos do hero (Home) */
.hero-title-reveal h1 {
  animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(80px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Marquee (faixa azul de estados/números) */
[data-marquee-track] {
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-33.3333%); }
}

/* ---------- Círculo giratório "EXPLORE MAIS" */
[data-spin] {
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Cards de segmentos com expansão no hover */
.seg-card {
  min-width: 0;
  flex: 1 1 0%;
  transition: flex 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.seg-card.active { flex: 4 1 0%; }
.seg-card img { transform: scale(1); }
.seg-card.active img { transform: scale(1.05); }
.seg-card .seg-expanded {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease 0.25s;
}
.seg-card.active .seg-expanded { opacity: 1; pointer-events: auto; }
.seg-card .seg-collapsed {
  opacity: 1;
  transition: opacity 0.25s ease;
}
.seg-card.active .seg-collapsed { opacity: 0; }

/* ---------- Timeline (página Sobre) */
.timeline-scroll { scrollbar-width: none; }
.timeline-scroll::-webkit-scrollbar { display: none; }
.timeline-scroll.dragging { cursor: grabbing !important; }

/* ---------- Header com sombra ao rolar */
#site-header.scrolled { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); }

/* ---------- Menu mobile deslizante */
#mobile-menu {
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 480px;
  opacity: 1;
}
#mobile-menu.hidden { display: block; visibility: hidden; }
#mobile-menu.open.hidden { visibility: visible; }

/* ---------- Banner de cookies */
#cookie-banner { display: none; }
#cookie-banner.show {
  display: block;
  animation: cookie-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cookie-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- Dropdown do formulário de contato */
.subject-menu {
  position: absolute;
  z-index: 60;
  margin-top: 4px;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.15);
  overflow: hidden;
  animation: menu-in 0.15s ease both;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.subject-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  color: #1f2937;
}
.subject-menu button:hover { background: #f3f4f6; color: #00a651; }

/* ---------- Toast de confirmação do formulário */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #0a1f44;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.toast-msg.hide { animation: toast-out 0.3s ease both; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(16px); }
}

/* ---------- Cards "Nossos Pilares" (página Sobre): mesma altura + rolagem interna */
.pillar-card {
  height: 300px;
  display: flex;
  flex-direction: column;
}

.pillar-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.pillar-scroll::-webkit-scrollbar { width: 6px; }
.pillar-scroll::-webkit-scrollbar-track { background: transparent; }
.pillar-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.pillar-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Ocultar barra de rolagem dos filtros do blog */
.scrollbar-hide { scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ---------- Botões flutuantes laterais ---------- */
.float-stack {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.25rem;
}
.float-item {
  position: relative;
  padding-left: 2rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.float-item.is-collapsed {
  transform: translateX(calc(100% - 2rem));
}
.float-item.is-collapsed > a {
  pointer-events: none;
}
.float-item__toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 3.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem 0 0 0.5rem;
  background: #0A1F44;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.25);
  transition: background-color 0.2s ease;
  z-index: 20;
}
.float-item--cliente .float-item__toggle {
  /* centra na área do botão verde (abaixo do padding do Tony) */
  top: calc(2.5rem + ((100% - 2.5rem) / 2));
  background: #00A651;
  box-shadow: none;
}
.float-item--cliente .float-item__toggle:hover {
  background: #008c44;
}
.float-item--info .float-item__toggle:hover {
  background: #1E3A5F;
}
.float-item__toggle:focus-visible {
  outline: 2px solid #00A651;
  outline-offset: 2px;
}
.float-item__toggle svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.float-item.is-collapsed .float-item__toggle svg {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .float-item,
  .float-item__toggle svg {
    transition: none;
  }
}
.float-cliente {
  position: relative;
  display: none !important;
  padding-top: 2.5rem;
  text-decoration: none;
}
.float-item--cliente {
  display: none !important;
}
.float-cliente__tony {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 9999px;
  border: 3px solid #fff;
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.25);
  z-index: 10;
  pointer-events: none;
}
.float-cliente__btn {
  background: #00A651;
  color: #fff;
  width: 140px;
  padding: 2.5rem 1rem 1rem;
  border-radius: 0.75rem 0 0 0.75rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
  text-align: center;
  user-select: none;
  transition: background-color 0.2s ease;
}
.float-cliente:hover .float-cliente__btn {
  background: #008c44;
}
.float-cliente__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff;
}
.float-cliente__status {
  margin: 0.25rem 0 0;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: rgb(255 255 255 / 0.9);
}

/* ---------- Banner flutuante de aniversário (Home) */
.aniversario-banner {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.aniversario-banner[hidden] {
  display: none !important;
}
.aniversario-banner__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.aniversario-banner__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 31 68 / 0.58);
  backdrop-filter: blur(5px);
}
.aniversario-banner__dialog {
  position: relative;
  z-index: 1;
  width: 96%;
  max-width: 96%;
  border-radius: 1.15rem;
  overflow: hidden;
  background: #0A1F44;
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.42);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 768px) {
  .aniversario-banner__dialog {
    width: 700px;
    min-width: 700px;
    max-width: 700px;
  }
}
.aniversario-banner.is-open .aniversario-banner__dialog {
  transform: none;
  opacity: 1;
}
.aniversario-banner__link {
  display: block;
  line-height: 0;
}
.aniversario-banner__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(86vh, 40rem);
  object-fit: contain;
}
.aniversario-banner__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: #fff;
  color: #0A1F44;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.aniversario-banner__close:hover {
  background: #00A651;
  color: #fff;
  transform: scale(1.06);
}
.aniversario-banner__close:focus-visible {
  outline: 2px solid #00A651;
  outline-offset: 3px;
}
body.aniversario-lock {
  overflow: hidden;
}

/* ---------- Páginas de política (privacidade / cookies) */
.policy-doc h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0A1F44;
  margin: 2rem 0 0.75rem;
}
.policy-doc h3:first-child {
  margin-top: 0;
}
.policy-doc p {
  margin: 0 0 1rem;
}
.policy-doc .policy-kicker {
  display: block;
  font-weight: 700;
  color: #0A1F44;
  margin: 1.25rem 0 0.5rem;
}
.policy-doc ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.policy-doc .policy-meta {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
}
@media (prefers-reduced-motion: reduce) {
  .aniversario-banner__dialog {
    transition: none;
  }
}

/* SUPORTE REMOTO do rodapé — oculto */
footer a[data-open-chat] {
  display: none !important;
}
