/*
Theme Name: DBP-Theme
Author: BuildingBridges gGmbH
Author URI: https://buildingbridges.social
Description: Lightweight, locally hosted WordPress base theme based on the supplied DBP layout.
Version: 0.1.90
Text Domain: dbp-theme
*/

@font-face {
  font-family: 'DBP Arial';
  src: url('assets/fonts/Arial.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --dbp-color-bg: #ffffff;
  --dbp-color-text: #1f1c3a;
  --dbp-color-header: #b9eeea;
  --dbp-color-footer: #445368;
  --dbp-color-footer-text: #ffffff;
  --dbp-color-footer-link: #ffffff;
  --dbp-color-footer-link-hover: #ffffff;
  --dbp-color-footer-link-active: #ffffff;
  --dbp-color-link: #009c9a;
  --dbp-color-link-hover: #445368;
  --dbp-color-nav: #1f1c3a;
  --dbp-color-nav-hover: #009c9a;
  --dbp-color-accent: #009c9a;
  --dbp-color-accent-soft: #b9eeea;
  --dbp-content-width: 1180px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}

/* Keep in-page anchor targets visible below the fixed site header. */
[id] {
  scroll-margin-top: 76px;
}
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
  margin: 0;
  min-height: 100vh;
  padding-top: 76px;
  display: flex;
  flex-direction: column;
  background: var(--dbp-color-bg);
  color: var(--dbp-color-text);
  font-family: 'DBP Arial', Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--dbp-color-link); text-decoration: none; }
a:hover, a:focus { color: var(--dbp-color-link-hover); text-decoration: underline; }
button, input, textarea, select { font: inherit; }

.dbp-site-header {
  background: var(--dbp-color-header);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.dbp-site-header__inner,
.dbp-site-main,
.dbp-site-footer__inner {
  width: min(calc(100% - 40px), var(--dbp-content-width));
  margin-inline: auto;
}
.dbp-site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.dbp-site-branding {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.dbp-site-logo {
  display: flex;
  align-items: center;
  height: 100%;
  line-height: 0;
}
.dbp-site-logo img { display: block; max-height: 48px; width: auto; }
.dbp-site-title { margin: 0; font-size: 1.2rem; font-weight: 700; }
.dbp-site-title a { color: var(--dbp-color-text); text-decoration: none; }

.dbp-primary-navigation { margin-left: auto; }
.dbp-primary-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}
.dbp-primary-navigation a {
  position: relative;
  color: var(--dbp-color-nav);
  font-size: 1.05rem;
  font-weight: 400;
  text-decoration: none;
}
.dbp-primary-navigation > ul > .menu-item-has-children {
  position: relative;
}
.dbp-primary-navigation > ul > .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dbp-submenu-arrow {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
  flex: 0 0 auto;
}
.dbp-submenu-open > a > .dbp-submenu-arrow {
  transform: translateY(2px) rotate(225deg);
}
.dbp-primary-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  min-width: 220px;
  padding: 10px 0;
  margin: 0;
  background: var(--dbp-color-header);
  box-shadow: 0 10px 24px rgba(31, 28, 58, .12);
  z-index: 20;
}
.dbp-primary-navigation .dbp-submenu-open > .sub-menu {
  display: block;
}
.dbp-primary-navigation .sub-menu li {
  margin: 0;
}
.dbp-primary-navigation .sub-menu a {
  display: block;
  padding: 9px 16px;
  white-space: nowrap;
}
.dbp-primary-navigation > ul > li > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
.dbp-primary-navigation a:hover,
.dbp-primary-navigation a:focus,
.dbp-primary-navigation .current-menu-item > a,
.dbp-primary-navigation .current_page_item > a,
.dbp-primary-navigation .current-menu-ancestor > a,
.dbp-primary-navigation .current_page_ancestor > a {
  color: var(--dbp-color-nav-hover);
  text-decoration: none;
}
.dbp-primary-navigation > ul > li > a:hover::after,
.dbp-primary-navigation > ul > li > a:focus::after,
.dbp-primary-navigation > ul > .current-menu-item > a::after,
.dbp-primary-navigation > ul > .current_page_item > a::after,
.dbp-primary-navigation > ul > .current-menu-ancestor > a::after,
.dbp-primary-navigation > ul > .current_page_ancestor > a::after {
  transform: scaleX(1);
}

.dbp-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dbp-menu-toggle__bar {
  display: block;
  height: 2px;
  background: var(--dbp-color-nav);
  margin: 5px 0;
  transition: transform .2s ease, opacity .2s ease;
}
.dbp-menu-toggle[aria-expanded="true"] .dbp-menu-toggle__bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.dbp-menu-toggle[aria-expanded="true"] .dbp-menu-toggle__bar:nth-child(3) { opacity: 0; }
.dbp-menu-toggle[aria-expanded="true"] .dbp-menu-toggle__bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.dbp-site-main { padding-top: 64px; padding-bottom: 0; min-height: 55vh; flex: 1 0 auto; }
.dbp-entry-header { margin-bottom: 28px; }
.dbp-entry-title { margin: 0; line-height: 1.15; font-size: clamp(2rem, 4vw, 3.6rem); }
.dbp-entry-content { font-size: 1.05rem; display: flow-root; }

/* Content lists: compact indentation, hanging markers and consistent item spacing. */
.dbp-entry-content ul,
.dbp-entry-content ol {
  margin-inline-start: 5px;
  padding-inline-start: 1.25em;
  list-style-position: outside;
}
.dbp-entry-content li:not(:last-child) {
  margin-bottom: 10px;
}
.dbp-entry-content > *:first-child { margin-top: 0; }
.dbp-entry-content > *:last-child { margin-bottom: 0; }
/* Paragraphs are justified by default, but explicit Gutenberg text alignment always wins. */
.dbp-entry-content p:not(.dbp-text-left):not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right) { text-align: justify; }
.dbp-entry-content .dbp-text-justify:not(.has-text-align-left):not(.has-text-align-center):not(.has-text-align-right) { text-align: justify; }
.dbp-entry-content .dbp-text-left,
.dbp-entry-content .has-text-align-left { text-align: left; }
.dbp-entry-content .has-text-align-center { text-align: center; }
.dbp-entry-content .has-text-align-right { text-align: right; }
.dbp-entry-content h2,
.dbp-entry-content h3,
.dbp-entry-content h4 { line-height: 1.25; }

.dbp-site-footer {
  position: relative;
  z-index: 200;
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  margin-top: auto;
  background: var(--dbp-color-footer);
  color: var(--dbp-color-footer-text);
}
.dbp-site-footer__inner {
  position: relative;
  z-index: 1;
}
.dbp-site-footer__inner {
  display: grid;
  align-items: start;
  padding-block: 48px;
}
@media (min-width: 901px) {
  .dbp-site-footer__inner {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: space-between;
    gap: 0;
  }
}
.dbp-site-footer a {
  color: var(--dbp-color-footer-link);
  font-weight: 400;
  text-decoration: none;
}
.dbp-site-footer a:hover,
.dbp-site-footer a:focus {
  color: var(--dbp-color-footer-link-hover);
  text-decoration: none;
}
.dbp-site-footer .current-menu-item > a,
.dbp-site-footer .current_page_item > a,
.dbp-site-footer .current-menu-ancestor > a,
.dbp-site-footer .current_page_ancestor > a {
  color: var(--dbp-color-footer-link-active);
}
.dbp-site-footer__company,
.dbp-site-footer__nav {
  min-width: 0;
}
.dbp-site-footer__logo {
  margin-bottom: 18px;
}
.dbp-site-footer__logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}
.dbp-site-footer__company-text {
  line-height: 1.55;
}
.dbp-site-footer__company-text > div,
.dbp-company-info > div {
  margin: 0;
}
.dbp-site-footer__nav-title {
  margin: 0 0 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.dbp-site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dbp-site-footer__nav li {
  margin: 0 0 8px;
}
.dbp-site-footer__nav a {
  display: inline-block;
}
.dbp-company-info {
  line-height: 1.6;
}

.dbp-company-email,
.dbp-company-phone {
  display: flex;
  align-items: center;
  gap: 0.45em;
}
.dbp-company-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
}
.dbp-company-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.dbp-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  [id] { scroll-margin-top: 68px; }
  body { padding-top: 68px; font-size: 1.05rem; }
  .dbp-site-header__inner { min-height: 68px; }
  .dbp-menu-toggle { display: block; margin-left: auto; }
  .dbp-primary-navigation {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--dbp-color-header);
    border-top: 1px solid rgba(31, 28, 58, .12);
    padding: 12px 20px 20px;
  }
  .dbp-primary-navigation.dbp-is-open { display: block; }
  .dbp-primary-navigation ul { display: block; }
  .dbp-primary-navigation li + li { margin-top: 4px; }
  .dbp-primary-navigation a { display: inline-block; padding: 10px 0; font-size: 1.2rem; }
  .dbp-primary-navigation > ul > .menu-item-has-children > a { display: inline-flex; }
  .dbp-primary-navigation .sub-menu {
    position: static;
    min-width: 0;
    padding: 0 0 4px 18px;
    background: transparent;
    box-shadow: none;
  }
  .dbp-primary-navigation .sub-menu a {
    padding: 7px 0;
    white-space: normal;
  }
  .dbp-primary-navigation > ul > li > a::after {
    display: none;
  }
  .dbp-site-main { width: min(calc(100% - 30px), var(--dbp-content-width)); padding-top: 40px; padding-bottom: 0; }
  .dbp-entry-content { font-size: 1.05rem; }
  .dbp-site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}

@media (max-width: 620px) {
  .dbp-site-footer__inner {
    width: min(calc(100% - 30px), var(--dbp-content-width));
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 30px;
    padding-block: 36px;
    text-align: center;
  }
  .dbp-site-footer__company,
  .dbp-site-footer__nav {
    width: 100%;
    text-align: center;
  }
  .dbp-site-footer__logo img {
    margin-inline: auto;
  }
  .dbp-site-footer__company-text .dbp-company-email,
  .dbp-site-footer__company-text .dbp-company-phone {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    justify-content: center;
    text-align: center;
  }
}

/* WordPress admin bar: position the fixed header below it. */
.admin-bar .dbp-site-header { top: 32px; }
.admin-bar [id] { scroll-margin-top: 108px; }
@media (max-width: 782px) {
  .admin-bar .dbp-site-header { top: 46px; }
  .admin-bar [id] { scroll-margin-top: 114px; }
}

/* DBP Hero Gutenberg block */
.dbp-has-leading-hero .dbp-site-main {
  padding-top: 0;
}
.dbp-hero {
  --dbp-hero-overlay: rgba(185, 238, 234, .58);
  --dbp-hero-panel: rgba(0, 111, 109, .78);
  --dbp-hero-text: #ffffff;
  --dbp-hero-min-height: 460px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.dbp-hero__visual {
  position: relative;
  width: 100%;
  min-height: var(--dbp-hero-min-height);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.dbp-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--dbp-hero-overlay);
  pointer-events: none;
}
.dbp-hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--dbp-content-width));
  margin-inline: auto;
  padding-block: 64px;
}
.dbp-hero__panel {
  width: min(610px, 100%);
  padding: clamp(26px, 4vw, 48px);
  background: var(--dbp-hero-panel);
  color: var(--dbp-hero-text);
}
.dbp-hero__panel > *:first-child { margin-top: 0; }
.dbp-hero__panel > *:last-child { margin-bottom: 0; }
.dbp-hero__panel h1,
.dbp-hero__panel h2,
.dbp-hero__panel h3,
.dbp-hero__panel h4,
.dbp-hero__panel h5,
.dbp-hero__panel h6,
.dbp-hero__panel p,
.dbp-hero__panel a:not(.wp-block-button__link) {
  color: inherit;
}
.dbp-hero__panel p {
  text-align: left;
}

@media (max-width: 900px) {
  .dbp-hero__visual {
    min-height: min(var(--dbp-hero-min-height), 70vh);
  }
  .dbp-hero__inner {
    width: min(calc(100% - 30px), var(--dbp-content-width));
    padding-block: 36px;
  }
  .dbp-hero__panel {
    width: 100%;
    padding: 26px;
  }
}

/* DBP Hero enhancements */
.dbp-hero__inner {
  min-height: var(--dbp-hero-min-height);
  display: flex;
  align-items: center;
}
.dbp-hero .wp-block-button__link {
  text-decoration: none !important;
}
.dbp-hero .wp-block-button__link:hover,
.dbp-hero .wp-block-button__link:focus {
  text-decoration: none !important;
}
.dbp-hero__stats {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--dbp-color-footer, #445368);
  color: var(--dbp-color-footer-text, #ffffff);
}
.dbp-hero__stats-inner {
  width: min(calc(100% - 40px), var(--dbp-content-width));
  margin-inline: auto;
  padding-block: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.dbp-hero__stat {
  min-width: 0;
  text-align: center;
}
.dbp-hero__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--dbp-stat-icon-size, 28px);
  height: var(--dbp-stat-icon-size, 28px);
  margin-bottom: 8px;
  color: var(--dbp-stat-icon-color, #ffffff);
}
.dbp-hero__stat-icon.dashicons {
  font-size: var(--dbp-stat-icon-size, 28px);
  line-height: 1;
}
.dbp-hero__stat-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.dbp-hero__stat-value {
  color: var(--dbp-stat-value-color, #ffffff);
  font-size: var(--dbp-stat-value-size, 32px);
  font-weight: 700;
  line-height: 1.05;
}
.dbp-hero__stat-label {
  margin-top: 5px;
  color: var(--dbp-stat-label-color, #ffffff);
  font-size: var(--dbp-stat-label-size, 13px);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .dbp-hero__inner {
    min-height: min(var(--dbp-hero-min-height), 70vh);
  }
  .dbp-hero__stats-inner {
    width: min(calc(100% - 30px), var(--dbp-content-width));
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dbp-hero__stats-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* DBP parallax */
.dbp-parallax-enabled {
  position: relative;
  z-index: 1;
  margin-top: 0;
  margin-bottom: 0;
}
.dbp-hero.dbp-parallax-enabled .dbp-hero__visual {
  transform-origin: center top;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 1;
}
.dbp-hero.dbp-parallax-enabled .dbp-hero__stats {
  position: relative;
  z-index: 4;
}
@media (prefers-reduced-motion: reduce) {
  [data-dbp-parallax="true"],
  [data-dbp-parallax="true"] * {
    scroll-behavior: auto !important;
  }
  .dbp-hero[data-dbp-parallax="true"] .dbp-hero__visual,
  .dbp-parallax-section[data-dbp-parallax="true"] .dbp-parallax-section__content {
    transform: none !important;
    will-change: auto !important;
  }
}

/* DBP generic parallax container */
.dbp-parallax-placeholder {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.dbp-parallax-section {
  position: relative;
  z-index: 1;
  margin-block: 0 !important;
  display: flow-root;
}
.dbp-parallax-section__content {
  position: relative;
  display: flow-root;
  transform-origin: center top;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/*
 * Full-width page-background curtain above parallax content.
 * It starts exactly at the lower edge of the parallax block instead of at the
 * first following Gutenberg block. This means margins between blocks can never
 * reveal the translated parallax layer underneath.
 */
.dbp-parallax-cover-parent {
  position: relative;
  isolation: isolate;
}
.dbp-parallax-cover-plane {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--dbp-color-bg);
  z-index: 1;
  pointer-events: none;
}

/*
 * Normal Gutenberg blocks are often transparent by design. After a parallax
 * block the cover plane therefore supplies the actual page background beneath
 * the entire remaining content area, including Gutenberg block margins.
 */
.dbp-parallax-cover-parent > .dbp-parallax-following:not(.dbp-full-width-background) {
  background-clip: padding-box;
}

/*
 * Keep the moving parallax layer below the curtain and every following
 * Gutenberg block above it. Using a small local z-index scale is important:
 * full-width background blocks create their own isolated stacking context and
 * must remain composited as one unit above the curtain.
 */
.dbp-parallax-cover-parent > [data-dbp-parallax="true"] {
  position: relative;
  z-index: 0 !important;
}
.dbp-parallax-cover-parent > .dbp-parallax-following {
  position: relative;
  z-index: 2 !important;
}

/* A full-width background that follows parallax must never fall behind the
 * cover plane, even when the block also has transform/animation/isolation. */
.dbp-parallax-cover-parent > .dbp-parallax-following.dbp-full-width-background {
  z-index: 2 !important;
}

/*
 * Generic DBP Parallax uses a real full-width background curtain between the
 * moving layer and all following Gutenberg blocks.  The higher local stacking
 * level is intentional: Gutenberg blocks using transforms, animations or
 * isolated full-width backgrounds create their own stacking contexts and could
 * otherwise appear underneath the curtain.
 */
.dbp-parallax-section__content {
  z-index: 1;
}

/*
 * Generic DBP Parallax follow-content layer.
 *
 * Unlike the absolute cover planes used by the Hero, this is a real DOM
 * wrapper around all root-level content following a DBP Parallax block.  Its
 * own full-width background covers Gutenberg margins as well as transparent
 * blocks, while foreground blocks (including Full Width Background blocks)
 * keep their own backgrounds above it.
 */
.dbp-parallax-following-wrap {
  position: relative;
  z-index: 5;
  display: flow-root;
  isolation: isolate;
  background: var(--dbp-color-bg);
}
.dbp-parallax-following-wrap::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0 auto 0 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--dbp-color-bg);
  pointer-events: none;
}
.dbp-parallax-following-wrap > * {
  position: relative;
}

/* DBP viewport animations for Gutenberg Columns. */
.dbp-animation-enabled {
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: opacity, transform;
  transition-property: opacity, transform;
  transition-duration: var(--dbp-animation-duration, 700ms);
  transition-delay: var(--dbp-animation-delay, 0ms);
  transition-timing-function: var(--dbp-animation-easing, ease-out);
}
html.dbp-animations-ready .dbp-animation-enabled:not(.dbp-animation-visible) {
  opacity: var(--dbp-animation-from-opacity, 0);
  transform: var(--dbp-animation-from-transform, translate3d(0, 40px, 0));
}
html.dbp-animations-ready .dbp-animation-enabled.dbp-animation-visible {
  opacity: 1;
  transform: none;
}
html.dbp-animations-ready .dbp-animation-enabled.dbp-animation-reversing {
  transition-delay: 0ms;
}
@media (prefers-reduced-motion: reduce) {
  .dbp-animation-enabled {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Individual Column blocks use the same animation engine as Columns containers. */
.wp-block-column.dbp-animation-enabled,
.wp-block-columns.dbp-animation-enabled {
  transform-style: preserve-3d;
}



/* Font Awesome Free icons are rendered as inline SVGs from local theme files. */
.dbp-fa-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
  vertical-align: middle;
}
.dbp-button-icon.dbp-fa-icon {
  width: var(--dbp-button-icon-size, 18px);
  height: var(--dbp-button-icon-size, 18px);
}
.dbp-content-icon__svg.dbp-fa-icon {
  display: block;
}

/* Theme-supplied DBP icons. They are local SVG masks and inherit currentColor. */
.dbp-theme-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.dbp-theme-icon--phone {
  -webkit-mask-image: url('assets/icons/phone.svg');
  mask-image: url('assets/icons/phone.svg');
}
.dbp-theme-icon--mail {
  -webkit-mask-image: url('assets/icons/mail.svg');
  mask-image: url('assets/icons/mail.svg');
}
.dbp-theme-icon--runner {
  -webkit-mask-image: url('assets/icons/runner.svg');
  mask-image: url('assets/icons/runner.svg');
}
.dbp-theme-icon--check-circle {
  -webkit-mask-image: url('assets/icons/check-circle.svg');
  mask-image: url('assets/icons/check-circle.svg');
}
.dbp-theme-icon--growth-bars {
  -webkit-mask-image: url('assets/icons/growth-bars.svg');
  mask-image: url('assets/icons/growth-bars.svg');
}
.dbp-theme-icon--strategy {
  -webkit-mask-image: url('assets/icons/strategy.svg');
  mask-image: url('assets/icons/strategy.svg');
}
.dbp-theme-icon--analytics {
  -webkit-mask-image: url('assets/icons/analytics.svg');
  mask-image: url('assets/icons/analytics.svg');
}
.dbp-theme-icon--target {
  -webkit-mask-image: url('assets/icons/target.svg');
  mask-image: url('assets/icons/target.svg');
}
.dbp-hero__stat-icon.dbp-theme-icon {
  width: var(--dbp-stat-icon-size, 28px);
  height: var(--dbp-stat-icon-size, 28px);
}
.dbp-button-icon.dbp-theme-icon {
  width: 1em;
  height: 1em;
}

/* DBP enhancements for the core Button block. */
.wp-block-button.dbp-button-enhanced .wp-block-button__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  overflow: hidden;
  text-decoration: none !important;
  transition:
    color var(--dbp-button-transition, 250ms) ease,
    transform var(--dbp-button-transition, 250ms) ease,
    background-size var(--dbp-button-transition, 250ms) ease;
}
.wp-block-button.dbp-button-enhanced .wp-block-button__link:hover,
.wp-block-button.dbp-button-enhanced .wp-block-button__link:focus,
.wp-block-button.dbp-button-enhanced:hover .wp-block-button__link,
.wp-block-button.dbp-button-enhanced:focus-within .wp-block-button__link {
  color: var(--dbp-button-hover-color, currentColor) !important;
  text-decoration: none !important;
}
.wp-block-button.dbp-button-enhanced .wp-block-button__link:hover *,
.wp-block-button.dbp-button-enhanced .wp-block-button__link:focus * {
  color: var(--dbp-button-hover-color, currentColor) !important;
}
.wp-block-button.dbp-button-hover-scale .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-scale .wp-block-button__link:focus,
.wp-block-button.dbp-button-hover-slide-left-scale .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-left-scale .wp-block-button__link:focus,
.wp-block-button.dbp-button-hover-slide-right-scale .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-right-scale .wp-block-button__link:focus {
  transform: scale(var(--dbp-button-hover-scale, 1.02));
}
.wp-block-button.dbp-button-hover-slide-left .wp-block-button__link,
.wp-block-button.dbp-button-hover-slide-left-scale .wp-block-button__link {
  background-image: linear-gradient(var(--dbp-button-hover-bg, transparent), var(--dbp-button-hover-bg, transparent));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
}
.wp-block-button.dbp-button-hover-slide-right .wp-block-button__link,
.wp-block-button.dbp-button-hover-slide-right-scale .wp-block-button__link {
  background-image: linear-gradient(var(--dbp-button-hover-bg, transparent), var(--dbp-button-hover-bg, transparent));
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 0% 100%;
}
.wp-block-button.dbp-button-hover-slide-left .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-left .wp-block-button__link:focus,
.wp-block-button.dbp-button-hover-slide-right .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-right .wp-block-button__link:focus,
.wp-block-button.dbp-button-hover-slide-left-scale .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-left-scale .wp-block-button__link:focus,
.wp-block-button.dbp-button-hover-slide-right-scale .wp-block-button__link:hover,
.wp-block-button.dbp-button-hover-slide-right-scale .wp-block-button__link:focus {
  background-size: 100% 100%;
}
.dbp-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  font-size: var(--dbp-button-icon-size, 18px);
  line-height: 1;
  vertical-align: middle;
  color: inherit !important;
}
/* Button icons must always follow the actual button text color, including
 * WordPress block colors and DBP hover colors on posts and pages alike. */
.wp-block-button.dbp-button-enhanced .wp-block-button__link .dbp-button-icon.dbp-fa-icon,
.wp-block-button.dbp-button-enhanced .wp-block-button__link .dbp-button-icon.dbp-fa-icon path {
  fill: currentColor !important;
}
.dbp-button-icon.dashicons {
  width: 1em;
  height: 1em;
  font-size: var(--dbp-button-icon-size, 18px);
  line-height: 1;
}
.dbp-button-icon.dashicons::before {
  display: block;
  line-height: 1;
  color: inherit !important;
}

@media (max-width: 782px) {
  html.dbp-animations-ready .dbp-animation-enabled[data-dbp-animation-mobile="false"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* Full-width Gutenberg backgrounds while preserving the normal content width. */
.dbp-full-width-background {
  position: relative;
  isolation: isolate;
}
.dbp-full-width-background::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: inherit;
  background-image: inherit;
  background-position: inherit;
  background-size: inherit;
  background-repeat: inherit;
  pointer-events: none;
}

/* DBP content icon block. */
.wp-block-dbp-theme-icon.dbp-content-icon {
  display: flex;
  align-items: center;
}
.wp-block-dbp-theme-icon.dbp-content-icon.aligncenter { justify-content: center; }
.wp-block-dbp-theme-icon.dbp-content-icon.alignright { justify-content: flex-end; }
.wp-block-dbp-theme-icon.dbp-content-icon.alignleft { justify-content: flex-start; }
.wp-block-dbp-theme-icon.dbp-content-icon .dashicons,
.wp-block-dbp-theme-icon.dbp-content-icon .dbp-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


/* Explicit DBP content icon alignment. */
.wp-block-dbp-theme-icon.dbp-content-icon { width: 100%; }
.wp-block-dbp-theme-icon.dbp-content-icon.dbp-content-icon--align-left { justify-content: flex-start; }
.wp-block-dbp-theme-icon.dbp-content-icon.dbp-content-icon--align-center { justify-content: center; }
.wp-block-dbp-theme-icon.dbp-content-icon.dbp-content-icon--align-right { justify-content: flex-end; }


/* Match Gutenberg column content alignment on the front end.
 * Gutenberg's editor normalizes the outer margin of the first/last block inside a column.
 * Without this, a paragraph/heading in one column starts lower than a DBP Icon block next to it. */
.wp-block-column > :first-child {
  margin-block-start: 0 !important;
}
.wp-block-column > :last-child {
  margin-block-end: 0 !important;
}

/* Keep Gutenberg Columns vertical alignment identical to the editor. */
.wp-block-columns.are-vertically-aligned-top {
  align-items: flex-start;
}
.wp-block-columns.are-vertically-aligned-center {
  align-items: center;
}
.wp-block-columns.are-vertically-aligned-bottom {
  align-items: flex-end;
}
.wp-block-column.is-vertically-aligned-top {
  align-self: flex-start;
}
.wp-block-column.is-vertically-aligned-center {
  align-self: center;
}
.wp-block-column.is-vertically-aligned-bottom {
  align-self: flex-end;
}

/* Case studies shortcode. */
.dbp-case-studies {
  width: 100%;
}

.dbp-case-studies [hidden] {
  display: none !important;
}

.dbp-case-studies__filters {
  margin-bottom: 2rem;
}

.dbp-case-studies__filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}

.dbp-case-studies__filter-row--secondary {
  margin-top: .8rem;
  transform-origin: top;
}

.dbp-case-studies__filter-row--secondary.is-opening {
  animation: dbp-case-studies-filter-open .22s ease-out both;
}

@keyframes dbp-case-studies-filter-open {
  from {
    opacity: 0;
    transform: translateY(-8px) scaleY(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.dbp-case-studies__filter {
  appearance: none;
  border: 1px solid rgba(68, 83, 104, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--dbp-color-text);
  font: inherit;
  line-height: 1.2;
  padding: .55rem 1rem;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.dbp-case-studies__filter:hover,
.dbp-case-studies__filter:focus-visible,
.dbp-case-studies__filter.is-active {
  background: var(--dbp-color-accent);
  border-color: var(--dbp-color-accent);
  color: #fff;
}

.dbp-case-studies__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.dbp-case-studies__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(68, 83, 104, .18);
  border-radius: 20px;
  background: #fff;
  color: var(--dbp-color-text);
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(31, 28, 58, .04);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.dbp-case-studies__card:hover,
.dbp-case-studies__card:focus-visible {
  color: var(--dbp-color-text);
  text-decoration: none !important;
  transform: translateY(-3px);
  border-color: rgba(0, 156, 154, .4);
  box-shadow: 0 12px 30px rgba(31, 28, 58, .09);
}

.dbp-case-studies__card-body {
  padding: 1.5rem 1.5rem 1.25rem;
}

.dbp-case-studies__title {
  margin: 0 0 .85rem;
  color: #445368;
  font-size: 1.2rem;
  line-height: 1.2;
}

.dbp-case-studies__description {
  margin: 0;
  color: var(--dbp-color-text);
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}

.dbp-case-studies__stats {
  display: grid;
  grid-template-columns: repeat(var(--dbp-case-study-stat-count, 1), minmax(0, 1fr));
  gap: 0;
  margin-top: auto;
  border-top: 1px solid rgba(68, 83, 104, .12);
  background: rgba(68, 83, 104, .035);
}

.dbp-case-studies__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: .8rem .35rem .9rem;
  text-align: center;
}

.dbp-case-studies__stat + .dbp-case-studies__stat {
  border-left: 1px solid rgba(68, 83, 104, .1);
}

.dbp-case-studies__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .28rem;
  color: var(--dbp-color-accent);
}

.dbp-case-studies__stat-icon-svg,
.dbp-case-studies__stat-icon .dashicons {
  width: 19px;
  height: 19px;
  font-size: 19px;
  line-height: 1;
}

.dbp-case-studies__stat-value {
  display: block;
  min-width: 0;
  font-size: clamp(.82rem, .9vw, 1rem);
  font-weight: 700;
  line-height: 1.08;
}

.dbp-case-studies__stat-label {
  display: block;
  min-width: 0;
  margin-top: .18rem;
  font-size: clamp(.62rem, .68vw, .78rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.dbp-case-studies__empty {
  margin: 1.5rem 0 0;
}

.dbp-case-studies__load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.dbp-case-studies__load-more {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dbp-color-link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: .35rem .6rem;
  text-decoration: none;
}

.dbp-case-studies__load-more:hover,
.dbp-case-studies__load-more:focus-visible {
  color: var(--dbp-color-link-hover);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .dbp-case-studies__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dbp-case-studies__grid {
    grid-template-columns: 1fr;
  }

  .dbp-case-studies__filter-row {
    gap: .5rem;
  }

  .dbp-case-studies__filter {
    padding: .5rem .8rem;
  }
}

/* Case-study card copy must never inherit the theme's default justified paragraph alignment. */
.dbp-entry-content .dbp-case-studies__card-body,
.dbp-entry-content .dbp-case-studies__title,
.dbp-entry-content .dbp-case-studies__description {
  text-align: left;
}

/* Video blocks can reuse the DBP lightbox instead of playing inline. */
.wp-block-video.dbp-video-lightbox-enabled,
.wp-block-video[data-dbp-video-lightbox="true"] {
  position: relative;
  cursor: pointer;
}

.wp-block-video.dbp-video-lightbox-enabled video,
.wp-block-video[data-dbp-video-lightbox="true"] video {
  cursor: pointer;
}

.wp-block-video.dbp-video-lightbox-enabled:focus-visible,
.wp-block-video[data-dbp-video-lightbox="true"]:focus-visible {
  outline: 2px solid var(--dbp-color-accent, #00aab8);
  outline-offset: 4px;
}

/* DBP content lightbox. Internal links with rel="dbp-lightbox" open content-only. */
html.dbp-lightbox-open,
body.dbp-lightbox-open {
  overflow: hidden;
}

.dbp-lightbox[hidden] {
  display: none !important;
}

.dbp-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.dbp-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.dbp-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 28, 58, .72);
  cursor: pointer;
}

.dbp-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: visible;
  background: var(--dbp-color-bg, #fff);
  color: var(--dbp-color-text, #1f1c3a);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  outline: none;
  transform: translateY(10px) scale(.995);
  transition: transform 180ms ease;
  overscroll-behavior: contain;
}

.dbp-lightbox.is-open .dbp-lightbox__dialog {
  transform: translateY(0) scale(1);
}

.dbp-lightbox__close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 999px;
  background: var(--dbp-color-footer, #445368);
  color: var(--dbp-color-footer-text, #fff);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}

.dbp-lightbox__close:hover,
.dbp-lightbox__close:focus-visible {
  transform: scale(1.04);
}

.dbp-lightbox__content {
  min-height: 120px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  box-sizing: border-box;
  padding: 4%;
  border-radius: inherit;
  overscroll-behavior: contain;
}

.dbp-lightbox__content > .dbp-lightbox__article {
  margin: 0;
}

.dbp-lightbox__content .dbp-entry-content {
  padding-top: 0;
  padding-bottom: 0;
}

.dbp-lightbox__video-wrap {
  margin: 0;
  width: 100%;
}

.dbp-lightbox__video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin: 0 auto;
  background: #000;
  object-fit: contain;
}

.dbp-lightbox__video-caption {
  margin-top: 1rem;
  margin-bottom: 0;
}

.dbp-lightbox__loading,
.dbp-lightbox__error {
  padding: 32px 0;
  text-align: center;
}

@media (max-width: 640px) {
  .dbp-lightbox {
    padding: 10px;
  }

  .dbp-lightbox__dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 12px;
  }

  .dbp-lightbox__close {
    top: -6px;
    right: -6px;
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .dbp-lightbox__loading,
  .dbp-lightbox__error {
    padding: 48px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dbp-lightbox,
  .dbp-lightbox__dialog,
  .dbp-lightbox__close {
    transition: none !important;
  }
}
