
/* Static-site helpers: cover-crop banners/galleries, visible type, mobile nav, forms, lightbox */

img.thumb-image, img[data-src], .sqs-block-image img, .sqs-gallery img, .sqs-block-gallery img,
.sqs-col img, .image-block-wrapper img, .content-fill img, img.loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Regular (non-cover) images stay fluid so they don't elongate pages */
.sqs-block-image .image-block-wrapper:not(.content-fill) img,
.image-block-wrapper:not(.content-fill) img {
  max-width: 100%;
  height: auto;
}

/* Banner page-thumbnail and any .content-fill frame: cover-crop, don't stretch the page */
#page-thumb,
body.page-thumbnail-as-banner #page-thumb,
.content-fill {
  overflow: hidden !important;
}
body.page-thumbnail-as-banner #page-thumb img,
#page-thumb img,
.content-fill > img,
a.image-slide-anchor img,
.sqs-gallery-block-grid .slide img,
.sqs-gallery-design-grid .slide img,
.sqs-gallery .slide img,
.content-wrapper.content-fill img {
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Keep grid cells as boxes (site.css already sets padding-bottom aspect ratios) */
.sqs-gallery-block-grid .slide .margin-wrapper a.image-slide-anchor,
.sqs-gallery-design-grid .slide a.image-slide-anchor,
.sqs-gallery-block-grid .content-fill,
a.image-slide-anchor.content-fill {
  display: block;
  position: relative;
  overflow: hidden;
}

/* Collection galleries: Squarespace JS normally grids .sqs-system-gallery.
   Reproduce that as a 4-across cropped grid (header block grids stay visible too). */
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slides {
  display: flex;
  flex-wrap: wrap;
}
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide {
  box-sizing: border-box;
  width: 25%;
  position: relative;
  overflow: hidden;
  height: 0;
  padding-bottom: 16.666%; /* 4-col 3:2, matches gallery-aspect-ratio-32-standard */
  margin: 0;
}
body.collection-type-gallery.gallery-design-grid.gallery-aspect-ratio-11-square .sqs-system-gallery .slide {
  padding-bottom: 25%;
}
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide img,
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide a {
  position: absolute !important;
  top: 0; left: 0; width: 100% !important; height: 100% !important;
  object-fit: cover !important;
}
@media (max-width: 1024px) {
  body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide {
    width: 33.333%;
    padding-bottom: 22.222%;
  }
}
@media (max-width: 640px) {
  body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide {
    width: 50%;
    padding-bottom: 33.333%;
  }
}

/* Slideshow thumbnail strip — don't let thumbs stack at full photo size */
.sqs-gallery-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 0 10px;
  height: auto !important;
}
.sqs-gallery-thumbnails img {
  position: static !important;
  width: 40px !important;
  height: 30px !important;
  object-fit: cover !important;
  flex: 0 0 auto;
  max-width: 40px !important;
}

/* Slideshow + slider galleries: Squarespace JS shows one frame at a time.
   Without it, every photo stacks at full size and the page becomes enormous. */
.sqs-gallery-block-slideshow .sqs-gallery,
.sqs-gallery-block-slider .sqs-gallery {
  position: relative;
  height: 0;
  padding-bottom: 66.666%;
  overflow: hidden;
}
.sqs-gallery-block-slideshow .sqs-gallery .slide {
  position: absolute !important;
  top: 0; left: 0; width: 100% !important; height: 100% !important;
  overflow: hidden;
  display: none;
}
.sqs-gallery-block-slideshow .sqs-gallery .slide.tgm-slide-active,
.sqs-gallery-block-slideshow:not(.tgm-gallery-ready) .sqs-gallery .slide:first-child {
  display: block;
}
.sqs-gallery-block-slideshow .sqs-gallery .slide img,
.sqs-gallery-block-slider .sqs-gallery > img {
  position: absolute !important;
  top: 0; left: 0; width: 100% !important; height: 100% !important;
  object-fit: cover !important;
  max-width: none !important;
}
.sqs-gallery-block-slider .sqs-gallery > img { display: none; }
.sqs-gallery-block-slider .sqs-gallery > img.tgm-slide-active,
.sqs-gallery-block-slider:not(.tgm-gallery-ready) .sqs-gallery > img:first-of-type { display: block; }
.sqs-gallery-controls { position: relative; z-index: 2; text-align: center; padding: 8px 0; }
.sqs-gallery-controls a { cursor: pointer; }

/* YouTube / embed: keep the 16:9 box even after we inject the iframe */
.embed-block-wrapper,
.sqs-video-wrapper {
  position: relative;
}
.sqs-video-wrapper iframe,
.embed-block-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Typekit FOIT: keep overlay title white and the welcome line visible (live color is #787878)
   even if Adobe Fonts never finishes loading on staging / localhost. */
body.page-thumbnail-as-banner #page-title,
html.wf-loading body.page-thumbnail-as-banner #page-title,
html.wf-inactive body.page-thumbnail-as-banner #page-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.banner-content-page-title-description #page-description,
body.banner-content-page-title-description #page-description p {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #787878 !important;
  -webkit-text-fill-color: #787878 !important;
}
#page-title, #page-description, #page-description p, .page-title, .page-description p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

#mobile-navigation { display: none; }
#mobile-navigation.is-open, body.tgm-mobile-open #mobile-navigation { display: block; }
#mobile-navigation-label { cursor: pointer; }
@media only screen and (max-width: 768px) {
  #mobile-navigation { display: block; }
  #mobile-navigation ul { display: none; margin: 0; padding: 0.5em 1em 1em; list-style: none; }
  #mobile-navigation.is-open ul, body.tgm-mobile-open #mobile-navigation ul { display: block; }
  #mobile-navigation-label:after { content: "\\2630"; font-size: 28px; line-height: 1; display: inline-block; padding: 8px 12px; cursor: pointer; }
  body.tgm-mobile-open #mobile-navigation-label:after { content: "\\2715"; }
}
.tgm-contact-form { max-width: 640px; margin: 1.5em auto 0 0; padding: 0 0 2em; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.tgm-contact-form .tgm-field { margin: 0 0 1em; }
.tgm-contact-form label { display: block; font-weight: 600; margin: 0 0 0.35em; }
.tgm-contact-form input[type="text"],
.tgm-contact-form input[type="email"],
.tgm-contact-form input[type="tel"],
.tgm-contact-form input[type="date"],
.tgm-contact-form select,
.tgm-contact-form textarea {
  width: 100%; box-sizing: border-box; padding: 0.55em 0.7em; border: 1px solid #ccc; border-radius: 2px;
  font: inherit;
}
.tgm-contact-form .tgm-check label { font-weight: 400; }
.tgm-contact-form .req { color: #b00; }
.tgm-contact-form .tgm-submit {
  background: #222; color: #fff; border: 0; padding: 0.7em 1.6em; cursor: pointer; font: inherit; letter-spacing: .04em;
}
.tgm-contact-form .tgm-submit:hover { background: #444; }
.tgm-form-success, .tgm-form-error { max-width: 640px; margin: 1em auto; padding: 0.8em 1em; }

#tgm-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.88); align-items: center; justify-content: center;
}
#tgm-lightbox.is-open { display: flex; }
#tgm-lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
#tgm-lightbox button {
  position: absolute; background: transparent; color: #fff; border: 0; font-size: 42px;
  cursor: pointer; line-height: 1; padding: 8px 16px;
}
#tgm-lightbox .tgm-lb-close { top: 12px; right: 16px; }
#tgm-lightbox .tgm-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
#tgm-lightbox .tgm-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.tgm-lb-trigger { cursor: zoom-in; }

/* tgm gallery 20261113b: 7px image spacing, pager, crimson sidebar buttons, quick form */

/* ~7px around each thumbnail (grid + collection system gallery) */
.sqs-gallery-block-grid .slide .margin-wrapper,
.sqs-gallery-design-grid .slide .margin-wrapper {
  margin: 7px !important;
}
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide img,
body.collection-type-gallery.gallery-design-grid .sqs-system-gallery .slide a {
  top: 7px !important;
  left: 7px !important;
  right: 7px !important;
  bottom: 7px !important;
  width: calc(100% - 14px) !important;
  height: calc(100% - 14px) !important;
}
.sqs-gallery-thumbnails { gap: 7px; }
.sqs-gallery-block-slideshow .sqs-gallery,
.sqs-gallery-block-slider .sqs-gallery {
  box-sizing: border-box;
  /* keep aspect box; inset the visible frame */
  border: 7px solid transparent;
}

/* Opened lightbox: 7px around the photo */
#tgm-lightbox {
  padding: 7px;
  box-sizing: border-box;
}
#tgm-lightbox img {
  max-width: calc(92vw - 14px);
  max-height: calc(90vh - 14px);
  margin: 7px;
  box-sizing: border-box;
}

/* Sub-gallery prev/next row */
.tgm-gallery-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding: 0 2px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tgm-gallery-pager a,
.tgm-gallery-pager a:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
}
.tgm-gallery-pager a:hover { text-decoration: underline; }
.tgm-gallery-pager svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
}
.tgm-gallery-pager-next { margin-left: auto; }

/* Crimson call / email buttons + quick contact (gallery sidebar only) */
.tgm-sidebar-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0.8em 0 1.1em;
}
.tgm-crimson-btn,
.tgm-crimson-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #B0122B;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 0.45em 0.55em;
  border-radius: 4px;
  border: 0;
  line-height: 1.2;
  box-sizing: border-box;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}
.tgm-crimson-btn:hover { background: #8E0E22; color: #fff !important; }
.tgm-crimson-btn svg { width: 16px; height: 16px; flex: 0 0 auto; fill: currentColor; }

.tgm-quick-contact {
  margin: 0 0 1em;
  padding: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: inherit;
}
.tgm-quick-contact .tgm-qc-title {
  margin: 0 0 0.7em;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tgm-quick-contact .tgm-field { margin: 0 0 0.7em; }
.tgm-quick-contact label { display: block; font-weight: 600; margin: 0 0 0.3em; }
.tgm-quick-contact .req { color: #e22; font-weight: 700; }
.tgm-quick-contact input[type="text"],
.tgm-quick-contact input[type="tel"],
.tgm-quick-contact input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45em 0.55em;
  border: 1px solid #ccc;
  border-radius: 3px;
  font: inherit;
  color: #111;
  background: #fff;
}
.tgm-quick-contact input:invalid:focus {
  outline-color: #B0122B;
}
.tgm-quick-contact .tgm-check label { font-weight: 400; display: flex; align-items: flex-start; gap: 6px; }
.tgm-quick-contact .tgm-check input { margin-top: 0.2em; flex: 0 0 auto; }
.tgm-quick-contact .tgm-submit {
  background: #B0122B;
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 0.6em 1.1em;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
}
.tgm-quick-contact .tgm-submit:hover { background: #8E0E22; }
.tgm-quick-contact .tgm-form-success,
.tgm-quick-contact .tgm-form-error,
#tgm-form-flash.tgm-form-success,
#tgm-form-flash.tgm-form-error {
  max-width: none;
  margin: 0 0 0.8em;
  padding: 0.6em 0.7em;
  font-size: 13px;
}
.tgm-form-success, #tgm-form-flash.tgm-form-success { background: #e7f6e7; color: #145214; }
.tgm-form-error, #tgm-form-flash.tgm-form-error { background: #fde8e8; color: #8a1212; }
.tgm-honeypot { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* TGM-SEO-ENHANCE */
.tgm-related-posts {
  margin: 2em 0 1.5em;
  padding: 1.25em 0 0;
  border-top: 1px solid #ddd;
  clear: both;
}
.tgm-related-posts h2 {
  font-size: 1.25em;
  margin: 0 0 0.55em;
  color: #222;
}
.tgm-related-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tgm-related-posts li {
  margin: 0.4em 0;
}
.tgm-related-posts a {
  color: #B0122B;
  text-decoration: underline;
}
.tgm-related-posts a:hover { color: #8E0E22; }
.tgm-see-also {
  margin: 1.5em 0 0.5em;
  font-size: 1em;
  line-height: 1.5;
}
.tgm-see-also a { color: #B0122B; }
h1.tgm-archive-heading {
  font-size: 1.8em;
  line-height: 1.25;
  margin: 0.4em 0 0.8em;
  color: inherit;
  font-weight: 400;
}
