/* ============================================================
   COMPONENTES REUTILIZÁVEIS - Customer Hub
   Animações, Transições, Componentes Globais
   ============================================================ */

/* ============================================================
   ANIMAÇÕES GLOBAIS
   ============================================================ */

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* ============================================================
   HEADER / NAVBAR - MELHORADO
   ============================================================ */

#nav {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInDown 0.5s ease-out;
}

#nav.stuck {
  animation: slideInDown 0.3s ease-out;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-logo {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.nav-logo img {
  transition: filter 0.3s ease;
}

.nav-logo:hover img {
  filter: brightness(0.9);
}

.nav-links a {
  position: relative;
  transition: color 0.3s ease;
}

/* Hamburger animado */
.hamburger {
  transition: transform 0.3s ease;
}

.hamburger:hover {
  transform: scale(1.1);
}

.hamburger[aria-expanded="true"] {
  animation: rotate 0.3s ease forwards;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(90deg); }
}

/* ============================================================
   BOTÕES - COMPONENTE
   ============================================================ */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efeito de ondulação no botão */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-rose);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 91, 138, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  border-color: var(--accent-rose);
  background: rgba(232, 91, 138, 0.05);
  transform: translateY(-2px);
}

/* ============================================================
   CARDS - COMPONENTE
   ============================================================ */

.card-base {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

.card-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.card-base:hover::before {
  left: 100%;
}

.card-base:hover {
  border-color: var(--accent-rose);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(232, 91, 138, 0.12);
}

/* ============================================================
   BADGES - COMPONENTE
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.badge-primary {
  background: rgba(232, 91, 138, 0.1);
  border: 1px solid var(--accent-rose);
  color: var(--accent-rose);
}

.badge-primary:hover {
  background: rgba(232, 91, 138, 0.15);
  transform: scale(1.05);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================================
   FORMULÁRIOS - COMPONENTE
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-input,
.form-textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 3px rgba(232, 91, 138, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-3);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============================================================
   LINKS - COMPONENTE
   ============================================================ */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-rose);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.link-arrow:hover {
  gap: 10px;
  color: var(--primary);
}

.link-arrow::after {
  content: '→';
  transition: transform 0.3s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ============================================================
   TAGS - COMPONENTE
   ============================================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--accent-rose);
  background: rgba(232, 91, 138, 0.08);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.tag:hover {
  background: rgba(232, 91, 138, 0.15);
  border-color: var(--accent-purple);
  transform: scale(1.02);
}

/* ============================================================
   MODAIS - COMPONENTE
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 36px;
  max-width: 500px;
  width: 90%;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* ============================================================
   TOOLTIPS - COMPONENTE
   ============================================================ */

.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

/* ============================================================
   LOADERS - COMPONENTE
   ============================================================ */

.loader {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent-rose);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   SCROLLBAR CUSTOMIZADO
   ============================================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-rose);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* ============================================================
   UTILIDADES DE ANIMAÇÃO
   ============================================================ */

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideInUp 0.5s ease-out;
}

.animate-slide-down {
  animation: slideInDown 0.5s ease-out;
}

.animate-slide-left {
  animation: slideInLeft 0.5s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.5s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   TRANSIÇÕES SUAVES
   ============================================================ */

.transition-all {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.transition-transform {
  transition: transform 0.3s ease;
}

/* ============================================================
   ESTADOS HOVER
   ============================================================ */

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow:hover {
  box-shadow: 0 0 24px rgba(232, 91, 138, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
  }

  .card-base {
    padding: 16px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
