/* =========================================================
   TEAM｜規劃團隊（Final / Authority / No-conflict）
   - 只保留必要：Hero(薄型) / 次導覽 / Team卡片 / 作品集格網 / Lightbox / 影片輪播
   - 所有樣式盡量 scope 在 .page-team 或 .inner，避免影響全站
   ========================================================= */

/* ========================
   Variables
   ======================== */
:root{
  --team-max: 1120px;
  --team-radius: 18px;
  --team-border: rgba(13,59,102,.14);
  --team-shadow: 0 12px 30px rgba(0,0,0,.08);
  --team-shadow-hover: 0 16px 42px rgba(0,0,0,.12);
  --team-bg: #f2f4f8;
  --team-card: #ffffff;
  --team-ink: #101820;
  --team-muted: rgba(16,24,32,.70);

  /* 品牌色（若 base.css 有就吃它，沒有就用 fallback） */
  --team-primary: var(--primary, #0d3b66);
  --team-secondary: var(--secondary, #c99700);
  --team-gold: var(--wt-gold-700, #c9a85d);
  --team-blue: var(--wt-blue-900, #0d3b66);
}

/* ========================
   Page base / container
   ======================== */
.page-team{
  background: var(--team-bg);
}

.page-team .container{
  max-width: var(--team-max);
  margin: 0 auto;
  padding-left: var(--wt-gutter, 16px);
  padding-right: var(--wt-gutter, 16px);
}

.page-team .section{
  padding: 10px 0 20px;
}

/* =========================================================
   Page Hero（薄型、穩定，不重複）
   ========================================================= */
.inner .page-hero{
  padding: 8px 0 0;
  background: #f1f3f6;
  border-bottom: 1px solid #dee2e6;
}

.inner .page-hero .container{
  padding-top: 8px;
  padding-bottom: 6px;
}

.page-hero-content{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
}

.page-title{
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--team-blue);
}

.page-kicker{
  font-size: 14px;
  font-weight: 800;
  color: var(--team-gold);
  letter-spacing: 0;
  text-transform: none;
  font-family: Arial, sans-serif;
}

.page-subtitle{
  margin: 0;
  font-size: 13px;
  color: #666;
  border-left: 1px solid #ddd;
  padding-left: 14px;
  line-height: 1.2;
}

@media (max-width: 768px){
  .inner .page-hero{
    padding: 14px 0 0;
  }
  .page-hero-content{
    flex-direction: column;
    gap: 6px;
  }
  .page-title{ font-size: 20px; }
  .page-kicker{ font-size: 13px; }
  .page-subtitle{
    border-left: none;
    padding-left: 0;
    color: #888;
    line-height: 1.45;
  }
}

/* =========================================================
   次導覽（Team sub-nav）
   ========================================================= */
.team-sub-nav{
  display: flex;
  width: fit-content;
  background: #fff;
  padding: 6px;
  border-radius: 12px 12px 0 0;
  border: 1px solid #dee2e6;
  border-bottom: none;
  box-shadow: 0 -8px 20px rgba(0,0,0,0.06);
  margin-top: 6px;
}

.sub-nav-item{
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  color: #666;
  font-weight: 600;
  border-radius: 10px;
  position: relative;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.sub-nav-item:hover{
  background: #f8f9fa;
  color: var(--team-blue);
}

.sub-nav-item.active{
  background: var(--team-blue);
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(13,59,102,0.20);
}

@media (max-width: 768px){
  .team-sub-nav{
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 14px;
    -webkit-overflow-scrolling: touch;
  }
  .team-sub-nav::-webkit-scrollbar{ display:none; }
}

/* =========================================================
   Grid（兩張人物卡）
   ========================================================= */
.page-team .grid-2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 860px){
  .page-team .grid-2{
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* =========================================================
   Card（人物卡：唯一版本）
   ========================================================= */
.page-team .card{
  position: relative;
  background: var(--team-card);
  border: 1px solid var(--team-border);
  border-radius: var(--team-radius);
  box-shadow: var(--team-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.page-team .card:hover{
  transform: translateY(-2px);
  box-shadow: var(--team-shadow-hover);
  border-color: rgba(13,59,102,.22);
}

/* 金色極淡光暈（hover 外圈，不改底色） */
.page-team .card::after{
  content:"";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
  box-shadow:
    0 0 0 1px rgba(201,151,0,.20),
    0 14px 34px rgba(201,151,0,.12);
}
.page-team .card:hover::after{ opacity: 1; }

.page-team .card-pad{
  padding: 18px 18px 16px;
}

/* 角色識別線（可選：HTML 上加 role-architect / role-design） */
.page-team .card.role-architect::before,
.page-team .card.role-design::before{
  content:"";
  display:block;
  height: 3px;
  width: 100%;
}
.page-team .card.role-architect::before{
  background: linear-gradient(90deg, rgba(13,59,102,.55), rgba(13,59,102,0));
}
.page-team .card.role-design::before{
  background: linear-gradient(90deg, rgba(201,151,0,.62), rgba(201,151,0,0));
}

/* =========================================================
   Typography（kicker 只留一套：左金線版）
   ========================================================= */
.page-team .kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .20em;
  color: rgba(13,59,102,.82);
  border-left: 3px solid var(--team-gold);
  padding-left: 10px;
  margin-bottom: 10px;
}

.page-team .h2{
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--team-ink);
}

.page-team .p{
  margin: 0 0 12px;
  line-height: 1.85;
  font-size: 14px;
  color: rgba(16,24,32,.86);
}

.page-team .muted{
  color: var(--team-muted);
}

/* =========================================================
   Profile（頭像置中、唯一版本）
   ========================================================= */
.page-team .profile{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
}

.page-team .profile .avatar{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: #e9edf3;
}

.page-team .profile-text{
  padding-top: 2px;
}

/* 頭像外框（角色不同色調） */
.page-team .card.role-architect .avatar{
  outline: 1px solid rgba(13,59,102,.14);
}
.page-team .card.role-design .avatar{
  outline: 1px solid rgba(201,151,0,.18);
}

@media (max-width: 768px){
  .page-team .profile{
    grid-template-columns: 96px 1fr;
    gap: 14px;
  }
}

@media (max-width: 520px){
  .page-team .card-pad{ padding: 16px 14px 14px; }
  .page-team .profile{
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }
}

/* =========================================================
   Badges
   ========================================================= */
.page-team .badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.page-team .badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(13,59,102,.06);
  border: 1px solid rgba(13,59,102,.14);
  color: rgba(13,59,102,.85);
}

/* =========================================================
   Buttons（只影響 team 頁）
   ========================================================= */
.page-team .btn-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  align-items: center;
}

.page-team .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
  border: 1px solid rgba(13,59,102,.22);
  background: #fff;
  color: rgba(13,59,102,.92);
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}

.page-team .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.page-team .btn.primary{
  background: linear-gradient(180deg, #e0b865 0%, #c99700 100%);
  color: #1b2530;
  border-color: #c99700;
  box-shadow: 0 6px 18px rgba(201,151,0,.25);
}

.page-team .btn.primary:hover{
  box-shadow: 0 8px 22px rgba(201,151,0,.35);
}

/* 手機：兩顆按鈕同排且不爆（第二顆略窄） */
@media (max-width: 520px){
  .page-team .btn-row{
    display: grid;
    grid-template-columns: auto min-content;
    justify-content: start;
    gap: 10px;
  }
  .page-team .btn{ width: 100%; }
  .page-team .btn-row .btn:not(.primary){
    padding: 0 10px;
    font-size: 12px;
    letter-spacing: .01em;
  }
}

@media (max-width: 360px){
  .page-team .btn-row{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   作品集 Work Grid（唯一版本）
   ========================================================= */
.page-team .work-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.page-team .work-card{
  cursor: pointer;
}

.page-team .work-img-wrapper{
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--team-radius);
  background: #eee;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-team .work-img-wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.page-team .work-card:hover .work-img-wrapper img{
  transform: scale(1.06);
}

.page-team .work-title{
  font-weight: 800;
  margin-top: 12px;
  color: var(--team-blue);
}

.page-team .work-loc{
  font-size: 13px;
  color: var(--wt-gray-500, #7b8490);
}

@media (max-width: 992px){
  .page-team .work-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 576px){
  .page-team .work-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   Lightbox（唯一版本，避免重複）
   - JS 顯示時：把 display 改成 flex
   ========================================================= */
.page-team .lightbox{
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
}

.page-team .lightbox-main{
  text-align: center;
  max-width: 85%;
}

.page-team #lightbox-img{
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  border: 3px solid rgba(255,255,255,0.10);
}

.page-team .lightbox-caption{
  color: #fff;
  margin-top: 14px;
  font-size: 16px;
  letter-spacing: .5px;
}

.page-team .lightbox-close{
  position: absolute;
  top: 18px;
  right: 26px;
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  cursor: pointer;
}

.page-team .lightbox-prev,
.page-team .lightbox-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  padding: 18px 14px;
  cursor: pointer;
  font-size: 28px;
  transition: .2s;
  border-radius: 8px;
}

.page-team .lightbox-prev:hover,
.page-team .lightbox-next:hover{
  background: var(--team-gold);
  color: #101820;
}

.page-team .lightbox-prev{ left: 18px; }
.page-team .lightbox-next{ right: 18px; }

@media (max-width: 768px){
  .page-team .lightbox-prev,
  .page-team .lightbox-next{
    padding: 14px 10px;
    font-size: 22px;
  }
  .page-team .lightbox-prev{ left: 6px; }
  .page-team .lightbox-next{ right: 6px; }
}

/* =========================================================
   影片輪播（owl carousel）：保留一套、避免重複
   ========================================================= */
.page-team .work-slider-section{
  margin-top: 60px;
  padding: 30px 15px;
}

.page-team .work-slider-section .section-header{
  text-align: left;
  margin-bottom: 26px;
}

.page-team .work-slider-section .section-title{
  font-size: 26px;
  margin: 0;
}

.page-team .video-carousel-wrapper{
  position: relative;
  padding: 10px 0;
}

.page-team .video-item{
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  cursor: pointer;
}

.page-team .video-img-container{
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 6px;
}

.page-team .video-img-container img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .35s ease;
  opacity: .92;
}

/* play */
.page-team .video-img-container::after{
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,151,0,.92);
  color: #101820;
  font-size: 18px;
  z-index: 2;
  transition: transform .2s ease, filter .2s ease;
}

.page-team .video-item:hover .video-img-container img{
  transform: scale(1.05);
  opacity: 1;
}
.page-team .video-item:hover .video-img-container::after{
  transform: translate(-50%,-50%) scale(1.06);
  filter: brightness(1.05);
}

.page-team .video-caption{
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  font-weight: 600;
  display: -webkit-box;
  
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.2em;
  text-align: justify;
}

/* owl nav */
.page-team .owl-nav button{
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(0,0,0,0.7) !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px !important;
  transition: .2s;
}

.page-team .owl-nav button:hover{
  background: rgba(201,151,0,0.95) !important;
  color: #101820 !important;
}

.page-team .owl-prev{ left: -18px; }
.page-team .owl-next{ right: -18px; }

@media (max-width: 1024px){
  .page-team .owl-nav{ display: none; }
}
