/* Endowed Organization ¯ NGO layout inspired by large HK charity sites */
:root {
  --color-ink: #1a1a1a;
  --color-muted: #5c5c5c;
  --color-bg: #f7f6f3;
  --color-white: #ffffff;
  --color-brand: #b4232a;
  --color-brand-dark: #8f1b22;
  --color-accent: #1e3a5f;
  --font-sans: "Noto Sans TC", "Noto Sans SC", "Noto Sans", system-ui, -apple-system, sans-serif;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --maxw: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.top-bar {
  background: var(--color-accent);
  color: #e8eef5;
  font-size: 0.875rem;
}
.top-bar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.35rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}
.top-bar a {
  color: #fff;
}
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.lang-switch a {
  opacity: 0.85;
  font-weight: 500;
}
.lang-switch a.is-active {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
}

.site-header {
  background: var(--color-white);
  border-bottom: 1px solid #e5e2dc;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  height: 52px;
  width: auto;
}
.brand-text h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}
.brand-text .sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  border: 1px solid #ccc;
  background: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  align-items: center;
}
.main-nav a {
  color: var(--color-ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-brand);
  text-decoration: none;
  border-bottom-color: var(--color-brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--color-brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-brand-dark);
  color: #fff;
}

/* Facebook ¯Follow us¯ graphic (graphics/followus.jpeg) */
.fb-follow-img {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  vertical-align: middle;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fb-follow-img:hover {
  text-decoration: none;
  opacity: 0.9;
}
.fb-follow-img:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.fb-follow-img img {
  display: block;
  height: 40px;
  width: auto;
  max-width: min(220px, 100%);
}
.prose .fb-follow-img,
p .fb-follow-img {
  margin-right: 0.65rem;
  margin-bottom: 0.35rem;
}
.main-nav .nav-item-fb .fb-follow-img img {
  height: 34px;
  max-width: 180px;
}
@media (max-width: 860px) {
  .main-nav .nav-item-fb {
    margin-top: 0.35rem;
  }
}
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.hero {
  position: relative;
  background: #111;
  color: #fff;
  min-height: 320px;
}
.hero-slides {
  position: relative;
  overflow: hidden;
}
.hero-slide {
  position: relative;
  display: none;
  min-height: 360px;
  background-size: cover;
  background-position: center;
  align-items: flex-end;
}
.hero-slide.is-active {
  display: flex;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 55%);
  pointer-events: none;
}
.hero-slide .inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  width: 100%;
}
.hero-slide h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hero-slide p {
  margin: 0;
  max-width: 36rem;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}
.hero-dots button.is-active {
  background: #fff;
}

.section {
  padding: 3rem 1.25rem;
}
.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  color: var(--color-accent);
}
.section-head p {
  margin: 0;
  color: var(--color-muted);
  max-width: 40rem;
  margin-inline: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid #ebe8e2;
}
.card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--color-brand);
}
.card p {
  margin: 0;
  color: #444;
  font-size: 0.95rem;
}

.split-cta {
  background: linear-gradient(135deg, var(--color-accent), #2a5080);
  color: #e8eef5;
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.split-cta h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}
.split-cta p {
  margin: 0 0 1.25rem;
  max-width: 42rem;
  margin-inline: auto;
  opacity: 0.95;
}
.split-cta .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.split-cta .btn-primary {
  background: #fff;
  color: var(--color-accent);
}
.split-cta .btn-primary:hover {
  background: #f0f0f0;
}

.fb-section {
  background: var(--color-white);
  border-top: 1px solid #e5e2dc;
  border-bottom: 1px solid #e5e2dc;
}
.fb-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .fb-wrap {
    grid-template-columns: 1fr 360px;
  }
}
.fb-placeholder {
  background: #f0eeea;
  border: 1px dashed #c9c4bc;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.page-hero {
  background: var(--color-accent);
  color: #fff;
  padding: 2.25rem 1.25rem;
}
.page-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.page-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}
.page-hero p {
  margin: 0;
  opacity: 0.9;
}

.prose {
  max-width: 52rem;
}
.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--color-accent);
}
.prose h2:first-child {
  margin-top: 0;
}
.prose p {
  margin: 0 0 1rem;
  white-space: pre-line;
}
.service-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e2dc;
}
.service-block:last-child {
  border-bottom: none;
}
.service-block h3 {
  margin: 0 0 0.5rem;
  color: var(--color-brand);
  font-size: 1.05rem;
}

.donation-img {
  background: var(--color-white);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: center;
  margin-bottom: 2rem;
}
.donation-img img {
  max-width: 100%;
}

.remarks-box {
  background: #fff9f0;
  border: 1px solid #e8dcc8;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.remarks-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}
.remarks-box ul {
  margin: 0;
  padding-left: 1.2rem;
}
.remarks-box li {
  margin-bottom: 0.5rem;
}

.form-panel {
  background: var(--color-white);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  max-width: 36rem;
}
.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="file"],
.form-row textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font: inherit;
}
.form-row textarea {
  min-height: 120px;
  resize: vertical;
}
.captcha-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.captcha-code {
  font-family: ui-monospace, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.2em;
  background: #eef2f7;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid #ccd6e4;
  user-select: all;
}
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.alert-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}
.alert-error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.site-footer {
  background: #2c2c2c;
  color: #ccc;
  padding: 2rem 1.25rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a {
  color: #fff;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    width: 100%;
    display: none;
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0;
  }
}
