/* 可編輯頁面的模組（2026-11 編輯模式）：版面沿用 about-pages.css，這裡只補模組之間的間距與 Portal 裡可以選的樣式 */

.ab-mod + .ab-mod {
  margin-top: 18px;
}

.ab-col > .ab-mod + .ab-mod {
  margin-top: 12px;
}

.ab-mod--info-cards + .ab-mod--info-cards {
  margin-top: 26px;
}

/* 模組原本自帶的外距改由 .ab-mod 統一處理 */
.ab-page .ab-mod > .ab-give-must {
  margin-top: 0 !important;
}

.ab-mod > .ab-give-actions,
.ab-mod > .ab-stats,
.ab-mod > .ab-note,
.ab-mod > .ab-photo {
  margin-top: 0;
  margin-bottom: 0;
}

.ab-mod > .ab-details {
  margin-top: 0;
}

.ab-mod > .ab-details + .ab-details {
  margin-top: 10px;
}

.ab-video-group + .ab-video-group {
  margin-top: 22px;
}

.ab-text.is-lead {
  font-size: 1.09375rem;
  color: var(--ab-ink);
}

/* 卡片背景 */
.ab-card.is-cream {
  background: #fbf8f4;
}

.ab-card.is-rose {
  background: var(--ab-tint);
  border-color: #ead9d7;
}

/* 每列幾個 */
.ab-page .ab-cols-1 { grid-template-columns: minmax(0, 1fr); }
.ab-page .ab-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ab-page .ab-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ab-page .ab-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 分欄比例 */
.ab-split.is-even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ab-split.is-wide-left {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

/* 圖片比例、角、寬度 */
.ab-photo.is-r16-9 img,
.ab-gallery.is-r16-9 img { aspect-ratio: 16 / 9; object-fit: cover; }
.ab-photo.is-r4-3 img,
.ab-gallery.is-r4-3 img { aspect-ratio: 4 / 3; object-fit: cover; }
.ab-photo.is-r1-1 img,
.ab-gallery.is-r1-1 img { aspect-ratio: 1 / 1; object-fit: cover; }

.ab-photo.is-square img,
.ab-gallery.is-square img {
  border-radius: 0;
}

.ab-photo.is-half {
  float: right;
  width: 44%;
  margin: 4px 0 14px 26px;
}

.ab-mod--image:has(.is-half) + .ab-mod::after {
  content: "";
  display: block;
  clear: both;
}

/* 照片集：拼貼（保留原比例）、主圖＋縮圖 */
.ab-gallery.is-masonry {
  display: block;
  columns: 3 200px;
  column-gap: 12px;
}

.ab-gallery.is-masonry figure {
  break-inside: avoid;
  margin-bottom: 12px;
}

.ab-gallery.is-feature > figure:first-child {
  grid-column: 1 / -1;
}

/* 按鈕列置中 */
.ab-give-actions.is-center {
  justify-content: center;
}

/* 資訊卡片：欄位名稱在上、補充說明、連結 */
.ab-give-acct.is-stacked {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.ab-give-acct.is-stacked dd + dt {
  margin-top: 6px;
}

.ab-gear-desc {
  display: block;
  margin-top: 4px;
  font-size: 0.84375rem;
  line-height: 1.6;
  color: var(--ab-muted);
}

.ab-give-link {
  margin-top: 8px !important;
  font-size: 0.90625rem;
}

/* 頁尾「編輯這一頁」：只是連到 Portal，系網本身不判斷登入 */
.site-edit-link {
  margin: 8px 0 0 !important;
  text-align: right;
  font-size: 0.84375rem;
}

.site-edit-link a {
  color: var(--ab-muted);
}

/* Portal 預覽時最上面的提示 */
.site-preview-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 16px !important;
  padding: 8px 14px;
  border: 1px solid #f0dcb0;
  border-radius: 10px;
  background: #fbf1dc;
  font-size: 0.875rem;
  font-weight: 700;
  color: #6b4500;
}

@media (max-width: 991.98px) {
  .ab-page .ab-cols-3,
  .ab-page .ab-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ab-split.is-even,
  .ab-split.is-wide-left {
    grid-template-columns: minmax(0, 1fr);
  }

  .ab-split.is-mobile-flip > .ab-col:first-child {
    order: 2;
  }
}

@media (max-width: 767.98px) {
  .ab-page .ab-cols-2,
  .ab-page .ab-cols-3,
  .ab-page .ab-cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ab-page .ab-gallery.ab-cols-3,
  .ab-page .ab-gallery.ab-cols-4,
  .ab-page .ab-gear.ab-cols-3,
  .ab-page .ab-gear.ab-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ab-photo.is-half {
    float: none;
    width: 100%;
    margin: 0;
  }
}
