/* ══════════════════════════════════════════
   GEMS TAIWAN: shared stylesheet
   All pages link to this file.
   resources.html has additional inline styles
   for its specialised resource-browser UI.
══════════════════════════════════════════ */

:root {
  --green-dark: #2d4a3e;
  --green-mid: #3d6b52;
  --green-light: #6a9e72;
  --cream: #eeeae0;
  --cream-dark: #e4e0d4;
  --text-dark: #1a1a1a;
  --text-mid: #3a3a3a;
  --text-muted: #777;
  --white: #ffffff;
  --border: rgba(0, 0, 0, 0.10);
  --border-mid: rgba(0, 0, 0, 0.18);

  /* legacy tokens used by older page sections */
  --accent: #3B6D11;
  --accent-light: #639922;
  --accent-pale: #EAF3DE;
  --amber-400: #BA7517;
  --teal-50: #E1F5EE;
  --amber-50: #FAEEDA;
  --coral-50: #FAECE7;
  --blue-50: #E6F1FB;

  --font-serif: 'Playfair Display', 'DM Serif Display', Georgia, serif;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   HEADER: dark green, curved bottom
══════════════════════════════════════ */

header {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 14px 24px 44px;
  clip-path: ellipse(105% 100% at 50% 0%);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: background 0.18s, border-color 0.18s;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

nav a.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--white);
  font-weight: 600;
}

.lang-switch {
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-dark);
  border-color: var(--white);
  font-weight: 700;
}

.lang-switch:hover {
  background: var(--white);
  color: var(--green-dark);
}

/* ══════════════════════════════════════
   MAIN CONTENT WRAPPER
══════════════════════════════════════ */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* resources.html uses .page instead of main */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2.5rem 6rem;
}

/* ══════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════ */

h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.15;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

p {
  color: var(--text-mid);
  line-height: 1.75;
}

a {
  color: var(--green-dark);
}

/* ══════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════ */

.section-header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 10px;
}

.section-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 42px);
  letter-spacing: -0.3px;
}

.section-header p {
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 580px;
  font-size: 16px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 28px;
}

/* ══════════════════════════════════════
   HOME PAGE
══════════════════════════════════════ */

body {
  margin: 0;
}

main {
  padding-top: 0;
}

.home-hero {
  margin-top: 0;
  padding-top: 0;
  overflow: visible;
  text-align: center;
}

.site-title-image {
  display: block;
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: 100vw;
  height: auto;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -5vh;
  margin-bottom: 18px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 10px;
}

.site-subtitle {
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

/* ══════════════════════════════════════
   SHARED VISION + PHILOSOPHY SECTIONS
   These make both sections look the same.
══════════════════════════════════════ */

.info-section {
  margin: 100px 0;
  padding-top: 56px;
  border-top: 2px solid rgba(45, 74, 62, 0.28);
}

.info-body,
.vision-body-full,
.philosophy-body {
  max-width: 860px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

.info-body p,
.vision-body-full p,
.philosophy-body p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-mid);
  margin-bottom: 18px;
}

.info-body p:last-child,
.vision-body-full p:last-child,
.philosophy-body p:last-child {
  margin-bottom: 0;
}

.info-body ul,
.vision-body-full ul,
.philosophy-body ul {
  padding-left: 20px;
  color: var(--text-mid);
  font-size: 15px;
  line-height: 2.1;
  margin-top: 6px;
}

/* ══════════════════════════════════════
   IMPACT
══════════════════════════════════════ */

.impact-section {
  margin: 100px 0;
  padding-top: 56px;
  border-top: 2px solid rgba(45, 74, 62, 0.28);
}

.impact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 20px;
}

.impact-schools {
  list-style: disc;
  padding-left: 18px;
  font-size: 15px;
  color: var(--text-mid);
  line-height: 2.1;
}

.impact-map-box {
  background: var(--cream-dark);
  border-radius: 16px;
  border: 1px solid var(--border-mid);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ══════════════════════════════════════
   PAST PROJECTS
   Clickable timeline version
══════════════════════════════════════ */

.projects-section {
  margin: 100px 0;
  padding-top: 56px;
  border-top: 2px solid rgba(45, 74, 62, 0.28);
}

.timeline-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 132px;
  margin: 36px 0 64px;
  padding: 0 4px;
}

.timeline-row::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green-dark);
  transform: translateY(-50%);
  z-index: 0;
}

.tl-node {
  position: relative;
  flex: 1;
  height: 132px;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
}

.tl-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-dark);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--green-dark);
  transform: translate(-50%, -50%);
  z-index: 2;
  transition:
    width 0.18s ease,
    height 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.tl-node:hover .tl-dot,
.tl-node.active .tl-dot,
.tl-dot.active {
  width: 18px;
  height: 18px;
  background: var(--green-light);
  box-shadow: 0 0 0 3px var(--green-dark), 0 0 0 8px rgba(106, 158, 114, 0.18);
}

.tl-label {
  position: absolute;
  left: 50%;
  width: 140px;
  max-width: 140px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.35;
  transform: translateX(-50%);
  z-index: 2;
  transition: color 0.18s ease;
}

.tl-node:hover .tl-label,
.tl-node.active .tl-label {
  color: var(--green-dark);
}

.tl-label.above {
  bottom: calc(50% + 24px);
}

.tl-label.below {
  top: calc(50% + 24px);
}

.tl-node:focus-visible {
  outline: none;
}

.tl-node:focus-visible .tl-dot {
  outline: 3px solid var(--green-light);
  outline-offset: 6px;
}

.project-panels {
  position: relative;
}

.project-panel {
  display: none;
}

.project-panel.active {
  display: grid;
}

.project-card {
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.project-card.reverse {
  direction: rtl;
}

.project-card.reverse>* {
  direction: ltr;
}

.project-year {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.project-card h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.project-card p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 12px;
}

.explore-link {
  font-size: 13px;
  color: var(--green-dark);
  font-weight: 500;
  word-break: break-all;
}

.project-logo {
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.project-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

/* ══════════════════════════════════════
   INTERACTIVE PROJECT / OUTREACH MAP
══════════════════════════════════════ */

.interactive-map-section {
  margin: 64px 0 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.interactive-map-section h3 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.map-intro {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 28px;
  line-height: 1.75;
}

.interactive-map-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.taiwan-map-card {
  background: var(--cream-dark);
  border: 1px solid var(--border-mid);
  border-radius: 18px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: visible;
}

.taiwan-silhouette-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
}

.taiwan-silhouette-img {
  display: block;
  object-fit: contain;
  object-position: center center;
}

.map-point-button {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: var(--green-dark);
  transform: translate(-50%, -50%);
  cursor: pointer;
  opacity: 0.9;
  padding: 0;
  z-index: 5;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.map-point-button:hover,
.map-point-button.active {
  background: var(--green-light);
  transform: translate(-50%, -50%) scale(1.35);
  opacity: 1;
  box-shadow: 0 0 0 5px rgba(106, 158, 114, 0.18);
}

.map-point-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.map-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
}

.map-info-year {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 8px;
}

.map-info-card h4 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.25;
}

.map-info-card p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 18px;
}

.map-info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-info-card li {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--accent-pale);
  border: 1px solid #c0dd97;
  border-radius: 999px;
  padding: 5px 11px;
}
.map-info-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: 260px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--cream-dark);
  margin: 0 auto;
}

@media (max-width: 760px) {
  .interactive-map-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .taiwan-map-card {
    min-height: 400px;
    padding: 20px;
  }

  .taiwan-silhouette-wrapper {
    width: min(100%, 235px);
  }

  .map-info-card {
    padding: 24px;
  }

  .map-info-card h4 {
    font-size: 24px;
  }
}

/* ══════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-pale);
  border: 2px solid #C0DD97;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--green-dark);
}

.team-card h3 {
  font-size: 15px;
  font-weight: 600;
}

.team-card .role {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* About: subtab tabs */
.subtab-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.subtab {
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: opacity 0.15s;
}

.subtab:hover {
  opacity: 0.85;
}

.subtab.inactive {
  background: var(--cream-dark);
  color: var(--text-mid);
  border: 1px solid var(--border-mid);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.member-card {
  text-align: center;
}

.member-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  margin: 0 auto 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.member-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.member-card ul {
  list-style: disc;
  text-align: left;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.9;
  margin-top: 6px;
}

/* ══════════════════════════════════════
   ETHICS PAGE
══════════════════════════════════════ */

.ethics-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 16px;
}

.ethics-block h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.ethics-block p {
  color: var(--text-mid);
  line-height: 1.8;
}

.ethics-block p+p {
  margin-top: 10px;
}

.ethics-block ul {
  margin-top: 10px;
  padding-left: 20px;
  color: var(--text-mid);
  line-height: 2;
}

.ethics-block a {
  color: var(--green-dark);
}

.sci-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}

.sci-image-box {
  background: var(--cream-dark);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sci-image-box img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

/* ══════════════════════════════════════
   BLOG PAGE
══════════════════════════════════════ */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.blog-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: start;
}

.blog-date-box {
  border: 1.5px dashed var(--text-dark);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.blog-content-box {
  border: 1.5px dashed var(--text-dark);
  border-radius: 8px;
  padding: 24px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.blog-thumb {
  height: 150px;
  background: #d8edd8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--green-dark);
}

.blog-body {
  padding: 20px;
}

.blog-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-body p {
  font-size: 14px;
  color: var(--text-mid);
}

/* ══════════════════════════════════════
   GET INVOLVED PAGE
══════════════════════════════════════ */

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 32px;
}

.page-title.center {
  text-align: center;
}


.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.poster-box {
  border: 2px dashed var(--text-dark);
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text-mid);
}

.signup-section {
  margin-top: 40px;
}

.signup-section h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.signup-section p {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-mid);
}

.signup-section a {
  color: var(--green-dark);
  font-size: 14px;
}

.flow-diagram {
  margin-top: 24px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 580px;
}

.flow-diagram img {
  width: 100%;
  display: block;
}

/* ══════════════════════════════════════
   ONLINE GAMES PAGE
══════════════════════════════════════ */

.game-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.game-thumb {
  height: 180px;
  background: #d8edd8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-body {
  padding: 20px;
}

.game-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.game-body p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   ARTWORKS PAGE
══════════════════════════════════════ */

.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.artwork-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.artwork-thumb {
  height: 200px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-info {
  padding: 16px 20px;
}

.artwork-info h3 {
  font-size: 15px;
  font-weight: 600;
}

.artwork-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════
   SHARED CARD GRID
══════════════════════════════════════ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.card:hover {
  border-color: var(--border-mid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 19px;
}

.card-icon.green {
  background: var(--accent-pale);
}

.card-icon.teal {
  background: var(--teal-50);
}

.card-icon.amber {
  background: var(--amber-50);
}

.card-icon.coral {
  background: var(--coral-50);
}

.card-icon.blue {
  background: var(--blue-50);
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.involve-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 10px;
}

.involve-card p {
  color: var(--text-mid);
  margin-bottom: 14px;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--border-mid);
  background: var(--white);
  color: var(--text-dark);
  transition: all 0.18s;
  font-family: var(--font-sans);
}

.btn:hover {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}

.btn-primary:hover {
  background: #1e3429;
  border-color: #1e3429;
}

/* ══════════════════════════════════════
   CONTACT ROW
══════════════════════════════════════ */

.contact-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 180px;
}

.contact-item .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-item a {
  font-size: 14px;
  color: var(--green-dark);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */

.site-footer {
  margin-top: 96px;
  background: var(--green-dark);
  color: var(--cream);
  padding: 56px 0 24px;
}

.footer-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1fr 1fr;
  gap: 36px;
  align-items: start;
}

.footer-col {
  min-width: 0;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  max-width: 280px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 14px;
}

.footer-text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
}

.footer-link,
.footer-socials a {
  display: block;
  width: fit-content;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-link:hover,
.footer-socials a:hover {
  color: var(--cream);
  transform: translateX(3px);
}

.footer-socials {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-bottom {
  width: min(1120px, calc(100% - 48px));
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  margin: 0;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .site-footer {
    margin-top: 72px;
    padding: 44px 0 22px;
  }

  .footer-inner {
    width: min(100% - 32px, 1120px);
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    width: min(100% - 32px, 1120px);
    margin-top: 32px;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 760px) {
  .interactive-map-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .taiwan-map-card {
    background: var(--cream-dark);
    border: 1px solid var(--border-mid);
    border-radius: 18px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: visible;
  }

  .taiwan-silhouette-wrapper {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 275 / 455;
    margin: 0 auto;
    overflow: visible;
  }

  .taiwan-silhouette-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
  }

  .map-info-card {
    padding: 24px;
  }

  .map-info-card h4 {
    font-size: 24px;
  }
}

@media (max-width: 700px) {

  .info-section,
  .impact-section,
  .projects-section,
  .interactive-map-section {
    margin: 76px 0;
    padding-top: 42px;
  }

  .info-body,
  .vision-body-full,
  .philosophy-body {
    padding: 24px;
  }

  .impact-layout {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card.reverse {
    direction: ltr;
  }

  .sci-layout {
    grid-template-columns: 1fr;
  }

  .members-grid {
    grid-template-columns: 1fr 1fr;
  }

  .poster-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-row {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    clip-path: ellipse(120% 100% at 50% 0%);
  }

  nav a {
    font-size: 12px;
    padding: 5px 12px;
  }

  main {
    padding: 20px 14px 60px;
  }

  .page {
    padding: 0 1rem 4rem;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .blog-entry {
    grid-template-columns: 80px 1fr;
  }
}
/* ══════════════════════════════════════
   AUTO-ADVANCING IMAGE CAROUSEL
══════════════════════════════════════ */

/* Outer wrapper: no overflow hidden here so images aren't clipped */
.carousel {
  position: relative;
  width: 100%;
  margin: 0;
}

/* Fade-edge overlays sit on the outer wrapper */
.carousel::before,
.carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--cream) 0%, transparent 100%);
}

.carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--cream) 0%, transparent 100%);
}

/* Inner viewport: this is what clips the scrolling track */
.carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
}

.carousel:hover .carousel-track {
  animation-play-state: paused;
}

/* ── Track: flex row that loops ── */
.carousel-track {
  display: flex;
  gap: var(--carousel-gap, 16px);
  width: max-content;
  animation: carousel-scroll var(--carousel-duration, 24s) linear infinite;
}

@keyframes carousel-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - var(--carousel-gap, 16px) / 2)); }
}

/* ── Each slide ── */
.carousel-slide {
  flex-shrink: 0;
  width: var(--carousel-slide-width, 420px);
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: initial;
  background: transparent;
}

/* ── Caption (optional) ── */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(20,35,28,0.72) 0%, transparent 100%);
  color: var(--white);
  padding: 28px 20px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
}

/* ── Dot nav ── */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-mid);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: var(--green-dark);
  transform: scale(1.3);
}

/* ── Gallery section wrapper ── */
.gallery-section {
  margin: 100px 0;
  padding-top: 56px;
  border-top: 2px solid rgba(45, 74, 62, 0.28);
}

.gallery-section .section-heading {
  margin-bottom: 24px;
}

.map-extra-image-wrap {
  width: 80%;
  margin: 40px auto 0;
}

.map-extra-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Responsive slide sizing ── */
@media (max-width: 700px) {
  .carousel-slide {
    --carousel-slide-width: 260px;
    --carousel-slide-height: 200px;
  }
}