/* Start custom CSS for html, class: .elementor-element-53563c8 *//* =========================================================
   台鋼保險小學堂｜六大人生階段保障重點
   延續主頁：Noto Sans TC、深藍、台鋼金、親民簡潔
   ========================================================= */

.tsg-life-page {
  --navy: #061f33;
  --navy-2: #0b304c;
  --gold: #f2a900;
  --gold-soft: #f7c85f;
  --paper: #fcfbf8;
  --light: #eef3f6;
  --white: #ffffff;
  --text: #172936;
  --muted: #60707b;
  --line: rgba(6,31,51,.13);

  --life: #315f9f;
  --care: #7a5aa6;
  --accident: #dd7a2d;
  --medical: #2f8b82;
  --cancer: #c94f68;
  --major: #7b6b42;

  color: var(--text);
  background: var(--paper);
  font-family: "Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;
  font-weight: 500;
  line-height: 1.7;
}

.tsg-life-page,
.tsg-life-page * {
  box-sizing: border-box;
}

.tsg-life-page a {
  color: inherit;
  text-decoration: none;
}

.tsg-life-container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* 主視覺 */
.tsg-life-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 45%, rgba(242,169,0,.16), transparent 25%),
    linear-gradient(115deg, var(--navy), var(--navy-2));
}

.tsg-life-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -180px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(242,169,0,.28);
  border-radius: 50%;
}

.tsg-life-hero__inner {
  position: relative;
  z-index: 2;
  min-height: 230px;
  padding: 34px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tsg-life-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
  color: rgba(255,255,255,.60);
  font-size: 12px;
}

.tsg-life-hero h1 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: clamp(34px,4.4vw,50px);
  font-weight: 800;
  line-height: 1.24;
}

.tsg-life-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255,255,255,.80);
  font-size: 16px;
}

/* 六個人生階段頁籤 */
.tsg-life-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6,31,51,.98);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.tsg-life-tabs__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
}

.tsg-life-tab {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 11px 8px;
  color: rgba(255,255,255,.70)!important;
  border-right: 1px solid rgba(255,255,255,.09);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.tsg-life-tab:last-child {
  border-right: 0;
}

.tsg-life-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
}

.tsg-life-tab:hover,
.tsg-life-tab.is-active {
  color: var(--white)!important;
  background: rgba(255,255,255,.055);
}

.tsg-life-tab.is-active::after {
  transform: scaleX(1);
}

/* 內容 */
.tsg-life-content {
  padding: 24px 0 20px;
}

.tsg-life-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.tsg-life-stage-head h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: clamp(28px,3vw,38px);
  font-weight: 800;
}

.tsg-life-stage-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tsg-life-legend {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: var(--navy);
  background: rgba(242,169,0,.13);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* 六大保障評估 */
.tsg-life-protection-list {
  display: grid;
  gap: 8px;
}

.tsg-life-protection {
  --accent: var(--navy);
  display: grid;
  grid-template-columns: 150px 120px minmax(0,1fr);
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 12px 18px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, white), white 38%);
  border-left: 5px solid var(--accent);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tsg-life-protection--life { --accent: var(--life); }
.tsg-life-protection--care { --accent: var(--care); }
.tsg-life-protection--accident { --accent: var(--accident); }
.tsg-life-protection--medical { --accent: var(--medical); }
.tsg-life-protection--cancer { --accent: var(--cancer); }
.tsg-life-protection--major { --accent: var(--major); }

.tsg-life-protection h3 {
  margin: 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.tsg-life-stars {
  display: inline-flex;
  gap: 3px;
  color: var(--accent);
  font-family: Arial,sans-serif;
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}

.tsg-life-stars .is-empty {
  color: rgba(6,31,51,.16);
}

.tsg-life-protection p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* 底部提醒與返回 */
.tsg-life-note {
  margin-top: 12px;
  padding: 11px 14px;
  color: var(--muted);
  background: var(--light);
  font-size: 12px;
}

.tsg-life-return {
  color: var(--white);
  background: var(--navy);
}

.tsg-life-return__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
}

.tsg-life-return h2 {
  margin: 0 0 2px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
}

.tsg-life-return p {
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}

.tsg-life-return__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  min-height: 43px;
  padding: 9px 18px;
  color: var(--navy)!important;
  background: var(--gold);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.tsg-life-disclaimer {
  padding: 10px 15px;
  color: var(--muted);
  background: #e9eef1;
  font-size: 11px;
  text-align: center;
}

/* 平板：三欄兩列 */
@media (max-width: 1024px) {
  .tsg-life-tabs__grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .tsg-life-tab {
    border-bottom: 1px solid rgba(255,255,255,.09);
  }

  .tsg-life-tab:nth-child(3n) {
    border-right: 0;
  }

  .tsg-life-tab:nth-child(n+4) {
    border-bottom: 0;
  }

  .tsg-life-protection {
    grid-template-columns: 135px 115px minmax(0,1fr);
  }
}

/* 手機：三欄兩列，內容改為緊湊兩行 */
@media (max-width: 767px) {
  .tsg-life-container {
    width: min(100% - 30px,1180px);
  }

  .tsg-life-hero__inner {
    min-height: 0;
    padding: 26px 0;
  }

  .tsg-life-hero h1 {
    font-size: 30px;
  }

  .tsg-life-hero p {
    font-size: 14px;
  }

  .tsg-life-tab {
    min-height: 54px;
    padding: 8px 4px;
    font-size: 11px;
  }

  .tsg-life-content {
    padding: 17px 0 15px;
  }

  .tsg-life-stage-head {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .tsg-life-stage-head h2 {
    font-size: 27px;
  }

  .tsg-life-legend {
    display: inline-block;
    margin-top: 8px;
  }

  .tsg-life-protection {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 4px 10px;
    min-height: 0;
    padding: 11px 12px;
  }

  .tsg-life-protection h3 {
    font-size: 15px;
  }

  .tsg-life-stars {
    justify-self: end;
    font-size: 16px;
  }

  .tsg-life-protection p {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.6;
  }

  .tsg-life-return__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 17px 0;
  }

  .tsg-life-return__button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 390px) {
  .tsg-life-container {
    width: calc(100% - 24px);
  }

  .tsg-life-tab {
    font-size: 10px;
    padding-left: 2px;
    padding-right: 2px;
  }
}


/* =========================================================
   版面更新
   1. Banner 右側融合各人生階段圖片
   2. 階段主標下方內文字級放大
   3. 手機頁籤改為兩欄三列
   ========================================================= */

/* Banner 右側淡化人物圖 */
.tsg-life-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(44%, 520px);
  height: 100%;
  background-image:
    linear-gradient(
      90deg,
      rgba(6,31,51,1) 0%,
      rgba(6,31,51,.72) 30%,
      rgba(6,31,51,.16) 100%
    ),
    var(--stage-hero-image);
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: 100% 100%, auto 118%;
  opacity: .9;
  pointer-events: none;
}

.tsg-life-hero__inner {
  padding-right: min(40%, 470px);
}

/* 每個階段主標下的說明文字放大兩級 */
.tsg-life-stage-head p {
  font-size: 18px;
  line-height: 1.8;
}

/* 手機版改為兩欄三列 */
@media (max-width: 767px) {
  .tsg-life-tabs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tsg-life-tab {
    min-height: 52px;
    padding: 9px 6px;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,.09);
    border-bottom: 1px solid rgba(255,255,255,.09);
  }

  .tsg-life-tab:nth-child(2n) {
    border-right: 0;
  }

  .tsg-life-tab:nth-child(n+5) {
    border-bottom: 0;
  }

  .tsg-life-hero::before {
    width: 46%;
    background-size: 100% 100%, auto 100%;
    opacity: .62;
  }

  .tsg-life-hero__inner {
    padding-right: 38%;
  }

  .tsg-life-stage-head p {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .tsg-life-tab {
    font-size: 11px;
  }

  .tsg-life-hero::before {
    width: 42%;
  }

  .tsg-life-hero__inner {
    padding-right: 34%;
  }
}


/* =========================================================
   正式環境修正
   1. 桌機版置頂頁籤避開網站固定頁首
   2. 手機版 Banner 圖片完整顯示，文字可覆蓋於圖片上方
   ========================================================= */

/* 正式站桌機固定頁首補償 */
@media (min-width: 1025px) {
  .tsg-life-tabs {
    top: 76px;
  }
}

/* 平板與手機維持貼齊視窗頂端 */
@media (max-width: 1024px) {
  .tsg-life-tabs {
    top: 0;
  }
}

/* 手機 Banner：圖片改為完整 contain 顯示，不再裁切 */
@media (max-width: 767px) {
  .tsg-life-hero::before {
    inset: 0;
    width: 100%;
    height: 100%;
    background-image:
      linear-gradient(
        90deg,
        rgba(6,31,51,.96) 0%,
        rgba(6,31,51,.82) 40%,
        rgba(6,31,51,.35) 72%,
        rgba(6,31,51,.08) 100%
      ),
      var(--stage-hero-image);
    background-repeat: no-repeat;
    background-position: center, right center;
    background-size: 100% 100%, contain;
    opacity: 1;
  }

  .tsg-life-hero__inner {
    position: relative;
    z-index: 2;
    padding-right: 0;
    min-height: 300px;
  }

  .tsg-life-hero h1,
  .tsg-life-hero p,
  .tsg-life-breadcrumb {
    position: relative;
    z-index: 3;
    max-width: 72%;
    text-shadow: 0 2px 8px rgba(0,0,0,.26);
  }
}

@media (max-width: 390px) {
  .tsg-life-hero__inner {
    min-height: 285px;
  }

  .tsg-life-hero h1,
  .tsg-life-hero p,
  .tsg-life-breadcrumb {
    max-width: 76%;
  }
}


/* =========================================================
   Banner 邊界柔化修正
   桌機 / 平板：讓左側深藍與右側人物圖之間，用漸層自然銜接
   ========================================================= */
@media (min-width: 768px) {
  .tsg-life-hero::before {
    right: 0;
    width: min(50%, 620px);
    height: 100%;
    background-image:
      linear-gradient(
        90deg,
        rgba(6,31,51,1) 0%,
        rgba(6,31,51,.98) 10%,
        rgba(6,31,51,.90) 22%,
        rgba(6,31,51,.72) 38%,
        rgba(6,31,51,.45) 56%,
        rgba(6,31,51,.18) 76%,
        rgba(6,31,51,.04) 100%
      ),
      var(--stage-hero-image);
    background-repeat: no-repeat;
    background-position: center, right center;
    background-size: 100% 100%, auto 122%;
    opacity: 1;
  }

  .tsg-life-hero__inner {
    padding-right: min(34%, 430px);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .tsg-life-hero::before {
    width: min(52%, 520px);
    background-size: 100% 100%, auto 112%;
  }

  .tsg-life-hero__inner {
    padding-right: min(30%, 300px);
  }
}


/* =========================================================
   Banner 真正融合修正
   圖片本身含深色背景，因此改用 mask 對整張圖片左側淡出，
   不再只疊加半透明漸層。
   ========================================================= */
@media (min-width: 768px) {
  .tsg-life-hero::before {
    right: 0;
    width: min(52%, 660px);
    height: 100%;
    background-image: var(--stage-hero-image);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 122%;
    opacity: 1;

    -webkit-mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0,0,0,.08) 8%,
      rgba(0,0,0,.30) 22%,
      rgba(0,0,0,.62) 40%,
      rgba(0,0,0,.88) 58%,
      #000 74%,
      #000 100%
    );
    mask-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0,0,0,.08) 8%,
      rgba(0,0,0,.30) 22%,
      rgba(0,0,0,.62) 40%,
      rgba(0,0,0,.88) 58%,
      #000 74%,
      #000 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
  }

  .tsg-life-hero__inner {
    padding-right: min(34%, 430px);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .tsg-life-hero::before {
    width: 55%;
    background-size: auto 112%;
  }

  .tsg-life-hero__inner {
    padding-right: 31%;
  }
}


/* =========================================================
   桌機版置頂頁籤修正
   移除先前 76px 頂部補償，避免頁籤懸空並露出白色間距。
   所有裝置統一貼齊瀏覽器頂端。
   ========================================================= */
.tsg-life-tabs {
  position: sticky;
  top: 0 !important;
  z-index: 999;
  width: 100%;
  margin: 0;
}

/* 避免正式環境佈景主題替 sticky 元素加入額外位移 */
@media (min-width: 1025px) {
  .tsg-life-tabs {
    top: 0 !important;
    transform: none !important;
  }
}


/* =========================================================
   正式環境置頂完整顯示修正
   不再使用 top 位移，改以最高層級覆蓋網站固定導覽列，
   避免頁籤上半部被網站 Header 遮住。
   ========================================================= */
.tsg-life-page,
.tsg-life-tabs {
  overflow: visible !important;
}

.tsg-life-tabs {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483000 !important;
  isolation: isolate;
  width: 100%;
  margin: 0 !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  box-shadow: 0 5px 14px rgba(6,31,51,.18);
}

.tsg-life-tabs__grid {
  position: relative;
  z-index: 2;
  background: #061f33;
}

/* 避免 Elementor / 佈景主題的父層裁切 sticky 元素 */
.elementor-widget-html,
.elementor-widget-container,
.elementor-element,
.elementor-section,
.elementor-container {
  overflow: visible;
}

/* 桌機正式環境：頁籤直接蓋在固定網站導覽列上方 */
@media (min-width: 1025px) {
  .tsg-life-tabs {
    top: 0 !important;
    z-index: 2147483000 !important;
  }
}/* End custom CSS */