/* SavedWorld.org™ static site overrides (Cloudflare Pages)
   IMPORTANT: keep the original look/feel; only fix functional issues. */

/* --- Technologies gallery --- */
body.page-id-156 .sw-tech-gallery{
  margin: 24px auto 0;
  max-width: 1100px;
  padding: 0 16px 24px;
}
body.page-id-156 .sw-tech-track{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 900px){
  body.page-id-156 .sw-tech-track{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  body.page-id-156 .sw-tech-track{
    grid-template-columns: 1fr;
  }
}
body.page-id-156 .sw-tech-card{
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
body.page-id-156 .sw-tech-card img{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
@media (max-width: 560px){
  body.page-id-156 .sw-tech-card img{ height: 220px; }
}

/* Hide the 3 original bottom image blocks (we re-render them cleanly as a gallery). */
body.page-id-156 .p-xly6182,
body.page-id-156 .p-67i4318,
body.page-id-156 .p-wel2315{
  display: none !important;
}

/* --- Subtle text polish (no heavy gray panels) --- */
.pagelayer-text-holder p{
  line-height: 1.65 !important;
}
.pagelayer-text-holder p strong,
.pagelayer-text-holder li strong{
  background: linear-gradient(transparent 62%, rgba(34, 139, 34, 0.22) 0) !important;
  padding: 0 2px !important;
  border-radius: 4px !important;
}
.pagelayer-text-holder a{
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}
.pagelayer-text-holder h2,
.pagelayer-text-holder h3{
  letter-spacing: .2px !important;
}
.pagelayer-text-holder h2:after{
  content:"";
  display:block;
  width: 56px;
  height: 3px;
  margin-top: 8px;
  background: rgba(64,84,178,0.85);
  border-radius: 999px;
}

/* Fix DisinfectClean feature card text stacking */
.pagelayer-service-text h6{
  display:block !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.25 !important;
}
.pagelayer-service-text h6 + h6{
  font-weight: 400 !important;
  opacity: 0.95 !important;
}


/* --- Brand readability (match homepage palette) --- */
.pagelayer-header .pagelayer-wp-title-holder{
  color: #ffffff !important;
}
.pagelayer-header .pagelayer-wp-title-link{
  color: #ffffff !important;
}

/* Footer text + links should be readable */
.pagelayer-footer,
.pagelayer-footer *{
  color: #ffffff !important;
}
.pagelayer-footer a{
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.pagelayer-footer a:hover{
  opacity: 0.9;
}

/* --- Subtle, site-wide readability polish (keeps original layout) --- */
.entry-content{
  line-height: 1.65;
}
.entry-content p{
  margin-bottom: 0.9em;
}
.entry-content ul,
.entry-content ol{
  padding-left: 1.25em;
}
.entry-content li{
  margin: 0.35em 0;
}

/* Headings: add a small accent rule (very light visual detail) */
.entry-content h2,
.entry-content h3{
  position: relative;
}
.entry-content h2::after{
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(219, 52, 60, 0.95);
  opacity: 0.85;
}
.entry-content h3::after{
  content: "";
  display: block;
  width: 54px;
  height: 2px;
  border-radius: 2px;
  margin-top: 9px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(219, 52, 60, 0.95);
  opacity: 0.75;
}

/* --- Technologies page: de-clump the image strip near the bottom --- */
.page-id-156 .p-thy4847 .pagelayer-row-holder{
  gap: 24px !important;
  row-gap: 24px !important;
}
.page-id-156 .p-thy4847 .pagelayer-image-holder{
  margin: 10px 0 !important;
}

/* --- Image safety: prevent stretched/squished images from fixed heights --- */
.pagelayer-image img,
.entry-content img,
.wp-block-image img{
  max-width: 100% !important;
  height: auto !important;
}

/* Pojo plugin assets are not shipped in static export */

/* Header logo injected by site-fixes.js */
.rw-title-with-logo{display:flex;align-items:center;gap:10px;line-height:1;}
.rw-header-logo{height:clamp(40px,3.2vw,54px);width:auto;flex:0 0 auto;filter:drop-shadow(0 1px 0 rgba(0,0,0,.25));}

/* Header logo (injected by site-fixes.js) */
.rw-title-with-logo{display:flex;align-items:center;gap:10px;line-height:1;}
.rw-header-logo{height:clamp(40px,3.2vw,54px);width:auto;flex:0 0 auto;filter:drop-shadow(0 1px 0 rgba(0,0,0,.25));}

/* -----------------------------
   SavedWorld.org™ overrides
   ----------------------------- */

/* Ensure header brand area is stable and the logo sits next to the title */
a.pagelayer-wp-title-holder.sw-brand-link,
a.pagelayer-wp-title-holder.sw-brand-link,
.pagelayer-wp-title-link.sw-brand-link,
a.pagelayer-wp_title_link.sw-brand-link,
.site-title a.sw-brand-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

img.sw-site-logo {
  height: 52px !important;
  width: auto !important;
  max-width: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Hide Pojo toolbar markup from WP exports (we provide our own working toolbar) */
#pojo-a11y-toolbar,
.pojo-a11y-toolbar-overlay,
.pojo-a11y-toolbar-toggle,
.pojo-a11y-toolbar-items {
  display: none !important;
}

/* -----------------------------
   Accessibility toolbar (custom)
   ----------------------------- */
#sw-a11y-root {
  /* Keep the wrapper from affecting page layout.
     The button/panel are positioned fixed (see below). */
  position: static;
  width: 0;
  height: 0;
  z-index: 2147483647;
  filter: none !important; /* don't inherit page filters */
}

.sw-a11y-fab {
  position: fixed !important;
  left: 16px !important;
  bottom: 16px !important;
  z-index: 2147483647 !important;
  border: 0;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

.sw-a11y-panel {
  position: fixed !important;
  left: 16px !important;
  bottom: 72px !important;
  z-index: 2147483647 !important;
  width: 260px;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.sw-a11y-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.sw-a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sw-a11y-grid button {
  border: 0;
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  font-weight: 700;
}

.sw-a11y-reset {
  grid-column: span 2;
}

.sw-a11y-hint {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.85;
}

/* A11y effects */
html { --sw-contrast: contrast(1); --sw-gray: grayscale(0); --sw-invert: invert(0); --sw-huerotate: hue-rotate(0deg); }

html.sw-a11y-contrast { --sw-contrast: contrast(1.15); }
html.sw-a11y-gray     { --sw-gray: grayscale(1); }
html.sw-a11y-invert    { --sw-invert: invert(1); --sw-huerotate: hue-rotate(180deg); }

body {
  filter: var(--sw-contrast) var(--sw-gray) var(--sw-invert) var(--sw-huerotate);
}

html.sw-a11y-underline a { text-decoration: underline !important; }

html.sw-a11y-readable body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
}

html.sw-a11y-lightbg body {
  background: #ffffff !important;
  color: #111111 !important;
}

html[data-sw-font="1"] { font-size: 112.5%; }
html[data-sw-font="2"] { font-size: 125%; }

/* Don't filter our a11y UI even when page filter is active */
html.sw-a11y-contrast #sw-a11y-root,
html.sw-a11y-gray #sw-a11y-root,
html.sw-a11y-invert #sw-a11y-root {
  filter: none !important;
}

/* Technologies carousel: keep the hero/illustration from being cropped */
.sw-tech-slide img[alt="SavedWorld technology illustration"] {
  object-fit: contain !important;
  height: 360px !important;
}

@media (max-width: 520px){
  img.sw-site-logo{ height: 42px !important; }
}