/**
 * A Tao Da Mídia — Estilos Globais
 *
 * @description Estilos customizados, animações e componentes visuais
 * @author A Tao Da Mídia
 * @version 1.0.0
 */

/* ─────────────────────────────────────────────────────────────
   VARIÁVEIS CSS CUSTOMIZADAS
   ───────────────────────────────────────────────────────────── */

:root {
  --color-primary: #135bec;
  --color-accent-gold: #D4AF37;
  --color-background-light: #f6f6f8;
  --color-background-dark: #0a0c12;
  --color-glass: rgba(255, 255, 255, 0.03);
  --color-glass-dark: rgba(16, 22, 34, 0.7);

  --transition-fast: 150ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;

  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-full: 9999px;

  --z-index-modal: 1000;
  --z-index-overlay: 999;
  --z-index-header: 50;
}

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────────────────────
   COMPONENTES VISUAIS
   ───────────────────────────────────────────────────────────── */

/**
 * Glassmorphism
 * Efeito de vidro fosco para cards e navegação
 */
.glassmorphism {
  background: var(--color-glass-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/**
 * Hero Gradient
 * Gradiente radial para seção hero
 */
.hero-gradient {
  background: radial-gradient(
    circle at 50% 50%,
    rgba(19, 91, 236, 0.15) 0%,
    rgba(10, 12, 18, 1) 70%
  );
}

/**
 * Text Effects
 * Efeitos de brilho para textos destacados
 */
.text-glow-gold {
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/**
 * Button Effects
 * Efeitos de brilho para botões dourados
 */
.gold-button-glow {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* ─────────────────────────────────────────────────────────────
   CHATBOT TYPEBOT MODAL
   ───────────────────────────────────────────────────────────── */

/**
 * Overlay do Chatbot
 * Camada escura que cobre a tela
 */
.chatbot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease,
              visibility 300ms ease;
}

.chatbot-overlay.chatbot-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/**
 * Container do Chatbot
 * Caixa centralizada que contém o iframe
 */
.chatbot-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 100%;
  max-height: 90vh;
  margin: 5vh auto;
  background: #0a0c12;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(212, 175, 55, 0.1);
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-overlay.chatbot-overlay--visible .chatbot-container {
  transform: scale(1) translateY(0);
}

@media (min-width: 768px) {
  .chatbot-container {
    height: 80vh;
    margin: 10vh auto;
  }
}

/**
 * Iframe do Typebot
 */
.chatbot-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding-top: 3.5rem;
}

/**
 * Botão de Fechar
 */
.chatbot-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 9999px;
  color: #D4AF37;
  cursor: pointer;
  transition: all 150ms ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chatbot-close:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: scale(1.1);
}

.chatbot-close:active {
  transform: scale(0.95);
}

.chatbot-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

/**
 * Decorações (dots animados)
 */
.chatbot-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-accent-gold);
  border-radius: var(--border-radius-full);
  opacity: 0.5;
}

.chatbot-dot--tl {
  top: 1.25rem;
  left: 1.25rem;
}

.chatbot-dot--br {
  bottom: 1.5rem;
  right: 1.5rem;
}

/* ─────────────────────────────────────────────────────────────
   FLOATING CHAT BUTTON
   ───────────────────────────────────────────────────────────── */

/**
 * Botão flutuante do chat
 * Aparece no canto inferior direito da tela
 */
.chatbot-floating-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-index-header);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: var(--color-accent-gold);
  border-radius: var(--border-radius-full);
  box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.4);
  cursor: pointer;
  transition: transform var(--transition-fast) ease,
              box-shadow var(--transition-fast) ease;
}

.chatbot-floating-button:hover {
  transform: scale(1.1);
  box-shadow: 0 20px 35px -5px rgba(212, 175, 55, 0.5);
}

.chatbot-floating-button:active {
  transform: scale(0.95);
}

/**
 * Indicador de ping (notificação)
 */
.chatbot-ping {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 1rem;
  height: 1rem;
  background: var(--color-primary);
  border-radius: var(--border-radius-full);
}

.chatbot-ping--animate {
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/**
 * Ícone do botão flutuante
 */
.chatbot-floating-button .material-symbols-outlined {
  font-size: 1.75rem;
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   ANIMAÇÕES
   ───────────────────────────────────────────────────────────── */

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

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

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

/* ─────────────────────────────────────────────────────────────
   UTILITÁRIOS
   ───────────────────────────────────────────────────────────── */

/**
 * Prevenção de scroll quando modal está aberto
 */
body.chatbot-open {
  overflow: hidden;
}

/**
 * Focus visible para acessibilidade
 */
:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVIDADE ADICIONAL
   ───────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────────
   HAMBURGER MENU (MOBILE)
   ───────────────────────────────────────────────────────────── */

/**
 * Linhas do hamburger
 */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-line-top {
  margin-bottom: 6px;
}

.hamburger-line-bottom {
  margin-top: 6px;
}

/**
 * Estado aberto do hamburger (X)
 */
.hamburger-active .hamburger-line-top {
  transform: rotate(45deg) translate(5px, 6px);
}

.hamburger-active .hamburger-line-middle {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger-active .hamburger-line-bottom {
  transform: rotate(-45deg) translate(5px, -6px);
}

/**
 * Menu mobile dropdown
 */
#mobile-menu {
  transform-origin: top;
  animation: slideDown 0.3s ease forwards;
}

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

@media (max-width: 640px) {
  .chatbot-floating-button {
    bottom: 1rem;
    right: 1rem;
    width: 3.5rem;
    height: 3.5rem;
  }

  .chatbot-container {
    max-height: 95vh;
    margin: 2.5vh auto;
    border-radius: var(--border-radius-md);
  }

  .chatbot-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}
