/* ==========================================================================
   AGENCY MB CONNECTING - BASE & DESIGN SYSTEM
   Variáveis, Reset, Tipografia, Containers, Botões Globais e Utilitários
   ========================================================================== */

:root {
  --bg-dark: #070B16;
  --bg-surface: #0E162B;
  --bg-card: #121C36;
  --bg-card-hover: #19274D;
  --border-subtle: #1F2D54;
  --border-gold: rgba(223, 171, 54, 0.35);

  --gold-primary: #DFAB36;
  --gold-light: #F6CE70;
  --gold-dark: #9A721C;
  --gold-gradient: linear-gradient(135deg, #F6CE70 0%, #DFAB36 50%, #A9791D 100%);

  --silver-accent: #A5B4CB;
  --silver-glow: transparent;

  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --whatsapp-color: #25D366;
  --live-red: #EF4444;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Curvas de Transição e Easing Padrão UX/UI de Mercado */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --reveal-duration: 0.75s;
  --scroll-offset: 92px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
  overflow-x: clip;
  width: 100%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.6;
  padding-bottom: 0;
  overflow-x: clip;
  width: 100%;
}

/* Offset de ancoragem para seções navegáveis com Header Sticky */
section[id],
div[id="eventos"],
div[id="horoscopo"] {
  scroll-margin-top: var(--scroll-offset);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* Container base com suporte a mobile, tablet, desktop médio e desktop de tela grande */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

@media (min-width: 1441px) {
  .container {
    max-width: 1380px;
    padding: 0 2rem;
  }
}

@media (min-width: 1680px) {
  .container {
    max-width: 1480px;
    padding: 0 2.5rem;
  }
}

/* Gradientes e Utilitários de Texto */
.text-gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   SOUNDWAVE CIRCULAR DE FUNDO (DESATIVADO)
   ========================================================================== */
.soundwave-canvas {
  display: none !important;
}

main,
footer,
.hero-section,
.portfolio-section {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   BOTÕES E COMPONENTES GLOBAIS DE INTERAÇÃO
   ========================================================================== */
.btn-gold {
  background: var(--gold-primary);
  color: #070B16;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: none;
}

.btn-outline {
  background: rgba(14, 22, 43, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface);
  transform: translateY(-2px);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--whatsapp-color);
  color: #070B16;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 99px;
  transition: all 0.2s ease;
}

.btn-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: none;
}

.btn-advertise {
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 28, 54, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.btn-advertise::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  padding-top: 220%;
  background: var(--gold-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: -1;
  pointer-events: none;
}

.btn-advertise:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-advertise:hover {
  color: #070B16;
  border-color: var(--gold-primary);
  box-shadow: none;
}

.btn-advertise i {
  position: relative;
  z-index: 1;
  display: inline-block;
  transform-origin: 20% 80%;
  transition: color 0.3s ease, transform 0.2s ease;
}

.btn-advertise:hover i {
  color: #070B16;
  animation: megaphone-diagonal-swing 2s ease-in-out infinite;
}

/* Animação de swing diagonal intervalado para ícone de megafone/anúncio (ativa no hover) */
@keyframes megaphone-diagonal-swing {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  6% {
    transform: translate(-3px, -3px) rotate(-16deg);
  }
  12% {
    transform: translate(3px, 2px) rotate(14deg);
  }
  18% {
    transform: translate(-2px, -2px) rotate(-10deg);
  }
  24% {
    transform: translate(2px, 1px) rotate(6deg);
  }
  30%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* ==========================================================================
   BADGES E TAGS GLOBAIS
   ========================================================================== */
.event-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.badge-destaque {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(223, 171, 54, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

.badge-cobertura {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(18, 28, 54, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--silver-accent);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--silver-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--gold-light);
}

.breadcrumbs span {
  color: var(--gold-primary);
  font-weight: 600;
}

/* ==========================================================================
   CABEÇALHOS DE SEÇÃO E WIDGETS DE SIDEBAR COMPARTILHADOS
   ========================================================================== */
.section-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  transition: border-color 0.45s var(--ease-out-expo);
}

/* Linha de destaque dourada animada na rolagem (ativa quando a seção entra em foco) */
.section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s var(--ease-out-expo), opacity 0.45s ease;
  opacity: 0;
  pointer-events: none;
}

.is-revealed .section-header::after,
.section-header.is-revealed::after,
.section-in-view .section-header::after {
  transform: scaleX(1);
  opacity: 1;
}

.section-in-view > .section-header::after,
.sidebar-widget.section-in-view > .section-header::after {
  width: 110px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--gold-primary);
  transition: transform 0.45s var(--ease-out-expo), color 0.3s ease;
}

.section-in-view > .section-header .section-title i,
.sidebar-widget.section-in-view > .section-header .section-title i {
  color: var(--gold-light);
  transform: scale(1.08);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: border-color 0.45s var(--ease-out-expo),
              box-shadow 0.45s var(--ease-out-expo),
              background-color 0.45s var(--ease-out-expo);
}

.sidebar-widget.section-in-view {
  border-color: rgba(223, 171, 54, 0.28);
}

/* ==========================================================================
   DIVISORES VISUAIS DE TRANSIÇÃO ENTRE SEÇÕES (ARCHITECTURAL DIVIDERS)
   ========================================================================== */
.section-transition-divider {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 12px auto;
  padding: 0 1.5rem;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.section-transition-divider::before {
  content: '';
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(31, 45, 84, 0.85) 20%,
    rgba(223, 171, 54, 0.45) 50%,
    rgba(31, 45, 84, 0.85) 80%,
    transparent 100%
  );
  transform: scaleX(0.35);
  opacity: 0;
  transition: transform 1.1s var(--ease-out-expo), opacity 0.8s var(--ease-out-quart);
}

.section-transition-divider .divider-node {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--gold-primary);
  border-radius: 2px;
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 0 5px var(--bg-dark), 0 0 12px rgba(223, 171, 54, 0.45);
  transition: transform 0.65s var(--ease-out-expo) 0.18s, opacity 0.65s ease 0.18s;
  opacity: 0;
}

.section-transition-divider.is-revealed::before {
  transform: scaleX(1);
  opacity: 1;
}

.section-transition-divider.is-revealed .divider-node {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

/* ==========================================================================
   SISTEMA DE TRANSIÇÃO E REVELAÇÃO NA ROLAGEM (SCROLL REVEAL - UX/UI)
   Progressive Enhancement: Ativo apenas quando `html.js-scroll-anim` está presente
   ========================================================================== */
html.js-scroll-anim [data-reveal]:not(.reveal-complete) {
  opacity: 0;
  will-change: transform, opacity;
  transition-property: opacity, transform;
  transition-duration: var(--reveal-duration, 0.75s);
  transition-timing-function: var(--ease-out-expo);
  transition-delay: calc(var(--stagger-index, 0) * 90ms + var(--reveal-delay, 0ms));
}

/* Variações Direcionais de Entrada */
html.js-scroll-anim [data-reveal="up"]:not(.is-revealed):not(.reveal-complete),
html.js-scroll-anim [data-reveal=""]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(0, 28px, 0);
}

html.js-scroll-anim [data-reveal="down"]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(0, -24px, 0);
}

html.js-scroll-anim [data-reveal="left"]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(-28px, 0, 0);
}

html.js-scroll-anim [data-reveal="right"]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(28px, 0, 0);
}

html.js-scroll-anim [data-reveal="scale"]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(0, 22px, 0) scale(0.975);
}

html.js-scroll-anim [data-reveal="fade"]:not(.is-revealed):not(.reveal-complete) {
  transform: translate3d(0, 12px, 0);
}

/* Estado Revelado (Visível no Viewport durante a transição) */
html.js-scroll-anim [data-reveal].is-revealed:not(.reveal-complete) {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* Limpeza pós-animação para preservar transformações nativas (hover, 3D, etc.) */
html.js-scroll-anim [data-reveal].reveal-complete {
  opacity: 1;
  will-change: auto;
  transition-delay: 0ms;
}

/* Destaque sutil temporário ao navegar via clique no menu (Anchor Focus Feedback) */
@keyframes sectionTargetHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(223, 171, 54, 0);
  }
  30% {
    box-shadow: 0 0 0 2px rgba(223, 171, 54, 0.45), 0 12px 32px -8px rgba(223, 171, 54, 0.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(223, 171, 54, 0);
  }
}

.section-target-pulse {
  animation: sectionTargetHighlight 1.2s var(--ease-out-expo) forwards;
  border-radius: var(--radius-md);
}

/* Em telas menores (mobile/tablet), neutraliza deslocamentos horizontais para evitar desalinhamento visual */
@media (max-width: 768px) {
  html.js-scroll-anim [data-reveal="left"]:not(.is-revealed):not(.reveal-complete),
  html.js-scroll-anim [data-reveal="right"]:not(.is-revealed):not(.reveal-complete) {
    transform: translate3d(0, 16px, 0);
  }

  /* No mobile, remove os loaders/barras de rolagem das seções, mantendo apenas a barra de progresso no header */
  .section-header::after,
  .section-header.is-revealed::after,
  .is-revealed .section-header::after,
  .section-in-view .section-header::after,
  .section-in-view > .section-header::after,
  .sidebar-widget.section-in-view > .section-header::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    width: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .section-transition-divider {
    display: none !important;
  }

  .section-in-view > .section-header .section-title i,
  .sidebar-widget.section-in-view > .section-header .section-title i {
    transform: none !important;
    color: var(--gold-primary) !important;
  }

  .sidebar-widget.section-in-view {
    border-color: var(--border-subtle) !important;
  }
}

/* ==========================================================================
   ACESSIBILIDADE: RESPEITO A PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js-scroll-anim [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .section-header::after,
  .section-transition-divider::before,
  .section-transition-divider .divider-node {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

