.hero-section {
  max-width: 1200px;
  margin: 0 auto;
  /* margin-top: 80px; */
  padding: 10px 0;
  text-align: center;
}
/* Contenedor principal para alinear todo */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}
.contenedor {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 60px;
}
.card {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Modo oscuro */
.dark-mode .card {
  background-color: #1e2633;
  border-color: #333;
  color: #f8f9fa;
}
.formulario {
  width: 100%;
}
.formulario h2 {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2 i {
  color: #6c3cfa;
}

#contactForm {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin-top: 1.5rem;
}
/* Modo oscuro */
.dark-mode #contactForm {
  background-color: #1e2633;
  border-color: #333;
  color: #f8f9fa;
}
.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: 0.5rem 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}
.dark-mode input {
  background-color: #242c3a;
  color: #f8f9fa;
}
.dark-mode textarea {
  background-color: #242c3a;
  color: #f8f9fa;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn {
  background: #6c3cfa;
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    margin-top: 80px;
    padding: 20px;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 20px;
  }
  #contactForm {
    padding: 0;
    border-radius: 0;
    border: 0;
    margin-top: 1.5rem;
    background-color: transparent;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  .formulario h2 {
    font-size: 1.5rem;
  }
  .contenedor {
    margin-top: 0;
    margin-bottom: 60px;
  }
}
/* ================================================================================================= */
/*                                  Modal base (oculto por defecto)                                  */
/* ================================================================================================= */
#chatModal {
  position: fixed;
  bottom: -100%;
  right: 20px;
  width: 320px;
  max-width: 90%;
  background: #fff;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: bottom 0.4s ease-in-out;
  z-index: 9999;
}

/* Contenedor interno */
#chatContainer {
  display: flex;
  flex-direction: column;
  height: 400px;
}

/* Encabezado */
#chatHeader {
  background: #6c3cfa;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chatHeader span {
  font-size: 20px;
  cursor: pointer;
}

/* Cuerpo del chat */
#chatMessages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #333;
}

/* Input */
#chatInput {
  border: none;
  border-top: 1px solid #ddd;
  padding: 10px;
  font-size: 0.9rem;
  outline: none;
}

/* Animación de apertura */
#chatModal.open {
  bottom: 0;
}

/* Estilos para mensajes */
.message {
  margin-bottom: 8px;
}
.message strong {
  color: #667eea;
}

/* Estilo para texto largo (respuestas del bot) */
.bot-message {
  white-space: pre-line;
}

/* Estilos específicos para la página de contacto */
@media (max-width: 768px) {
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
