/* ============================================================
   doubao-optimization-en.css
   Doubao GEO Optimization Service — AIPO GEO (English Version)
   Tailwind CSS (via CDN, preflight disabled) + Custom Styles
   Color Scheme: Fresh Blue #4F6FE8, Teal #2CC4B0, Lavender #A5B4FC
   Design: No gradients, bright & clean, modern AI service page
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors — Doubao Blue/Teal/Lavender (NO gradients) */
  --db-blue:      #4F6FE8;
  --db-teal:      #2CC4B0;
  --db-lavender:  #A5B4FC;
  --db-blue-dark: #3451C7;
  --db-teal-dark: #1FA898;

  /* Hero / Dark Section */
  --db-hero-bg:   #EEF2FF;   /* 淡藍紫背景 */
  --db-hero-dark: #1E2D6B;   /* 深藍文字 */

  /* Neutrals */
  --text:         #1a2340;
  --text-2:       #4a5568;
  --muted:        #718096;
  --bg:           #ffffff;
  --bg-alt:       #F5F8FF;
  --bg-blue-soft: #EEF2FF;
  --border:       #dde3f5;
  --r:            10px;
  --r-lg:         16px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 84px; }


/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--db-blue); }
.breadcrumb span { margin: 0 6px; }

/* ============================================================
   HERO — 清新藍紫背景，左 2/3 右 1/3
   ============================================================ */
.hero {
  background: var(--bg-blue-soft);
  padding: 72px 0 50px;
  overflow: hidden;
}
/* 2/3 + 1/3 grid */
.hero-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;           /* 縮小左右間距 */
  align-items: end;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--db-lavender);
  color: var(--db-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
  letter-spacing: 0.4px;
}
.hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  color: var(--db-hero-dark);
  line-height: 1.18;
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--db-blue);
}
.hero-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 28px;
  line-height: 1.75;
}
.hero-checks { display: flex; flex-direction: column; gap: 9px; margin-bottom: 36px; }
.hero-checks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-2); list-style: none;
}
.hero-checks li::before {
  content: '✓';
  color: var(--db-teal);
  font-weight: 800;
  font-size: 14px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--db-blue);
  color: #fff;
  padding: 13px 28px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--db-blue-dark); transform: translateY(-1px); }
.btn-ghost {
  border: 1.5px solid var(--db-blue);
  color: var(--db-blue);
  background: #fff;
  padding: 12px 24px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s;
  display: inline-block;
}
.btn-ghost:hover { background: var(--db-blue); color: #fff; }

/* ---------- CHAT WINDOW ---------- */
.hero-chat { width: 100%; flex-shrink: 0; padding-left: 4px; }
.chat-window {
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: 0 -6px 32px rgba(79,111,232,0.14);
  border: 1px solid var(--border);
  border-bottom: none;
}
.chat-header {
  background: var(--db-blue);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-logo {
  width: 34px; height: 34px;  /* logo 放大 */
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
}
.chat-header-text { color: #fff; font-size: 15px; font-weight: 700; }
.chat-header-sub { color: rgba(255,255,255,0.75); font-size: 11px; }
.chat-body {
  padding: 18px 16px;
  background: #f8f9fb;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 300px;   /* 聊天框加高 */
}
.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-av {
  width: 32px; height: 32px;  /* 頭像放大 */
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.chat-av.db { background: var(--db-blue); overflow: hidden; }
.chat-av.db img { width: 100%; height: 100%; object-fit: contain; }
.chat-av.user-av { background: #e0e7ff; color: var(--db-blue); font-size: 10px; }
.chat-bubble {
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;     /* 字體放大 */
  color: var(--text);
  line-height: 1.65;
  max-width: 100%;     /* 允許更寬 */
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chat-msg.user .chat-bubble {
  background: var(--db-blue);
  color: #fff;
}
.chat-sources { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.chat-source-tag {
  font-size: 10px;
  background: #EEF2FF;
  color: var(--db-blue);
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--db-lavender);
}
.chat-typing {
  display: flex; gap: 4px; align-items: center;
  padding: 9px 12px;
  background: #fff;
  border-radius: 10px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chat-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--db-teal);
  animation: typing 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* ---------- STATS ---------- */
.stats {
  background: var(--bg);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stat-item {
  text-align: center;
  padding: 24px 32px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--db-blue);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 14px; color: var(--text-2); font-weight: 500; }

/* ============================================================
   DEFINITION — 左右等高對齊
   ============================================================ */
.definition { padding: 80px 0; background: var(--bg); }
.section-eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--db-blue); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.25;
}
.section-lead {
  font-size: 16px;
  color: var(--text-2);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* 左右等高：stretch + 各自填滿 */
.def-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.def-left {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.def-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Compare Table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  flex: 1;
}
.compare-table th {
  text-align: left;
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
}
.compare-table th.highlight {
  background: var(--bg-blue-soft);
  color: var(--db-blue);
  border-bottom-color: var(--db-blue);
}
.compare-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
  line-height: 1.5;
}
.compare-table td.highlight {
  background: #F5F8FF;
  color: var(--text);
  font-weight: 600;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: #fafbff; }
.compare-table tr:hover td.highlight { background: var(--bg-blue-soft); }

/* Definition boxes — fill remaining height */
.def-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  flex: 1;
}
.def-box h3 {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.def-box p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ---------- SERVICES ---------- */
.services { padding: 80px 0; background: var(--bg-alt); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: box-shadow .25s, transform .2s;
  border-top: 3px solid var(--db-blue);
}
.service-card:nth-child(even) { border-top-color: var(--db-teal); }
.service-card:hover { box-shadow: 0 6px 28px rgba(79,111,232,0.1); transform: translateY(-2px); }
.service-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--bg-blue-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.service-card h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.service-card ul { margin-top: 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.service-card ul li {
  font-size: 13px; color: var(--text-2);
  padding-left: 14px; position: relative;
}
.service-card ul li::before {
  content: '·'; position: absolute; left: 3px;
  color: var(--db-teal); font-weight: 700;
}

/* ---------- PROCESS ---------- */
.process { padding: 80px 0; background: var(--bg); }
.process-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-top: 40px;
}
.process-steps { display: flex; flex-direction: column; gap: 20px; }
.process-step { display: flex; gap: 18px; align-items: flex-start; }
.step-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--db-blue);
  color: #fff;
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.process-img { border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 8px 32px rgba(79,111,232,0.12); }
.process-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   WHY US — 清新藍色背景（取代深色）
   ============================================================ */
.whyus {
  padding: 80px 0;
  background: var(--bg-blue-soft);   /* 淡藍紫背景，清新明亮 */
}
.whyus .section-eyebrow { color: var(--db-blue); }
.whyus .section-title { color: var(--db-hero-dark); }
.whyus .section-lead { color: var(--text-2); }
.whyus-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
  margin-top: 40px;
}
.whyus-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(79,111,232,0.14);
}
.whyus-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  min-height: 380px;
}
.whyus-points { display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.whyus-point { display: flex; gap: 16px; align-items: flex-start; }
.wp-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--db-lavender);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.wp-content h4 { font-size: 16px; font-weight: 700; color: var(--db-hero-dark); margin-bottom: 5px; }
.wp-content p { font-size: 14px; color: var(--text-2); line-height: 1.65; }

/* ============================================================
   FAQ — 左右各 50%，右側圖片與文字上下對齊
   ============================================================ */
.faq { padding: 80px 0; background: var(--bg); }
.faq-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex; justify-content: space-between;
  align-items: center; padding: 16px 0;
  cursor: pointer; gap: 12px;
}
.faq-q span { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5; }
.faq-toggle {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-blue-soft);
  border: 1px solid var(--db-lavender);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--db-blue);
  font-size: 16px; font-weight: 700;
  transition: transform .25s, background .2s;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--db-blue);
  color: #fff;
  border-color: transparent;
}
.faq-a {
  display: none;
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
}
.faq-item.open .faq-a { display: block; }

/* FAQ Right Side — 圖片鋪滿右側框 */
.faq-side { position: sticky; top: 80px; }
.faq-side-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(79,111,232,0.1);
}
.faq-side-img img {
  width: 100%;
  height: 360px;       /* 固定高度，鋪滿 */
  object-fit: cover;   /* cover 確保填滿 */
  display: block;
  background: #EEF2FF;
}
.faq-side-cta {
  margin-top: 16px;
  background: var(--bg-blue-soft);
  border: 1px solid var(--db-lavender);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
}
.faq-side-cta p {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.6;
}
.faq-side-cta a {
  display: block;
  background: var(--db-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 8px;
  transition: background .2s;
}
.faq-side-cta a:hover { background: var(--db-blue-dark); }

/* ---------- CTA BAND ---------- */
.cta-band {
  padding: 72px 0;
  background: var(--db-blue);
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.cta-band p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto; margin-right: auto;
}
.btn-white {
  background: #fff;
  color: var(--db-blue);
  padding: 14px 32px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  transition: opacity .2s, transform .15s;
}
.btn-white:hover { opacity: 0.92; transform: translateY(-2px); }
.cta-note { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,0.65); }


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-chat { width: 100%; max-width: 400px; }
  .def-layout, .process-layout, .whyus-layout, .faq-layout { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .whyus-img img { min-height: 260px; }
  .faq-side { position: static; }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}


/* ------------------------------------------------------------
   以下自 doubao-optimization.html 的内联 <style> 外移
   ------------------------------------------------------------ */
/* 布局顶部固定导航条 (#navbar) 浮于内容之上，本页首屏第一块是面包屑，给它留出顶部间距 */
.breadcrumb { padding-top: 96px; }
@media (max-width: 768px) { .breadcrumb { padding-top: 80px; } }

/* 本页 CSS 把 .container 收窄到 1140px / padding 0 84px，会波及布局的导航条与页脚容器；
   这里把 #navbar / #footer 的 .container 还原为站点默认的响应式宽度 */
#navbar .container, #footer .container {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px)  { #navbar .container, #footer .container { max-width: 640px; } }
@media (min-width: 768px)  { #navbar .container, #footer .container { max-width: 768px; padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 1024px) { #navbar .container, #footer .container { max-width: 1024px; } }
@media (min-width: 1280px) { #navbar .container, #footer .container { max-width: 1280px; } }
@media (min-width: 1536px) { #navbar .container, #footer .container { max-width: 1536px; } }

/* 布局的一级导航链接带 .text-white，但导航条底色是白色 */
#navbar .text-white { color: #000000; }
#navbar a.bg-primary { color: #ffffff !important; }
