/* Chatbot Launcher Button */
.chatbot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #295389;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: none;
  outline: none;
}

.chatbot-launcher:hover {
  transform: scale(1.05);
  background-color: #1a3a66;
}

.chatbot-launcher svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* Chatbot Modal Background Blur */
.chatbot-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99995;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chatbot-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Chatbot Modal Container */
.chatbot-modal {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 400px;
  height: 650px;
  max-width: 100vw;
  max-height: calc(100vh - 80px);
  background-color: #ffffff;
  border-radius: 12px 0 0 0;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 99999;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  border: none;
  border-left: 1px solid #e5e7eb;
  overflow: hidden;
}

.chatbot-modal.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Home Page Override: Center the modal */
body.home .chatbot-modal {
  bottom: auto !important;
  right: auto !important;
  top: 50% !important;
  left: 50% !important;
  width: 90vw !important;
  max-width: 800px !important;
  height: 80vh !important;
  max-height: 800px !important;
  transform: translate(-50%, -50%) scale(0.95) !important;
}

body.home .chatbot-modal.active {
  transform: translate(-50%, -50%) scale(1) !important;
}

.chatbot-modal.fullscreen, body.home .chatbot-modal.fullscreen {
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
}

.chatbot-launcher {
  display: none !important;
}

/* Hide HubSpot corporate chat widget globally */
#hubspot-messages-iframe-container,
#hs-chat-bubble-wrapper {
  display: none !important;
}
/* Header */
.chatbot-header {
  background-color: #295389;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  flex-shrink: 0;
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-logo-bg {
  width: 32px;
  height: 32px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-logo-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chatbot-header h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
  color: white;
}

.chatbot-controls {
  display: flex;
  gap: 8px;
}

.chatbot-controls button {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.chatbot-controls button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.chatbot-controls svg {
  width: 20px;
  height: 20px;
}

/* Body / Iframe */
.chatbot-body {
  flex: 1;
  position: relative;
  background-color: white;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.chatbot-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, rgba(41, 83, 137, 0.1), transparent);
  pointer-events: none;
}

.chatbot-iframe {
  width: 100%;
  height: calc(100% + 200px);
  margin-top: -200px;
  border: none;
  display: block;
}

/* Footer */
.chatbot-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.chatbot-footer p {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.25;
  margin: 0;
  flex: 1;
}

.chatbot-reset-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9999px;
  background-color: #295389;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chatbot-reset-btn:hover {
  background-color: #1a3a66;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.chatbot-reset-btn:active {
  transform: translateY(0);
}

/* Resizer handle */
.chatbot-resizer {
  display: flex;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  cursor: ew-resize;
  z-index: 100000;
  transition: background-color 0.2s;
}

body.home .chatbot-resizer {
  display: none !important;
}

.chatbot-resizer:hover {
  background-color: rgba(41, 83, 137, 0.1);
}

.chatbot-resizer-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 40px;
  background-color: #d1d5db;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.chatbot-resizer:hover .chatbot-resizer-line {
  background-color: #295389;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .chatbot-modal {
    width: calc(100vw - 48px);
    bottom: 90px;
  }
  .chatbot-footer {
    flex-direction: column;
    text-align: center;
  }
  .chatbot-resizer {
    display: none;
  }
}


/* Modern Category Cards */
ul.hkb-archive {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 24px !important;
  padding: 32px 16px 64px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

ul.hkb-archive > li {
  margin: 0 !important;
  width: 100% !important;
  display: flex !important;
}

ul.hkb-archive > li .hkb-category {
  height: 100% !important;
  width: 100% !important;
  padding: 32px 24px !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

ul.hkb-archive > li .hkb-category:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border-color: #e2e8f0 !important;
}

ul.hkb-archive > li .hkb-category__iconwrap {
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 64px !important;
}

ul.hkb-archive > li .hkb-category__iconwrap img {
  max-height: 56px !important;
  width: auto !important;
  object-fit: contain !important;
}

ul.hkb-archive > li .hkb-category__title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
  text-align: center !important;
  margin: 0 !important;
}

/* Override Elementor Category Cards on Homepage to look modern */
.home .elementor-widget-image-box .elementor-image-box-wrapper {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: 24px !important;
  margin: 0 !important;
  height: 100% !important;
  min-height: 250px !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.home .elementor-widget-image-box .elementor-image-box-wrapper:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border-color: #e2e8f0 !important;
}

.home .elementor-widget-image-box .elementor-image-box-img {
  margin-bottom: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 120px !important;
  width: 100% !important;
}

.home .elementor-widget-image-box .elementor-image-box-img img {
  width: 100% !important;
  max-width: 160px !important;
  height: auto !important;
  max-height: 120px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

.home .elementor-widget-image-box .elementor-image-box-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  flex-grow: 1 !important;
  width: 100% !important;
}

.home .elementor-widget-image-box .elementor-image-box-content h3,
.home .elementor-widget-image-box .elementor-image-box-content h3 a {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  text-align: center !important;
}

.home .elementor-widget-image-box .elementor-image-box-content h3 a:hover {
  color: #2563eb !important;
}

/* Remove the outer grey card background/border added by Elementor */
.home .elementor-column:has(.elementor-image-box-wrapper),
.home .elementor-column:has(.elementor-image-box-wrapper) > .elementor-widget-wrap,
.home .elementor-widget-image-box,
.home .elementor-widget-image-box > .elementor-widget-container {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  height: 100% !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  display: block !important;
}

/* Force entire page content wrapper to mimic React max-w-6xl */
.home .ht-container {
  max-width: 1152px !important;
  width: 100% !important;
}

/* ========================================== */
/* EXPLICIT OVERRIDE FOR 5-BOX LAYOUT         */
/* ========================================== */
.home .elementor-element-d024266 {
    background: transparent !important;
}

.home .elementor-element-d024266 .elementor-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 1152px !important;
    margin: 0 auto !important;
}

.home .elementor-element-d024266 .elementor-column {
    width: 211px !important;
    min-width: 211px !important;
    max-width: 211px !important;
    flex: 0 0 211px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.home .elementor-element-d024266 .elementor-widget-wrap,
.home .elementor-element-d024266 .elementor-widget-image-box,
.home .elementor-element-d024266 .elementor-widget-container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.home .elementor-element-d024266 .elementor-image-box-wrapper {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 24px !important;
    margin: 0 !important;
    min-height: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* -------------------------------------- */
/* FAQ Center React Component Override    */
/* -------------------------------------- */

.home .elementor-element-c9a7635 {
    background: transparent !important;
}

.home .elementor-element-c9a7635 > .elementor-container {
    width: 100% !important;
    max-width: 1152px !important;
    margin: 0 auto !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-wrapper {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  align-items: center !important;
  max-width: 1152px !important;
  margin: 40px auto 40px !important;
  padding: 12px 24px !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  background: #ffffff !important;
  border-radius: 24px !important;
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-wrapper::after {
  content: "›" !important;
  position: absolute !important;
  right: 24px !important;
  font-size: 32px !important;
  color: #94a3b8 !important;
  font-family: monospace !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-wrapper:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-img {
  margin: 0 24px 0 0 !important;
  width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  flex: 0 0 48px !important;
  background: #2563eb !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-img img {
  display: none !important; /* Hide old FAQ image */
}

.home .elementor-element-77e0a10 .elementor-image-box-img::after {
  content: "FAQ" !important;
  color: white !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  line-height: 1 !important;
  letter-spacing: 0.5px !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-content {
  text-align: left !important;
  flex: 1 !important;
  width: 100% !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-content h3 {
  text-align: left !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 0 2px 0 !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-content h3 a {
  text-decoration: none !important;
}

.home .elementor-element-77e0a10 .elementor-image-box-content::after {
  content: "Find quick answers to commonly asked questions, troubleshooting steps, and configuration guides for all your Grandstream devices." !important;
  display: block !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  font-weight: 400 !important;
  margin-top: 2px !important;
  width: 95% !important;
}
