/* The DRX clear glass treatment, shared by public page templates. */
:root {
  --ct-glass-blur: 8px;
  --ct-glass-radius: 26px;
  --ct-glass-reflections: linear-gradient(180deg,
    rgb(255 255 255 / .29), rgb(255 255 255 / .05) 13%, transparent 30% 76%, rgb(255 255 255 / .15));
  --ct-glass-inner-rim: inset 0 1px 1px rgb(255 255 255 / .56), inset 0 -1px 1px rgb(255 255 255 / .32);
  --ct-glass-halo: 0 14px 32px rgb(9 49 78 / .13), 0 15px 58px 3px rgb(24 149 207 / .16);
}
.ct-glass-playback {
  position: absolute;
  z-index: 2;
  inset: auto 12px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border: 1px solid rgb(255 255 255 / .46);
  border-radius: 999px;
  color: #fff;
  background: var(--ct-glass-reflections);
  box-shadow: var(--ct-glass-inner-rim), 0 2px 9px rgb(0 0 0 / .21);
  transition: opacity .24s ease, transform .24s ease;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ct-glass-playback {
    -webkit-backdrop-filter: blur(var(--ct-glass-blur)) saturate(115%);
    backdrop-filter: blur(var(--ct-glass-blur)) saturate(115%);
  }
}
.ct-glass-playback[hidden],
.ct-glass-playback [hidden] { display: none; }
.ct-glass-playback button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  font: 650 14px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease;
}
.ct-glass-playback .ct-glass-play-button {
  padding: 0;
  background: rgb(255 255 255 / .07);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / .3);
}
.ct-glass-playback .ct-glass-fullscreen-button { padding: 0; }
.ct-glass-playback svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 1px 2px rgb(0 0 0 / .8));
}
.ct-glass-playback .ct-glass-sound-button {
  min-width: 65px;
  text-shadow: 0 1px 2px rgb(0 0 0 / .55);
}
.ct-glass-playback button:focus-visible,
.ct-glass-playback input:focus-visible {
  outline: 2px solid #d2f5ff;
  outline-offset: 1px;
  background-color: rgb(255 255 255 / .14);
}
.ct-glass-playback button:active { background-color: rgb(255 255 255 / .20); }
.ct-glass-playback input {
  --ct-glass-progress: 0%;
  --ct-glass-track-height: 6px;
  --ct-glass-thumb-size: 14px;
  --ct-glass-track:
    linear-gradient(180deg, #fff, rgb(227 231 236 / .94)) left / var(--ct-glass-progress) 100% no-repeat,
    linear-gradient(180deg, rgb(255 255 255 / .34), rgb(255 255 255 / .17));
  --ct-glass-track-highlight: inset 0 1px 1px rgb(0 0 0 / .23), 0 0 0 1px rgb(0 0 0 / .23),
    0 1px 2px rgb(0 0 0 / .25);
  --ct-glass-thumb:
    radial-gradient(ellipse at 32% 18%, #fff, transparent 55%),
    linear-gradient(155deg, rgb(255 255 255 / .83), rgb(255 255 255 / .39));
  --ct-glass-thumb-shadow: inset 0 -1px 2px rgb(48 53 60 / .28), 0 1px 3px rgb(0 0 0 / .38),
    0 0 6px rgb(255 255 255 / .24);
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 0;
  width: 100%;
  min-width: 24px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #f5fbff;
  cursor: pointer;
  touch-action: pan-y;
}
.ct-glass-playback input:disabled { opacity: .46; cursor: default; }
.ct-glass-playback input::-webkit-slider-runnable-track {
  height: var(--ct-glass-track-height);
  border-radius: 999px;
  background: var(--ct-glass-track);
  box-shadow: var(--ct-glass-track-highlight);
}
.ct-glass-playback input::-moz-range-track {
  height: var(--ct-glass-track-height);
  border-radius: 999px;
  background: var(--ct-glass-track);
  box-shadow: var(--ct-glass-track-highlight);
}
.ct-glass-playback input::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: var(--ct-glass-thumb-size);
  height: var(--ct-glass-thumb-size);
  margin-top: calc((var(--ct-glass-track-height) - var(--ct-glass-thumb-size)) / 2);
  border: 1px solid rgb(255 255 255 / .84);
  border-radius: 50%;
  background: var(--ct-glass-thumb);
  box-shadow: var(--ct-glass-thumb-shadow);
}
.ct-glass-playback input::-moz-range-thumb {
  box-sizing: border-box;
  width: var(--ct-glass-thumb-size);
  height: var(--ct-glass-thumb-size);
  border: 1px solid rgb(255 255 255 / .84);
  border-radius: 50%;
  background: var(--ct-glass-thumb);
  box-shadow: var(--ct-glass-thumb-shadow);
}
.ct-glass-playback input:active {
  --ct-glass-thumb-shadow: inset 0 -1px 2px rgb(48 53 60 / .28), 0 1px 3px rgb(0 0 0 / .38),
    0 0 8px rgb(255 255 255 / .42);
}
@media (hover: hover) and (pointer: fine) {
  .ct-glass-playback button:hover { background-color: rgb(255 255 255 / .14); }
  .ct-glass-video-frame.ct-glass-controls-idle:not(:focus-within) .ct-glass-playback {
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
  }
}
@media (pointer: coarse), (max-width: 600px) {
  :root { --ct-glass-blur: 4px; }
  .ct-glass-playback {
    inset: auto 7px 7px;
    gap: 3px;
    padding: 2px 4px;
  }
  .ct-glass-playback .ct-glass-sound-button { padding-inline: 7px; min-width: 60px; }
}
.ct-glass-video-frame.ct-glass-fullscreen {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background: #061f33;
  box-shadow: none;
}
html body .ct-glass-video-frame.ct-glass-fullscreen > video { height: 100%; object-fit: contain; }
.ct-glass-fullscreen .ct-glass-playback {
  inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  margin-inline: auto;
  max-width: 46rem;
}
@media (prefers-reduced-motion: reduce) {
  .ct-glass-playback, .ct-glass-playback button { transition: none; }
  .ct-glass-video-frame.ct-glass-controls-idle:not(:focus-within) .ct-glass-playback { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .ct-glass-playback {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (forced-colors: active) {
  .ct-glass-playback { color: ButtonText; background: Canvas; border-color: ButtonText; }
  .ct-glass-playback input { appearance: auto; -webkit-appearance: auto; }
  .ct-glass-playback svg { filter: none; }
  .ct-glass-playback .ct-glass-sound-button { text-shadow: none; }
  .ct-glass-playback button:focus-visible, .ct-glass-playback input:focus-visible { outline-color: Highlight; }
}

/* Match the staggered photo pair on the Neck Pain page. */
html body :is(.back-image-stack, .neck-image-stack, .frozen-image-stack,
  .spine-condition-page .spine-image-stack):has(> img + img) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 16px;
  min-height: 0;
  aspect-ratio: auto;
}

html body :is(.back-image-stack, .neck-image-stack, .frozen-image-stack,
  .spine-condition-page .spine-image-stack):has(> img + img) > img:is(:first-child, :last-child) {
  position: static;
  display: block;
  box-sizing: border-box;
  width: 78%;
  /* Several regional photos set the crop or height inline. */
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 30px;
  box-shadow: 0 24px 70px rgb(8 40 64 / .12);
}

html body :is(.back-image-stack, .neck-image-stack, .frozen-image-stack,
  .spine-condition-page .spine-image-stack):has(> img + img) > img:last-child {
  justify-self: end;
}

/* Apply the glass finish without changing the photo dimensions. */
html body .ct-glass-photo.ct-glass-photo,
html body .ct-glass-figure.ct-glass-figure,
html body .ct-glass-video-frame.ct-glass-video-frame {
  border-radius: var(--ct-glass-radius) !important;
  box-shadow: var(--ct-glass-halo) !important;
}

html body .ct-glass-photo.ct-glass-photo {
  outline: 1px solid rgb(232 249 255 / .70);
  outline-offset: -1px;
}

html body .ct-glass-figure.ct-glass-figure,
html body .ct-glass-video-frame.ct-glass-video-frame {
  overflow: hidden;
}

.ct-glass-anchor { position: relative; }
.ct-glass-video-wrap { display: block; width: 100%; min-width: 0; }
.ct-glass-video-wrap > video { display: block; width: 100%; margin: 0; }
.ct-glass-video-frame > :is(.dalfino-video-preview, .test-video-cover) { z-index: 3; }
.ct-glass-video-frame:has(> .dalfino-video-preview:not([hidden])) > .ct-glass-playback { visibility: hidden; }

html body .ct-glass-figure.ct-glass-figure::after,
html body .ct-glass-video-frame.ct-glass-video-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgb(160 218 240 / .30);
  border-top-color: rgb(239 251 255 / .78);
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / .18), transparent 9px,
    transparent calc(100% - 7px), rgb(255 255 255 / .11));
  box-shadow: inset 0 1px 1px rgb(255 255 255 / .43), inset 0 -1px 1px rgb(255 255 255 / .22);
  pointer-events: none;
}

html body .ct-glass-video-frame.ct-glass-fullscreen {
  border-radius: 0 !important;
  box-shadow: none !important;
}
html body .ct-glass-video-frame.ct-glass-fullscreen::after { content: none; }

html body :is(a, button, input).ct-glass-action.ct-glass-action {
  --ct-glass-button-ink: #183b5a;
  --ct-glass-button-edge: rgb(64 102 128 / .29);
  --ct-glass-button-depth: 0 2px 9px rgb(9 38 61 / .12);
  box-sizing: border-box;
  max-inline-size: 100%;
  border-radius: 999px !important;
  border: 1px solid var(--ct-glass-button-edge) !important;
  color: var(--ct-glass-button-ink) !important;
  background: var(--ct-glass-reflections) !important;
  box-shadow: var(--ct-glass-inner-rim), var(--ct-glass-button-depth) !important;
  text-align: center;
  white-space: normal;
  transition: box-shadow .18s ease, transform .18s ease;
}
html body :is(a, button, input).ct-glass-action.ct-glass-action-primary {
  --ct-glass-button-ink: #075181;
  --ct-glass-button-edge: rgb(8 104 165 / .44);
  --ct-glass-button-depth: 0 3px 11px rgb(11 85 135 / .19);
  font-weight: 700;
}
html body :is(a, button, input).ct-glass-action.ct-glass-action-on-dark {
  --ct-glass-button-ink: #fff;
  --ct-glass-button-edge: rgb(255 255 255 / .46);
  --ct-glass-button-depth: 0 3px 12px rgb(0 0 0 / .22);
  text-shadow: 0 1px 2px rgb(0 0 0 / .58);
}
html body :is(a, button, input).ct-glass-action-primary.ct-glass-action-on-dark {
  --ct-glass-button-edge: rgb(201 241 255 / .75);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html body :is(a, button, input).ct-glass-action {
    -webkit-backdrop-filter: blur(var(--ct-glass-blur)) saturate(115%) !important;
    backdrop-filter: blur(var(--ct-glass-blur)) saturate(115%) !important;
  }
}
@media (hover: hover) and (pointer: fine) {
  html body :is(a, button, input).ct-glass-action.ct-glass-action:hover:not(:disabled) {
    --ct-glass-button-depth: 0 5px 15px rgb(11 85 135 / .23);
    transform: translateY(-1px);
  }
}
html body :is(a, button, input).ct-glass-action.ct-glass-action:focus-visible {
  outline: 2px solid #0879cc;
  outline-offset: 3px;
}
html body :is(a, button, input).ct-glass-action-on-dark:focus-visible { outline-color: #d2f5ff; }
html body :is(button, input).ct-glass-action:disabled { opacity: .6; cursor: not-allowed; }


@media (max-width: 900px) {
  html body .condition-hero-grid-standard,
  html body .treatment-intro { min-width: 0; }
  html body :is(.condition-three, .condition-related, .regional-condition-grid, .home-condition-grid, #clinic-blog-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  html body :is(.condition-three, .condition-related, .regional-condition-grid, .home-condition-grid, #clinic-blog-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (pointer: coarse), (max-width: 600px) {
  :root {
    --ct-glass-radius: 24px;
    --ct-glass-halo: 0 9px 22px rgb(9 49 78 / .12), 0 10px 35px rgb(24 149 207 / .14);
  }
}
@media (prefers-reduced-motion: reduce) {
  html body :is(a, button, input).ct-glass-action.ct-glass-action { transition: none; }
  html body :is(a, button, input).ct-glass-action.ct-glass-action:hover:not(:disabled) { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  html body :is(a, button, input).ct-glass-action {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
@media (forced-colors: active) {
  html body :is(a, button, input).ct-glass-action.ct-glass-action {
    color: LinkText !important;
    border-color: LinkText !important;
  }
  html body :is(a, button, input).ct-glass-action.ct-glass-action:focus-visible { outline-color: Highlight; }
}

/* Match the smaller hero columns without restoring the old tablet size jumps. */
@media (max-width: 900px) {
  html body .home-page .home-hero h1 {
    font-size: clamp(2rem, calc(.85rem + 5vw), 3.75rem);
  }
  html body .lp-page .lp-hero h1 {
    font-size: clamp(2rem, calc(1rem + 4.5vw), 3.5rem);
  }
}
