/**
 * WAYSTEK — 白底 + 淺藍活力企業風（Bootstrap Icons / MIT）
 */

:root {
  --w-white: #ffffff;
  --w-bg: #f8fbfd;
  --w-bg-soft: #eef6fb;
  --w-bg-band: #e3f2fb;
  --w-border: rgba(55, 81, 126, 0.12);
  --w-text: #37517e;
  --w-body: #444444;
  --w-muted: #5c6f82;
  --w-accent: #47b2e4;
  --w-accent-bright: #6ec9f0;
  --w-accent-deep: #2d6a8f;
  --w-shadow: 0 8px 32px rgba(55, 81, 126, 0.08);
  --w-shadow-hover: 0 14px 40px rgba(71, 178, 228, 0.15);
}

body {
  background-color: var(--w-white) !important;
  color: var(--w-body) !important;
}

/* Header — 清爽白底＋滾動後略加深 */
#header {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--w-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

#header.header-scrolled,
#header.header-inner-pages {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--w-shadow);
}

#header .logo a {
  display: flex;
  align-items: center;
}

#header .navbar a,
#header .navbar a:focus {
  color: var(--w-text) !important;
}

#header .navbar a:hover,
#header .navbar .active,
#header .navbar li:hover > a {
  color: var(--w-accent) !important;
}

/* 手機選單：#header 的 backdrop-filter 會讓子元素 position:fixed 被限制在導覽列高度內，導致全螢幕選單看不到 */
@media (max-width: 991px) {
  #header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #header .mobile-nav-toggle {
    position: relative;
    z-index: 10002;
  }

  #header .navbar.navbar-mobile {
    z-index: 10000 !important;
  }

  /* 手機選單開啟時，右上角關閉鍵固定可見且可點 */
  #navbar.navbar-mobile .mobile-nav-toggle {
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 10003 !important;
    display: block !important;
    font-size: 32px !important;
    line-height: 1 !important;
    color: var(--w-text) !important;
    background: #ffffff !important;
    border: 1px solid var(--w-border);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    text-align: center;
    box-shadow: var(--w-shadow);
  }

  /* 強制手機選單全螢幕顯示，避免被任何父層樣式影響 */
  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open #header {
    position: static !important;
    overflow: visible !important;
  }

  /* 不依賴 body class，navbar-mobile 一出現就全螢幕 */
  #navbar.navbar-mobile,
  body.mobile-nav-open #navbar.navbar-mobile {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.96) !important;
    z-index: 10000 !important;
    overflow: hidden !important;
  }

  #navbar.navbar-mobile ul,
  body.mobile-nav-open #navbar.navbar-mobile ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: absolute !important;
    top: 70px !important;
    right: 16px !important;
    bottom: 16px !important;
    left: 16px !important;
    overflow-y: auto !important;
    background: #fff !important;
    border: 1px solid var(--w-border) !important;
    border-radius: 12px !important;
    box-shadow: var(--w-shadow) !important;
    padding: 10px 0 !important;
  }

  #navbar.navbar-mobile li {
    width: 100%;
  }

  #navbar.navbar-mobile a,
  #navbar.navbar-mobile a:focus {
    display: block !important;
    color: var(--w-text) !important;
    padding: 12px 20px !important;
  }
}

/* 新版手機抽屜選單（獨立於原 template mobile nav） */
.mobile-drawer {
  display: none;
}

@media (max-width: 991px) {
  body.mobile-drawer-open {
    overflow: hidden;
  }

  .mobile-drawer.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 11000;
  }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 34, 56, 0.36);
    backdrop-filter: blur(2px);
  }

  .mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(84vw, 360px);
    height: 100%;
    background: #ffffff;
    box-shadow: -12px 0 32px rgba(55, 81, 126, 0.2);
    padding: 70px 14px 14px;
  }

  .mobile-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--w-border);
    border-radius: 999px;
    background: #fff;
    color: var(--w-text);
    font-size: 30px;
    line-height: 1;
  }

  .mobile-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--w-border);
    border-radius: 12px;
    overflow-y: auto;
    max-height: calc(100vh - 96px);
    background: #fff;
  }

  .mobile-drawer-list li {
    border-bottom: 1px solid rgba(55, 81, 126, 0.08);
  }

  .mobile-drawer-list li:last-child {
    border-bottom: none;
  }

  .mobile-drawer-list a {
    display: block;
    padding: 13px 16px;
    color: var(--w-text);
    font-weight: 600;
  }

  /* Normalize language switch item in drawer (no pill/oversized radius). */
  .mobile-drawer-list .lang-switch {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 13px 16px !important;
    color: var(--w-text) !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
  }

  .mobile-drawer-list .lang-switch:hover {
    background: #f5f9fd !important;
    color: var(--w-accent-deep) !important;
  }
}

.mobile-nav-toggle {
  color: var(--w-text) !important;
}

.logo-img {
  max-height: 42px;
  width: auto;
  object-fit: contain;
}

.lang-switch {
  padding: 8px 14px !important;
  margin-left: 12px;
  border-radius: 999px;
  border: 2px solid var(--w-accent) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--w-accent) !important;
  background: rgba(71, 178, 228, 0.08) !important;
}

.lang-switch:hover {
  background: var(--w-accent) !important;
  color: #fff !important;
}

/* Hero — 淺藍活力漸層 */
#hero {
  background: linear-gradient(145deg, #e8f4fc 0%, #ffffff 42%, #f0f9ff 100%) !important;
  border-bottom: 1px solid var(--w-border);
}

/* 手機：不要用固定 100vh 裁切內容；改為可隨內容伸長 */
@media (max-width: 991px) {
  #hero {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 5.25rem;
    padding-bottom: 2.25rem;
    align-items: flex-start !important;
    overflow: visible !important;
  }

  #hero > .container {
    padding-bottom: 0.5rem;
  }
}

/* Hero 兩顆 CTA */
#hero .hero-cta-row {
  gap: 0.65rem !important;
}

#hero .btn-hero-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

/* 與外框鈕同寬 2px 邊框，避免一顆因 border 視覺較窄 */
#hero .btn-hero-cta.btn-get-started {
  border: 2px solid transparent !important;
}

#hero .btn-hero-cta--outline {
  background: #fff !important;
  color: #37517e !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
  border: 2px solid #47b2e4 !important;
  font-weight: 600 !important;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
  box-shadow: 0 4px 14px rgba(71, 178, 228, 0.2) !important;
}

#hero .btn-hero-cta--outline:hover {
  background: #f5fbff !important;
  color: var(--w-accent-deep) !important;
  box-shadow: 0 6px 18px rgba(71, 178, 228, 0.28) !important;
}

/* 桌機（≥992px）：兩顆 CTA 同寬，與手機一致 */
@media (min-width: 992px) {
  #hero .hero-cta-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: 520px;
    margin-top: 10px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #hero .hero-cta-row .btn-hero-cta {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 10px 18px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }

  #hero .hero-cta-row .btn-hero-cta i {
    margin-right: 0.35rem !important;
    flex-shrink: 0;
  }
}

/* ≤991px（手機／小平板）：兩顆強制等分寬度（先前只寫 575px，較寬手機仍會依字長變寬） */
@media (max-width: 991px) {
  #hero .hero-cta-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: min(100%, 520px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #hero .hero-cta-row .btn-hero-cta {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    padding: 10px 12px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  #hero .hero-cta-row .btn-hero-cta i {
    margin-right: 0.3rem !important;
    flex-shrink: 0;
  }
}

@media (max-width: 575px) {
  #hero .hero-cta-row .btn-hero-cta {
    font-size: 0.86rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* 極窄：改直向堆疊，維持全寬一致 */
@media (max-width: 360px) {
  #hero .hero-cta-row {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  #hero .hero-cta-row .btn-hero-cta {
    width: 100% !important;
    flex: none !important;
    max-width: 100% !important;
    white-space: normal;
    line-height: 1.3;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }
}

/* Hero 底部特色：允許換行、避免橫向溢出被裁切 */
#hero .hero-feature-chips {
  max-width: 100%;
  gap: 0.5rem 0.85rem !important;
  row-gap: 0.65rem !important;
  line-height: 1.45;
  padding-bottom: 0.25rem;
  overflow: visible !important;
}

#hero .hero-feature-chip {
  max-width: 100%;
  line-height: 1.45;
}

#hero .hero-feature-chip i {
  line-height: 1;
  align-self: center;
}

/* 英文首頁（html lang="en"）：與中文版相同的 Hero 行為—拉丁文換行、較長 CTA 字級與列寬 */
html[lang="en"] #hero h2.hero-tagline {
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="en"] #hero .hero-lead {
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="en"] #hero .hero-cta-row {
  max-width: min(100%, 600px);
}

@media (max-width: 991px) {
  html[lang="en"] #hero .hero-cta-row .btn-hero-cta {
    font-size: 0.78rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    line-height: 1.2;
  }
}

@media (max-width: 575px) {
  html[lang="en"] #hero .hero-cta-row .btn-hero-cta {
    font-size: 0.72rem !important;
    padding-left: 0.3rem !important;
    padding-right: 0.3rem !important;
  }
}

#hero h1 {
  color: var(--w-text) !important;
}

#hero h2 {
  color: var(--w-accent) !important;
  font-weight: 600 !important;
}

/* Hero 副標：手機版避免詞組被拆字（如「軟硬｜整合」），並可整段換行置中 */
#hero h2.hero-tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 0.15rem;
  row-gap: 0.35rem;
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

@media (min-width: 992px) {
  #hero .hero-text-col h2.hero-tagline {
    justify-content: flex-start;
  }
}

#hero h2.hero-tagline .hero-tagline-dot {
  opacity: 0.85;
  flex-shrink: 0;
}

#hero .hero-lead {
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

#hero .btn-get-started {
  background: var(--w-accent) !important;
  color: #fff !important;
}

#hero .btn-get-started:hover {
  background: var(--w-accent-deep) !important;
}

/* Hero 主視覺：使用 ai.jpg 等實圖（覆寫 style.css 對 hero-img img 的過窄寬度） */
#hero .hero-ai-visual img.hero-ai-image {
  width: min(100%, 540px);
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(34, 67, 109, 0.12);
  box-shadow: 0 16px 40px rgba(71, 178, 228, 0.18), 0 4px 12px rgba(34, 67, 109, 0.08);
  object-fit: cover;
  display: block;
}

@media (max-width: 991px) {
  #hero .hero-ai-visual img.hero-ai-image {
    width: min(92%, 480px) !important;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 575px) {
  #hero .hero-ai-visual img.hero-ai-image {
    width: min(100%, 420px) !important;
  }
}

/* Section titles */
.section-title h2 {
  color: var(--w-text) !important;
}

.section-title p {
  color: var(--w-muted) !important;
}

.section-bg {
  background-color: var(--w-bg-soft) !important;
}

.portfolio.section-bg,
.skills.core-services {
  background-color: #f6f9fc !important;
}

.about .content p,
.about .content ul li {
  color: var(--w-body) !important;
}

.about .content ul i {
  color: var(--w-accent) !important;
}

/* About — 方塊／卡片式版面 */
.about-highlight-box {
  height: 100%;
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.4rem;
  box-shadow: var(--w-shadow);
  border-left: 4px solid var(--w-accent);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.about-highlight-box:hover {
  box-shadow: var(--w-shadow-hover);
  transform: translateY(-2px);
}

.about-highlight-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(71, 178, 228, 0.18), rgba(71, 178, 228, 0.06));
  color: #2d6a8f;
  font-size: 1.35rem;
}

.about-highlight-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--w-text) !important;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.about-highlight-text {
  color: var(--w-muted) !important;
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 0.85rem;
}

.about-highlight-text:last-child {
  margin-bottom: 0;
}

.about-capabilities-lead {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--w-text) !important;
  margin-bottom: 1.25rem;
  max-width: 640px;
}

.about-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
}

/* 寬螢幕五卡同一列（容器足夠時） */
@media (min-width: 1200px) {
  .about-capability-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }
}

.about-cap-box {
  background: var(--w-white);
  border: 1px solid rgba(34, 67, 109, 0.11);
  border-radius: 14px;
  padding: 1.25rem 1.15rem 1.2rem;
  box-shadow: var(--w-shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.about-cap-box:hover {
  box-shadow: var(--w-shadow-hover);
  border-color: rgba(71, 178, 228, 0.35);
  transform: translateY(-3px);
}

.about-cap-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #e8f4fc, #d4ecfa);
  color: #2d6a8f !important;
  font-size: 1.25rem;
}

.about-cap-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--w-text) !important;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.about-cap-desc {
  font-size: 0.9rem;
  color: var(--w-muted) !important;
  line-height: 1.65;
  margin: 0;
  flex: 1 1 auto;
}

/* Why us */
.why-us .content h3 {
  color: var(--w-text) !important;
}

.why-us .content p,
.why-us .accordion-list p {
  color: var(--w-muted) !important;
}

.why-us .accordion-list a {
  color: var(--w-text) !important;
}

/* 為何選擇威思 — 右側圖：縮小、柔邊融入版塊 */
.why-us-ai-panel {
  min-height: 0;
  padding: 1rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.why-us-ai-panel .why-us-side-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0.25rem auto;
  border-radius: 14px;
  border: none;
  object-fit: cover;
  /* 漸層感柔光：多層大模糊＋淡藍暈，邊緣較不「切」在版面上 */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65),
    0 10px 32px rgba(71, 178, 228, 0.18),
    0 22px 56px rgba(45, 106, 143, 0.12),
    0 40px 80px -12px rgba(71, 178, 228, 0.15);
  /* 邊緣略淡出，與 section 底色銜接 */
  -webkit-mask-image: radial-gradient(
    ellipse 92% 94% at 50% 50%,
    #000 52%,
    rgba(0, 0, 0, 0.65) 78%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 92% 94% at 50% 50%,
    #000 52%,
    rgba(0, 0, 0, 0.65) 78%,
    transparent 100%
  );
}

@media (min-width: 992px) {
  .why-us-ai-panel .why-us-side-img {
    max-width: 300px;
  }
}

@media (max-width: 575px) {
  .why-us-ai-panel .why-us-side-img {
    max-width: 280px;
  }
}

/* Services */
.services .icon-box {
  background: var(--w-white) !important;
  border: 1px solid var(--w-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--w-shadow) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.services .icon-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--w-shadow-hover) !important;
}

.services .icon-box .icon {
  background: linear-gradient(135deg, rgba(71, 178, 228, 0.2), rgba(71, 178, 228, 0.06)) !important;
}

.services .icon-box h4 a {
  color: var(--w-text) !important;
}

.services .icon-box h4 a:hover {
  color: var(--w-accent) !important;
}

.services .icon-box p,
.services .icon-box ul li {
  color: var(--w-muted) !important;
}

/* Team */
.team .member {
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  box-shadow: var(--w-shadow);
  padding: 1.25rem;
  align-items: stretch;
}

.team .member .member-info {
  flex: 1;
  min-width: 0;
  padding-left: 1.75rem;
}

.team .member .pic {
  border-radius: 14px;
  border: 1px solid var(--w-border);
}

/* 覆寫 style.css 的 .pic 寬 180px，統一頭像框高度（企業風剪影） */
.team .member .pic.team-avatar {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  height: 128px !important;
  min-height: 128px !important;
  max-height: 128px !important;
  border-radius: 12px !important;
  overflow: hidden;
  flex-shrink: 0;
  align-self: flex-start;
}

.team-avatar {
  background: linear-gradient(135deg, #e8f4fc, #d4ecfa) !important;
  color: #2d6a8f !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(34, 67, 109, 0.15);
}

.team .member .pic.team-avatar svg {
  width: 72%;
  height: 82%;
  display: block;
  flex-shrink: 0;
}

.team .member-info h4 {
  color: var(--w-text) !important;
}

.team .member-info span {
  color: var(--w-accent) !important;
}

.team .member-info p {
  color: var(--w-muted) !important;
}

/* FAQ */
.faq .faq-list a {
  color: var(--w-text) !important;
}

.faq .faq-list p {
  color: var(--w-muted) !important;
}

.faq .faq-list .icon-help {
  color: var(--w-accent) !important;
}

/* Contact */
.contact .info {
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  box-shadow: var(--w-shadow);
}

.contact .info h4,
.contact .php-email-form label {
  color: var(--w-text) !important;
}

.contact .info p,
.contact .info a {
  color: var(--w-muted) !important;
}

.contact .info a:hover {
  color: var(--w-accent) !important;
}

.contact .php-email-form {
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  box-shadow: var(--w-shadow);
  padding: 1.5rem;
}

.contact .php-email-form .form-control {
  background: var(--w-white) !important;
  border: 1px solid var(--w-border) !important;
  color: var(--w-body) !important;
}

.contact .php-email-form .form-control:focus {
  border-color: var(--w-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(71, 178, 228, 0.2);
}

.contact .php-email-form button[type="submit"] {
  background: var(--w-accent) !important;
  color: #fff !important;
  border: none !important;
}

.contact .php-email-form button[type="submit"]:hover {
  background: var(--w-accent-deep) !important;
}

.contact-hours-box {
  background: linear-gradient(135deg, #e8f4fc, #f5fbff) !important;
  border: 1px solid var(--w-border) !important;
}

.contact-hours-box h5 {
  color: var(--w-text) !important;
}

.contact-hours-box p {
  color: var(--w-muted) !important;
}

/* Footer */
#footer .footer-top {
  background: var(--w-bg-soft) !important;
  border-top: 1px solid var(--w-border);
}

#footer .footer-contact h3,
#footer .footer-links h4 {
  color: var(--w-text) !important;
}

#footer .footer-contact p,
#footer .footer-links ul a {
  color: var(--w-muted) !important;
}

#footer .footer-links ul a:hover {
  color: var(--w-accent) !important;
}

#footer .footer-bottom {
  border-top: 1px solid var(--w-border);
  background: var(--w-white) !important;
}

#footer .copyright {
  color: var(--w-muted) !important;
}

/* Mobile menu */
.navbar-mobile {
  background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-mobile ul {
  background-color: var(--w-white) !important;
  border: 1px solid var(--w-border);
  box-shadow: var(--w-shadow);
}

.navbar-mobile a {
  color: var(--w-text) !important;
}

.navbar-mobile a:hover,
.navbar-mobile .active {
  color: var(--w-accent) !important;
}

/* Preloader */
#preloader {
  background: var(--w-bg-band) !important;
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--w-bg-soft) !important;
  border-bottom: 1px solid var(--w-border);
}

.breadcrumbs h2 {
  color: var(--w-text) !important;
}

.breadcrumbs ol li a,
.breadcrumbs ol li {
  color: var(--w-muted) !important;
}

.inner-page {
  background: var(--w-white);
}

.inner-page p {
  color: var(--w-muted);
}

.portfolio-details {
  background: var(--w-white);
}

.portfolio-details p {
  color: var(--w-muted) !important;
}

.portfolio-details h3,
.portfolio-details h4 {
  color: var(--w-text) !important;
}

.portfolio-info,
.portfolio-description {
  color: var(--w-muted);
}

.portfolio-description h2 {
  color: var(--w-text) !important;
}

/* Stats */
.stats-section {
  background: var(--w-white) !important;
  border-top: 1px solid var(--w-border);
  border-bottom: 1px solid var(--w-border);
}

.stat-item .stat-number {
  color: var(--w-accent) !important;
}

.stat-item .stat-label {
  color: var(--w-muted) !important;
}

/* Tech / core services */
.core-services {
  background: #f6f9fc !important;
}

.tech-domain-card {
  background: var(--w-white) !important;
  border: 1px solid rgba(34, 67, 109, 0.11) !important;
  border-top: 4px solid #2d6a8f !important;
  box-shadow: var(--w-shadow) !important;
  border-radius: 14px !important;
  padding: 1.4rem 1.2rem !important;
}

.tech-domain-card:hover {
  box-shadow: var(--w-shadow-hover) !important;
}

.tech-domain-card h4 {
  color: var(--w-text) !important;
}

.tech-domain-card p {
  color: var(--w-muted) !important;
}

.tech-tag {
  background: rgba(71, 178, 228, 0.12) !important;
  color: var(--w-accent-deep) !important;
}

/* Case cards */
.case-card {
  background: var(--w-white) !important;
  border: 1px solid rgba(34, 67, 109, 0.11) !important;
  box-shadow: var(--w-shadow) !important;
  border-radius: 14px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.case-card:hover {
  box-shadow: var(--w-shadow-hover) !important;
}

.case-card-body p {
  color: var(--w-muted) !important;
  margin-bottom: 14px;
  flex: 1 1 auto;
}

.case-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 16px;
}

.case-result {
  background: linear-gradient(90deg, rgba(71, 178, 228, 0.12), rgba(71, 178, 228, 0.06)) !important;
  color: var(--w-accent-deep) !important;
  border: 1px solid rgba(71, 178, 228, 0.2);
  margin-top: auto;
}

.case-card-header {
  background: #ffffff !important;
  border-left: 4px solid #2d6a8f;
  border-bottom: 1px solid rgba(34, 67, 109, 0.11);
  padding: 22px 20px;
  color: var(--w-text);
}

.case-card-header i {
  font-size: 1.6rem;
  margin-bottom: 8px;
  display: block;
  color: #2d6a8f;
}

.case-card-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--w-text) !important;
}

/* CTA — 保留對比強的藍色帶 */
.cta-section {
  background: linear-gradient(120deg, #2e4f78 0%, #3d78ac 55%, #4f8fc4 100%) !important;
  border-top: none;
  border-bottom: none;
}

.cta-section h2,
.cta-section p {
  color: #fff !important;
}

.btn-cta {
  background: #fff !important;
  color: var(--w-text) !important;
  /* 避免中文＋圖示在窄寬度被裁切 */
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.75rem 1.85rem !important;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-cta:hover {
  background: var(--w-bg-band) !important;
  color: var(--w-text) !important;
}

.cta-section .container {
  text-align: center;
}

/* AI section — 淺藍區塊（非深色） */
.ai-antivirus-section {
  background: linear-gradient(180deg, #dbeef9 0%, #f5fbff 55%, #ffffff 100%) !important;
  border-top: 1px solid var(--w-border);
  border-bottom: 1px solid var(--w-border);
  color: var(--w-body);
}

.ai-antivirus-section .section-title h2 {
  color: var(--w-text) !important;
}

.ai-antivirus-section .section-title p {
  color: var(--w-muted) !important;
}

.ai-antivirus-section .text-accent-deep {
  color: #2d6a8f !important;
}

/* AI 區 — 導言（與下方方塊網格對齊、可讀寬度） */
.ai-section-lead {
  color: #5c6f82;
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 0;
  text-align: center;
}

@media (min-width: 992px) {
  .ai-section-lead {
    text-align: left;
  }
}

/* WCS 介紹圖（AI 區 — 導言與能力卡之間） */
.wcs-intro-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(100%, 820px);
  margin-left: auto;
  margin-right: auto;
}

.wcs-intro-link {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--w-shadow);
  border: 1px solid var(--w-border);
  background: var(--w-white);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.wcs-intro-link:hover,
.wcs-intro-link:focus-visible {
  box-shadow: var(--w-shadow-hover);
  transform: translateY(-3px);
}

.wcs-intro-link:focus-visible {
  outline: 3px solid var(--w-accent);
  outline-offset: 4px;
}

.wcs-intro-img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  transition: transform 0.45s ease;
  margin-left: auto;
  margin-right: auto;
}

.wcs-intro-link:hover .wcs-intro-img,
.wcs-intro-link:focus-visible .wcs-intro-img {
  transform: scale(1.015);
}

.wcs-intro-zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--w-text);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  border: 1px solid var(--w-border);
  box-shadow: 0 4px 18px rgba(55, 81, 126, 0.1);
  pointer-events: none;
}

.wcs-intro-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--w-muted);
  line-height: 1.55;
  padding: 0 0.5rem;
  width: 100%;
  max-width: 52rem;
}

@media (max-width: 575px) {
  .wcs-intro-zoom-hint {
    font-size: 0.72rem;
    padding: 6px 10px;
    bottom: 10px;
    right: 10px;
  }

  .wcs-intro-link {
    border-radius: 12px;
  }
}

.ai-feature-grid .ai-feature-item {
  margin-bottom: 0;
}

/* AI 區 — eBPF / Kernel BPF 說明面板 */
.ai-bpf-panel {
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 16px;
  box-shadow: var(--w-shadow);
  padding: 1.5rem 1.35rem 1.4rem;
  border-left: 4px solid var(--w-accent-deep);
}

.ai-bpf-panel__head {
  margin-bottom: 1.1rem;
}

.ai-bpf-panel__head .ai-badge {
  margin-bottom: 0.65rem;
}

.ai-bpf-panel__title {
  color: var(--w-text);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.ai-bpf-panel__lead {
  color: var(--w-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0;
}

.ai-bpf-panel__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-bpf-panel__list > li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  background: var(--w-bg-soft);
  border-radius: 10px;
  border: 1px solid rgba(55, 81, 126, 0.06);
}

.ai-bpf-panel__list > li > i {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--w-accent);
  margin-top: 0.1rem;
}

.ai-bpf-panel__list > li > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--w-body);
}

.ai-bpf-panel__list > li > div strong {
  color: var(--w-text);
  font-size: 0.92rem;
}

.ai-bpf-panel__list > li > div span {
  color: var(--w-muted);
  font-size: 0.86rem;
}

@media (min-width: 768px) {
  .ai-bpf-panel {
    padding: 1.65rem 1.6rem 1.45rem;
  }

  .ai-bpf-panel__title {
    font-size: 1.28rem;
  }
}

/* AI 區 — 應用場景小卡（等高、圖示對齊） */
.ai-scenes-heading {
  color: #2d6a8f;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-scenes-row {
  margin-top: 0.25rem;
}

.ai-scene-card {
  background: var(--w-white);
  border: 1px solid var(--w-border);
  border-radius: 12px;
  padding: 1.1rem 0.65rem;
  box-shadow: var(--w-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ai-scene-card:hover {
  box-shadow: var(--w-shadow-hover);
  transform: translateY(-2px);
}

.ai-scene-icon {
  font-size: 2rem !important;
  color: #47b2e4 !important;
  line-height: 1;
  display: block;
}

.ai-scene-label {
  color: var(--w-muted);
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.35;
  max-width: 100%;
}

.ai-feature-item {
  background: var(--w-white);
  border-radius: 14px;
  padding: 1.5rem 1.35rem 1.45rem;
  border-left: 4px solid var(--w-accent);
  box-shadow: var(--w-shadow);
  border: 1px solid var(--w-border);
  border-left-width: 4px;
  transition: box-shadow 0.25s ease;
}

.ai-feature-item:hover {
  box-shadow: var(--w-shadow-hover);
}

.ai-feature-item h4 {
  color: var(--w-accent-deep) !important;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.ai-feature-item p {
  color: var(--w-muted) !important;
  margin: 0;
  line-height: 1.75;
}

.btn-ai-brief {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--w-accent) !important;
  color: #fff !important;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 1rem;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 18px rgba(71, 178, 228, 0.28);
}

.btn-ai-brief:hover {
  background: var(--w-accent-deep) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(71, 178, 228, 0.35);
}

.ai-badge {
  display: inline-block;
  background: rgba(71, 178, 228, 0.15);
  color: var(--w-accent-deep);
  border: 1px solid rgba(71, 178, 228, 0.35);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Inner pages */
.service-detail-card {
  background: var(--w-white) !important;
  border: 1px solid var(--w-border) !important;
  box-shadow: var(--w-shadow) !important;
}

.service-detail-card h3,
.service-detail-card h5 {
  color: var(--w-text) !important;
}

.service-detail-card p,
.service-detail-card ul li {
  color: var(--w-muted) !important;
}

.process-step .step-num {
  background: linear-gradient(135deg, #47b2e4, #37517e) !important;
}

.process-step .step-content h5 {
  color: var(--w-text) !important;
}

.process-step .step-content p {
  color: var(--w-muted) !important;
}

.case-info-box {
  background: var(--w-white) !important;
  border: 1px solid var(--w-border);
  box-shadow: var(--w-shadow);
}

.case-info-box h4 {
  color: var(--w-text) !important;
  border-bottom-color: var(--w-accent) !important;
}

.case-info-box ul li {
  color: var(--w-muted) !important;
  border-bottom-color: var(--w-border) !important;
}

.case-info-box ul li strong {
  color: var(--w-accent-deep) !important;
}

.tech-badge {
  background: rgba(71, 178, 228, 0.12) !important;
  color: var(--w-accent-deep) !important;
}

.challenge-item {
  background: #fff8f8 !important;
  border-left-color: #e57373 !important;
}

.challenge-item p {
  color: var(--w-muted) !important;
}

.solution-item {
  background: #f4fff6 !important;
  border-left-color: #66bb6a !important;
}

.solution-item p {
  color: var(--w-muted) !important;
}

.why-us .img {
  background-image: none !important;
}

/* 重點說明條（統計區下方） */
.value-strip {
  background: linear-gradient(90deg, rgba(71, 178, 228, 0.12), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--w-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--w-text);
  font-size: 0.95rem;
  line-height: 1.65;
}

.value-strip i {
  color: var(--w-accent);
  font-size: 1.35rem;
  vertical-align: middle;
}

/* ===== Enterprise Refresh (2026) ===== */
body {
  letter-spacing: 0.1px;
}

.container {
  max-width: 1180px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.section-title p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
}

#hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

#hero h2 {
  font-size: 1.32rem;
  line-height: 1.45;
  color: #294f7d !important;
}

#hero p {
  font-size: 1rem !important;
  line-height: 1.85 !important;
}

.stats-section {
  border-top: none;
}

.stat-item {
  text-align: center;
  padding: 10px 8px;
}

.stat-item .stat-number {
  font-size: 2rem;
  font-weight: 700;
}

.services .icon-box,
.tech-domain-card,
.case-card,
.team .member,
.service-detail-card,
.case-info-box {
  border-radius: 14px !important;
  border: 1px solid rgba(34, 67, 109, 0.11) !important;
}

.services .icon-box .icon,
.case-card-header i,
.tech-domain-card i {
  color: #2d6a8f !important;
}

.services .icon-box p,
.tech-domain-card p,
.case-card-body p,
.team .member-info p,
.faq .faq-list p {
  line-height: 1.75 !important;
}

.btn-get-started,
.btn-cta,
.contact .php-email-form button[type="submit"] {
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}

.value-strip {
  background: #f7fbff;
  border-left: 4px solid var(--w-accent);
}

@media (max-width: 991px) {
  #hero h1 {
    font-size: 2rem;
  }
  .section-title h2 {
    font-size: 1.6rem;
  }
}

/* 極窄螢幕：CTA 仍完整顯示 */
@media (max-width: 380px) {
  .btn-cta {
    font-size: 0.9rem !important;
    padding: 0.65rem 1.2rem !important;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

/* =====================================================================
   WCS Chat Demo Widget
   ===================================================================== */
.wcs-demo-section {
  padding: 48px 0 32px;
  background: var(--w-bg);
}

.wcs-section-label {
  text-align: center;
  margin-bottom: 28px;
}
.wcs-section-label h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--w-text);
  margin-bottom: 5px;
}
.wcs-section-label h3 i {
  color: var(--w-accent);
  margin-right: 6px;
}
.wcs-section-label p {
  font-size: 0.875rem;
  color: var(--w-muted);
  margin: 0;
}

.awtlgpt-card {
  background: #fff;
  border: 1px solid var(--w-border);
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(55, 81, 126, 0.10);
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto;
}

.wcs-chat-header {
  background: linear-gradient(90deg, #1a2f4e 0%, #2d4a72 100%);
  color: #fff;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.wcs-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wcs-header-brand > i { color: #47b2e4; font-size: 1rem; }

.wcs-counter {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.60);
  font-weight: 400;
  flex-shrink: 0;
}

.wcs-progress-bar {
  height: 2px;
  background: rgba(71, 178, 228, 0.13);
  overflow: hidden;
}
.wcs-progress-fill {
  height: 100%;
  background: var(--w-accent);
  width: 0%;
}

.wcs-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  flex-shrink: 0;
  animation: wcs-pulse 1.6s ease-in-out infinite;
}
@keyframes wcs-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  50%       { opacity: 0.55; box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

/* messages area */
.awtlgpt-messages {
  padding: 16px 18px;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* user bubble */
.msg-user {
  display: flex;
  justify-content: flex-end;
}
.msg-user .bubble {
  background: #e9f3fb;
  border: 1px solid rgba(71, 178, 228, 0.22);
  border-radius: 14px 14px 2px 14px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #2d3748;
  max-width: 72%;
  line-height: 1.6;
}

/* AI bubble */
.msg-ai {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.msg-ai .ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #47b2e4 0%, #2d6a8f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(71, 178, 228, 0.35);
  letter-spacing: 0.3px;
}
.msg-ai .bubble {
  background: #f0f8ff;
  border: 1px solid rgba(71, 178, 228, 0.22);
  border-radius: 2px 14px 14px 14px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #2d3748;
  line-height: 1.7;
  flex: 1;
}

.awtlgpt-cursor {
  display: inline-block;
  width: 2px;
  background: #47b2e4;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: awtlgpt-blink 0.7s step-end infinite;
}
@keyframes awtlgpt-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* input bar */
.awtlgpt-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid #f0f4f8;
}
.awtlgpt-input-inner {
  flex: 1;
  background: #f7f9fb;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}
#awtlgpt-placeholder { color: #aab4be; user-select: none; pointer-events: none; }
#awtlgpt-input-text  { color: #2d3748; }
#awtlgpt-input-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #47b2e4;
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: awtlgpt-blink 0.7s step-end infinite;
}
.awtlgpt-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--w-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: default;
  flex-shrink: 0;
  opacity: 0.7;
}

@media (max-width: 575px) {
  .awtlgpt-messages { max-height: 260px; padding: 12px 14px; }
  .msg-user .bubble, .msg-ai .bubble { font-size: 0.855rem; }
  .wcs-chat-header { font-size: 0.8rem; }
}

/* Bootstrap Icons 字型：覆寫舊版 bootstrap-icons.css 內含 ?hash 的 url（快取／未上傳新檔時仍會 404）
   theme 永遠在 bootstrap-icons.css 之後載入，此處 @font-face 應優先生效 */
@font-face {
  font-family: "bootstrap-icons";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2") format("woff2"),
       url("/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff") format("woff");
}
