/* Efecto de onda animado */
.wave-animation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background-size: 1000px 100px;
  animation: wave 15s linear infinite;
  opacity: 0.8;
}
.wave-animation:nth-child(2) {
  animation: wave-reverse 20s linear infinite;
  opacity: 0.5;
  bottom: 10px;
}
@keyframes wave {
  0% { background-position-x: 0; }
  100% { background-position-x: 1000px; }
}
@keyframes wave-reverse {
  0% { background-position-x: 1000px; }
  100% { background-position-x: 0; }
}

/* Animaciones personalizadas */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s;
}
.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.2s !important; }
.delay-2 { transition-delay: 0.4s !important; }
.delay-3 { transition-delay: 0.6s !important; }
.delay-4 { transition-delay: 0.8s !important; }
.delay-5 { transition-delay: 1s !important; }

/* Efecto parallax */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Ajustes de columnas en la galería y secciones */
@media (max-width: 992px) {
  .hero { padding: 160px 0 100px; }
  .navbar-brand img { height: 40px; }
  .navbar-brand { font-size: 1.5rem; }
  .section-title { font-size: 1.8rem; }
}
@media (max-width: 768px) {
  .section-title { font-size: 1.5rem; }
  .hero h1 { font-size: 2.5rem; }
  .icon-box i { font-size: 2rem; }
  .whatsapp-float, .back-to-top {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    bottom: 20px;
  }
  .whatsapp-float { left: 20px; }
  .back-to-top { right: 20px; }
  .row > .col-md-4, .row > .col-md-6 {
    width: 100%;
    padding: 10px 0;
  }
  #chatbotContainer {
    width: 280px;
    margin-right: 10px;
    margin-bottom: 70px;
  }
  .position-fixed.p-3 {
    margin-right: 10px !important;
    margin-bottom: 70px !important;
  }
}
@media (max-width: 576px) {
  .section-title { font-size: 1rem; }
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2.2rem; }
  .navbar-brand img { height: 35px; }
  .navbar-brand { font-size: 1.2rem; }
  .col-md-4, .col-md-6 {
    width: 100%;
    padding: 10px 0;
  }
  .whatsapp-float, .back-to-top {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    bottom: 10px;
  }
}

/* Tamaño y posición del icono del chatbot */
#chatbotIcon {
  width: 62px;
  height: 62px;
  position: fixed;
  bottom: 100px;
  right: 30px;
}
@media (max-width: 576px) {
  #chatbotIcon {
    width: 50px;
    height: 50px;
    bottom: 70px;
    right: 10px;
  }
  .position-fixed {
    margin-bottom: 20px;
    margin-right: 10px;
    right: 28px;
  }
}

/* Contenedor del chatbot */
#chatbotContainer {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background-color: #ffffff;
}

/* Header del chatbot */
.card-header {
  border-radius: 10px 10px 0 0;
  background-color: #007bff;
  font-size: 14px;
  font-weight: bold;
}

/* Contenedor general del mensaje individual */
.chatbot-message {
  display: inline-block;
  word-wrap: break-word;
  margin-bottom: 10px;
  padding: 6px;
  max-width: 80%;
}

/* Mensajes del bot */
.chatbot-message.bot-message {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.63);
  align-self: flex-start;
}

/* Mensajes del usuario */
.chatbot-message.user-message {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  border-radius: 15px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.521);
  align-self: flex-end;
}

/* Entrada de texto */
#chatbotInput {
  border-radius: 50px;
  padding: 12px;
  font-size: 14px;
  border-color: #0056b3;
}

/* Botón de enviar */
#chatbotSend {
  background-color: #007bff;
  border-radius: 80px;
  color: white;
  transition: background-color 0.3s ease;
}
#chatbotSend:hover {
  background-color: #0056b3;
}

/* Botón de cerrar */
#chatbotClose {
  background-color: transparent;
  border: none;
}
#chatbotClose:hover {
  background-color: #e9ecef;
}

/* Footer del chatbot */
.card-footer {
  border-radius: 0 0 10px 10px;
}

/* Estilo de acordeones */
.accordion-button {
  background-color: #f1f1f1;
  font-weight: 600;
  color: rgba(26, 62, 114, 0.98);
}
.accordion-button:not(.collapsed) {
  background-color: rgba(26, 62, 114, 0.98);
  color: #fff;
}
.accordion-body {
  background-color: #fff;
  animation: fadeIn 0.4s ease-in;
}
.accordion-item {
  border-radius: 10px;
  border: none;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  overflow: hidden;
}
.accordion-item:hover {
  transform: scale(1.005);
}
.accordion-button i {
  transition: transform 0.3s ease;
}
.accordion-button:hover i {
  transform: rotate(-5deg);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Botones de sugerencias dentro del flujo del chat */
.suggestion-btn {
  background-color: #e9f2ff;
  color: #1a3e72;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Al pasar el cursor */
.suggestion-btn:hover {
  background-color: #d0e4ff;
  transform: scale(1.03);
}

/* Responsive */
@media (max-width: 576px) {
  .suggestion-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Autocompletado */
#autocomplete-suggestions {
  position: absolute;
  left: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-height: 200px;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 123, 255, 0.3);
}
#autocomplete-suggestions li {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
  color: #0d6efd;
}
#autocomplete-suggestions li:hover {
  background-color: rgba(13, 110, 253, 0.08);
}
.autocomplete-highlight {
  color: #0d6efd;
  font-weight: bold;
  background-color: rgba(13, 110, 253, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}
