
:root {
  --blue: #65c8ee;
  --blue-dark: #256b94;
  --orange: #fc8a58;
  --green: #bed800;
  --ink: #2d4657;
  --muted: #647785;
  --line: #dce9f1;
  --font-scale: 1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: calc(16px * var(--font-scale)); }
body { margin: 0; color: var(--ink); background: #edf8fc url("/theme/background.jpg") center top repeat; font-family: Arial, Helvetica, sans-serif; line-height: 1.65; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; }
button, a { transition: color .2s, background-color .2s, transform .2s; }
button:focus-visible, a:focus-visible { outline: 3px solid #111; outline-offset: 3px; }

.skip-link { position: fixed; z-index: 1000; top: -100px; left: 1rem; padding: .7rem 1rem; background: #111; color: white; }
.skip-link:focus { top: 1rem; }
.site-frame { width: min(1180px, calc(100% - 32px)); margin: 28px auto; background: #fff; border-radius: 10px; box-shadow: 0 18px 60px rgb(70 117 140 / 18%); overflow: hidden; }
.site-header { border-top: 6px solid transparent; border-image: url("/theme/header-top.jpg") 6 repeat; }
.brand-wrap { padding: 24px 24px 16px; background: rgba(255,255,255,.9); }
.brand-image { display: block; width: 100%; max-height: 365px; object-fit: cover; border-radius: 8px; }
.main-nav { display: flex; align-items: stretch; margin: 0 24px 18px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(#fbfdff, #f0f6fa); overflow: hidden; }
.main-nav a { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: .8rem 1.1rem; color: #528cba; font-size: 1.02rem; font-weight: 700; text-align: center; border-right: 1px solid var(--line); }
.main-nav a:hover, .main-nav a:focus { color: #fff; background: var(--blue); }
.menu-toggle { display: none; margin: 0 24px 14px; padding: .75rem 1rem; color: white; background: var(--blue-dark); border: 0; border-radius: 6px; font-weight: 700; }
main { min-height: 400px; }

.hero-slider { position: relative; min-height: 430px; margin: 0 24px 22px; overflow: hidden; border-radius: 8px; background: #dceef7; }
.hero-slider > img, .static-slide > img { width: 100%; height: 500px; object-fit: cover; }
.static-slide { position: absolute; inset: 0; }
.static-slide[hidden] { display: none; }
.hero-overlay { position: absolute; inset: 0 0 0 auto; width: min(48%, 500px); display: flex; flex-direction: column; justify-content: center; padding: 3.4rem; color: #174d6b; background: linear-gradient(90deg, transparent, rgba(255,255,255,.91) 18%, rgba(255,255,255,.97)); }
.hero-overlay h1 { margin: .2rem 0 1rem; color: var(--orange); font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.05; }
.hero-overlay p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.hero-dots { position: absolute; right: 3rem; bottom: 1.5rem; display: flex; gap: .5rem; }
.hero-dots button { width: 14px; height: 14px; padding: 0; border: 2px solid white; border-radius: 50%; background: #b5ddeb; box-shadow: 0 0 0 1px #7abbd4; }
.hero-dots button.is-active { background: var(--orange); }
.eyebrow { margin: 0 0 .35rem; color: #6d8798; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.button { display: inline-block; align-self: flex-start; padding: .7rem 1.05rem; color: white !important; background: var(--blue); border-radius: 6px; font-weight: 700; }
.button:hover { background: var(--orange); transform: translateY(-1px); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 24px 28px; }
.service-card { display: flex; align-items: center; gap: 16px; min-height: 165px; padding: 20px; border-radius: 8px; color: white; }
.service-card img { width: 74px; flex: 0 0 auto; }
.service-card h2 { margin: 0 0 .35rem; color: inherit; font-size: 1.55rem; line-height: 1.1; }
.service-card p { margin: 0; }
.service-card a { color: white; text-decoration: underline; }
.service-green { background: #b8d100; }
.service-blue { background: #5cc7ee; }
.service-orange { background: #fc8a58; }

.home-intro { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; padding: 48px 44px; background: #f8fbfd; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-intro h1, .latest-section h2, .page-heading h1 { margin: 0; color: #325f7c; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.12; }
.donation-box { padding: 28px; color: #fff; background: var(--blue-dark); border-radius: 8px; }
.donation-box h2 { margin-top: 0; color: white; }
.donation-box strong { display: block; padding: .9rem; word-break: break-word; background: rgba(255,255,255,.12); border-radius: 5px; }
.donation-box .button { background: var(--orange); }
.latest-section { padding: 48px 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 24px; padding: 0 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card, .program-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgb(75 120 145 / 8%); }
.post-card img { width: 100%; height: 205px; object-fit: cover; }
.post-card-body, .program-card > div { padding: 20px; }
.post-card time, .list-card time, .page-heading time { color: var(--orange); font-size: .85rem; font-weight: 700; }
.post-card h3, .list-card h2, .program-card h2 { margin: .45rem 0 .7rem; line-height: 1.25; }
.post-card h3 { font-size: 1.2rem; }
.post-card p { color: var(--muted); font-size: .92rem; }
.read-more { font-weight: 800; }

.breadcrumbs { display: flex; gap: .55rem; padding: 1rem 44px; color: var(--muted); background: #f5f9fc; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .9rem; }
.page-heading { padding: 42px 44px 28px; }
.standard-page, .article-page { padding-bottom: 54px; }
.standard-page > .page-heading, .article-page > .page-heading { padding-bottom: 18px; }
.featured-image { display: block; width: calc(100% - 88px); max-height: 680px; margin: 0 44px 34px; object-fit: contain; background: #f3f8fb; border-radius: 8px; }
.content-prose { padding: 0 44px; color: #3f5360; }
.content-prose h1, .content-prose h2 { color: #325f7c; line-height: 1.2; }
.content-prose h1 { margin-top: 2rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.content-prose p { margin: 0 0 1.1rem; }
.content-prose ul, .content-prose ol { padding-left: 1.4rem; }
.content-prose img { display: block; max-height: 800px; margin: 1.4rem auto; object-fit: contain; border-radius: 6px; }
.content-prose a { text-decoration: underline; }
.legacy-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0 0 30px; }
.legacy-column { min-width: 0; }
.legacy-column .service-card { color: var(--ink); background: #f3f9fc; border: 1px solid var(--line); }
.spacer { height: 1.4rem; }
.category-pill { display: inline-block; margin-top: .8rem; padding: .25rem .65rem; color: white; background: var(--blue); border-radius: 100px; font-size: .8rem; }
.empty-note { margin: 0 44px 50px; padding: 1.5rem; background: #f3f8fb; border-radius: 8px; }

.content-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 38px; padding: 0 44px 54px; }
.post-list { display: grid; gap: 22px; }
.list-card { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.list-card img { width: 100%; height: 175px; object-fit: cover; border-radius: 6px; }
.list-card p { color: var(--muted); }
.sidebar section { margin-bottom: 24px; padding: 20px; background: #f4f9fc; border-radius: 8px; }
.sidebar h2 { margin: 0 0 10px; color: #325f7c; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { border-top: 1px solid var(--line); }
.sidebar li:first-child { border-top: 0; }
.sidebar li a { display: flex; justify-content: space-between; padding: .48rem 0; }

.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0 44px 54px; }
.program-card img { width: 100%; height: 220px; object-fit: contain; background: #f5f9fc; }
.contact-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; padding: 0 44px 54px; }
.contact-card { padding: 28px; color: white; background: var(--blue-dark); border-radius: 8px; }
.contact-card h2, .contact-card a { color: white; }
.map { min-height: 430px; overflow: hidden; border-radius: 8px; }
.map iframe { width: 100%; height: 100%; min-height: 430px; border: 0; }

.site-footer { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 28px; align-items: start; padding: 38px 44px; color: #d8e8f2; background: #244f69; }
.site-footer strong { color: white; font-size: 1.25rem; }
.site-footer p { margin: .4rem 0; }
.site-footer nav { display: grid; gap: .35rem; }
.site-footer a { color: white; }

.accessibility { position: fixed; z-index: 100; top: 12px; right: 12px; }
.accessibility-toggle, .accessibility-panel button { padding: .6rem .8rem; color: white; background: #173f58; border: 1px solid rgba(255,255,255,.35); border-radius: 5px; cursor: pointer; }
.accessibility-panel { display: grid; gap: 6px; width: 250px; margin-top: 6px; padding: 10px; background: #173f58; border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / 25%); }
.font-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; color: white; text-align: center; }
.access-contrast { --ink: #fff; --muted: #fff; --line: #fff; background: #000 !important; }
.access-contrast .site-frame, .access-contrast main, .access-contrast section, .access-contrast article, .access-contrast aside, .access-contrast header, .access-contrast footer, .access-contrast nav { color: #fff !important; background: #000 !important; }
.access-contrast a { color: #ff0 !important; text-decoration: underline; }
.access-mono { filter: grayscale(1); }
.access-links a { text-decoration: underline !important; text-decoration-thickness: 3px !important; }

@media (max-width: 900px) {
  .site-frame { width: min(100% - 16px, 760px); margin: 8px auto; }
  .brand-wrap { padding: 12px; }
  .brand-image { min-height: 190px; object-fit: cover; object-position: center; }
  .menu-toggle { display: block; }
  .main-nav { display: none; margin: 0 24px 18px; flex-direction: column; }
  .main-nav.is-open { display: flex; }
  .main-nav a { min-height: 48px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-slider { min-height: 430px; }
  .hero-slider > img, .static-slide > img { height: 430px; }
  .hero-overlay { width: 65%; padding: 2rem; }
  .service-grid, .post-grid, .program-grid { grid-template-columns: 1fr 1fr; }
  .service-grid article:last-child { grid-column: 1 / -1; }
  .home-intro { grid-template-columns: 1fr; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .legacy-row { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .site-frame { width: 100%; margin: 0; border-radius: 0; }
  .brand-image { min-height: 155px; object-position: center; }
  .hero-slider { min-height: 450px; margin: 0 12px 16px; }
  .hero-slider > img, .static-slide > img { height: 450px; }
  .hero-overlay { inset: auto 0 0; width: 100%; min-height: 75%; justify-content: end; padding: 1.5rem 1.2rem 3.5rem; background: linear-gradient(transparent, rgba(255,255,255,.98) 25%); }
  .hero-overlay h1 { font-size: 1.7rem; }
  .hero-dots { right: 1.2rem; }
  .service-grid, .post-grid, .program-grid { grid-template-columns: 1fr; padding-left: 12px; padding-right: 12px; }
  .service-grid article:last-child { grid-column: auto; }
  .service-card { min-height: 0; }
  .home-intro, .latest-section, .page-heading, .breadcrumbs, .content-with-sidebar, .contact-grid, .site-footer { padding-left: 20px; padding-right: 20px; }
  .featured-image { width: calc(100% - 40px); margin-left: 20px; margin-right: 20px; }
  .content-prose { padding-left: 20px; padding-right: 20px; }
  .section-heading { align-items: start; padding: 0; }
  .list-card { grid-template-columns: 1fr; }
  .list-card img { height: 220px; }
  .sidebar, .site-footer { grid-template-columns: 1fr; }
  .accessibility { top: auto; right: 8px; bottom: 8px; }
}
