/**
 * Custom Block Styles
 * 
 * Este arquivo contém estilos personalizados para blocos Gutenberg.
 * Classes adicionadas aqui estarão sempre disponíveis no site.
 */

/* ========================================
   ANIMAÇÕES DE ENTRADA (FADE / ZOOM / FLIP)
   ======================================== */

.anim-fade-in,
.anim-fade-up,
.anim-fade-down,
.anim-fade-left,
.anim-fade-right,
.anim-zoom-in,
.anim-zoom-out,
.anim-flip-y {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: 0.15s; /* delay padrão */
  will-change: opacity, transform;
}

/* Opções de delay selecionáveis no editor */
.anim-delay-0    { transition-delay: 0s !important; }
.anim-delay-100  { transition-delay: 0.1s !important; }
.anim-delay-200  { transition-delay: 0.2s !important; }
.anim-delay-300  { transition-delay: 0.3s !important; }
.anim-delay-500  { transition-delay: 0.5s !important; }
.anim-delay-700  { transition-delay: 0.7s !important; }
.anim-delay-1000 { transition-delay: 1s !important; }
.anim-delay-1500 { transition-delay: 1.5s !important; }

/* Posição inicial de cada tipo */
.anim-fade-up    { transform: translateY(48px); }
.anim-fade-down  { transform: translateY(-48px); }
.anim-fade-left  { transform: translateX(-60px); }
.anim-fade-right { transform: translateX(60px); }
.anim-zoom-in    { transform: scale(0.85); }
.anim-zoom-out   { transform: scale(1.15); }
.anim-flip-y     { transform: rotateX(80deg); transform-origin: top center; }

/* Estado visível — adicionado pelo IntersectionObserver */
.anim-fade-in.is-animated,
.anim-fade-up.is-animated,
.anim-fade-down.is-animated,
.anim-fade-left.is-animated,
.anim-fade-right.is-animated,
.anim-zoom-in.is-animated,
.anim-zoom-out.is-animated,
.anim-flip-y.is-animated {
  opacity: 1;
  transform: none;
}

/* ========================================
   MOBILE — desabilita efeitos complexos (< 1024px)
   ======================================== */

@media (max-width: 1023px) {

  /* Animações de entrada: sempre visíveis */
  .anim-fade-in, .anim-fade-up, .anim-fade-down,
  .anim-fade-left, .anim-fade-right,
  .anim-zoom-in, .anim-zoom-out, .anim-flip-y {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Typewriter: texto normal, display block, sem corte */
  .anim-typewriter {
    white-space: normal !important;
    overflow: visible !important;
    display: block !important;
    line-height: 1.2 !important;
  }
  .anim-typewriter::after { display: none; }

  /* Efeito imagem giratória: sem rotação */
  .efeito-images figure.img-circle { transform: none !important; }

  /* Steps section: cancela scrollytelling, tudo centralizado */
  .steps-scroll-wrapper { height: auto !important; }
  .steps-section {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
  }
  .steps-section .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .steps-section .wp-block-column {
    opacity: 1 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 480px !important;
    text-align: center !important;
  }
  /* Ícone centralizado no step */
  .steps-section .justco-icon {
    display: flex !important;
    justify-content: center !important;
  }
  /* Seta para baixo entre steps (exceto o último) */
  .steps-section .wp-block-column:not(:last-child)::after {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0.75rem auto;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23c3e535' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m19 12-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
  .steps-intro {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .steps-progress, .steps-arrow { display: none !important; }

  /* Cover stats: sem expansão lateral nem padding */
  .wp-block-cover:has(.counter-section),
  .wp-block-cover:has(.counter-section).cover--wide {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    transition: none !important;
  }
  /* Hiper section: before full width fixo */
  .hiper-section::before,
  .hiper-section.hiper-before--wide::before { width: 100vw !important; transition: none !important; }
}

/* ========================================
   TYPEWRITER — escreve e apaga em loop
   ======================================== */

.anim-typewriter {
  overflow: hidden;
  white-space: nowrap;
}

.anim-typewriter::after {
  content: '|';
  display: inline;
  margin-left: 1px;
  animation: tw-blink 0.7s step-end infinite;
}

@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ========================================
   EFEITO IMAGES — img-fix + img-circle
   ======================================== */

/* img-fix flui normalmente e define a altura do container */
.efeito-images figure.img-fix {
  position: relative;
  z-index: 0;
  margin: 0;
  width: 100%;
}

/* img-circle sobrepõe img-fix com posição absoluta */
.efeito-images figure.img-circle {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

/* Imagens 100% width com altura proporcional */
.efeito-images figure.img-fix img,
.efeito-images figure.img-circle img {
  width: 100%;
  height: auto;
  display: block;
}

/* Container precisa de position relative para o absolute funcionar */
.efeito-images > .wp-block-group__inner-container {
  position: relative;
}

/* ========================================
   BLOCK: CONTENT SECTION
   ======================================== */

.position-relative * {
  position: relative;
  z-index: 1;
}

.giro-elemento-1 {
  max-width: 30%;
  position: absolute;
  right: -2%;
  bottom: -10%;
  z-index: 0;
}
.giro-elemento-2 {
  max-width: 20%;
  position: absolute;
  left: -5%;
  top: 60%;
  z-index: 0;
}

.giro-elemento-3 {
  width: 230px;
  max-width: 100%;
  position: absolute;
  left: 2%;
  top: -20px;
  z-index: 0;
}

.giro-elemento-4 {
  width: 230px;
  max-width: 100%;
  position: absolute;
  left: -250px;
  bottom: -20px;
  z-index: 0;
}

.blocks-flex hr {
  padding: 10px !important;
}
.blocks-flex .wp-block-group .wp-block-cover {
  margin-bottom: 2em;
  border-radius: 20px;
  -webkit-border-radius: 10px !important;
  -moz-border-radius: 10px !important;
  border-radius: 10px !important;
  overflow: hidden;
  position: relative;
  color: #fff;
}
.blocks-flex .wp-block-group .wp-block-cover .wp-block-cover__inner-container {
  color: #fff;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;
  padding: 30px;
}
.blocks-flex .wp-block-group .wp-block-cover .wp-block-cover__inner-container h4 {font-size: 26px !important; line-height: 32px !important; color: #fff;}
.blocks-flex .wp-block-group .wp-block-cover::after {
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: #00000035;
  z-index: 1;
}

.cover-section {
  width: 94vw !important; /* Largura total da viewport */
  max-width: none !important;
  margin-left: calc(-47vw + 50%) !important; /* Centraliza e expande */
  margin-right: calc(-47vw + 50%) !important;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  padding-left: 2.5vw; /* 2.5% de cada lado para ter 95% total */
  padding-right: 2.5vw;
  z-index: 2;
}

/* Imagem de fundo */
.cover-section .wp-block-cover__image-background {
    object-position: center;
}

/* Overlay escuro */
.cover-section .wp-block-cover__background {
    opacity: 0.4;
}

/* Conteúdo interno - Limitado como container-custom */
.cover-section .wp-block-cover__inner-container {
    max-width: 80rem; /* 1280px - mesmo que max-w-7xl */
    margin-left: auto;
    margin-right: auto;
    padding: 4rem 1rem; /* py-16 px-4 */
    position: relative;
    z-index: 2;
}

/* ============================================
   BLOCKQUOTE (Citação no topo)
   ============================================ */

.cover-section .wp-block-quote {
    border: none;
    margin: 0 0 3rem 0;
    padding: 0;
    position: relative;
}

.cover-section .wp-block-quote p {
    font-size: 2.2rem; /* 40px */
    line-height: 1;
    font-weight: 800;
    color: white;
    margin: 0;
}

/* Aspas decorativas - AGORA COM SVG */
.cover-section .wp-block-quote::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: -1rem;
    width: 80px;
    height: 80px;
    background-image: url('../img/SVG/aspas.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    z-index: -1;
}

/* ============================================
   COLUNAS (Lista + Parágrafo)
   ============================================ */

.cover-section .wp-block-columns {
    gap: 3rem;
    margin-top: 3rem;
}

.cover-section .wp-block-column {
    color: white;
}

/* Lista (Coluna esquerda) */
.cover-section .wp-block-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cover-section .wp-block-list li {
    font-size: 1.5rem;
    line-height: 1.4;
    position: relative;
    padding-left: 1.5rem;
    list-style: circle;
    padding-left: 20px;
}

/* Parágrafo (Coluna direita) */
.cover-section .wp-block-column p {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0;
}

/* ============================================
   RESPONSIVO
   ============================================ */

/* Tablets */
@media (min-width: 640px) {
    .cover-section .wp-block-cover__inner-container {
        padding: 4rem 1.5rem; /* px-6 */
    }
    
    .cover-section .wp-block-quote p {
        font-size: 3rem; /* 48px */
    }
    
    .cover-section .wp-block-quote::before {
        width: 100px;
        height: 100px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .cover-section .wp-block-cover__inner-container {
        padding: 5rem 2rem; /* py-20 px-8 */
    }
    
    .cover-section .wp-block-quote p {
        font-size: 3.5rem; /* 56px */
    }
    
    .cover-section .wp-block-columns {
        gap: 4rem;
    }
    
    .cover-section .wp-block-quote::before {
        width: 120px;
        height: 120px;
        top: -3rem;
    }
}

/* Mobile - Colunas empilhadas */
@media (max-width: 781px) {
    .cover-section .wp-block-columns {
        flex-direction: column;
    }
    
    .cover-section .wp-block-quote p {
        font-size: 2rem; /* 32px */
    }
    
    .cover-section .wp-block-quote::before {
        width: 60px;
        height: 60px;
        top: -1rem;
    }
}


.color-section-1 {position: relative; color: #ede6d9; padding-bottom: 50px;}
.color-section-1 * {position: relative; z-index: 1;}
.color-section-1::before {
  content: '';
  background: #006349;
  width: 100vw;
  height: calc(100% + 300px);
  left: 0;
  bottom: 0;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  position: absolute;
  z-index: 0;
}
.color-section-1 h1, 
.color-section-1 h2, 
.color-section-1 h3, 
.color-section-1 h4{
  color: #c3e535;
}


.wp-block-group h1:first-child,
.wp-block-group h2:first-child,
.wp-block-group h3:first-child,
.wp-block-group h4:first-child {
    padding-bottom: 10px !important;
}



/* ========================================
   GRÁFICO CIRCULAR - SEM BORDAS
   ======================================== */

.grafico {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 !important;
}

.grafico .wp-block-group__inner-container {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.grafico p {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #c3e535;
  line-height: 1.3;
  z-index: 2;
}

/* ========================================
   RESPONSIVO
   ======================================== */
@media (max-width: 768px) {
  .grafico {
    max-width: 350px;
  }

  .grafico p {
    font-size: 0.875rem;
    padding: 1rem;
  }
}

/* ========================================
   STEPS SECTION — scrollytelling
   ======================================== */

.steps-scroll-wrapper {
  position: relative;
}

.steps-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Desktop: garante sticky via CSS (reforço ao inline style do JS) */
@media (min-width: 1024px) {
  .steps-section[style*="sticky"] {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
  }
}

/* Cada coluna começa oculta */
.steps-section .wp-block-columns > .wp-block-column {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.steps-section .wp-block-columns > .wp-block-column.step-visible {
  opacity: 1;
  transform: none;
}

/* Número h6 */
.steps-section h6 {
  font-size: 2.5rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  margin: 0 0 0.5rem 0 !important;
  color: #c3e535 !important;
}

/* Ícone */
.steps-section .justco-icon {
  display: block;
  margin: 0.75rem 0;
}

.steps-section .justco-icon svg {
  width: 38px;
  height: 38px;
}

/* Título */
.steps-section h3 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 !important;
  padding: 0 !important;
  line-height: 1.4rem !important;
}

/* Descrição */
.steps-section p {
  font-size: 0.9rem !important;
  line-height: 1.65 !important;
  opacity: 0.7;
  margin: 0 !important;
}

/* Inner container não pode ser o containing block do intro */
.steps-section > .wp-block-group__inner-container {
  position: static;
  width: 100%;
}

/* Intro (conteúdo antes das colunas, encapsulado via JS) */
.steps-intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}

.steps-intro.steps-intro--visible {
  opacity: 1;
  transform: none;
}

/* Seta entre steps (inserida via JS) */
.steps-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 6px;
  color: #d1d5db;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.4s ease;
}

.steps-arrow.is-visible {
  opacity: 0.4;
  transform: none;
}

.steps-arrow.is-active {
  opacity: 1;
  color: #c3e535;
  animation: arrow-pulse 0.8s ease infinite alternate;
}

@keyframes arrow-pulse {
  from { transform: translateX(0); }
  to   { transform: translateX(6px); }
}

/* Barra de progresso (inserida via JS) */
.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.steps-progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background 0.35s, transform 0.35s;
  flex-shrink: 0;
}

.steps-progress-dot.is-active {
  background: #1d0e77;
  transform: scale(1.5);
}

.steps-progress-dot.is-done {
  background: #c3e535;
}

.steps-progress-line {
  width: 28px;
  height: 2px;
  background: #d1d5db;
  margin: 0 4px;
  transition: background 0.35s;
  flex-shrink: 0;
}

.steps-progress-line.is-done {
  background: #c3e535;
}

/* ========================================
   COVER STATS (cover que contém .counter-section)
   ======================================== */

.wp-block-cover:has(.counter-section) {
  width: 94vw !important;
  max-width: none !important;
  margin-left: calc(-47vw + 50%) !important;
  margin-right: calc(-47vw + 50%) !important;
  margin-top: -70px !important;
  border-radius: 24px;
  overflow: hidden;
  padding: 4rem 0 !important;
  transition:
    width       0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    margin-left 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-radius 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.wp-block-cover:has(.counter-section) .wp-block-cover__inner-container {
  padding: 100px !important;
}

.wp-block-cover:has(.counter-section).cover--wide {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  border-radius: 0;
}

/* Counter section — espaçamento compacto */
.counter-section {
  padding: 1.25rem !important;
  margin-top: 2rem !important;
}

.counter-section .wp-block-columns {
  gap: 0.75rem !important;
  margin: 0 !important;
}

.counter-section h3 {
  font-size: 2.8rem !important;
  font-weight: 900 !important;
  margin: 0 !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.counter-section h4 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0 0 0.2rem !important;
  padding: 0 !important;
}

.counter-section p {
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  opacity: 0.85;
}

/* ========================================
   HIPER SECTION
   ======================================== */

.hiper-section {
  position: relative;
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Mantém conteúdo acima do ::before */
.hiper-section * {
  position: relative;
  z-index: 1;
}

/* Fundo 94vw centralizado, sobe 80px acima — mesma proporção do hero */
.hiper-section::before {
  content: '';
  position: absolute;
  background: #ffffcc80;
  width: 94vw;
  height: calc(100% + 80px);
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hiper-section.hiper-before--wide::before {
  width: 100vw;
}

/* ========================================
   BLOCKS ITENS
   ======================================== */

.blocks-itens {
  padding: 2rem;
  border-radius: 16px;
}

/* Força textos a herdar a cor inline definida pelo editor */
.blocks-itens h1,
.blocks-itens h2,
.blocks-itens h3,
.blocks-itens h4,
.blocks-itens h5,
.blocks-itens h6,
.blocks-itens p,
.blocks-itens a {
  color: inherit !important;
}

h5.has-text-align-center {display: table; margin: 0 auto;}

/* Ícone 50px */
.blocks-itens .justco-icon svg {
  width: 50px;
  height: 50px;
}

/* h4 26px */
.blocks-itens h4 {
  font-size: 26px !important;
}

/* ========================================
   MOBILE — overrides tardios (devem vir após o CSS desktop)
   ======================================== */

@media (max-width: 1023px) {
  .wp-block-cover:has(.counter-section) .wp-block-cover__inner-container {
    padding: 30px !important;
  }

  .counter-section {
    padding: 0 !important;
    margin: 0 !important;
  }
}


