:root {
  --green: #2f8f58;
  --green-dark: #155334;
  --mint: #e6f8ed;
  --pink: #ffe6ee;
  --sky: #e3f5ff;
  --sun: #fff4c7;
  --coral: #f27a55;
  --text: #24322b;
  --muted: #5f7068;
  --line: #cde8d9;
  --card: #fff;
  --shadow: 0 14px 34px rgba(33, 86, 61, .13);
  --font-scale: 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font: calc(16px * var(--font-scale)) / 1.55 Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 9% 12%, rgba(255, 244, 199, .68), transparent 26%),
    radial-gradient(circle at 92% 10%, rgba(227, 245, 255, .86), transparent 28%),
    radial-gradient(circle at 20% 88%, rgba(230, 248, 237, .82), transparent 30%),
    #f8fcf9 url("assets/site-background.jpg") center center / cover fixed no-repeat;
}

a {
  color: #0756a6;
}

a:hover {
  color: #003a73;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: #000;
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(236, 250, 244, .96) 56%, rgba(227, 245, 255, .95));
  border-bottom: 5px solid #89d7a5;
  box-shadow: 0 8px 22px rgba(34, 107, 71, .11);
}

.header-inner {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 22px;
}

.brand-mark {
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  background: #6de1be;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(36, 120, 85, .18);
}

.brand-text p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: .98em;
}

.brand-text h1 {
  margin: 0;
  color: var(--green-dark);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
}

.access-toggle,
.button,
.access-panel button,
.menu-toggle {
  border: 2px solid var(--green);
  border-radius: 6px;
  background: linear-gradient(180deg, #3aa965, var(--green));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(47, 143, 88, .18);
}

.access-toggle,
.button,
.menu-toggle {
  padding: 11px 16px;
}

.button-secondary {
  background: #fff;
  color: var(--green);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 22px;
}

.home-layout {
  max-width: 1600px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 16px;
}

.menu-toggle {
  display: none;
  width: 100%;
  margin-bottom: 8px;
}

.side-nav {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.side-nav a {
  position: relative;
  display: block;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, padding-left .18s ease;
}

.side-nav a:last-child {
  border-bottom: 0;
}

.side-nav a.active,
.side-nav a:hover {
  background: linear-gradient(90deg, #dbf6e7, #fff);
  color: #0d5c38;
  padding-left: 22px;
}

.side-nav a.active::before,
.side-nav a:hover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: var(--coral);
}

.sidebar-banner {
  display: block;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.sidebar-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.sidebar-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(33, 86, 61, .18);
}

.content {
  min-width: 0;
}

.home-news-layout {
  position: relative;
  margin-bottom: 24px;
}

.home-news-layout .news-section {
  margin-bottom: 0;
}

.home-side-banner {
  display: block;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 300px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.home-side-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.home-side-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(33, 86, 61, .18);
}

.section {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: .01em;
}

.eyebrow {
  margin: 0 0 8px;
  color: #c24f35;
  font-size: .9em;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.section {
  padding: 24px;
}

.page-section {
  min-height: 420px;
}

.page-section .lead {
  max-width: 820px;
  font-size: 1.1em;
}

.page-section p {
  max-width: 860px;
}

.section-head {
  margin-bottom: 18px;
}

.news-section {
  padding: 0;
  overflow: hidden;
}

.news-section .section-head {
  margin: 0;
  min-height: 154px;
  padding: 22px 340px 22px 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 244, 199, .9), transparent 24%),
    linear-gradient(135deg, #2f8f58, #48b978 62%, #77d49a);
  color: #fff;
}

.news-section .eyebrow,
.news-section h2 {
  color: #fff;
}

.news-list {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(246, 253, 249, .94));
}

.pos-section {
  padding: 0;
  overflow: hidden;
}

.home-bottom-banners {
  padding: 18px;
}

.home-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.home-info-banner {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 88, 60, .08);
}

.home-info-banner-wide {
  grid-column: 1 / -1;
}

.home-info-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.home-info-banner-wide img {
  max-height: 360px;
  object-fit: contain;
}

.news-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 16px;
  box-shadow: 0 8px 22px rgba(30, 88, 60, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.news-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(36, 77, 58, .12);
}

.news-card:hover {
  transform: translateY(-2px);
  border-color: #a8dfbd;
  box-shadow: 0 14px 30px rgba(30, 88, 60, .13);
}

.news-card h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 1.35em;
}

.news-date {
  display: inline-block;
  margin: 0 0 8px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--pink);
  color: #a53c2d;
  font-weight: 800;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 20px rgba(30, 88, 60, .08);
}

.card h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

.card p {
  margin: 0 0 14px;
}

.link-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.link-list a,
.legacy-link {
  display: inline-block;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #f4fff8, var(--mint));
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.page-links {
  max-width: 860px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subpages-box {
  max-width: 860px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(230, 248, 237, .9), rgba(227, 245, 255, .72));
  padding: 16px;
}

.subpages-box h3 {
  margin: 0 0 12px;
  color: var(--green-dark);
}

.subpages-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subpages-list a {
  display: inline-block;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 9px 12px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(30, 88, 60, .08);
}

.page-builder-content {
  display: flow-root;
  margin-top: 20px;
}

.builder-block {
  margin-bottom: 22px;
  max-width: 100%;
}

.builder-block:last-child {
  margin-bottom: 0;
}

/* Alignment: images and buttons can float beside surrounding text, like a normal document editor */
.builder-align-left {
  float: left;
  max-width: 46%;
  margin: 0 22px 16px 0;
}

.builder-align-right {
  float: right;
  max-width: 46%;
  margin: 0 0 16px 22px;
}

.builder-align-center {
  clear: both;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  text-align: center;
}

.builder-align-full,
.builder-block-heading,
.builder-block-text,
.builder-block-table,
.builder-block-gallery {
  clear: both;
}

.builder-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.builder-gallery-item {
  flex: 1 1 220px;
  max-width: calc(33.333% - 11px);
  margin: 0;
}

.builder-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.builder-gallery-item figcaption {
  margin-top: 6px;
  font-size: .9em;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .builder-gallery-item {
    max-width: calc(50% - 8px);
  }
}

@media (max-width: 480px) {
  .builder-gallery-item {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .builder-align-left,
  .builder-align-right {
    float: none;
    max-width: 100%;
    margin: 0 0 16px;
  }
}

.builder-heading {
  margin: 8px 0 0;
  color: var(--green-dark);
  font-size: 1.6em;
}

.builder-text p {
  margin: 0 0 10px;
}

.rich-content {
  max-width: 100%;
}

.rich-content p,
.rich-content h2,
.rich-content h3,
.rich-content ul,
.rich-content ol {
  margin-top: 0;
}

.rich-content a {
  font-weight: 700;
}

.builder-image {
  margin: 0;
}

.builder-image img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
}

.builder-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: .95em;
}

.builder-document {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 20px rgba(30, 88, 60, .08);
}

.builder-doc-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  color: var(--green-dark);
  font-size: 32px;
}

.builder-document h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

.builder-document p {
  margin: 0 0 14px;
}

.builder-table-wrap,
.rich-content table {
  width: 100%;
  overflow-x: auto;
}

.builder-table-caption {
  margin: 0 0 12px;
  color: var(--green-dark);
}

.builder-table,
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, .62);
  border: 2px solid #111;
  overflow: hidden;
}

.builder-table th,
.builder-table td,
.rich-content th,
.rich-content td {
  border: 2px solid #111;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  color: #111;
}

.builder-table th,
.rich-content th {
  background: rgba(255, 255, 255, .72);
  color: #111;
  font-weight: 800;
  text-align: center;
  vertical-align: middle;
}

.builder-table a,
.rich-content table a {
  color: #004fbd;
  font-weight: 800;
  text-decoration: underline;
}

.builder-table-links {
  display: grid;
  gap: 4px;
  align-content: start;
}

.builder-table-links a {
  display: inline-block;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.site-footer {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 20px 22px;
  color: var(--muted);
  border-top: 1px solid rgba(47, 143, 88, .16);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.qr-footer {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 136px;
  color: var(--green-dark);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.qr-footer img {
  display: block;
  width: 126px;
  height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(30, 88, 60, .08);
}

.qr-footer:hover {
  color: #0756a6;
  text-decoration: underline;
}

.access-panel {
  position: sticky;
  top: 0;
  z-index: 50;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 4px solid currentColor;
  background: #fff;
  color: #000;
}

.access-panel button {
  border-color: currentColor;
  background: transparent;
  color: inherit;
  padding: 8px 12px;
}

body.access-on .access-panel {
  display: flex;
}

body.access-on.font-large {
  --font-scale: 1.5;
}

body.access-on.font-xlarge {
  --font-scale: 2;
}

body.access-on {
  background-image: none;
}

body.access-on.theme-dark {
  --green: #fff;
  --green-dark: #fff;
  --mint: #111;
  --text: #fff;
  --muted: #fff;
  --line: #fff;
  --card: #000;
  background: #000;
  color: #fff;
}

body.access-on.theme-blue {
  --green: #fff;
  --green-dark: #fff;
  --mint: #002b5c;
  --text: #fff;
  --muted: #fff;
  --line: #fff;
  --card: #003b7a;
  background: #003b7a;
  color: #fff;
}

body.access-on .site-header,
body.access-on .section,
body.access-on .side-nav,
body.access-on .sidebar-banner,
body.access-on .card {
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

body.access-on a {
  text-decoration: underline;
}

body.access-on .news-card,
body.access-on .builder-document,
body.access-on .subpages-box,
body.access-on .builder-table,
body.access-on .home-info-banner {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}

body.access-on .builder-table th,
body.access-on .builder-table td {
  background: var(--card);
  color: var(--text);
  border-color: var(--line);
}

body.access-on .news-section .section-head,
body.access-on .news-list,
body.access-on .subpages-box,
body.access-on .builder-doc-icon {
  background: var(--card);
  color: var(--text);
}

body.access-on .news-section .eyebrow,
body.access-on .news-section h2,
body.access-on .news-date {
  color: var(--text);
}

body.access-on .news-card img,
body.access-on .builder-image img,
body.access-on .brand-mark,
body.access-on .sidebar-banner img,
body.access-on .home-side-banner img,
body.access-on .home-info-banner img,
body.access-on .qr-footer img {
  display: block;
  background: #fff;
  border: 2px solid var(--line);
  filter: none;
  opacity: 1;
}

body.access-on.hide-images img {
  display: none;
}

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: 56px 1fr;
  }

  .access-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .home-news-layout {
    position: static;
  }

  .home-side-banner {
    position: static;
    width: 100%;
    margin: 0 0 18px;
  }

  .news-section .section-head {
    min-height: 0;
    padding: 22px 24px;
  }

  .sidebar {
    position: static;
  }

  .menu-toggle {
    display: block;
  }

  .side-nav {
    display: none;
  }

  .side-nav.open {
    display: block;
  }

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

  .home-banner-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* ── News expand / modal ────────────────────────────────────────── */
.news-card .news-text-short { margin: 0 0 10px; }

.news-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 16px;
  border: none;
  border-radius: 999px;
  background: var(--green, #2f8f58);
  color: #fff;
  font-size: .92em;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .15s ease;
}
.news-expand-btn:hover { background: #1e6b3f; transform: translateY(-1px); }

/* Modal overlay */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.news-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.news-modal {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  transform: translateY(16px) scale(.97);
  transition: transform .22s ease;
}
.news-modal-overlay.open .news-modal {
  transform: translateY(0) scale(1);
}
.news-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.6em;
  line-height: 1;
  cursor: pointer;
  color: #888;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .15s;
}
.news-modal-close:hover { background: #f0f0f0; color: #333; }
.news-modal-date {
  display: inline-block;
  margin: 0 0 10px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--pink, #fde8e4);
  color: #a53c2d;
  font-weight: 800;
  font-size: .9em;
}
.news-modal h2 {
  margin: 0 40px 14px 0;
  color: var(--green-dark, #1e5c3a);
  font-size: 1.45em;
  line-height: 1.25;
}
.news-modal-body { font-size: 1em; line-height: 1.65; white-space: pre-wrap; }
.news-modal-cover {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
  display: block;
}

/* Photo gallery inside modal */
.news-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.news-modal-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  border: 2px solid #e4f0ea;
  transition: transform .18s, box-shadow .18s;
}
.news-modal-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* Lightbox for zoomed gallery photo */
.news-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.news-lightbox.open { opacity: 1; pointer-events: auto; }
.news-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 16px 60px rgba(0,0,0,.5);
  cursor: default;
}

@media (max-width: 640px) {
  .news-modal { padding: 18px 14px 16px; }
  .news-modal-gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
