/* Static-restore helpers for the kennymarchant.com static copy. */

/* --- Official website badge (header, next to the logo) --- */
#logoImage {
  display: inline-block;
  vertical-align: middle;
}

.official-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 16px;
  padding: 4px 11px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.4;
  opacity: 0.85;
  white-space: nowrap;
}

/* --- Form success notices --- */
.restore-form-success {
  font-family: inherit;
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  border: 1px solid #b8c4cc;
  border-left: 4px solid #1c3d5a;
  background: #f4f7f9;
  color: #1c3d5a;
  font-size: 1rem;
  line-height: 1.5;
}

.restore-form-success p {
  margin: 0;
}

/* --- Slideshow fallback ---
   Without the Squarespace gallery bundle the slideshow strip
   (.sqs-gallery is a white-space:nowrap strip animated via transform,
   fixed at height:600px) spills sideways and stretches the whole page.
   Normalize the strip and show only the first slide, in normal flow so
   the container gets its height from the image. */
.sqs-gallery-block-slideshow {
  overflow: hidden;
}

.sqs-gallery-block-slideshow .sqs-gallery {
  height: auto !important;
  margin: 0;
  white-space: normal;
  transition: none;
  transform: none !important;
}

.sqs-gallery-block-slideshow .slide {
  display: none;
}

.sqs-gallery-block-slideshow .slide:first-child {
  display: block;
  position: relative;
}

.sqs-gallery-block-slideshow .slide:first-child img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
}

/* Summary/autogrid strips share the same nowrap gallery container;
   let their slides wrap instead of spilling sideways. */
.sqs-gallery-design-autogrid {
  white-space: normal;
  height: auto !important;
}

/* --- Summary block + grid gallery fallbacks (no Squarespace JS) ---
   The runtime used to add .positioned to summary items and .loaded to
   hydrated images, and it sized grid-gallery images absolutely inside
   their square anchors. Without it the news feed stays invisible and
   grid images render at natural size, spilling over the page. */
.summary-item {
  visibility: visible !important;
}

.img-wrapper img {
  opacity: 1 !important;
  transition: none;
}

.sqs-gallery-block-grid .slide .margin-wrapper a.image-slide-anchor {
  position: relative;
  overflow: hidden;
}

.sqs-gallery-block-grid .slide .margin-wrapper a.image-slide-anchor img.thumb-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sqs-gallery-block-grid::after {
  content: "";
  display: block;
  clear: both;
}

/* --- Layout fallbacks for classes the Squarespace runtime used to size ---
   The template already gives .banner-thumbnail-wrapper position:relative,
   overflow:hidden and its height via padding (180px/155px). Do NOT add
   min-height here: it applies to the content box, so padding stacks on
   top and produces a huge empty band under the banner image. */
#thumbnail.content-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
}

#thumbnail.content-fill img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Hero portrait on the homepage banner --- */
.restore-hero-portrait {
  position: absolute;
  right: 6%;
  bottom: 0;
  z-index: 5;
  height: 88%;
  max-height: 460px;
  width: auto;
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.banner-thumbnail-wrapper {
  position: relative;
}

.desc-wrapper .restore-hero-name {
  margin-bottom: 0;
}

.desc-wrapper .restore-hero-sub {
  font-size: 0.55em;
  letter-spacing: 0.06em;
  opacity: 0.92;
}

/* --- Static chart bars (district page) --- */
.restore-chart {
  padding: 12px 0;
}

.restore-chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.restore-chart-label {
  flex: 0 0 130px;
  text-align: right;
  font-size: 14px;
  color: #333;
}

.restore-chart-bar {
  flex: 1;
  height: 22px;
  background: #edf0f3;
  border: 1px solid #d5dbe1;
  border-radius: 2px;
  overflow: hidden;
}

.restore-chart-fill {
  height: 100%;
  background: #1c3d5a;
}

.restore-chart-row:nth-child(2n) .restore-chart-fill {
  background: #8b98a6;
}

.restore-chart-value {
  flex: 0 0 44px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #333;
}

/* --- Responsive guards --- */
@media (max-width: 768px) {
  .official-badge {
    display: none;
  }

  .restore-hero-portrait {
    height: 52%;
    right: 4%;
    border-width: 2px;
  }

  .restore-chart-label {
    flex-basis: 92px;
    font-size: 12px;
  }

  .restore-chart-value {
    flex-basis: 36px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .restore-hero-portrait {
    height: 42%;
  }
}

/* Visually hidden but accessible to screen readers / crawlers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Homepage "Latest News" summary: static grid (autogrid JS is gone) ---
   Squarespace sized/cropped slides at runtime; do it with plain CSS. */
.summary-block-setting-design-autogrid .summary-item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 47px;
  white-space: normal;
}

.summary-block-setting-design-autogrid .summary-item {
  width: calc((100% - 94px) / 3);
  overflow: visible;
}

.summary-block-setting-design-autogrid .summary-thumbnail-container {
  display: block;
  margin: 0 0 15px 0;
}

.summary-block-setting-design-autogrid .summary-thumbnail.img-wrapper {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.summary-block-setting-design-autogrid .summary-thumbnail.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.summary-block-setting-design-autogrid .summary-excerpt p {
  margin: 0 0 12px 0;
}

/* Carousel pager arrows are dead without the runtime. */
.summary-carousel-pager {
  display: none;
}

@media (max-width: 900px) {
  .summary-block-setting-design-autogrid .summary-item {
    width: calc((100% - 47px) / 2);
  }
}

@media (max-width: 640px) {
  .summary-block-setting-design-autogrid .summary-item-list {
    gap: 24px;
  }
  .summary-block-setting-design-autogrid .summary-item {
    width: 100%;
  }
}

/* Official records & profiles (static footer row) */
.official-links {
  text-align: center;
  padding: 1.4em 1em 0.2em;
  font-size: 12px;
  line-height: 1.6;
}
.official-links-title {
  display: block;
  margin-bottom: 0.55em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.65;
}
.official-links-list a {
  display: inline-block;
  margin: 0 0.6em 0.4em;
  color: inherit;
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}
.official-links-list a:hover,
.official-links-list a:focus-visible {
  opacity: 1;
}

/* Footer copyright line */
.official-copyright {
  text-align: center;
  padding: 0.9em 1em 0.4em;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}
