/* ==========================================================================
   PAGE ASSETS -> CSS
   post: "Digital Implant Planning vs. Traditional Methods"
   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 digital-planning photo, the embedded procedure video, and
   the five-card interactive before/after comparison gallery.

   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: the
   comparison gallery 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 Sep-2026 Brushing
   post, now confirmed on a second post -> worth promoting 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. "Side-by-side comparison" stat headings ──────────────────────────── */
.damico-blog-container.damico-blog-container h3.implant-stat-h3 {
  padding-left: 16px;
  border-left: 4px solid #3f8f7d;
}

/* ── 3. Digital-planning photo ───────────────────────────────────────────── */
.damico-blog-container.damico-blog-container .implant-photo {
  margin: 28px 0;
}
.damico-blog-container.damico-blog-container .implant-photo__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(27, 58, 92, 0.16);
}

/* ── 4. Procedure video ──────────────────────────────────────────────────── */
.damico-blog-container.damico-blog-container .implant-video {
  margin: 28px 0;
}
.damico-blog-container.damico-blog-container .implant-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #0d2436;
  box-shadow: 0 10px 30px rgba(27, 58, 92, 0.16);
}
@supports not (aspect-ratio: 16 / 9) {
  .damico-blog-container.damico-blog-container .implant-video__frame {
    height: 0;
    padding-top: 56.25%;
  }
}
.damico-blog-container.damico-blog-container .implant-video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── 5. Before / after comparison gallery ────────────────────────────────── */
.damico-blog-container.damico-blog-container .implant-compare-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 32px 0;
}
.damico-blog-container.damico-blog-container .implant-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 .implant-compare__frame {
  position: relative;
  overflow: hidden;
  background: #0d2436;
  --pos: 50%;
}
.damico-blog-container.damico-blog-container .implant-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 (every photo
   in this gallery is verified 1920x1080). 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 .implant-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 .implant-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 .implant-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 .implant-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);
}
.damico-blog-container.damico-blog-container .implant-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 .implant-compare__range::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent !important;
}
.damico-blog-container.damico-blog-container .implant-compare__range::-moz-range-track {
  height: 100%;
  background: transparent !important;
  border: 0;
}
.damico-blog-container.damico-blog-container .implant-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 .implant-compare__range::-moz-range-thumb {
  width: 8px;
  height: 100%;
  background: transparent !important;
  border: 0;
  cursor: ew-resize;
}
.damico-blog-container.damico-blog-container .implant-compare__range:focus-visible {
  outline: none;
}
.damico-blog-container.damico-blog-container .implant-compare__frame:focus-within {
  box-shadow: inset 0 0 0 3px #c9a84c;
}

/* ── 6. Responsive ────────────────────────────────────────────────────────
   The gallery already fluid-wraps via auto-fit; only spacing and the handle
   size need to come down on small phones. */
@media (max-width: 640px) {
  .damico-blog-container.damico-blog-container .implant-compare-gallery {
    gap: 18px;
    margin: 24px 0;
  }
  .damico-blog-container.damico-blog-container .implant-compare__handle {
    width: 36px;
    height: 36px;
  }
  .damico-blog-container.damico-blog-container .implant-photo,
  .damico-blog-container.damico-blog-container .implant-video {
    margin: 22px 0;
  }
}

/* ── 6b. CTA phone-number overflow guard (identical fix to the Brushing
   post; the same phone number, so the same fix is needed again here — a
   second 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;
    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;
  }
}

/* ── 7. 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 .implant-compare__frame {
    transition: none;
  }
}