/* Container principal do CTA */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 900px;
  margin: 3rem auto;
  min-height: auto;
  overflow: hidden;
  border-radius: 15px;
  position: relative;
}

.cta-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 2rem);
  position: relative;
  z-index: 1;
}

/* Título principal do CTA */
.cta-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

/* Subtítulo do CTA */
.cta-subtitle {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background-color: white;
  color: var(--primary);
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid transparent;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  margin: clamp(0.5rem, 2vw, 1rem) auto 0 auto;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: fit-content !important;
  box-sizing: border-box;
}

/* Efeito de entrada */
.cta {
  animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
  0% {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }
  60% {
    transform: translateY(-5px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.cta:hover::after {
  opacity: 1;
}

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

/* Ajuste nas media queries para garantir width auto sem restrição */
@media (max-width: 768px) {
  .cta-button {
    width: auto !important;
    min-width: unset !important;
    padding: 0.85rem 1.4rem;
  }
}

@media (max-width: 480px) {
  .cta-button {
    width: auto !important;
    min-width: unset !important;
    padding: 0.9rem 1.5rem;
    min-height: 48px;
  }
}

@media (max-width: 360px) {
  .cta-button {
    width: auto !important;
    min-width: unset !important;
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem;
  }
}

/* Ícone dentro do botão */
.cta-button i {
  font-size: 1.2em;
  transition: transform 0.3s ease;
  animation: none;
}

/* Estados de hover do botão */
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  animation-name: pulse;
  animation-duration: 0.6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

.cta-button:hover i {
  transform: scale(1.1);
}

.cta-button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.cta-button:active {
  transform: translateY(0);
}

/* ===== ANIMAÇÕES - SEÇÃO CTA ===== */
.cta .cta-content {
  animation: fadeInUp 1s ease-out;
}

.cta .cta-title {
  animation: fadeInUp 0.8s ease-out;
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.cta .cta-subtitle {
  animation: fadeInUp 0.8s ease-out;
  animation-delay: 0.3s;
  animation-fill-mode: both;
}

/* Efeito de fundo animado */
.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
  background-size: 200% 200%;
  animation: backgroundMove 10s linear infinite;
  z-index: 0;
}

/* Animação de movimento do fundo */
@keyframes backgroundMove {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

/* Animações adicionais */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 1024px) {
  .cta {
    min-height: 350px;
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 3vw, 1.5rem);
  }
}

/* Tablets */
@media (max-width: 768px) {
  .cta {
    min-height: 320px;
    padding: clamp(2rem, 5vw, 3rem) 1rem;
  }
  
  .cta-button {
    width: auto;
    max-width: none;
    padding: clamp(0.875rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.75rem);
  }
}

/* Smartphones */
@media (max-width: 480px) {
  .cta {
    min-height: 280px;
    padding: clamp(1.5rem, 4vw, 2.5rem) 0.75rem;
  }
  
  .cta-button {
    width: auto;
    max-width: none;
    padding: 1rem 1.5rem;
    min-height: 48px;
  }
}

@media (max-width: 360px) {
  .cta {
    padding: 1.5rem 0.5rem;
    min-height: 260px;
  }
  
  .cta-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .cta-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }
  
  .cta-button {
    font-size: 0.95rem;
    padding: 0.875rem 1.25rem;
    width: auto;
    max-width: none;
  }
}

/* MELHORIAS DE ACESSIBILIDADE */
@media (prefers-reduced-motion: reduce) {
  .cta,
  .cta-button,
  .cta-button i {
    transition: none;
    animation: none !important;
  }
}

/* Alto contraste para melhor legibilidade */
@media (prefers-contrast: high) {
  .cta-title {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  }
  
  .cta-subtitle {
    color: white;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }
  
  .cta-button:focus {
    outline-width: 4px;
    outline-color: white;
  }
}

/* Modo escuro do sistema */
@media (prefers-color-scheme: dark) {
  .cta-button {
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
}