/* Supplement styles (populated in later phases if needed) */

/* --- Article typography baseline (px: theme root is 62.5%, rem-scoped styles shrink to body size) --- */
.entry-content { font-size: 16px; line-height: 1.7; color: #222; }
.entry-content > *:first-child { margin-top: 0; }

.entry-content h2, .entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6 {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}
.entry-content h2 { font-size: 26px; margin: 1.6em 0 .5em; }
.entry-content h3 { font-size: 21px; margin: 1.4em 0 .45em; }
.entry-content h4 { font-size: 18px; margin: 1.2em 0 .4em; }

.entry-content p  { margin: 0 0 1.05em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.05em; padding-left: 1.4em; }
.entry-content li { margin: 0 0 .4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content a  { text-decoration: underline; }
.entry-content img { max-width: 100%; height: auto; }

.entry-content table { width: 100%; margin: 1em 0; font-size: 0.95em; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .45em .6em; border: 1px solid #dedede; vertical-align: top; text-align: left; }
.entry-content th { font-weight: 600; background: #fafafa; }
.entry-content blockquote { margin: 1em 0; border-left: 3px solid #6ec4bf; padding-left: .8em; color: #535353; }

/* =========================================================
   JADE responsive visual refresh
   Additive overrides only: preserves existing theme and PHP
   ========================================================= */
:root {
  --jade-ink: #173a3a;
  --jade-deep: #102f31;
  --jade-accent: #278d83;
  --jade-mint: #e5f4f1;
  --jade-paper: #f6f8f7;
  --jade-line: #e1e8e6;
  --jade-muted: #63716f;
  --jade-radius: 16px;
  --jade-shadow: 0 12px 34px rgba(17, 48, 47, .09);
}

html { scroll-behavior: smooth; }
body {
  color: #293735;
  background: var(--jade-paper);
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
button, input, textarea, select { max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); }
#frame, #content-wrapper, #main-content, .dynamic-content { min-width: 0; }
#main.site-main {
  display: block;
  min-height: 50vh;
  padding-bottom: 56px;
}
#main.site-main > .container {
  width: min(1180px, calc(100% - 40px));
  padding-top: clamp(28px, 5vw, 56px) !important;
  padding-bottom: clamp(40px, 6vw, 72px) !important;
}
#main h1 {
  color: var(--jade-ink);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.15;
  margin: 0 0 24px;
}
#main h2, #main h3 { color: var(--jade-ink); }
#main p { overflow-wrap: anywhere; }
#main .entry-content {
  max-width: 100%;
  overflow-wrap: anywhere;
}
#main .entry-content img,
#main .entry-content figure,
#main .entry-content video,
#main .entry-content iframe {
  max-width: 100%;
}
#main .entry-content img {
  display: block;
  height: auto;
  border-radius: 10px;
  margin: 1.2em auto;
}
#main .entry-content figure { margin: 1.5em 0; }
#main .entry-content figcaption {
  color: var(--jade-muted);
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}
#main .entry-content pre,
#main .entry-content table { max-width: 100%; overflow-x: auto; }
#main .entry-content table { display: block; }
#main .entry-content blockquote {
  border-left: 4px solid var(--jade-accent);
  border-radius: 0 10px 10px 0;
  background: #eef7f5;
  padding: 18px 22px;
}
#main .entry-content a { color: #19786f; text-underline-offset: 3px; }

/* Navigation: retain the original theme's structure, improve spacing */
#flyout-container .flyout-menu > li > a {
  padding-top: 13px !important;
  padding-bottom: 13px !important;
}
#flyout-container .flyout-menu > li {
  border-radius: 7px;
}
#main-content nav a,
#content-wrapper nav a { text-decoration: none; }
#main-content nav a:hover,
#content-wrapper nav a:hover { color: var(--jade-accent); }

/* Blog catalogue */
#blog-cards {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 26px !important;
  margin-top: 26px;
}
#blog-cards > div {
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  flex: initial !important;
}
#blog-cards > div > div {
  height: 100%;
  border: 1px solid rgba(28, 73, 68, .08);
  border-radius: var(--jade-radius) !important;
  box-shadow: 0 8px 26px rgba(17, 48, 47, .07) !important;
  background: #fff !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
#blog-cards > div > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--jade-shadow) !important;
}
#blog-cards > div > div > a:first-child {
  display: block;
  overflow: hidden;
  background: #eaf1ef;
}
#blog-cards > div > div > a:first-child img {
  display: block;
  width: 100% !important;
  height: 210px !important;
  min-height: 0 !important;
  max-height: 210px !important;
  object-fit: cover !important;
  transition: transform .35s ease;
}
#blog-cards > div > div:hover > a:first-child img { transform: scale(1.035); }
#blog-cards > div > div > div {
  padding: 22px 22px 24px !important;
  gap: 0;
}
#blog-cards h2 {
  font-size: 19px !important;
  line-height: 1.38 !important;
  letter-spacing: -.02em;
  margin: 0 0 11px !important;
}
#blog-cards h2 a {
  color: var(--jade-ink) !important;
  text-decoration: none !important;
}
#blog-cards h2 a:hover { color: var(--jade-accent) !important; }
#blog-cards p {
  color: #667370 !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  margin: 0 0 18px !important;
}
#blog-cards a[style*="border:1px solid"] {
  align-self: flex-start;
  padding: 8px 15px !important;
  border-radius: 999px !important;
  border-color: #c7e3de !important;
  color: #19786f !important;
  font-size: 11px !important;
  letter-spacing: .07em !important;
}
#blog-lm-wrap { padding: 34px 0 12px !important; }
#blog-lm-btn {
  padding: 13px 26px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  letter-spacing: .07em !important;
  box-shadow: 0 6px 16px rgba(39, 141, 131, .18);
}
#blog-lm-btn:hover { filter: brightness(.94); }
#blog-lm-btn:disabled { opacity: .65; cursor: wait; }

/* Individual articles: readable column and balanced sidebar */
#main > .container > div[style*="display:flex"] {
  gap: clamp(24px, 4vw, 46px) !important;
}
#main > .container > div[style*="display:flex"] > div[style*="flex:1"] {
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(28, 73, 68, .08);
  border-radius: var(--jade-radius);
  padding: clamp(22px, 4vw, 46px);
  box-shadow: 0 8px 28px rgba(17, 48, 47, .045);
}
#main article.post > h1 { margin-bottom: 24px; }
#main article.post .entry-content {
  color: #33413f;
  font-size: 16px;
  line-height: 1.85;
}
#main article.post .entry-content h2 { margin-top: 1.8em; }
#main article.post .entry-content h3 { margin-top: 1.5em; }
#main aside[style*="position:sticky"] {
  flex-basis: 270px !important;
  width: 270px;
  max-width: 270px !important;
}
#main aside[style*="position:sticky"] > div {
  background: #fff !important;
  border: 1px solid var(--jade-line);
  border-left: 4px solid var(--jade-accent) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(17, 48, 47, .05);
  padding: 22px 20px !important;
}
#main aside h3 {
  font-size: 12px !important;
  letter-spacing: .1em !important;
  color: var(--jade-accent) !important;
}
#main aside a {
  color: #314744 !important;
  overflow-wrap: anywhere;
}
#main aside a:hover { color: var(--jade-accent) !important; }

/* Homepage content sections, including the link widget */
#main-content > section.clearfix {
  padding-top: clamp(26px, 4vw, 48px) !important;
  padding-bottom: clamp(26px, 4vw, 48px) !important;
}
#main-content > section.clearfix .container { width: min(1180px, calc(100% - 40px)); }
#main-content #blog-cards { margin-bottom: 10px; }
#main-content .container > h2,
#main-content .container > h3 { color: var(--jade-ink); }
#main-content .container a img { max-width: 100%; }

/* Contact and other legacy forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], textarea, select {
  max-width: 100%;
  border: 1px solid #d4dfdc;
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(39, 141, 131, .18);
  border-color: var(--jade-accent);
}
button, input[type="submit"], .button {
  transition: filter .18s ease, transform .18s ease;
}
button:hover, input[type="submit"]:hover, .button:hover { filter: brightness(.96); }

/* Footer stays compatible with the existing footer template */
footer, #footer, .site-footer {
  overflow-wrap: anywhere;
}
footer a, #footer a, .site-footer a { text-underline-offset: 3px; }

/* Accessibility and mobile layouts */
:focus-visible {
  outline: 3px solid rgba(39, 141, 131, .65);
  outline-offset: 3px;
}
@media (max-width: 980px) {
  #blog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #main aside[style*="position:sticky"] {
    position: static !important;
    flex: 1 1 100% !important;
    width: auto;
    max-width: none !important;
  }
}
@media (max-width: 640px) {
  .container,
  #main.site-main > .container,
  #main-content > section.clearfix .container {
    width: calc(100% - 28px);
  }
  #blog-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px !important;
  }
  #blog-cards > div > div > a:first-child img {
    height: 220px !important;
    max-height: 220px !important;
  }
  #blog-cards > div > div > div { padding: 20px !important; }
  #main > .container > div[style*="display:flex"] > div[style*="flex:1"] {
    padding: 22px 18px;
  }
  #main article.post .entry-content { font-size: 15px; }
  #main h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


.jade-blog-heading {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}
.jade-blog-heading h1 { margin-bottom: 12px !important; }
.jade-blog-intro {
  margin: 0 auto;
  color: var(--jade-muted);
  font-size: 16px;
  max-width: 620px;
}
.jade-blog-page #blog-cards { margin-top: 34px; }

/* =========================================================
   JADE HEADER REBUILD — compact, aligned, responsive
   Keeps the existing menu markup and URLs; CSS-only layout.
   ========================================================= */
@media (min-width: 768px) {
  body .navbar.hidden-xs {
    display: block !important;
    position: relative;
    z-index: 1000;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(91, 190, 183, .96) !important;
    box-shadow: 0 8px 26px rgba(10, 48, 48, .10);
  }

  body .navbar.hidden-xs > .container {
    width: min(1240px, calc(100% - 48px)) !important;
    max-width: 1240px !important;
    padding: 0 !important;
  }

  body .navbar.hidden-xs > .container > .row,
  body .navbar.hidden-xs nav.col-md-12 {
    margin: 0 !important;
    padding: 0 !important;
  }

  body .navbar.hidden-xs .main-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(18px, 3vw, 48px) !important;
    width: 100% !important;
    min-height: 126px !important;
    height: 126px !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
  }

  body .navbar.hidden-xs .main-nav > li {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    float: none !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide {
    flex: 0 0 118px !important;
    order: 0;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide > div,
  body .navbar.hidden-xs .main-nav > li.menu-slide > div > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide > div > a {
    width: 100% !important;
    min-height: 54px !important;
    padding: 12px 18px !important;
    border: 1.5px solid rgba(255,255,255,.9) !important;
    border-radius: 5px !important;
    background: rgba(255,255,255,.07) !important;
    box-sizing: border-box !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide > div > a:hover {
    background: rgba(255,255,255,.18) !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide > div > a span,
  body .navbar.hidden-xs .main-nav > li:not(.menu-slide) > div > a span {
    display: inline-block !important;
    font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    letter-spacing: .04em !important;
    font-weight: 600 !important;
    color: #fff !important;
    white-space: nowrap !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide > div > a img,
  body .navbar.hidden-xs .main-nav > li:not(.menu-slide) > div > a img {
    display: none !important;
  }

  /* Center logo: visually balanced without forcing the header taller. */
  body .navbar.hidden-xs .main-nav > li.menu-item-home {
    flex: 0 0 112px !important;
    order: 1;
  }

  body .navbar.hidden-xs .main-nav > li.menu-item-home > div,
  body .navbar.hidden-xs .main-nav > li.menu-item-home > div > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-item-home > div > a {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-item-home > div > a img {
    display: block !important;
    width: auto !important;
    height: 88px !important;
    max-width: 112px !important;
    max-height: 88px !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  body .navbar.hidden-xs .main-nav > li.Contact-wrapper,
  body .navbar.hidden-xs .main-nav > li:not(.menu-slide):not(.menu-item-home) {
    order: 2;
  }

  body .navbar.hidden-xs .main-nav > li > div > a,
  body .navbar.hidden-xs .main-nav > li > a {
    font-family: "Open Sans", Helvetica, Arial, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    letter-spacing: .04em !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  /* Prevent the menu's nested links from permanently overlaying the hero. */
  body .navbar.hidden-xs .main-nav > li > ul,
  body .navbar.hidden-xs .main-nav > li > div > ul,
  body .navbar.hidden-xs .main-nav > li .sub-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    z-index: 1100 !important;
    min-width: 210px !important;
    padding: 8px !important;
    margin: 0 !important;
    list-style: none !important;
    background: rgba(30, 100, 98, .98) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.18) !important;
  }

  body .navbar.hidden-xs .main-nav > li:hover > ul,
  body .navbar.hidden-xs .main-nav > li:focus-within > ul,
  body .navbar.hidden-xs .main-nav > li:hover > div > ul,
  body .navbar.hidden-xs .main-nav > li:focus-within > div > ul,
  body .navbar.hidden-xs .main-nav > li:hover .sub-menu,
  body .navbar.hidden-xs .main-nav > li:focus-within .sub-menu {
    display: block !important;
  }

  body .navbar.hidden-xs .main-nav ul li,
  body .navbar.hidden-xs .main-nav ul li a {
    display: block !important;
    width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  body .navbar.hidden-xs .main-nav ul li a {
    padding: 10px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #fff !important;
    white-space: normal !important;
    text-decoration: none !important;
  }

  body .navbar.hidden-xs .main-nav ul li a:hover {
    background: rgba(255,255,255,.13) !important;
    border-radius: 5px !important;
  }

  /* Mobile navigation must not leak into the desktop layout. */
  body #mobile-nav,
  body .sm-navbar.visible-xs {
    display: none !important;
  }
}

@media (max-width: 767px) {
  body .navbar.hidden-xs { display: none !important; }
  body .sm-navbar.visible-xs {
    display: block !important;
    position: relative !important;
    z-index: 1000 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 14px !important;
    background: rgba(91, 190, 183, .97) !important;
    box-sizing: border-box !important;
  }

  body .sm-navbar .navbar-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 78px !important;
  }

  body .sm-navbar .main-menu {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    list-style: none !important;
  }

  body .sm-navbar .small-logo img {
    display: block !important;
    width: auto !important;
    height: 58px !important;
    max-width: 74px !important;
    object-fit: contain !important;
  }

  body .sm-navbar .reorder { margin-left: auto !important; }
  body .sm-navbar .reorder > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    color: #fff !important;
    font-size: 24px !important;
    border: 1px solid rgba(255,255,255,.65) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
  }

  body #mobile-nav {
    display: block !important;
    position: absolute !important;
    top: 78px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1200 !important;
    background: rgba(30, 100, 98, .98) !important;
  }

  body #flyout-container {
    overflow: hidden;
    height: 0;
  }
  body.mobile-nav-show #flyout-container {
    height: auto;
  }

  body #mobile-nav .flyout-menu {
    margin: 0 !important;
    padding: 8px 14px 14px !important;
    list-style: none !important;
  }

  body #mobile-nav .flyout-menu > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,.18) !important;
  }

  body #mobile-nav .flyout-menu > li > a {
    display: block !important;
    padding: 13px 10px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    color: #fff !important;
    text-decoration: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .navbar.hidden-xs *,
  body #mobile-nav * {
    transition: none !important;
    animation: none !important;
  }
}

/* Definitive fix: theme JS adds hover-active; neutralize that state on header links. */
@media (min-width: 768px) {
  body .navbar.hidden-xs .main-nav > li.hover-active,
  body .navbar.hidden-xs .main-nav > li.hover-active > div,
  body .navbar.hidden-xs .main-nav > li.hover-active > div > a,
  body .navbar.hidden-xs .main-nav > li.hover-active > a,
  body .navbar.hidden-xs .main-nav > li.hover-active > div > a span,
  body .navbar.hidden-xs .main-nav > li.hover-active > a span,
  body .navbar.hidden-xs .main-nav > li.hover-active > div > a img,
  body .navbar.hidden-xs .main-nav > li.hover-active > a img {
    background: transparent !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    outline: none !important;
  }

  body .navbar.hidden-xs .main-nav > li.menu-slide.hover-active > div > a {
    border-color: rgba(255,255,255,.9) !important;
    background: transparent !important;
  }

  body .navbar.hidden-xs .main-nav > li.hover-active:not(.menu-slide) > div > a,
  body .navbar.hidden-xs .main-nav > li.hover-active:not(.menu-slide) > a {
    padding-top: inherit !important;
    padding-bottom: inherit !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  body .navbar.hidden-xs .main-nav > li.hover-active > div > a::before,
  body .navbar.hidden-xs .main-nav > li.hover-active > div > a::after,
  body .navbar.hidden-xs .main-nav > li.hover-active > a::before,
  body .navbar.hidden-xs .main-nav > li.hover-active > a::after {
    content: none !important;
    display: none !important;
  }
}
@media (max-width: 767px) {
  body .sm-navbar .hover-active,
  body .sm-navbar .hover-active > a,
  body .sm-navbar .hover-active > div > a,
  body #mobile-nav .hover-active,
  body #mobile-nav .hover-active > a {
    background: transparent !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    outline: none !important;
  }
}
