/* 本檔載入頁面：工廠自動化管理系統 (products/industrial-systems/factory-automation.html) */
/* pages/factory-automation.css — 工廠自動化管理系統 */
/* 使用位置：整份文件：CSS 變數（顏色等共用設定，供下方規則以 var(--名稱) 取用） */
:root {
  --brand: #0a5bb5;
  --brand-ink: #0b2545;
  --accent: #f08a24;
  --green: #4f8f1f;
  --line: #e2e8f0;
  --text: #334155;
  --muted: #64748b;
}

/* ===== 版面 ===== */
/* 使用位置：主要內容區 */
.factory_automation-body {
  background: linear-gradient(180deg, #eef4fa 0%, #f6f9fc 320px, #f6f9fc 100%);
  color: var(--text);
  padding-bottom: 1px;
}

/* 使用位置：麵包屑導覽 */
.factory_automation-body .breadcrumb {
  max-width: 1200px;
  width: calc(100% - 2rem);
  margin: 87px auto 0;
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;
  padding: 1.1rem 0 0.4rem;
}

/* 使用位置：主要內容區 */
.factory_automation-container {
  max-width: 1200px;
  width: calc(100% - 2rem);
  box-sizing: border-box;
  margin: 0.8rem auto 3.5rem;
  padding: 2.4rem 2.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(15, 40, 80, 0.07);
  line-height: 1.8;
}

/* 使用位置：頁面大標題 (H1) */
.cards-container h1 {
  margin: 0 0 1.2rem;
  font-size: 1.75rem;
  color: var(--brand-ink);
}

/* ===== 系統概述 ===== */
/* 使用位置：「工廠自動化管理系統」區塊 */
.system-overview > p {
  margin: 0;
  padding: 1.1rem 1.4rem;
  border-radius: 10px;
  background: #f3f8fe;
  border: 1px solid #dbe8f6;
}

/* 使用位置：「工廠自動化管理系統」區塊 */
.system-overview strong {
  color: var(--brand);
}

/* 使用位置：「ISA-95架構整合」區塊 */
.key-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2.4rem;
}

/* 使用位置：「ISA-95架構整合」區塊、「機台聯網技術」區塊、「ERP系統整合」區塊…等 */
.feature-box {
  padding: 1.2rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 使用位置：「ISA-95架構整合」區塊、「機台聯網技術」區塊、「ERP系統整合」區塊…等｜滑鼠移入時 */
.feature-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 40, 80, 0.1);
}

/* 使用位置：「工廠自動化管理系統」區塊、「ISA-95架構整合」區塊、「機台聯網技術」區塊…等 */
.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, #3fa2f5, var(--brand));
}

/* 使用位置：「ISA-95架構整合」區塊｜第 2 個 */
.feature-box:nth-child(2) .feature-icon { background: linear-gradient(135deg, #5fd6df, #1593a6); }
/* 使用位置：「機台聯網技術」區塊｜第 3 個 */
.feature-box:nth-child(3) .feature-icon { background: linear-gradient(135deg, #ffb062, var(--accent)); }
/* 使用位置：「ERP系統整合」區塊｜第 4 個 */
.feature-box:nth-child(4) .feature-icon { background: linear-gradient(135deg, #a4d65e, var(--green)); }

/* 使用位置：「ISA-95架構整合」標題、「機台聯網技術」標題、「ERP系統整合」標題…等 */
.feature-box h3 {
  margin: 0.8rem 0 0.3rem;
  font-size: 1.05rem;
  color: var(--brand-ink);
}

/* 使用位置：「ISA-95架構整合」區塊、「機台聯網技術」區塊、「ERP系統整合」區塊…等 */
.feature-box p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ===== 功能卡片 ===== */
/* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等 */
.card {
  margin-bottom: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 40, 80, 0.05);
  overflow: hidden;
}

/* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等 */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.4rem;
  background: linear-gradient(90deg, #f3f8fe 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}

/* 使用位置：「生產效率分析」區塊、「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊…等 */
.card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(135deg, #3fa2f5, var(--brand));
}

/* 使用位置：「數位化生產管理系統架構」標題、「機台聯網_Smart Machine Box_SMB(智」標題、「機台聯網_連結ERP系統」標題…等 */
.card-header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--brand-ink);
}

/* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等 */
.card-body {
  padding: 1.4rem;
}

/* 使用位置：「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊、「機台聯網_訂單轉錄」區塊…等 */
.card-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

/* 重點說明 */
/* 使用位置：「機台聯網_訂單轉錄」區塊、「機台聯網_製令轉錄」區塊、「機台聯網_稼動率」區塊…等 */
.highlight-box {
  position: relative;
  margin: 0 0 1.2rem;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border-radius: 10px;
  background: #fff8ec;
  border: 1px solid #f7dcb4;
  color: #7a4a0f;
  font-weight: 600;
}

/* 使用位置：「機台聯網_訂單轉錄」區塊、「機台聯網_製令轉錄」區塊、「機台聯網_稼動率」區塊…等｜前方裝飾 */
.highlight-box::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f08a24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 使用位置：「機台聯網_訂單轉錄」區塊、「機台聯網_製令轉錄」區塊、「機台聯網_稼動率」區塊…等 */
.highlight-box p {
  margin: 0;
}

/* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等 */
.card-description {
  margin-top: 1.2rem;
}

/* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等 */
.card-description p {
  margin: 0;
}

/* 時序圖 */
/* 使用位置：「數位化生產管理系統架構」區塊 */
.diagram-container {
  width: 100%;
  overflow-x: auto;
  margin: 0 auto 0.5rem;
  background: #fff;
}

/* 使用位置：「數位化生產管理系統架構」區塊 */
#diagram {
  display: block;
  margin: 0 auto;
  min-width: 800px;
}

/* ===== 常見問題 ===== */
/* 使用位置：「工廠自動化管理系統常見問題」區塊 */
.faq-section {
  margin: 2.4rem 0;
}

/* 使用位置：「工廠自動化管理系統常見問題」標題 */
.faq-section > h3 {
  margin: 0 0 1rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--brand);
  font-size: 1.2rem;
  color: var(--brand-ink);
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊 */
.faq-item {
  margin-bottom: 0.8rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊 */
.faq-question,
.faq-answer p {
  position: relative;
  padding-left: 2.2rem;
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊 */
.faq-question {
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--brand-ink);
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊｜前方裝飾 */
.faq-question::before,
.faq-answer p::before {
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊｜前方裝飾 */
.faq-question::before {
  content: "Q";
  color: #fff;
  background: var(--brand);
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊 */
.faq-answer p {
  margin: 0;
  color: var(--text);
}

/* 使用位置：「工廠自動化管理系統常見問題」區塊｜前方裝飾 */
.faq-answer p::before {
  content: "A";
  color: #b45f0c;
  background: #fdf0e3;
}

/* ===== 相關產品與服務 ===== */
/* 使用位置：「相關產品與服務」區塊 */
.related-products {
  background-color: #f5f8ff;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0 0;
}

/* 使用位置：「相關產品與服務」標題 */
.related-products h3 {
  color: #2c5686;
  margin-top: 0;
}

/* 使用位置：「相關產品與服務」區塊 */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

/* 使用位置：「相關產品與服務」區塊 */
.related-links a {
  display: block;
  padding: 10px 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #333;
  transition: all 0.3s ease;
}

/* 使用位置：「相關產品與服務」區塊｜滑鼠移入時 */
.related-links a:hover {
  background-color: #e1f2ff;
  color: #2c5686;
  border-color: #2c5686;
}

/* ===== 響應式 ===== */
@media (max-width: 1024px) {
  /* 使用位置：「ISA-95架構整合」區塊｜螢幕寬度 ≤1024px（平板/手機）時 */
  .key-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  /* 使用位置：主要內容區｜螢幕寬度 ≤768px（平板/手機）時 */
  .factory_automation-container {
    width: calc(100% - 1.2rem);
    padding: 1.4rem 1.1rem;
  }

  /* 使用位置：頁面大標題 (H1)｜螢幕寬度 ≤768px（平板/手機）時 */
  .cards-container h1 {
    font-size: 1.4rem;
  }

  /* 使用位置：「ISA-95架構整合」區塊｜螢幕寬度 ≤768px（平板/手機）時 */
  .key-features {
    grid-template-columns: 1fr;
  }

  /* 使用位置：「數位化生產管理系統架構」區塊、「機台聯網_Smart Machine Box_SMB(智」區塊、「機台聯網_連結ERP系統」區塊…等｜螢幕寬度 ≤768px（平板/手機）時 */
  .card-body {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  /* 使用位置：麵包屑導覽｜螢幕寬度 ≤480px（手機）時 */
  .factory_automation-body .breadcrumb {
    margin-top: 70px;
  }
}
