/* ==================================================================
   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ão flutuante Área do Cliente (Tony) */
.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-cliente {
  position: relative;
  display: block;
  padding-top: 2.5rem;
  text-decoration: none;
}
.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);
}
