/* Shared lightweight styles for incremental modernization */
:root {
  --site-font-sans: Verdana, Arial, Helvetica, sans-serif;
  --site-font-serif: "Times New Roman", Times, serif;
  --site-text: #000000;
  --site-bg: #ffffff;
  --site-link: #003399;
  --site-panel: #99ff99;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.site-page {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--site-font-sans);
}

body.shell-page {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-text);
  font-family: var(--site-font-sans);
}

body.site-page a {
  color: var(--site-link);
}

.page-left {
  max-width: 1000px;
  margin: 0;
  padding: 20px 16px 28px;
}

.page-title {
  margin: 0 0 12px;
  font-size: 32px;
  text-align: left;
}

.section-title {
  margin: 24px 0 12px;
  font-size: 24px;
  text-align: left;
}

.page-copy {
  line-height: 1.45;
}

.site-page img {
  max-width: 100%;
  height: auto;
}

/* Top-level shell */
.shell-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell-header {
  border-bottom: 2px solid #6f9650;
  background: #ffffff;
  padding: 8px 10px 6px;
}

.shell-brand {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.shell-brand-tree {
  height: auto;
  width: auto;
  flex: 0 0 auto;
}

.shell-brand-logo {
  width: 100%;
  height: auto;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
}

.shell-brand-leaf {
  width: auto;
  height: auto;
  margin-bottom: 6px;
  align-self: flex-end;
  animation: leaf-bob 3s ease-in-out infinite;
}

@keyframes leaf-bob {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0);
  }
}

.shell-layout {
  width: 100%;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 14.25rem minmax(0, 1fr);
}

.shell-nav {
  background: #99ff99;
  border-right: 1px solid #6f9650;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.shell-nav a {
  display: block;
  width: 100%;
  margin: 0 0 4px;
  box-sizing: border-box;
}

.shell-nav a:last-child {
  margin-bottom: 0;
}

.shell-main-link {
  width: calc(100% - 2px);
  margin: 0 auto 6px;
  box-sizing: border-box;
  border: 1px solid #6c8f4b;
  background: linear-gradient(#d9ffd5, #a4d98f);
  color: #0f3518;
  text-decoration: none;
  font-family: var(--site-font-sans);
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0.56rem 0.62rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.shell-main-link.is-hover {
  background: linear-gradient(#eaffe6, #b2e39e);
}

.shell-main-link.is-active {
  background: linear-gradient(#8ecf77, #76b85f);
}

.shell-main-link span {
  display: block;
}

.shell-service-nav {
  display: none;
  margin: 2px 0 10px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(111, 150, 80, 0.45);
}

.shell-service-nav.is-open {
  display: block;
}

.shell-service-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #315127;
}

.shell-service-link {
  margin: 0 0 5px;
  padding: 3px 4px;
  display: block;
  line-height: 1.25;
  font-size: 12px;
  text-decoration: none;
  color: #134a92;
}

.shell-service-link:last-child {
  margin-bottom: 0;
}

.shell-service-link.is-active {
  background: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  color: #0a2f5c;
}

@media (min-width: 1280px) {
  .shell-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .shell-main-link {
    font-size: 0.95rem;
    padding: 0.58rem 0.66rem;
  }
}

@media (min-width: 1600px) {
  .shell-layout {
    grid-template-columns: 15.5rem minmax(0, 1fr);
  }

  .shell-main-link {
    font-size: 1rem;
    padding: 0.62rem 0.72rem;
  }
}

.shell-main {
  background: #ffffff;
}

#mainFrame {
  border: 0;
  width: 100%;
  min-height: calc(100vh - 110px);
}

.shell-note {
  margin: 0;
  padding: 16px;
}

/* Home and services hero pages */
.hero-page {
  background: #f7faf4;
}

.hero-wrap {
  max-width: 1240px;
  margin: 0;
  padding: 16px 20px;
}

.hero-surface {
  position: relative;
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
}

.hero-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
  z-index: 1;
}

.hero-image {
  display: block;
  width: 608px;
  max-width: 100%;
  height: auto;
  border: 1px solid #8aa96a;
  position: relative;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  max-width: min(860px, calc(100% - 24px));
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(200, 215, 188, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.hero-surface-home .hero-overlay {
  top: 2px;
  left: 2px;
  padding: 4px 6px;
  max-width: min(360px, calc(100% - 24px));
}

.hero-surface-home::before {
  display: none;
}

.hero-surface-home .hero-overlay {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-surface-home .hero-overlay h1 {
  max-width: 34ch;
  text-wrap: wrap;
}

.hero-surface-aq::before,
.hero-surface-ih::before,
.hero-surface-gcs::before,
.hero-surface-ww::before {
  display: none;
}

.hero-surface-aq .hero-overlay,
.hero-surface-ih .hero-overlay,
.hero-surface-gcs .hero-overlay {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-surface-hsw::before {
  display: none;
}

.hero-surface-hsw .hero-overlay {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #f4fff1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.hero-surface-ih .hero-overlay {
  max-width: min(620px, calc(100% - 280px));
}

.hero-surface-gcs .hero-overlay {
  top: 62px;
}

.hero-surface-ww .hero-overlay {
  top: 122px;
  left: auto;
  right: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #f4fff1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.hero-quote {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: 240px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-quote p {
  margin: 0;
}

.hero-quote-ih {
  font-size: 13px;
}

.hero-overlay h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  line-height: 1.1;
}

.hero-overlay h2 {
  margin: 16px 0 4px;
  font-size: 1.3rem;
}

.hero-overlay ul {
  margin: 0;
  padding-left: 20px;
}

.hero-overlay li {
  margin: 0 0 2px;
  line-height: 1.0;
}

.hero-links {
  list-style: square;
}

.hero-links a {
  color: #003399;
  font-weight: 700;
}

@media (max-width: 760px) {
  .hero-surface {
    display: block;
    width: 100%;
  }

  .hero-surface::before {
    display: none;
  }

  .hero-image {
    width: 100%;
  }

  .hero-overlay,
  .hero-quote {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    max-width: none;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    text-shadow: none;
  }

  .hero-surface-home .hero-overlay h1 {
    max-width: none;
    text-wrap: initial;
  }

  .hero-surface-hsw .hero-overlay,
  .hero-surface-ww .hero-overlay {
    color: inherit;
    text-shadow: none;
  }

  .hero-surface-gcs .hero-overlay,
  .hero-surface-ww .hero-overlay,
  .hero-surface-ih .hero-overlay {
    max-width: none;
  }

  .hero-quote {
    font-size: 13px;
    line-height: 1.35;
    color: #163226;
    margin-top: 6px;
  }
}

/* President message */
.soq-page {
  background: #f7faf4;
}

.soq-wrap {
  max-width: 980px;
  margin: 0;
  padding: 16px;
}

.soq-panel {
  background: #99ff99;
  border: 1px solid #7cad66;
  padding: 20px 22px;
}

.soq-panel p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.soq-signature {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.soq-signature img {
  width: 75px;
  height: 97px;
  flex: 0 0 auto;
}

.soq-signature p {
  margin: 0;
}

/* Key associates */
.associates-page {
  margin: 0;
  padding: 14px 16px 20px;
  background: #f7faf4;
}

.associates-page .WordSection1 {
  max-width: 1200px;
  margin: 0;
}

.associates-page table.MsoNormalTable {
  width: 100% !important;
  table-layout: fixed;
}

.associates-page table.MsoNormalTable td:first-child {
  width: 2% !important;
}

.associates-page table.MsoNormalTable td:nth-child(2) {
  width: 34% !important;
  padding-right: 14px !important;
  vertical-align: top;
}

.associates-page table.MsoNormalTable td:nth-child(3) {
  width: 64% !important;
  vertical-align: top;
}

/* Community page */
.community-page .thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.community-page .image-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.community-page .portrait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.community-page .photo-link {
  display: block;
}

.community-page img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

.community-page .notes {
  margin-top: 20px;
}

/* Useful links page */
.links-page {
  font-family: var(--site-font-serif);
}

.links-page .links-wrap {
  max-width: 900px;
  margin: 0;
  padding: 16px;
}

.links-page .links-panel {
  background: var(--site-panel);
  padding: 14px 18px;
}

.links-page h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.links-page h2 {
  margin: 22px 0 12px;
  font-size: 24px;
}

.links-page ul {
  margin: 0 0 0 20px;
  padding: 0;
}

.links-page li {
  margin: 0 0 8px;
}

.links-page .links-note {
  margin-top: 8px;
  font-size: 15px;
}

@media (max-width: 640px) {
  .page-title {
    font-size: 28px;
  }

  .section-title {
    font-size: 21px;
  }

  .links-page h1 {
    font-size: 28px;
  }

  .links-page h2 {
    font-size: 22px;
  }
}

@media (max-width: 900px) {
  .shell-brand {
    align-items: flex-start;
    gap: 8px;
  }

  .shell-brand-tree {
    height: auto;
    width: auto;
  }

  .shell-brand-leaf {
    display: none;
  }

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

  .shell-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid #6f9650;
    padding: 8px 8px 6px;
  }

  .shell-nav a {
    margin: 0;
    width: auto;
  }

  .shell-service-nav {
    width: 100%;
    order: 2;
    margin: 4px 0 2px;
  }

  #mainFrame {
    min-height: calc(100vh - 170px);
  }

  .hero-wrap {
    padding: 10px;
  }

  .hero-surface {
    display: inline-block;
  }

  .hero-overlay {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 12px 14px;
  }

  .hero-surface-home .hero-overlay {
    max-width: min(640px, calc(100% - 16px));
  }

  .hero-surface-home .hero-overlay h1 {
    max-width: none;
  }

  .hero-surface-gcs .hero-overlay {
    top: 28px;
  }

  .hero-surface-ww .hero-overlay {
    top: auto;
    bottom: 8px;
    left: auto;
    right: 8px;
  }

  .hero-surface-ih .hero-overlay {
    max-width: calc(100% - 16px);
  }

  .hero-quote {
    top: auto;
    right: 8px;
    bottom: 8px;
    max-width: min(240px, calc(55% - 10px));
    font-size: 13px;
  }

  .hero-overlay h1 {
    font-size: 1.3rem;
  }

  .hero-overlay h2 {
    font-size: 1.3rem;
  }

  .soq-wrap {
    padding: 10px;
  }

  .soq-panel {
    padding: 14px;
  }

  .soq-signature {
    flex-direction: column;
  }

  .associates-page {
    padding: 10px;
  }

}

@media (max-width: 680px) {
  .soq-wrap {
    padding: 8px;
  }

  .soq-panel {
    padding: 12px 10px;
  }

  .soq-panel,
  .soq-panel p,
  .soq-panel strong,
  .soq-panel em {
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  .associates-page .WordSection1 {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .associates-page table.MsoNormalTable {
    width: 100% !important;
    table-layout: fixed;
  }

  .associates-page table.MsoNormalTable td:first-child {
    display: none !important;
  }

  .associates-page table.MsoNormalTable td:nth-child(2),
  .associates-page table.MsoNormalTable td:nth-child(3) {
    display: table-cell !important;
    width: auto !important;
    padding: 0 0 4px !important;
    vertical-align: top;
  }

  .associates-page table.MsoNormalTable td:nth-child(2) {
    width: 40% !important;
    padding-right: 8px !important;
  }

  .associates-page table.MsoNormalTable td:nth-child(3) {
    width: 60% !important;
  }

  .associates-page table.MsoNormalTable td:nth-child(2) p,
  .associates-page table.MsoNormalTable td:nth-child(3) p {
    text-align: left !important;
  }

  .associates-page p {
    margin: 0 0 6px !important;
  }
}
