/* ==========================================================================
   PAGE ASSETS -> CSS
   post: "At What Age Should Your Child Get Braces? Why Waiting Until 13
   Could Be a $2,000 Mistake"
   Site Assets Manager -> edit the post -> "Page Assets" -> CSS

   Loads on this post only. It adds nothing that Blog CSS already provides
   (quick-summary-box, faq-section, cta-band, green-link and the base
   typography all come from Blog CSS) and only styles what this article
   introduces: the two before/after comparison sliders.

   This post intentionally matches the plain baseline pattern used by the
   Sep-28 "Digital Implant Planning" post -- drag only, no hover-lift, no
   scroll-entrance-reveal. The hover/entrance treatment on the Oct-3 ortho
   post was a one-off enhancement requested specifically for that post; the
   user asked this time for zero visual/structural difference from the
   established baseline, so it is intentionally not repeated here.

   Every selector is written under .damico-blog-container twice, the same
   trick Blog CSS uses, so these rules tie with the legacy layer and win on
   source order because page CSS is enqueued after Blog CSS.

   No backslash anywhere in this file (Rule Zero). No viewport-width units,
   no forced-nowrap, and nothing here hides content pending JavaScript: each
   comparison shows two complete, real photographs at a static 50/50 split
   by default; JavaScript only lets the visitor move that split.
   ========================================================================== */

/* ── 1. Accessibility contrast fixes (same issue as the three prior posts --
   this is the fourth consecutive post needing it; a strong candidate for
   promotion to Blog CSS). Measured against white: the legacy h3 colour
   #7FB3A6 is 2.4:1 (needs 3:1 even for large text) and the callback button
   white-on-#3F8F7D is 3.9:1 (needs 4.5:1). Same hues, darker values: 6.0:1
   for both. Delete either rule to fall back to the site-wide look, or
   promote it to Blog CSS. */
.damico-blog-container.damico-blog-container h3 {
  color: #2f6d5f;
}
.damico-blog-container.damico-blog-container .cta-btn-callback {
  background: #2f6d5f;
}
.damico-blog-container.damico-blog-container .cta-btn-callback:hover,
.damico-blog-container.damico-blog-container .cta-btn-callback:focus-visible {
  background: #245a4e;
}

/* ── 2. Before / after comparison (two single-pair instances on this page) ── */
.damico-blog-container.damico-blog-container .childortho-compare-wrap {
  margin: 32px 0;
}
.damico-blog-container.damico-blog-container .childortho-compare {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 58, 92, 0.14);
}
.damico-blog-container.damico-blog-container .childortho-compare__frame {
  position: relative;
  overflow: hidden;
  background: #0d2436;
  --pos: 50%;
}
.damico-blog-container.damico-blog-container .childortho-compare__img {
  user-select: none;
  pointer-events: none;
}
/* The "after" photo stays in normal document flow: a plain, full-width image
   that sizes itself from its own real width/height attributes (both pairs
   are verified 1920x1080 and 1625x1080). That is what gives the frame its
   height, so the comparison still shows a real, correctly-proportioned
   photograph even in a browser or environment where this stylesheet -- or
   any part of it -- fails to load or apply. Nothing depends on aspect-ratio
   support or on this specific selector matching. */
.damico-blog-container.damico-blog-container .childortho-compare__img--after {
  display: block;
  width: 100%;
  height: auto;
  z-index: 1;
}
/* The "before" photo is the only piece that needs absolute positioning: it
   overlays the now-correctly-sized frame and gets clipped to reveal the
   photo underneath. */
.damico-blog-container.damico-blog-container .childortho-compare__img--before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.damico-blog-container.damico-blog-container .childortho-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 3;
  width: 3px;
  margin-left: -1.5px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(13, 36, 54, 0.18);
  pointer-events: none;
}
.damico-blog-container.damico-blog-container .childortho-compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  color: #1b3a5c;
  box-shadow: 0 4px 14px rgba(13, 36, 54, 0.3);
}
/* !important on every background below is a defensive fix: a sitewide CSS
   rule forces <input> backgrounds to opaque white, which otherwise hides
   the photographs underneath this range input (found and fixed on the
   Sep-28 post, confirmed again on the Oct-3 post -- shipped from day one
   here rather than rediscovered live a third time). */
.damico-blog-container.damico-blog-container .childortho-compare__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: ew-resize;
  touch-action: pan-y;
}
.damico-blog-container.damico-blog-container .childortho-compare__range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent !important;
}
.damico-blog-container.damico-blog-container .childortho-compare__range::-moz-range-track {
  height: 100%;
  background: transparent !important;
  border: 0;
}
.damico-blog-container.damico-blog-container .childortho-compare__range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 8px;
  height: 100%;
  background: transparent !important;
  border: 0;
  cursor: ew-resize;
}
.damico-blog-container.damico-blog-container .childortho-compare__range::-moz-range-thumb {
  width: 8px;
  height: 100%;
  background: transparent !important;
  border: 0;
  cursor: ew-resize;
}
.damico-blog-container.damico-blog-container .childortho-compare__range:focus-visible {
  outline: none;
}
.damico-blog-container.damico-blog-container .childortho-compare__frame:focus-within {
  box-shadow: inset 0 0 0 3px #c9a84c;
}

/* ── 3. Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .damico-blog-container.damico-blog-container .childortho-compare-wrap {
    margin: 24px 0;
  }
  .damico-blog-container.damico-blog-container .childortho-compare__handle {
    width: 36px;
    height: 36px;
  }
}

/* ── 4. CTA phone-number overflow guard (identical fix to the three prior
   posts; the same phone number, so the same fix is needed again here -- a
   fourth sign this belongs in Blog CSS, not repeated per page). ──────────── */
.damico-blog-container.damico-blog-container .cta-band__label {
  display: inline;
}
.damico-blog-container.damico-blog-container .cta-band__number {
  display: inline-block;
}
.damico-blog-container.damico-blog-container .cta-band__email {
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .damico-blog-container.damico-blog-container .cta-band__place {
    text-align: left;
    text-wrap: balance;
  }
}
@media (max-width: 520px) {
  .damico-blog-container.damico-blog-container .cta-btn-call,
  .damico-blog-container.damico-blog-container .cta-btn-callback {
    padding: 14px 16px !important;
    font-size: 1.05em;
  }
  .damico-blog-container.damico-blog-container .cta-band__label {
    text-wrap: balance;
  }
  .damico-blog-container.damico-blog-container .cta-band__number {
    display: block;
  }
}
@media (max-width: 400px) {
  .damico-blog-container.damico-blog-container .cta-band {
    padding: 26px 14px;
  }
  .damico-blog-container.damico-blog-container .cta-band__email {
    font-size: 0.94em;
  }
}
@media (max-width: 360px) {
  .damico-blog-container.damico-blog-container .cta-band__email {
    gap: 6px;
    font-size: 0.86em;
  }
}

/* ── 4b. CTA button box-sizing fix (latent, sitewide Blog CSS bug, first
   found and fixed on the Oct-3 ortho post -- see that post's status doc).
   Blog CSS's own .cta-buttons-wrapper a rule applies 15px/30px padding on
   box-sizing: content-box, and its own <=520px rule then sets that same
   element to width: 100% -- the padding adds on top of the 100% content
   box instead of being absorbed into it, overflowing the button by about
   60px on narrow phones. box-sizing: border-box fixes the sizing math
   directly; !important is required above on this page's own small-screen
   padding override too, because a bare type selector like "...wrapper a"
   outranks a class selector at equal class-count, so Blog CSS's rule would
   otherwise win on specificity even though this file loads after it. */
.damico-blog-container.damico-blog-container .cta-buttons-wrapper a {
  box-sizing: border-box !important;
}

/* ── 5. Reduced motion ────────────────────────────────────────────────────
   Nothing on this page animates by default (the comparison split moves
   only in direct, 1:1 response to a drag or key press, never on its own),
   so this only guarantees the focus/hover colour changes above don't pick
   up an implied transition from elsewhere in the stylesheet cascade. */
@media (prefers-reduced-motion: reduce) {
  .damico-blog-container.damico-blog-container .cta-btn-callback,
  .damico-blog-container.damico-blog-container .childortho-compare__frame {
    transition: none;
  }
}