/*
 * Service pillar page (Digital Marketing). Sits on top of servicelanding.css and the shared .vz illustration system,
 * and uses the same tokens, radii, shadows and dark-mode treatment. Class prefix: .dm-
 */

/* ------------------------------------------------------------------ section frame */
.dm-section {
  position: relative;
  z-index: 1;
  padding: var(--sectionPadding);
  background-color: #fff;
  overflow-x: clip;
}
.dm-channels {
  padding-top: 0;
}
.dm-together {
  background-color: #f1f7fc;
}
.dm-section .cs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  max-width: 80rem;
  width: 100%;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.dm-section .cs-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 46.875rem;
}
/* Balanced line breaks for the headings (no single-word last lines). */
#banner-1519.so-hero .cs-int-title,
#banner-1519.so-hero .cs-int-sub,
.dm-section .cs-title,
#sl-intro .cs-title {
  text-wrap: balance;
}
.dm-lead {
  margin-top: 0.9rem;
}
.dm-lead p {
  margin: 0 0 0.85rem;
  font-size: 1.0625rem;
  line-height: 1.6em;
  color: var(--bodyTextColor);
}
.dm-lead p:last-child {
  margin-bottom: 0;
}
#dm-channels {
  scroll-margin-top: 6.5rem;
}

/* ------------------------------------------------------------------ channels: one featured group, four single cards */
.dm-ch-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  width: 100%;
  list-style: none;
}
.dm-ch {
  position: relative;
}
.dm-ch__link:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.dm-ch__link--plain:before {
  display: none;
}
.dm-ch:focus-within:not(.dm-ch--feature) {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}
.dm-ch__link:focus-visible {
  outline: none;
}
.dm-ch--feature {
  background-color: #eef6fd;
  border-color: #d9e6f2;
}
.dm-ch--feature:hover {
  transform: none;
  border-color: #d9e6f2;
  background-color: #eef6fd;
  box-shadow: none;
}
.dm-ch--feature .sl-card__text {
  max-width: 38rem;
}
.dm-ch__subs {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.dm-sub {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin: 0;
  border: 1px solid #d9e6f2;
  border-radius: 0.9rem;
  background-color: #fff;
  padding: 1rem 1.1rem 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.dm-sub:hover {
  transform: translateY(-0.2rem);
  border-color: var(--secondary);
  box-shadow: 0 0.75rem 1.75rem rgba(0, 31, 63, 0.1);
}
.dm-sub:focus-within {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}
.dm-sub__icon {
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background-color: var(--primary);
  height: 2.5rem;
  width: 2.5rem;
}
.dm-sub__icon img {
  height: 1.3rem;
  width: auto;
  filter: brightness(0) invert(1);
}
.dm-sub__title {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.2em;
  font-weight: 700;
  color: var(--headerColor);
}
.dm-sub__title a {
  color: inherit;
  text-decoration: none;
}
.dm-sub__title a:after {
  content: " \2192";
  color: var(--vz-text-blue, #0867a0);
}
.dm-sub__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--secondary);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 2px;
}
.dm-sub__text {
  grid-column: 2;
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.5em;
  color: var(--bodyTextColor);
}
@media only screen and (min-width: 40rem) {
  .dm-ch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dm-ch--feature {
    grid-column: 1 / -1;
    order: -1;
  }
  .dm-ch__subs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media only screen and (min-width: 64rem) {
  .dm-ch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dm-ch--feature {
    grid-column: span 2;
    order: 0;
  }
}

/* ------------------------------------------------------------------ better together */
.dm-together__grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: center;
  width: 100%;
}
.dm-together__visual {
  min-width: 0;
}
.dm-roles {
  display: grid;
  gap: 1.15rem 2rem;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dm-role {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin: 0;
}
.dm-role__icon {
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background-color: var(--primary);
  height: 2.75rem;
  width: 2.75rem;
}
.dm-role__icon img {
  height: 1.4rem;
  width: auto;
  filter: brightness(0) invert(1);
}
.dm-role__title {
  margin: 0 0 0.25rem;
  font-size: 1.1875rem;
  line-height: 1.25em;
  font-weight: 700;
  color: var(--headerColor);
}
.dm-role__text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55em;
  color: var(--bodyTextColor);
}
.dm-role__text a {
  font-weight: 700;
  color: var(--linkOnLight, #0a74b5);
}
@media only screen and (min-width: 40rem) {
  .dm-roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media only screen and (min-width: 64rem) {
  .dm-together__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 5vw, 5rem);
  }
  .dm-roles {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ------------------------------------------------------------------ commercial thinking */
@media only screen and (min-width: 64rem) {
  .dm-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------------ phones: one consistent rhythm */
@media only screen and (max-width: 47.999rem) {
  .dm-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .dm-channels {
    padding-top: 0;
  }
  .dm-section .cs-container {
    gap: 1.75rem;
  }
  .dm-together__grid {
    gap: 1.75rem;
  }
  .dm-lead p {
    font-size: 1rem;
  }
}
@media only screen and (max-width: 39.999rem) {
  .dm-ch-grid {
    gap: 0.875rem;
  }
  .dm-ch__subs {
    grid-column: 1 / -1;
  }
  .dm-sub {
    padding: 0.9rem 1rem 1rem;
  }
}

/* ------------------------------------------------------------------ dark mode */
html.dark-mode .dm-section {
  background-color: var(--dark);
}
html.dark-mode .dm-together {
  background-color: #0a1824;
}
html.dark-mode .dm-lead p,
html.dark-mode .dm-role__text p,
html.dark-mode .dm-sub__text {
  color: rgba(255, 255, 255, 0.82);
}
html.dark-mode .dm-role__title,
html.dark-mode .dm-sub__title {
  color: #fff;
}
html.dark-mode .dm-role__text a {
  color: var(--secondary);
}
html.dark-mode .dm-ch--feature,
html.dark-mode .dm-ch--feature:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(67, 183, 255, 0.07);
  box-shadow: none;
}
html.dark-mode .dm-sub {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(0, 0, 0, 0.4);
}
html.dark-mode .dm-sub:hover {
  border-color: var(--secondary);
  background-color: rgba(67, 183, 255, 0.08);
  box-shadow: rgba(67, 183, 255, 0.2) 0px 0px 24px;
}
html.dark-mode .dm-sub__icon,
html.dark-mode .dm-role__icon {
  background-color: #0a2748;
}
html.dark-mode .dm-sub__title a:after {
  color: var(--secondary);
}
@media (prefers-reduced-motion: reduce) {
  .dm-sub,
  .dm-sub:hover {
    transition: none;
    transform: none;
  }
}

/* ------------------------------------------------------------------ commercial tiles: swipe row on phones
 * Under 40rem the eight tiles become four columns of two, scrolling sideways with scroll snapping and a peek of the next
 * column (the same approach as the homepage services cards). Each tile is placed by the normal grid flow: tiles 1 to 4 fill
 * the first row and 5 to 8 the second, so the columns pair 1 with 5, 2 with 6, 3 with 7 and 4 with 8. The four columns are
 * written below; if the number of tiles changes, change "repeat(4" to match. 40rem and up keep the existing grid. */
.dm-slider {
  width: 100%;
}
.dm-slider-nav {
  display: none;
}
.dm-slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: transparent;
  height: 2.75rem;
  width: 2.75rem;
  color: var(--primary);
  cursor: pointer;
}
.dm-slider-btn[aria-disabled="true"] {
  opacity: 0.3;
  cursor: default;
}
.dm-slider-btn:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}
.dm-slider-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dm-slider-dot {
  display: block;
  border-radius: 0.25rem;
  background: var(--primary);
  opacity: 0.25;
  height: 0.5rem;
  width: 0.5rem;
}
.dm-slider-dot.is-active {
  opacity: 1;
  width: 1.5rem;
}
.dm-slider-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html.dark-mode .dm-slider-btn {
  border-color: var(--bodyTextColorWhite);
  color: var(--bodyTextColorWhite);
}
html.dark-mode .dm-slider-dot {
  background: var(--bodyTextColorWhite);
}
html.dark-mode .dm-slider-dot.is-active {
  background: var(--secondary);
}
@media only screen and (max-width: 39.999rem) {
  .dm-commercial .dm-slider {
    margin: 0 -1rem;
    width: calc(100% + 2rem);
  }
  .dm-commercial .dm-tiles {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, min(calc((100% + 0.25rem) / 1.12), 22rem));
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.25rem 1rem 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
  }
  .dm-commercial .dm-tiles::-webkit-scrollbar {
    display: none;
  }
  .dm-commercial .dm-tiles:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: -2px;
    border-radius: 1rem;
  }
  .dm-commercial .dm-tiles .sl-tile {
    scroll-snap-align: start;
    min-width: 0;
  }
  .dm-commercial .dm-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
  }
  .dm-commercial .dm-slider-nav[hidden] {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .dm-slider-dot {
    transition: width 0.25s, opacity 0.25s;
  }
}
