
#personalize {
  width: 100%;
  min-height: 720px;
  padding-top: 7rem;
  position: relative;
  overflow: hidden;
  background-color: #d9d9d9;
  background-image: url("../img/fundo-waves.svg");
  background-position: bottom center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* container centralizado com largura máxima */
#personalize .container {
  width: 1200px;
  max-width: calc(100% - 80px);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  position: relative;
  box-sizing: border-box;
}

/* força a ordem: imagem à esquerda, texto à direita,
     mesmo que no HTML o texto venha primeiro */
#personalize .image-content {
  flex: 0 0 55%;
  order: 1;
  position: relative;
  display: block;
}

#personalize .text-content {
  flex: 0 0 43%;
  order: 2;
  z-index: 5;
  /* acima da imagem se houver sobreposição */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* conteúdo no topo da coluna */
  padding: 60px 40px 40px 40px;
  /* empurra o texto pra baixo pra ficar como na referência */
  box-sizing: border-box;
  color: white;
}

/* título grande, em duas linhas visualmente compactas */
#personalize .text-content h2 {
  margin: 0 0 18px 0;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* parágrafo descritivo */
#personalize .text-content p {
  margin: 0 0 28px 0;
  font-weight: 400;
  color: white;
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 520px;
  /* largura do bloco de texto */
}

.personalizeBold {
  color: white;
}

/* botão */
#personalize .btn {
  width: 15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #b11226;
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  /* necessário para o ::before */
  z-index: 1;
  /* mantém o texto na frente do ::before */
  overflow: hidden;
  /* garante que o ::before não vaze */
}

#personalize .btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #d4203c, #a30d24);
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  z-index: -1;
  /* garante que fique atrás do texto */
}

#personalize .btn:hover::before {
  transform: translateX(0);
}

#personalize .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* imagem: posicionada de forma absoluta dentro da coluna,
     afin para ficar cortada no bottom da section */

/* ---------------------- */
/* animação */
/* ---------------------- */
/* 1. ESTADO INICIAL DO TEXTO (vem da direita) */
.image-content,
.text-content h2,
.text-content p,
.text-content a.btn {
  opacity: 0;
}

/* --- GATILHOS (QUANDO  É ADICIONADO) --- */

/* 3. ANIMAÇÕES DO TEXTO (como já estava) */
#personalize.is-visible .text-content h2,
#personalize.is-visible .text-content p,
#personalize.is-visible .text-content a.btn {
  animation: virDaDireita 0.6s ease-out forwards;
}

/* 4. ANIMAÇÃO DA IMAGEM (ESSA PARTE É A CORREÇÃO PRINCIPAL) */
#personalize.is-visible .image-content {
  animation: subirSuave 1s ease-out forwards;
}

/* --- DELAYS (PARA ORQUESTRAR A ENTRADA) --- */

#personalize.is-visible .text-content h2 {
  animation-delay: 0.1s;
}
#personalize.is-visible .text-content p {
  animation-delay: 0.3s;
}
#personalize.is-visible .text-content a.btn {
  animation-delay: 0.6s;
}

#personalize.is-visible .image-content {
  animation-delay: 0.3s;
}
/* ---------------------- */

#personalize .image-content img {
  position: absolute;
  left: -6%;
  /* empurra um pouco para a esquerda (ajuste se necessário) */
  bottom: -5.5rem;
  /* deixa a imagem sair para baixo (cortada) */
  width: 640px;
  /* largura fixa para o efeito; ajuste se precisar */
  max-width: none;
  height: auto;
  display: block;
  z-index: 3;
  /* pequenas melhorias visuais */
  -webkit-filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

/* ---------- Responsivo (mobile/tablet) ---------- */

@media (max-width: 1500px) {
  #personalize .image-content img {
    bottom: -9.5rem;
  }
}

@media (max-width: 1100px) {
  #personalize {
    padding: 40px 30px;
    min-height: 640px;
  }

  #personalize .container {
    width: 100%;
    max-width: 1100px;
  }

  #personalize .image-content img {
    width: 520px;
    left: -4%;
    bottom: -7.2rem;
  }

  #personalize .text-content {
    padding-top: 44px;
  }
}

@media (max-width: 820px) {
  /* layout em coluna: texto em cima, imagem abaixo (não cortada) */
  #personalize {
    padding: 30px 18px;
    min-height: auto;
  }

  #personalize .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  #personalize .image-content {
    order: 2;
    flex: none;
    width: 100%;
    height: auto;
  }

  #personalize .image-content img {
    position: relative;
    left: 0;
    bottom: -2.5rem;
    width: 68%;
    max-width: 360px;
    margin: 0 auto;
  }

  #personalize .text-content {
    order: 1;
    width: 100%;
    padding: 10px 6px 20px 6px;
    text-align: center;
    align-items: center;
  }

  #personalize .text-content p {
    max-width: 100%;
  }
}
