footer {
  display: flex;
  flex-direction: row;
  background-color: rgb(0, 0, 0);
  padding: 20px;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 100vw;
  overflow-x: hidden;
}

.footer-logo-container {
  margin: 0;
  padding: 0;
}

.footer-logo-container img {
  width: 100%;
  height: auto;
  max-height: 250px;
  display: block;
}

.pages-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pages-links h3 {
  color: rgb(255, 255, 255);
  margin: 0 0 8px 0;
}

.pages-links a {
  text-decoration: underline;
  text-decoration-color: transparent;
  color: rgb(222, 222, 222);
  font-size: 18px;
  margin-top: 5px;
  transition: 0.5s ease;
}

.pages-links a:hover {
  color: rgb(255, 255, 255);
  text-decoration-color: rgb(255, 255, 255);
}

.social-media-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.social-media-links h3 {
  color: rgb(255, 255, 255);
  margin: 0 0 8px 0;
}

.social-media-links a {
  display: flex;
  align-items: center;
  text-decoration: underline;
  text-decoration-color: transparent;
  margin: 0;
  font-size: 18px;
  color: rgb(186, 186, 186);
  transition: 0.5s ease;
}

.social-media-links a:hover {
  color: rgb(255, 255, 255);
  text-decoration-color: rgb(255, 255, 255);
}

.social-media-links a p {
  margin: 0 5px 0 0;
}

.social-media-links img {
  width: 30px;
  height: auto;
  background-color: rgb(186, 186, 186);
  border-radius: 15px;
  padding: 2px;
}

.social-media-links img:hover {
  background-color: white;
}
#ai-chat-button {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-weight: bold;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  background-image: url('/images/smsLogo.svg');
  background-size: 40px 40px;
  background-position: center;
  background-repeat: no-repeat;
}
#ai-chat-button:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(0,150,136, 0.45);
}

#ai-chat-box {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 340px;
  height: 460px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 14px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  font-family: Arial, sans-serif;
}

#ai-chat-header {
  background: #009688;
  color: white;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#ai-close {
  background: none;
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

#ai-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f5f5f5;
}

.ai-message {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.4;
  font-size: 14px;
}

.ai-message.user {
  background: #111;
  color: white;
  margin-left: auto;
}

.ai-message.bot {
  background: white;
  color: #222;
  border: 1px solid #ddd;
}

#ai-form {
  display: flex;
  border-top: 1px solid #ccc;
}

#ai-input {
  flex: 1;
  padding: 12px;
  border: none;
  outline: none;
}

#ai-form button {
  background: #009688;
  color: white;
  border: none;
  padding: 0 16px;
  cursor: pointer;
}

#ai-chat-preview {
  position: fixed;
  right: 25px;
  bottom: 100px;
  width: 260px;
  padding: 16px 38px 16px 16px;
  box-sizing: border-box;
  background: white;
  color: #222;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  z-index: 9998;
  animation: aiPreviewAppear 0.3s ease;
}

#ai-chat-preview::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  background: white;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  transform: rotate(45deg);
}

#ai-chat-preview p {
  margin: 0;
}

#ai-preview-close {
  position: absolute;
  top: 5px;
  right: 8px;
  padding: 3px;
  background: transparent;
  color: #555;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#ai-preview-close:hover {
  color: #000;
}

@keyframes aiPreviewAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
    padding: 30px 20px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .footer-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .footer-logo-container img {
    width: 70%;
    max-width: 260px;
    max-height: 180px;
    object-fit: contain;
  }

  .pages-links {
    align-items: center;
    width: 100%;
  }

  .pages-links a {
    font-size: 17px;
  }

  .social-media-links {
    align-items: center;
    width: 100%;
  }

  .social-media-links a {
    justify-content: center;
    font-size: 17px;
    max-width: 100%;
    text-align: center;
  }

  .social-media-links a p {
    margin: 0 8px 0 0;
    line-height: 1.4;
  }

  .social-media-links img {
    width: 28px;
    flex-shrink: 0;
  }
  #ai-chat-preview {
    right: 15px;
    bottom: 90px;
    width: min(260px, calc(100vw - 30px));
  }
  #ai-chat-button {
    right: 15px;
    bottom: 15px;
  }

  #ai-chat-box {
    right: 15px;
    bottom: 85px;
    width: calc(100vw - 30px);
    height: min(460px, calc(100vh - 110px));
  }
}