/* Estilos para as modais */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  background-color: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.modal-body {
  padding: 32px;
}

.modal-close {
  position: absolute;
  right: 24px;
  top: 24px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.modal-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
}

.modal-footer {
  padding: 16px 32px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .modal-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

.modal-image {
  border-radius: 12px;
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-text h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.modal-text p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
}

.modal-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon {
  color: #2563eb;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.feature-text {
  font-size: 14px;
  color: #334155;
}

.modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  background-color: #2563eb;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.modal-button:hover {
  background-color: #1d4ed8;
}

/* Scroll do body sendo bloqueado quando modal está aberta */
body.modal-open {
  overflow: hidden;
}

/* Animação de entrada para os elementos dentro da modal */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-overlay.active .modal-content > * {
  animation: fadeInUp 0.4s ease forwards;
}

.modal-overlay.active .modal-content > *:nth-child(2) {
  animation-delay: 0.1s;
}

/* Estilos adicionais */
.mt-4 {
  margin-top: 1rem;
}

.modal-features {
  margin-top: 1.5rem;
}

.modal-features .feature-item {
  margin-bottom: 0.75rem;
}

.modal-text h3 {
  color: #2563eb;
}

.modal-button {
  margin-top: 1.5rem;
  display: inline-flex;
}

/* Responsividade para telas menores */
@media (max-width: 767px) {
  .modal-container {
    width: 95%;
  }

  .modal-content {
    grid-template-columns: 1fr;
  }

  .modal-image {
    order: 1;
  }

  .modal-text {
    order: 2;
    margin-top: 1.5rem;
  }

  .modal-header {
    padding: 16px 24px;
  }

  .modal-body {
    padding: 24px;
  }

  .modal-title {
    font-size: 20px;
  }
}
