/* Minimal custom styles - most styling done via Tailwind CSS */

.error-message {
  color: #dc2626;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fee2e2;
  border-radius: 0.5rem;
  display: none;
}

.success-message {
  color: #16a34a;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #dcfce7;
  border-radius: 0.5rem;
  display: none;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

/* Slider specific styles */
.slider-bg {
  background-size: cover;
  background-position: center;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
}

/* Card hover effects */
.product-card, .solution-card, .case-card, .news-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover, .solution-card:hover, .case-card:hover, .news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Form focus states */
input:focus, textarea:focus, select:focus {
  outline: none;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
/* ===== AI 智能客服 widget ===== */
.ai-chat-bubble:hover {
  transform: scale(1.08);
}

#ai-chat-panel {
  animation: aiChatPop 0.18s ease-out;
}

@keyframes aiChatPop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 移动端：面板铺满宽度 */
@media (max-width: 480px) {
  #ai-chat-panel {
    width: calc(100vw - 24px) !important;
    height: calc(100vh - 140px) !important;
    left: 12px !important;
    right: 12px !important;
  }
}

/* <picture> 默认是 inline 盒子且没有高度，会让里层 img 的 h-full / w-full 失效。
   设为块级并撑满父容器，图片在卡片和图格里就能正常铺满。 */
picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================
   富文本正文（CMS 里的文章/产品描述/案例）：
   项目没有安装 @tailwindcss/typography，.prose 里的标签默认没有样式，
   这里手工排版，避免标题和正文挤成一段。
   ============================================================ */
.prose { line-height: 1.75; color: #374151; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #111827; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: #111827; margin: 1.5rem 0 0.5rem; }
.prose h4 { font-size: 1.05rem; font-weight: 600; color: #111827; margin: 1.25rem 0 0.5rem; }
.prose p { margin: 0.75rem 0; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin: 0.75rem 0; }
.prose ol { list-style: decimal; padding-left: 1.4rem; margin: 0.75rem 0; }
.prose li { margin: 0.35rem 0; }
.prose li > ul, .prose li > ol { margin: 0.25rem 0; }
.prose a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #1d4ed8; }
.prose strong { font-weight: 600; color: #111827; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.prose th { background: #f9fafb; font-weight: 600; color: #111827; }
.prose img { border-radius: 0.5rem; margin: 1rem 0; height: auto; }
.prose blockquote { border-left: 3px solid #d1d5db; padding-left: 1rem; color: #4b5563; margin: 1rem 0; }
