/* =========================================================
   V2.36 全站資料呈現一致化
   目標：
   1) 每個子選項有清楚邊界與淺色背景
   2) 每筆核可資料彼此有明顯卡片區隔
   3) 摘要固定在左、完整內容固定在右（桌機）
   4) 文件下載／活動剪影／志工園地與會議、財務、年度工作、聯絡我們採同一套規則
   ========================================================= */

/* 主內容欄的子選項：每個選項就是一個完整區塊 */
.section-main{
  display:grid;
  gap:30px;
}

.section-main .managed-subsection{
  position:relative;
  margin:0 !important;
  padding:28px 28px 30px !important;
  border:1.5px solid #ddcfe5 !important;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(56,28,77,.07);
  scroll-margin-top:110px;
}

.section-main .managed-subsection + .managed-subsection{
  margin-top:0 !important;
  padding-top:28px !important;
  border-top-width:1.5px !important;
}

.section-main .managed-subsection::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:8px;
}

/* 各子選項以不同柔和色系輪替 */
.section-main .managed-subsection:nth-of-type(5n+1){background:#fbf6ff !important;border-color:#dbc8e7 !important}
.section-main .managed-subsection:nth-of-type(5n+1)::before{background:#9864b8}
.section-main .managed-subsection:nth-of-type(5n+2){background:#f2fbf6 !important;border-color:#cce4d6 !important}
.section-main .managed-subsection:nth-of-type(5n+2)::before{background:#64a27e}
.section-main .managed-subsection:nth-of-type(5n+3){background:#fff7f1 !important;border-color:#ead5c4 !important}
.section-main .managed-subsection:nth-of-type(5n+3)::before{background:#c88b5c}
.section-main .managed-subsection:nth-of-type(5n+4){background:#f3f8ff !important;border-color:#cadced !important}
.section-main .managed-subsection:nth-of-type(5n+4)::before{background:#6d97c2}
.section-main .managed-subsection:nth-of-type(5n){background:#fffbed !important;border-color:#e8dca8 !important}
.section-main .managed-subsection:nth-of-type(5n)::before{background:#bea044}

/* 子選項標題列 */
.section-main .managed-subsection .block-heading{
  display:flex;
  gap:16px;
  align-items:flex-start;
  margin:-3px 0 22px !important;
  padding:3px 0 18px !important;
  border-bottom:1px solid rgba(78,45,95,.14) !important;
}
.section-main .managed-subsection .block-heading > span{
  flex:0 0 auto;
  min-width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  font-weight:900;
  box-shadow:inset 0 0 0 1px rgba(80,39,109,.05);
}
.section-main .managed-subsection .block-heading h2{margin:0 0 5px;color:#35104f}
.section-main .managed-subsection .block-heading p{margin:0;color:#78667e;line-height:1.6}
.section-main .managed-subsection:nth-of-type(5n+1) .block-heading > span{background:#eadcf4;color:#612a86}
.section-main .managed-subsection:nth-of-type(5n+2) .block-heading > span{background:#dcefe3;color:#2d714d}
.section-main .managed-subsection:nth-of-type(5n+3) .block-heading > span{background:#f7e3d3;color:#855027}
.section-main .managed-subsection:nth-of-type(5n+4) .block-heading > span{background:#dfeaf7;color:#345f87}
.section-main .managed-subsection:nth-of-type(5n) .block-heading > span{background:#f3e9c2;color:#796419}

/* 每個子選項內的資料清單 */
.section-main .managed-feed{margin-top:0}
.section-main .full-content-feed{
  display:grid;
  gap:22px !important;
}

/* 每筆資料：獨立白色卡片，避免黏成一片 */
.section-main .full-content-feed > .full-content-item{
  position:relative;
  margin:0;
  padding:25px 25px 23px !important;
  border:1px solid #dfd4e5 !important;
  border-left:6px solid #8e60ad !important;
  border-radius:19px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 7px 22px rgba(54,29,72,.065) !important;
  overflow:hidden;
}
.section-main .full-content-feed > .full-content-item + .full-content-item{
  margin-top:0;
}
.section-main .full-content-feed > .full-content-item:hover{
  transform:translateY(-1px);
  box-shadow:0 11px 28px rgba(54,29,72,.095) !important;
}

/* 每筆資料的上方資訊列 */
.section-main .full-content-item .full-content-head{
  margin:0 0 20px !important;
  padding:0 88px 17px 0 !important;
  border-bottom:1px solid rgba(76,46,91,.13) !important;
}
.section-main .full-content-item .full-content-head h3{
  margin:10px 0 0;
  color:#35104f;
  font-size:1.42rem;
  line-height:1.45;
}
.section-main .full-content-item .full-content-meta{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.section-main .full-content-item .full-content-meta span{
  padding:5px 10px;
  border:1px solid rgba(96,59,115,.10);
  border-radius:999px;
  background:#f7f1fa;
  color:#715d79;
  font-size:.9rem;
}

/* 右上角資料編號保留但縮小，避免干擾標題 */
.section-main .full-content-feed{counter-reset:v236-item}
.section-main .full-content-feed > .full-content-item{counter-increment:v236-item}
.section-main .full-content-feed > .full-content-item::before{
  content:"資料 " counter(v236-item, decimal-leading-zero) !important;
  position:absolute !important;
  top:0 !important;
  right:0 !important;
  padding:7px 13px !important;
  border-radius:0 18px 0 14px !important;
  background:#6e3592 !important;
  color:#fff !important;
  font-size:.75rem !important;
  font-weight:800 !important;
  letter-spacing:.04em;
}

/* 關鍵：摘要在左、完整內容在右 */
.section-main .full-content-text-grid{
  display:grid !important;
  grid-template-columns:minmax(210px,.82fr) minmax(0,1.55fr) !important;
  gap:0 !important;
  align-items:stretch !important;
  margin-top:0 !important;
  border:1px solid #e5dce9;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.section-main .full-content-text-grid .full-content-summary,
.section-main .full-content-text-grid .full-content-body{
  margin:0 !important;
  padding:18px 19px !important;
  min-width:0;
  height:auto !important;
}
.section-main .full-content-text-grid .full-content-summary{
  background:#faf5fc;
  border-right:1px solid #dfd3e5;
}
.section-main .full-content-text-grid .full-content-body{
  background:#fff;
  border-left:0 !important;
}
.section-main .full-content-summary > strong,
.section-main .full-content-body > strong{
  display:block !important;
  margin:0 0 10px !important;
  padding:0 !important;
  background:transparent !important;
  color:#51247a !important;
  font-size:.98rem !important;
  font-weight:900 !important;
}
.section-main .full-content-summary p,
.section-main .full-content-body > div{
  margin:0 !important;
  min-height:80px;
  padding:14px 15px !important;
  border:1px solid rgba(100,66,119,.12) !important;
  border-radius:12px !important;
  line-height:1.88;
  box-sizing:border-box;
}
.section-main .full-content-summary p{
  background:rgba(255,255,255,.72) !important;
  border-left:4px solid #9b6db9 !important;
  color:#4d4052;
}
.section-main .full-content-body > div{
  background:#fff !important;
  color:#2d2631;
}

/* 子選項色系同步到摘要區 */
.section-main .managed-subsection:nth-of-type(5n+2) .full-content-summary p{border-left-color:#64a27e !important}
.section-main .managed-subsection:nth-of-type(5n+3) .full-content-summary p{border-left-color:#c88b5c !important}
.section-main .managed-subsection:nth-of-type(5n+4) .full-content-summary p{border-left-color:#6d97c2 !important}
.section-main .managed-subsection:nth-of-type(5n) .full-content-summary p{border-left-color:#bea044 !important}

/* 圖片與附件各自再有一層容器 */
.section-main .full-content-images{
  margin-top:18px !important;
  padding:14px !important;
  border:1px solid #e3d8e7 !important;
  border-radius:15px !important;
  background:#fbf8fc !important;
}
.section-main .full-content-image{
  border:1px solid #ddd2e3 !important;
  background:#fff !important;
  box-shadow:0 4px 12px rgba(50,27,68,.04);
}
.section-main .full-content-attachments{
  margin:19px 0 0 !important;
  padding:16px !important;
  border:1px dashed #d7c7df !important;
  border-radius:15px !important;
  background:#fcf9fd !important;
}
.section-main .full-content-attachments h4{
  margin:0 0 11px !important;
  color:#51247a !important;
}
.section-main .full-content-attachment{
  margin-top:9px !important;
  border:1px solid #ddd0e4 !important;
  border-radius:12px !important;
  background:#fff !important;
  box-shadow:0 2px 8px rgba(47,26,61,.035);
}

/* 文件下載頁：附件區稍微更突出 */
body:has(.section-sidebar a[href="#minutes"]) .full-content-attachments{
  background:#fffaf0 !important;
  border-color:#e4d3a6 !important;
}

/* 無資料也保持一個完整框，不會飄在頁面中 */
.section-main .empty-state{
  margin:0;
  padding:24px;
  border:1.5px dashed #cfbfd8 !important;
  border-radius:15px;
  background:rgba(255,255,255,.72) !important;
  text-align:center;
}

/* 左側選單也增加明確容器與 hover */
.section-sidebar{
  border:1px solid #dfd3e5 !important;
  border-radius:20px !important;
  background:linear-gradient(180deg,#fff 0%,#faf7fc 100%) !important;
  box-shadow:0 7px 22px rgba(55,29,73,.05) !important;
}
.section-sidebar strong{
  display:block;
  padding-bottom:14px;
  margin-bottom:9px;
  border-bottom:1px solid #e7dce9;
}
.section-sidebar a{
  display:block;
  margin:4px 0;
  padding:10px 12px !important;
  border-radius:10px;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.section-sidebar a:hover{
  background:#efe5f5;
  color:#51247a;
  transform:translateX(2px);
}

.section-main .managed-subsection:target{
  box-shadow:0 0 0 3px rgba(104,51,148,.11),0 12px 32px rgba(55,28,75,.09) !important;
}

@media(max-width:900px){
  .section-main .full-content-text-grid{
    grid-template-columns:minmax(180px,.85fr) minmax(0,1.3fr) !important;
  }
}

@media(max-width:760px){
  .section-main{gap:20px}
  .section-main .managed-subsection{
    padding:20px 16px 22px !important;
    border-radius:18px;
  }
  .section-main .managed-subsection + .managed-subsection{padding-top:20px !important}
  .section-main .managed-subsection::before{width:5px}
  .section-main .managed-subsection .block-heading{gap:11px;margin-bottom:17px !important}
  .section-main .managed-subsection .block-heading > span{min-width:38px;height:38px;border-radius:11px}
  .section-main .full-content-feed{gap:17px !important}
  .section-main .full-content-feed > .full-content-item{
    padding:20px 15px 17px !important;
    border-left-width:5px !important;
    border-radius:16px !important;
  }
  .section-main .full-content-feed > .full-content-item::before{
    position:static !important;
    display:inline-flex !important;
    width:max-content;
    margin:-2px 0 11px auto;
    border-radius:999px !important;
    padding:5px 9px !important;
  }
  .section-main .full-content-item .full-content-head{
    padding-right:0 !important;
    margin-bottom:15px !important;
  }
  .section-main .full-content-item .full-content-head h3{font-size:1.24rem}

  /* 手機改上下排列，但摘要／完整內容仍有清楚邊界 */
  .section-main .full-content-text-grid{
    grid-template-columns:1fr !important;
  }
  .section-main .full-content-text-grid .full-content-summary{
    border-right:0;
    border-bottom:1px solid #dfd3e5;
  }
  .section-main .full-content-text-grid .full-content-summary,
  .section-main .full-content-text-grid .full-content-body{
    padding:15px !important;
  }
  .section-main .full-content-summary p,
  .section-main .full-content-body > div{min-height:0}
  .section-main .full-content-attachment{
    align-items:flex-start;
    flex-direction:column;
  }
  .section-main .full-content-actions{width:100%;flex-wrap:wrap}
  .section-main .full-content-actions .btn-v214{flex:1;text-align:center}
}
