/*
 * GNACF 視覺重構
 * 原則：真實現場、清楚路徑、少裝飾、易閱讀。
 */
:root {
  --paper: #fcfbf8;
  --canvas: #f2f5f2;
  --ink: #1e3131;
  --muted: #596766;
  --green: #165c59;
  --green-dark: #104442;
  --sand: #e8dfcf;
  --line: #d7dfda;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; }
body > .body-wrap { background: var(--paper); }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 1rem;
  padding: .75rem 1rem;
  transform: translateY(-120%);
  color: #fff;
  background: var(--green-dark);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 200;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: .75rem max(1.25rem, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(22, 92, 89, .15);
  background: rgba(252, 251, 248, .96);
  backdrop-filter: blur(12px);
}
.site-brand { display: inline-flex; flex: 0 0 auto; }
.site-brand img { display: block; width: 150px; height: auto; max-height: 46px; object-fit: contain; }
.site-nav { display: flex; flex: 1; align-items: center; justify-content: center; gap: clamp(.65rem, 1.5vw, 1.5rem); }
.site-nav > a, .site-nav summary {
  color: var(--ink);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
}
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after { margin-left: .35rem; content: "⌄"; color: var(--green); }
.site-nav details { position: relative; }
.site-menu {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  display: grid;
  width: max-content;
  min-width: 190px;
  gap: .15rem;
  padding: .6rem;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30, 49, 49, .08);
}
.site-menu a { padding: .6rem .75rem; border-radius: 3px; color: var(--ink); font-size: .9rem; }
.site-menu a:hover { color: var(--green-dark); background: var(--canvas); }
.site-header__cta, .button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.05rem;
  border: 1px solid var(--green);
  border-radius: 3px;
  color: #fff !important;
  background: var(--green);
  font-weight: 700;
  text-decoration: none;
}
.site-header__cta:hover, .button--primary:hover { background: var(--green-dark); }

/* 原 Weebly 導覽由新的共用導覽取代；內容與頁尾仍保留。 */
body:not(.site-home) #header,
body:not(.site-home) #navigation { display: none !important; }
body:not(.site-home) #wrapper { padding-top: 0; }
body:not(.site-home) .banner-wrap { display: none; }
body:not(.site-home) #content-wrapper { padding-top: 0; }
body:not(.site-home) #wsite-content { padding-top: 1.5rem; }
body:not(.site-home) .container { width: min(100%, var(--max)); padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 2.5rem); }
body:not(.site-home) #wsite-content h1,
body:not(.site-home) #wsite-content h2 {
  max-width: 760px;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  letter-spacing: -.03em;
}
body:not(.site-home) #wsite-content h1 { font-size: clamp(2rem, 4vw, 3.25rem) !important; }
body:not(.site-home) #wsite-content h2 { font-size: clamp(1.45rem, 2.8vw, 2.15rem) !important; }
body:not(.site-home) #wsite-content p,
body:not(.site-home) #wsite-content div.paragraph {
  max-width: 760px;
  color: var(--muted) !important;
  font-size: 1.05rem !important;
  line-height: 1.9 !important;
}
body:not(.site-home) #wsite-content img { border-radius: 4px; }
body:not(.site-home) .wsite-section { background-color: transparent !important; }
body:not(.site-home) .wsite-section-wrap:nth-child(even) { background: var(--canvas); }
body:not(.site-home) .wsite-multicol-table { border-collapse: separate; border-spacing: 1rem; }
body:not(.site-home) .wsite-multicol-col {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  vertical-align: top;
}
body:not(.site-home) .wsite-button { border-radius: 3px; box-shadow: none; }
body:not(.site-home) .blog-body { max-width: 800px; margin: 0 auto; }
body:not(.site-home) .blog-header { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
body:not(.site-home) .blog-date { color: var(--green-dark); font-weight: 700; }
body:not(.site-home) .blog-social,
body:not(.site-home) .blog-comments,
body:not(.site-home) .blog-comments-bottom,
body:not(.site-home) #commentPostDiv,
body:not(.site-home) iframe[src*="weebly.com/editor/apps/showCommentForm"] { display: none !important; }

.site-home { overflow-x: hidden; }
.site-home > #header,
.site-home > #wrapper { display: none !important; }
.site-home main { display: block; }
.site-story { overflow-x: hidden; }
.story-hero {
  min-height: 380px;
  padding: clamp(4rem, 9vw, 7rem) max(1.25rem, calc((100vw - var(--max)) / 2));
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 68, 66, .92), rgba(16, 68, 66, .55)),
    url("/uploads/1/3/7/3/137363135/background-images/2120220805.jpg") center/cover;
}
.story-hero > div { max-width: 700px; }
.story-hero .eyebrow { color: #dce9db; }
.story-hero h1 { margin: 0; color: #fff; font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.16; }
.story-hero p:not(.eyebrow) { max-width: 580px; margin: 1.25rem 0 0; color: #e5eeea; font-size: 1.1rem; line-height: 1.85; }
.story-intro {
  display: flex;
  width: min(100% - 2.5rem, var(--max));
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 0 auto;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.story-intro p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.8; }
.story-intro a { color: var(--green-dark); font-weight: 800; white-space: nowrap; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}
.story-card { min-width: 0; border: 1px solid var(--line); background: #fff; }
.story-card a { display: block; height: 100%; color: var(--ink); }
.story-card img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: cover; background: var(--canvas); }
.story-card div { padding: 1.25rem; }
.story-card p { margin: 0 0 .6rem; color: var(--green); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.story-card h2 { min-height: 3.1em; margin: 0; color: var(--ink); font-size: 1.3rem; line-height: 1.45; }
.story-card span { display: block; margin-top: 1.5rem; color: var(--green-dark); font-size: .9rem; font-weight: 800; }
.story-card:hover { border-color: var(--green); }
.home-hero {
  position: relative;
  display: grid;
  min-height: min(720px, calc(100vh - 76px));
  align-items: end;
  padding: clamp(4rem, 9vw, 9rem) max(1.25rem, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(90deg, rgba(12, 35, 34, .82) 0%, rgba(12, 35, 34, .52) 48%, rgba(12, 35, 34, .1) 100%),
    url("/uploads/1/3/7/3/137363135/background-images/1622345942.jpg") center/cover;
}
.home-hero__content { width: min(690px, 100%); padding-bottom: 1rem; color: #fff; }
.eyebrow { margin: 0 0 .8rem; color: var(--green); font-size: .8rem; font-weight: 800; letter-spacing: .13em; }
.home-hero .eyebrow { color: #dce9db; }
.home-hero h1 { margin: 0; color: #fff; font-size: clamp(2.7rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.16; }
.home-hero__content > p:not(.eyebrow) { max-width: 570px; margin: 1.5rem 0 0; color: #edf2ee; font-size: 1.15rem; line-height: 1.8; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button--quiet { border-color: rgba(255,255,255,.65); background: transparent; }
.button--quiet:hover { border-color: #fff; background: rgba(255,255,255,.1); }

.section { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) max(1.25rem, 4vw, 2.5rem); }
.section--tint { width: 100%; padding-right: max(1.25rem, calc((100vw - var(--max)) / 2)); padding-left: max(1.25rem, calc((100vw - var(--max)) / 2)); background: var(--canvas); }
.section-heading { max-width: 700px; margin-bottom: 2.5rem; }
.section-heading h2, .support-banner h2 { margin: 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.25; }
.section-heading--split { display: flex; max-width: none; align-items: end; justify-content: space-between; gap: 1.5rem; }
.text-link { color: var(--green-dark); font-weight: 800; text-decoration: none; white-space: nowrap; }
.text-link span { margin-left: .35rem; transition: transform .2s ease; }
.text-link:hover span { display: inline-block; transform: translateX(4px); }

.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.action-grid a { min-height: 245px; padding: 1.8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); background: #fff; }
.action-grid a:hover { color: var(--green-dark); background: #fff; }
.action-grid span { display: block; color: var(--green); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.action-grid strong { display: block; margin-top: 2.5rem; font-size: 1.35rem; }
.action-grid p { margin: .75rem 0 0; color: var(--muted); line-height: 1.7; }

.home-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.home-intro__copy p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; line-height: 1.9; }
.home-intro figure { margin: 0; }
.home-intro img { display: block; width: 100%; aspect-ratio: 1.2; object-fit: cover; }
.home-intro figcaption { margin-top: .8rem; color: var(--muted); font-size: .88rem; }

.mission-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.mission-grid a { display: flex; min-height: 260px; flex-direction: column; justify-content: end; padding: 1.5rem; border-top: 3px solid var(--green); color: var(--ink); background: var(--canvas); }
.mission-grid a:hover { color: var(--ink); border-top-color: var(--green-dark); background: #e8efea; }
.mission-grid span { font-size: 1.25rem; font-weight: 800; }
.mission-grid p { margin: .75rem 0 0; line-height: 1.7; }

.section--ink { width: 100%; padding-right: max(1.25rem, calc((100vw - var(--max)) / 2)); padding-left: max(1.25rem, calc((100vw - var(--max)) / 2)); color: #fff; background: var(--ink); }
.section--ink .eyebrow, .section--ink h2 { color: #fff; }
.text-link--light { color: #d8e9df; }
.news-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid rgba(255,255,255,.2); }
.news-list article { border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.news-list article:nth-child(even) { border-right: 0; }
.news-list a { display: block; min-height: 215px; padding: 1.6rem; color: #fff; }
.news-list a:hover { background: rgba(255,255,255,.04); }
.news-list time { color: #b8d1c8; font-size: .8rem; font-weight: 700; letter-spacing: .05em; }
.news-list h3 { margin: 1.8rem 0 .65rem; font-size: 1.35rem; line-height: 1.45; }
.news-list p { margin: 0; color: #d7e0dc; line-height: 1.7; }

.support-banner { display: flex; width: min(100%, var(--max)); align-items: center; justify-content: space-between; gap: 2rem; margin: clamp(2rem, 5vw, 5rem) auto; padding: clamp(2rem, 5vw, 4rem) max(1.25rem, 4vw, 2.5rem); background: var(--sand); }
.support-banner .eyebrow { color: var(--green-dark); }
.support-banner > div:last-child { min-width: 250px; text-align: center; }
.support-banner p:last-child { color: var(--muted); font-size: .82rem; }

.site-footer { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; padding: 4rem max(1.25rem, calc((100vw - var(--max)) / 2)); color: #dce4df; background: var(--green-dark); }
.site-footer img { width: 170px; height: auto; filter: brightness(0) invert(1); }
.site-footer h2 { margin: 0 0 1rem; color: #fff; font-size: 1rem; }
.site-footer p { margin: .75rem 0; line-height: 1.8; }
.site-footer a { color: #dce4df; text-decoration: underline; }

/* AI 圖片會在建置時替換為既有的真實活動照片，避免留下空白區塊。 */
body.wsite-page-support .site-donation-cta { display: none; }

@media (max-width: 900px) {
  .site-header { display: grid; min-height: 0; grid-template-columns: 1fr auto; gap: .35rem .8rem; }
  .site-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding: .45rem 0 .1rem; }
  .site-header__cta { display: inline-flex; min-height: 38px; padding: .45rem .75rem; font-size: .88rem; }
  .home-intro, .support-banner { grid-template-columns: 1fr; flex-direction: column; align-items: flex-start; }
  .mission-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-header { min-height: 104px; padding: .55rem 1rem .4rem; }
  .site-brand img { width: 122px; }
  .site-nav { gap: 1.15rem; }
  .site-nav > a, .site-nav summary { font-size: .84rem; }
  .site-menu { position: fixed; top: 104px; left: 1rem; right: 1rem; width: auto; transform: none; }
  .home-hero { min-height: 580px; padding-top: 10rem; padding-bottom: 3rem; background-position: 62% center; }
  .story-hero { min-height: 400px; padding-top: 8rem; }
  .home-hero h1 { font-size: clamp(2.45rem, 12vw, 3.25rem); }
  .action-grid, .news-list { grid-template-columns: 1fr; }
  .action-grid a { min-height: 180px; }
  .news-list article, .news-list article:nth-child(even) { border-right: 0; }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-grid a { min-height: 170px; }
  .section-heading--split { align-items: flex-start; flex-direction: column; }
  .support-banner > div:last-child { min-width: 0; text-align: left; }
  .site-footer { grid-template-columns: 1fr; gap: 1.5rem; }
  .story-intro { align-items: flex-start; flex-direction: column; }
  .story-grid { grid-template-columns: 1fr; gap: 1rem; }
  .story-card h2 { min-height: 0; }
  .imageGallery [style*="float:left"],
  .imageGallery [style*="float: left"] {
    width: 50% !important;
    max-width: 50% !important;
  }
  body:not(.site-home) .wsite-multicol-table,
  body:not(.site-home) .wsite-multicol-tbody,
  body:not(.site-home) .wsite-multicol-tr,
  body:not(.site-home) .wsite-multicol-col { display: block; width: 100% !important; }
  body:not(.site-home) .wsite-multicol-col { margin-bottom: 1rem; }
}
