.solutions {
  padding-block: clamp(28px, 6vw, 64px);
  text-align: center;
}

.solutions__title {
  font-weight: 800;
  font-size: clamp(24px, 3.6vw, 40px);
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-block: clamp(12px, 3.2vw, 28px);
}

/* 卡片容器 */
.sol-card {
  /* 原樣保留 */
}

/* summary：縮起時看到的樣子 */
.sol-card__summary {
  list-style: none;
  display: grid;
  grid-template-columns: 100%;
  gap: 12px;
  padding: 12px 12px 16px;
  cursor: pointer;
}
.sol-card__summary::-webkit-details-marker {
  display: none;
}

/* 縮圖與覆蓋標題 */
.sol-card__thumb {
  position: relative;
}
.sol-card__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-size: clamp(18px, 5.8vw, 24px);
  line-height: 1.2;
  padding: 0 16px;
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.sol-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 卡片說明與按鈕 */
.sol-card__info {
  padding: 0 4px;
}
.sol-card__desc {
  margin: 0 0 10px;
  font-size: clamp(14px, 1.8vw, 16px);
  color: #333;
  line-height: 1.7;
}

/* 展開內容 */
.sol-panel {
  border-top: 1px solid #eee;
  padding: 16px 14px 18px;
  background: #fafafa;
}
.sol-panel__title {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: clamp(22px, 3.2vw, 28px); /* 手機至少 22px，最大到 28px */
  line-height: 1.25;
  margin-bottom: 16px; /* 視覺更喘一點 */
}

/* 內頁網格 */
.sol-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
/* …(sol-item 系列保留)… */

/* 平板 */
@media (min-width: 768px) {
  .sol-card__summary {
    grid-template-columns: 42% 1fr;
    align-items: center;
    padding: 16px;
  }
  .sol-card__info {
    padding: 0 8px;
  }
  .sol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .solutions__title {
    margin-block: 24px 32px;
  }
}

/* 桌機 */
@media (min-width: 992px) {
  .sol-card {
    margin: 18px 0;
  }
  .sol-panel {
    border-top: 0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 14px 14px;
  }
}

/* CTA 造型（保留） */
.sol-card__cta.btn.btn-primary {
  --btn-bg: #2c295a;
  --btn-bg-hover: #232047;
  --btn-text: #fff;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(44, 41, 90, 0.24);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s,
    background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
@media (hover: hover) and (pointer: fine) {
  .sol-card__cta.btn.btn-primary:hover {
    background: var(--btn-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(44, 41, 90, 0.28);
    filter: brightness(1.02);
  }
  .sol-card__cta.btn.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(44, 41, 90, 0.22);
  }
}
.sol-card__cta.btn.btn-primary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 6px rgba(44, 41, 90, 0.35);
}
.sol-card__cta.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 14px;
}

/* Solutions 區塊：summary 直式覆蓋 */
.solutions .sol-card > .sol-card__summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.solutions .sol-card__thumb {
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
}
.solutions .sol-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.solutions .sol-card__info {
  display: grid;
  gap: 8px;
}
/* 可留空的 ::after 不再定義 */

/* --- Fix: solutions 區塊的圖片在手機寬度內自適應 --- */
.solutions .sol-item__figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: auto;
  margin-bottom: 14px; /* 手機間距 */
}

.solutions .sol-item__figure img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto; /* 依比例縮放，不裁切 */
  object-fit: cover; /* 若未來加上固定高寬也不會變形 */
}

/*（可選）若你想讓手機版圖面固定視覺比例，打開這段 */
@media (max-width: 576px) {
  .solutions .sol-item__figure {
    aspect-ratio: 16 / 9; /* or 4 / 3 */
  }
  .solutions .sol-item__figure img {
    height: 100%;
  }
}

@media (min-width: 768px) {
  .solutions .sol-item__figure {
    margin-bottom: 18px; /* 平板以上再多一點 */
  }
}

/* Sol 面板：卡片內標題置中 + 下方裝飾橫線 */
.sol-item__title h4 {
  text-align: center;
  font-weight: 700; /* 比較有力道 */
  margin: 0 0 8px; /* 與下方橫線的間距 */
  line-height: 1.25;
}

.sol-item__title::after {
  content: "";
  display: block;
  width: 48px; /* 橫線長度 */
  height: 3px; /* 橫線粗細 */
  background: #111; /* 顏色（可換品牌色） */
  margin: 8px auto 0; /* 與標題距離 + 置中 */
  border-radius: 2px;
}

/* 標題下方說明文字（已存在，這裡補齊間距與行距） */
.sol-item__text {
  margin: 10px 0 0; /* 與上方圖/線條留白 */
  color: #444;
  font-size: 14px;
  line-height: 1.7;
  text-align: left; /* 若想置中就改成 center */
}

/* 手機字級可稍微放大（可選） */
@media (max-width: 576px) {
  .sol-item__title {
    font-size: 18px;
  }
  .sol-item__text {
    font-size: 15px;
  }
}

/* 手機：兩個 article 之間拉大間距 */
@media (max-width: 576px) {
  .solutions .sol-grid {
    row-gap: 40px; /* 明顯一點的上下間距 */
    column-gap: 0; /* 單欄時不需要左右間距，可留著也行 */
  }
}

/* ===== Solutions：桌機版橫排（方案B）覆蓋 ===== */
@media (min-width: 992px) {
  /* 卡片寬度與外距 */
  .solutions .sol-card {
    max-width: 1100px;
    margin: 22px auto;
  }

  /* summary 改成：圖左、文右（覆蓋你先前的直式設定） */
  .solutions .sol-card > .sol-card__summary {
    display: flex !important; /* 蓋過先前的 grid/column */
    flex-direction: row !important; /* 橫排 */
    align-items: center;
    gap: 18px;
    padding: 20px;
  }

  /* 縮圖比例與大小 */
  .solutions .sol-card__thumb {
    flex: 0 0 44%;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
  }
  .solutions .sol-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 右側文字區 */
  .solutions .sol-card__info {
    display: grid;
    gap: 12px;
    text-align: left;
    padding: 4px 8px;
  }
  .solutions .sol-card__desc {
    font-size: 16px;
    line-height: 1.7;
  }
  .solutions .sol-card__cta {
    justify-self: start;
  } /* 按鈕靠左 */

  /* 展開面板維持 3 欄 */
  .solutions .sol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 不要顯示 summary 的箭頭（若有出現） */
  .solutions .sol-card > .sol-card__summary::after {
    display: none !important;
    content: none !important;
  }
}

/* ===== Solutions：區域性復位（防外部規則干擾）===== */
.solutions {
  position: relative;
  overflow: visible;
}

/* 避免被全站的直排、固定定位、白空格等規則污染 */
.solutions,
.solutions * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: normal !important;
}

/* 只留「想知道更多」按鈕來控制展開/收合，不顯示 summary 的原生箭頭或自製箭頭 */
.solutions .sol-card__summary::-webkit-details-marker {
  display: none !important;
}
.solutions .sol-card__summary::after {
  content: none !important;
}

/* 讓按鈕真的能點（你先前有設 pointer-events:none） */
.solutions .sol-card__cta {
  pointer-events: auto !important;
  position: static !important; /* 防外部把它設成 fixed / absolute */
  inset: auto !important;
}

/* ===== Solutions：桌機版橫排（B 版最終覆蓋）===== */
@media (min-width: 992px) {
  /* 卡片寬度與外距 */
  .solutions .sol-card {
    max-width: 1100px;
    margin: 22px auto;
  }

  /* 橫排：圖左文右 */
  .solutions .sol-card > .sol-card__summary {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 18px;
    padding: 20px;
    text-align: left;
  }

  /* 縮圖 */
  .solutions .sol-card__thumb {
    flex: 0 0 44%;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
  }
  .solutions .sol-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 右側文字 */
  .solutions .sol-card__info {
    display: grid;
    gap: 12px;
    padding: 4px 8px;
  }
  .solutions .sol-card__desc {
    font-size: 16px;
    line-height: 1.7;
  }
  .solutions .sol-card__cta {
    justify-self: start; /* 按鈕靠左 */
  }

  /* 展開面板維持 3 欄 */
  .solutions .sol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==== Solutions：桌機版強制覆蓋（放在最底） ==== */

/* 先把這個區塊常見的干擾關掉（只影響 .solutions 內） */
.solutions,
.solutions * {
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  position: relative; /* 防外層把東西設成 fixed/absolute */
}

.solutions .sol-card__summary::-webkit-details-marker {
  display: none !important;
}
.solutions .sol-card__summary::after {
  content: none !important;
}
.solutions .sol-card__cta {
  pointer-events: auto !important;
  position: static !important;
}

/* 桌機版：圖左／文右 */
@media (min-width: 992px) {
  .solutions .sol-card {
    max-width: 1100px !important;
    margin: 22px auto !important;
  }

  .solutions .sol-card > summary.sol-card__summary {
    display: flex !important; /* 一定用 flex，蓋掉先前直排/grid */
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 18px !important;
    padding: 20px !important;
    text-align: left !important;
  }

  .solutions .sol-card__thumb {
    flex: 0 0 44% !important;
    aspect-ratio: 4 / 3 !important;
    max-height: 420px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  .solutions .sol-card__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .solutions .sol-card__info {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 4px 8px !important;
  }
  .solutions .sol-card__desc {
    font-size: 16px !important;
    line-height: 1.7 !important;
  }
  .solutions .sol-card__cta {
    align-self: flex-start !important; /* 按鈕靠左 */
  }

  /* 展開的三欄網格維持 */
  .solutions .sol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 保留並確定這段在 CSS 最後面 */
.solutions .sol-card__cta {
  pointer-events: auto;
}
