/* Shared visual comparisons for Home and Portfolio. */
.dcs-ba-preview {
  padding-block: clamp(64px, 7vw, 110px);
  background: var(--pbmit-white-color);
  color: var(--pbmit-blackish-color);
}
.dcs-ba-heading {
  max-width: 850px;
  margin: 0 auto 32px;
  text-align: center;
}
.dcs-ba-eyebrow {
  margin: 0 0 14px;
  color: var(--pbmit-global-color);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.dcs-ba-heading h2,
.dcs-ba-portfolio .dcs-ba-heading h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}
.dcs-ba-description {
  max-width: 650px;
  margin: 20px auto 0;
  color: var(--pbmit-body-typography-color);
  font-size: 17px;
  line-height: 1.7;
}
.dcs-ba-disclosure {
  display: inline-block;
  margin: 18px 0 0;
  padding: 7px 13px;
  border: 1px solid var(--pbmit-light-color);
  border-radius: 6px;
  background: var(--pbmit-light-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.dcs-ba-instructions {
  margin: 18px 0 0;
  color: var(--pbmit-body-typography-color);
  font-size: 14px;
  line-height: 1.6;
}
.dcs-ba-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.dcs-ba-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--pbmit-light-color);
  border-radius: 14px;
  background: var(--pbmit-white-color);
  box-shadow: 0 8px 28px rgba(var(--pbmit-blackish-color-rgb), .06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.dcs-ba-media {
  position: relative;
  padding-bottom: 36px;
  background: var(--pbmit-light-color);
}
.dcs-ba-viewport {
  --ba-position: 50%;
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--pbmit-blackish-color);
  touch-action: pan-y;
}
.dcs-ba-image,
.dcs-ba-before-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dcs-ba-image {
  display: block;
  max-width: none;
  object-fit: contain;
  object-position: 50% 50%;
}
.dcs-ba-before-layer {
  background: var(--pbmit-blackish-color);
  clip-path: inset(0 calc(100% - var(--ba-position)) 0 0);
}
.dcs-ba-label {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(var(--pbmit-white-color-rgb), .35);
  border-radius: 5px;
  background: rgba(var(--pbmit-blackish-color-rgb), .95);
  color: var(--pbmit-white-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.6px;
  pointer-events: none;
}
.dcs-ba-label-before { left: 12px; }
.dcs-ba-label-after { right: 12px; }
.dcs-ba-divider {
  position: absolute;
  z-index: 2;
  inset-block: 0;
  left: var(--ba-position);
  width: 2px;
  background: var(--pbmit-white-color);
  box-shadow: 0 0 0 1px rgba(var(--pbmit-blackish-color-rgb), .70);
  transform: translateX(-50%);
  pointer-events: none;
}
.dcs-ba-handle {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: clamp(22px, var(--ba-position), calc(100% - 22px));
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--pbmit-white-color);
  border-radius: 50%;
  background: var(--pbmit-secondary-color);
  color: var(--pbmit-white-color);
  box-shadow: 0 2px 10px rgba(var(--pbmit-blackish-color-rgb), .25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
/* The native thumb's travel matches the image width, including both endpoints. */
.dcs-ba-range {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: -22px;
  width: calc(100% + 44px);
  max-width: none;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  transform: translateY(-50%);
  cursor: ew-resize;
  touch-action: pan-y;
}
.dcs-ba-range::-webkit-slider-runnable-track {
  height: 4px;
  border: 0;
  background: transparent;
}
.dcs-ba-range::-webkit-slider-thumb {
  width: 44px;
  height: 44px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
.dcs-ba-range::-moz-range-track,
.dcs-ba-range::-moz-range-progress {
  height: 4px;
  border: 0;
  background: transparent;
}
.dcs-ba-range::-moz-range-thumb {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.dcs-ba-card:focus-within {
  border-color: var(--pbmit-secondary-color);
  box-shadow: 0 0 0 3px var(--pbmit-white-color), 0 0 0 6px var(--pbmit-secondary-color);
}
.dcs-ba-card:focus-within .dcs-ba-handle {
  box-shadow: 0 0 0 3px var(--pbmit-global-color);
}
.dcs-ba-watermark {
  position: absolute;
  right: 12px;
  bottom: 3px;
  width: 68px;
  height: 30px;
  background: url("../images/logo/logo-dallas-chimney-service.svg") center / contain no-repeat;
  opacity: 0.6;
  pointer-events: none;
}
.dcs-ba-caption {
  padding: 22px;
}
.dcs-ba-caption h3 {
  min-height: 2.6em;
  margin: 0;
  color: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.dcs-ba-caption p {
  margin: 12px 0 0;
  color: var(--pbmit-body-typography-color);
  font-size: 15px;
  line-height: 1.65;
}
.dcs-ba-actions {
  margin-top: 36px;
  text-align: center;
}
.dcs-ba-preview .pbmit-btn{
  color: white;
  border-color: var(--pbmit-global-color);
}

.dcs-ba-preview .pbmit-btn:hover {
  color: var(--pbmit-secondary-color);
  border-color: var(--pbmit-global-color);
}
.dcs-ba-preview .pbmit-btn:focus-visible {
  outline: 3px solid var(--pbmit-secondary-color);
  outline-offset: 4px;
}
.dcs-ba-portfolio-note {
  margin: 12px 0 0;
  color: var(--pbmit-body-typography-color);
  font-size: 14px;
}
.dcs-ba-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .dcs-ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dcs-ba-card:last-child {
    grid-column: 1 / -1;
    width: calc((100% - 24px) / 2);
    justify-self: center;
  }
}
@media (min-width: 1024px) {
  .dcs-ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dcs-ba-card:last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}
@media (hover: hover) {
  .dcs-ba-card:hover {
    border-color: rgba(var(--pbmit-secondary-color-rgb), .25);
    box-shadow: 0 12px 32px rgba(var(--pbmit-blackish-color-rgb), .12);
    transform: translateY(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dcs-ba-card { transition: none; }
  .dcs-ba-card:hover { transform: none; }
}

.dcs-ba-portfolio .dcs-ba-gallery-title {
  margin: 0 0 28px;
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.2;
  text-align: center;
}

/* Enlarge controls: separate from the slider so dragging, touch and keyboard range input are unaffected. */
.dcs-ba-zoom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 22px 0;
}
.dcs-ba-zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(var(--pbmit-secondary-color-rgb), .25);
  border-radius: 6px;
  background: var(--pbmit-white-color);
  color: var(--pbmit-secondary-color);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.dcs-ba-zoom:hover {
  border-color: var(--pbmit-global-color);
  background: var(--pbmit-light-color);
  color: var(--pbmit-secondary-color);
}
.dcs-ba-zoom:focus-visible {
  outline: 3px solid var(--pbmit-secondary-color);
  outline-offset: 2px;
}

/* Enlarged view: full image at its own aspect ratio, with the Before/After label and logo watermark. */
.dcs-ba-mfp .mfp-figure:after { background: var(--pbmit-blackish-color); }
.dcs-ba-mfp-figure { position: relative; }
.dcs-ba-mfp .dcs-ba-mfp-label {
  top: 52px;
  left: 12px;
  font-size: 13px;
}
.dcs-ba-mfp .dcs-ba-mfp-watermark {
  right: 12px;
  bottom: 52px;
  width: 104px;
  height: 44px;
  padding: 6px 10px;
  box-sizing: content-box;
  border-radius: 6px;
  background-color: rgba(var(--pbmit-white-color-rgb), .85);
  background-origin: content-box;
  opacity: .9;
}
.dcs-ba-mfp .mfp-title {
  color: var(--pbmit-white-color);
  font-size: 15px;
}
.dcs-ba-mfp .mfp-close {
  width: 44px;
  height: 44px;
  line-height: 44px;
  opacity: 1;
}
.dcs-ba-mfp .mfp-close:focus-visible {
  outline: 3px solid var(--pbmit-white-color);
  outline-offset: -3px;
}
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
  .dcs-ba-mfp .dcs-ba-mfp-label { top: 12px; }
  .dcs-ba-mfp .dcs-ba-mfp-watermark { bottom: 12px; }
}
@media (max-width: 767px) {
  .dcs-ba-mfp .dcs-ba-mfp-watermark { width: 76px; height: 32px; }
}

/* Keep both Enlarge buttons on one line in every card: they share the card width and scale
   down with the card itself (small phones, and the narrow 3-column layout around 1024px). */
@supports (container-type: inline-size) {
  .dcs-ba-card { container-type: inline-size; }
  .dcs-ba-zoom-actions { flex-wrap: nowrap; }
  .dcs-ba-zoom { white-space: nowrap; }
  @container (max-width: 400px) {
    .dcs-ba-zoom-actions {
      gap: 6px;
      padding: 14px clamp(10px, 4cqi, 22px) 0;
    }
    .dcs-ba-zoom {
      flex: 1 1 0;
      min-width: 0;
      justify-content: center;
      gap: clamp(4px, 1.5cqi, 8px);
      padding: 8px clamp(5px, 2cqi, 14px);
      font-size: clamp(11px, 3.6cqi, 14px);
    }
    .dcs-ba-zoom svg {
      flex: 0 0 auto;
      width: clamp(12px, 3.8cqi, 16px);
      height: clamp(12px, 3.8cqi, 16px);
    }
  }
}
