/* ============================================================================
   ATIVE-GLOBAL-UTILITIES.CSS
   ============================================================================
   
   Utilitarios globais, ajustes finais e correcoes de layout
   
   CARREGAR POR ULTIMO (depois de todos os modulos)
   
   VERSAO: 1.3 - Melhorias Premium (Prioridade Media)
   DATA: Janeiro 2026
   
   ALTERACOES V1.3:
   - Espacamento de secoes aumentado para 8rem (era 6rem)
   - Backgrounds com texturas sutis (gradientes dourados)
   - Transicoes refinadas com cubic-bezier suave
   - Removido body { color: white } - BUG CORRIGIDO
   - Usando var(--cinza-texto) para textos secundarios
   
   ============================================================================ */

/* ============================================================================
   1. TIPOGRAFIA PREMIUM
   ============================================================================ */

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif !important;
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--marrom-escuro, #211d1a);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--marrom-escuro);
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h4,
h5,
h6 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--dourado);
}

p {
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--marrom-medio);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 2rem;
  }

  body {
    font-size: 1rem;
  }
}

/* ============================================================================
   2. SECOES COM RESPIRO PREMIUM - ESPACAMENTO AUMENTADO
   ============================================================================ */

/* MELHORIA MEDIA #2: Aumentar espacamento de 6rem para 8rem */
.page-section {
  padding: var(--section-py) 0 !important;
}

@media (max-width: 576px) {
  .page-section {
    padding: var(--section-py-sm) 0 !important;
  }
}

/* Superfícies controladas por classe (sem hardcode) */
.ative-surface-1 {
  background-color: var(--section-bg-1) !important;
}
.ative-surface-2 {
  background-color: var(--section-bg-2) !important;
}

/* Opcional: um “material” sutil (premium) sem imagem */
.ative-surface-1.ative-surface-tinted {
  background-image: linear-gradient(180deg, var(--section-bg-1-tint), transparent);
}

.ative-surface-2.ative-surface-tinted {
  background-image: linear-gradient(180deg, var(--section-bg-2-tint), transparent);
}

/* HERO (espresso) — não entra na alternância */
.ative-surface-hero {
  background-color: var(--hero-bg) !important;
  color: var(--on-hero);
}

/* Garante legibilidade do conteúdo do hero */
.ative-surface-hero h1,
.ative-surface-hero h2,
.ative-surface-hero h3,
.ative-surface-hero h4,
.ative-surface-hero h5,
.ative-surface-hero h6 {
  color: var(--on-hero);
}

.ative-surface-hero p,
.ative-surface-hero .text-muted,
.ative-surface-hero .text-secondary,
.ative-surface-hero small {
  color: var(--on-hero-muted) !important;
}

.ative-surface-hero a:not(.btn) {
  color: var(--on-hero);
  text-decoration-color: var(--hero-divider);
}

.ative-surface-hero a:not(.btn):hover {
  color: var(--branco-puro);
}

.section-heading,
h2.section-heading {
  font-family: 'Playfair Display', serif !important;
  font-size: 3rem;
  color: var(--marrom-escuro);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--dourado), var(--cobre));
  border-radius: 2px;
}

.section-subheading,
.text-muted {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--cinza-texto, #6c757d) !important;
  margin-bottom: 3rem;
  line-height: 1.7;
}

/* Cabeçalho padrão de seção */
.ative-section-header {
  text-align: center !important;
  margin-bottom: var(--section-header-gap);
}

.ative-section-title {
  margin: 0;
}

.ative-section-lead {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--text-muted);
}

/* Evita que âncoras caiam escondidas sob a navbar fixa */
section[id],
header[id] {
  scroll-margin-top: calc(var(--nav-h, 80px) + 12px);
}

/* Divider padrão */
.ative-divider {
  width: var(--divider-width);
  height: var(--divider-height);
  background: var(--divider-color);
  border: 0;
  margin: 0.75rem auto 1rem;
}

/* ============================================================================
   3. HR DIVIDER PREMIUM
   ============================================================================ */

hr.divider {
  height: 3px !important;
  max-width: 3.25rem;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, var(--dourado), var(--cobre)) !important;
  opacity: 1 !important;
  border: none !important;
  border-radius: 2px;
}

hr.divider-light {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5)) !important;
}

/* ============================================================================
   4. DEPOIMENTOS PREMIUM - COM HOVER DOURADO REFINADO
   ============================================================================ */

.testimonial-item {
  background: var(--branco-puro);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--sombra-leve);
  position: relative;
  /* MELHORIA MEDIA #5: Transicao refinada */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(201, 169, 97, 0.1);
}

.testimonial-item::before {
  content: '"';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--dourado);
  opacity: 0.15;
  font-weight: 700;
}

/* MELHORIA MEDIA #4: Hover com borda dourada refinada */
.testimonial-item:hover {
  box-shadow: 0 12px 32px rgba(201, 169, 97, 0.12);
  transform: translateY(-6px);
  border-color: var(--dourado);
}

.testimonial-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--marrom-medio);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.star-rating,
.rating i,
.fa-star {
  color: rgba(var(--marrom-escuro-rgb), 0.6) !important;
}

/* ============================================================================
   5. BADGES E TAGS PREMIUM
   ============================================================================ */

.badge {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 50px;
}

/* MELHORIA MEDIA #1: Badge primary agora usa dourado */
.badge-primary {
  background: linear-gradient(135deg, var(--dourado), var(--cobre)) !important;
  color: var(--branco-puro) !important;
}

.badge-success {
  background: linear-gradient(135deg, var(--verde), var(--verde-escuro)) !important;
  color: var(--branco-puro) !important;
}

/* ============================================================================
   6. ANIMACOES PREMIUM - TRANSICOES REFINADAS
   ============================================================================ */

/* MELHORIA MEDIA #5: Timing curves mais suaves */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pulse-subtle {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.pulse-on-hover:hover {
  animation: pulse-subtle 2s ease-in-out infinite;
}

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

.shimmer {
  background: linear-gradient(90deg, var(--dourado) 0%, var(--dourado-hover) 50%, var(--dourado) 100%);
  background-size: 2000px 100%;
  animation: shimmer 3s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================================
   7. LINKS E CORES
   ============================================================================ */

a {
  color: var(--marrom-medio);
  /* MELHORIA MEDIA #5: Transicao refinada */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--dourado);
  text-decoration: none;
}

.text-primary {
  color: var(--dourado) !important;
}

.text-muted {
  color: var(--cinza-texto, #6c757d) !important;
}

.bg-primary {
  background: linear-gradient(135deg, var(--verde), var(--verde-escuro)) !important;
}

.bg-dark {
  background-color: var(--marrom-escuro) !important;
}

.container {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

html {
  scroll-behavior: smooth;
}

/* ============================================================================
   9. AJUSTES DE SCROLL E PADDING (NAVBAR FIXA)
   ============================================================================ */

/*
  Contrato:
  - Mobile/tablet: sempre compensa a navbar fixa (body padding-top = --nav-h)
  - Desktop:
    - HOME (body.page-home): NÃO compensa no body (o HERO já compensa via CSS)
    - Páginas internas (body.page-internal): compensa no body
*/

body {
  padding-top: 0;
}

@media (max-width: 991.98px) {
  body {
    padding-top: var(--nav-h);
  }
}

@media (min-width: 992px) {
  body.page-internal {
    padding-top: var(--nav-h);
  }
}

/* ============================================================================
   13. CARDS GERAIS - COM HOVER DOURADO
   ============================================================================ */

.card {
  margin: 0 auto;
  float: none;
  margin-bottom: 20px;
  /* MELHORIA MEDIA #5: Transicao refinada */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* MELHORIA MEDIA #4: Hover com borda dourada refinada */
.card:hover {
  border-color: var(--dourado);
  box-shadow: 0 12px 32px rgba(201, 169, 97, 0.12);
}

/* ============================================================================
   14. TABELAS CSS
   ============================================================================ */

#cssTable td {
  vertical-align: top;
  padding-right: 15px;
}

/* ============================================================================
   16. BACKGROUND OVERRIDES
   ============================================================================ */

.bg-light {
  background-color: var(--surface-2) !important;
}

/* CORRECAO: Removido body { color: white } que era bug */

/* ============================================================================
   17. MASTHEAD RESPONSIVO
   ============================================================================ */

header.masthead h1 {
  font-size: 2.4rem;
  font-weight: 600;
}

@media (min-width: 1200px) {
  header.masthead h1 {
    font-size: 3.5rem;
  }
}

/* ============================================================================
   18. TRANSICOES GLOBAIS REFINADAS
   ============================================================================ */

/* MELHORIA MEDIA #5: Aplicar transicao suave em elementos interativos */
button,
a,
.btn,
input,
textarea,
select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   FIM - ATIVE-GLOBAL-UTILITIES.CSS
   ============================================================================ */

/* Evita que âncoras caiam escondidas sob a navbar fixa */
section[id],
header[id] {
  scroll-margin-top: calc(var(--nav-h, 80px) + 12px);
}
