/*
 * Digi4Circular — the CSS that Elementor V4 global classes cannot express.
 *
 * Every rule is prefixed `.elementor ` where it competes with an Elementor
 * class. Elementor auto-prefixes its own generated rules (widget base styles
 * AND global classes) with a `.elementor ` ancestor, giving them specificity
 * (0,2,0); a bare class rule at (0,1,0) silently loses regardless of source
 * order.
 *
 * Kept deliberately small. Anything the prop schema can express lives in a
 * global class instead, because props always survive an editor re-save and
 * hand-written CSS does not.
 */

/* -------------------------------------------------------------------------
 * Document-level typography.
 *
 * `body` and `html` are not Elementor elements, so no global class can reach
 * them — this has to be a stylesheet rule. It is not cosmetic: the live site's
 * 14px/1.4 body metric is what sizes every block of running copy, and without
 * it the consortium card grew 130px taller than the original purely from
 * line-height drift.
 *
 * html at 62.5% makes 1rem = 10px, which is what every rem/em value copied
 * from the original theme is measured against.
 * ---------------------------------------------------------------------- */

html { font-size: 62.5%; }

body {
	font: 300 14px/1.4 'Inter', Helvetica, Arial, sans-serif;
	color: #444;
	background-color: #f2f2f2;
}

/* The original theme's own img rule, and it is load-bearing rather than
 * cosmetic. An inline <img> sits on the text baseline, so the space reserved
 * beneath it depends on vertical-align: the theme's `bottom` leaves 1.2px,
 * Elementor's `middle` leaves 4.6px. That 3.4px inflated every news row and
 * cascaded into a 5px error on the card height and 4px on the whole page. */
img {
	max-width: 100%;
	vertical-align: bottom;
}

/* -------------------------------------------------------------------------
 * The rotating header rims.
 *
 * The atomic prop schema has no @keyframes surface, and a global class's
 * custom_css lands INSIDE that class's own rule block — so it can say
 * `& svg g#InnerRim{animation:d4cSpin …}` but cannot open a top-level
 * @keyframes. This is the one thing that genuinely has to live in a stylesheet.
 * ---------------------------------------------------------------------- */

@keyframes d4cSpin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

/* Honour a reduced-motion preference by stopping the rims where they are,
   rather than speeding them up — a near-zero duration turns a slow rotation
   into a single-frame jump, which is worse than the animation. */
@media (prefers-reduced-motion: reduce) {
	.elementor .d4c-hero-svg-art svg g#InnerRim,
	.elementor .d4c-hero-svg-art svg g#MidRim,
	.elementor .d4c-hero-svg-art svg g#OutterRim {
		animation: none !important;
	}
}

/* -------------------------------------------------------------------------
 * About page: the "Read more" / "Collapse" toggle.
 *
 * Styled here rather than as a global class on purpose. The button is created
 * at runtime by d4c.js, and Elementor's global-class bundler only counts a
 * class as "used" when it appears in `settings.classes` on a real atomic
 * element — so a global class here would be dropped from the compiled CSS
 * silently, while still showing up in the DOM.
 * ---------------------------------------------------------------------- */

.elementor .d4c-readmore {
	display: block;
	width: max-content;
	/* centred, not right-aligned: the live button is created with
	 * `marginCenter dispBlock` and matches the plain `button.greenButton` rule
	 * (uniform 25px radius), not the `.blockStyle a.greenButton` rule with the
	 * asymmetric corners — that one only applies to anchors. */
	margin: 0 auto;
	background: var(--Bright-Green, #0db14b);
	color: #fff;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	/* `normal`, not the inherited 1.4 — a <button> does not inherit line-height
	 * in the original, and the 2.6px difference showed up on the card height. */
	line-height: normal;
	padding: 3px 30px;
	border-radius: 25px;
}

/* -------------------------------------------------------------------------
 * Mobile.
 *
 * The live site has essentially no responsive CSS — one media query at 750px —
 * so below ~900px it overflows and the header circle sits on top of the copy.
 * Per the "match desktop, fix mobile" decision, desktop is untouched and only
 * the narrow widths are corrected.
 * ---------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.elementor .d4c-news-title { font-size: 18px; }
}

/* The nav is a single 70px row of six uppercase links plus a 220px logo, which
 * stops fitting around 900px. The live site swaps to a Max Mega Menu hamburger
 * at 768; V4 has no toggle widget and this build no longer carries that plugin,
 * so the pill wraps instead — no JavaScript, no overflow, and the desktop
 * layout above 900px is untouched. */
@media (max-width: 900px) {
	.elementor .d4c-nav {
		flex-wrap: wrap;
		height: auto;
		border-radius: 35px;
		padding: 10px 20px;
		row-gap: 4px;
	}
	.elementor .d4c-nav-logo-link { padding-inline-start: 0; margin: 0 auto; }
	.elementor .d4c-nav-links {
		flex-wrap: wrap;
		justify-content: center;
		height: auto;
		flex-basis: 100%;
	}
	.elementor .d4c-nav-link { height: auto; padding: 6px 10px; }
}

@media (max-width: 767px) {
	/* the news row stacks; its thumbnail goes full width */
	.elementor .d4c-news-item { flex-direction: column; }
	.elementor .d4c-news-img  { width: 100%; height: 160px; }

	.elementor .d4c-fact-value { font-size: 64px; }
	.elementor .d4c-footer-input { width: 100%; }

	/* the header circle is sized in fixed px for the desktop composition */
	.elementor .d4c-hero-svg-art,
	.elementor .d4c-hero-svg-art-inner { width: 100%; height: auto; }

	/* the consortium track is a fixed 270px column on desktop; let it fill */
	.elementor .d4c-partners-scroller { height: auto; max-height: 671px; }
}

/* -------------------------------------------------------------------------
 * Rich body copy inside the About cards is now built from atomic elements
 * (e-paragraph / e-heading / display:list-item), so its spacing lives in the
 * global classes d4c-body-p, d4c-block-h3, d4c-list and d4c-li-*. The CSS rules
 * that used to style the raw-HTML widget's <p>/<ol>/<ul>/<h3> were removed:
 * `.d4c-block-inner p` is (0,2,1) and was outranking the (0,2,0) list-item
 * class, silently restoring a 1em margin on every list row.
 * ---------------------------------------------------------------------- */


/* ---------------------------------------------------------------------------
 * Pagination numbers
 *
 * The numbers between the two native arrows are injected by d4c.js (Elementor
 * 4.2.x has no numbered-pagination element). The live pill lays its items out
 * as inline text runs separated by a single space, so the gap is a space's
 * width at 14px rather than a flex gap.
 * ------------------------------------------------------------------------ */
.d4c-pagination .d4c-page-current { font-weight: 700; }
/* A disabled arrow is hidden, not greyed: on the live site page 1 shows
 * `1 2 3 … 7 Next »` with no Previous at all. Elementor's own e-pagination
 * base style sets display on the anchor, so this needs the extra element
 * qualifier to win. */
.d4c-pagination a.e--disabled { display: none; }


/* ---------------------------------------------------------------------------
 * Contact portraits
 *
 * One of the four key-staff records has no photo. The atomic image widget still
 * emits an <img> with no src attribute, which renders as a broken image — hide
 * it, and the card's own `align-content:flex-end` then bottom-aligns the rest
 * exactly as the live theme does.
 * ------------------------------------------------------------------------ */
.d4c-contact-photo-img:not([src]) { display: none; }


/* ---------------------------------------------------------------------------
 * Dynamic description paragraphs
 *
 * Descriptions are stored one paragraph per meta key so each can be its own
 * <p> (see content-sync.php). Records with fewer paragraphs leave the trailing
 * slots empty, and an empty <p> would still contribute its 14px margin.
 * ------------------------------------------------------------------------ */
.d4c-partner-text:empty,
.d4c-modal-text:empty,
/* The home carousel's paragraphs carry ONLY the spacing class — d4c-partner-text
 * also sets margin, and two global classes setting the same property on one
 * element have an undefined winner. That left the trailing empty slot out of the
 * rule above: it collapsed to 0 height but kept its 14px top margin, which
 * pushed the website button 14px down and made Paderborn overflow its card. */
.d4c-desc-first:empty,
.d4c-desc-rest:empty { display: none; }

/* NOT .d4c-download-desc — the live page renders that div whether or not it has
 * text (400x0, offset 30px), and it carries the 13px gap below each title pill.
 * Hiding it collapses a real part of the layout. */


/* The host the modal overlays are moved into (see d4c.js). It must not affect
 * layout itself — the overlays inside are position:fixed. */
.d4c-modal-host { display: contents; }


/* ---------------------------------------------------------------------------
 * Neutralise the outgoing theme's chrome rules on Elementor's location wrappers
 *
 * Elementor Pro wraps a Theme Builder document in a REAL <header>/<footer>
 * element (`.elementor-location-header` / `.elementor-location-footer`), so any
 * theme rule targeting those tags hits the wrapper as well as the design inside
 * it. On this site BBtheme has two that bite, and neither shows up on a build
 * running hello-elementor:
 *
 *   footer { background:var(--darkPurple); border-radius:150px;
 *            margin:4em auto 1em; color:#fff; font-size:11px }
 *       -> a SECOND purple 150px-radius slab around the real footer, and 44px
 *          of extra top margin on every page.
 *   .home header { min-height:570px }
 *       -> the front page's header wrapper inflates from 130px to 570px,
 *          pushing the whole document down 484px.
 *
 * Measured with dev/bbtheme-leak.py, which injects BBtheme's real stylesheet
 * into a rebuilt page and diffs the geometry.
 *
 * The doubled class is deliberate: `.home header` scores (0,1,1), so a single
 * `.elementor-location-header` (0,1,0) loses to it. Repeating the class makes it
 * (0,2,0) and wins without resorting to !important — which would then have to be
 * out-shouted by anything legitimately styling these wrappers later.
 * ------------------------------------------------------------------------ */
/* The rebuild's own header/footer are <header>/<footer> elements too, so
 * `.home header` reaches the inner .d4c-header just as it reaches the wrapper —
 * neutralising only the wrapper leaves the front page 440px too tall. */
.elementor-location-header.elementor-location-header,
.elementor-location-footer.elementor-location-footer,
.d4c-header.d4c-header,
.d4c-header-inner.d4c-header-inner {
	min-height: 0;
}

.elementor-location-header.elementor-location-header,
.elementor-location-footer.elementor-location-footer {
	background: none;
	border-radius: 0;
	margin: 0;
	padding: 0;
	min-height: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

/* ---------------------------------------------------------------------------
 * Type the rebuild relies on but never stated
 *
 * These come from whichever theme is active, so they are correct today by
 * accident. Stating them keeps the pages identical under BBtheme, under
 * hello-elementor, and under whatever comes next.
 * ------------------------------------------------------------------------ */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.elementor strong, .elementor b { font-weight: 700; }

/* ---------------------------------------------------------------------------
 * Text rendering parity with the live site.
 *
 * BBtheme sets `text-rendering: optimizeLegibility` on the body; hello-elementor
 * leaves it at `auto`. That switch turns kerning and ligatures on, so it moves
 * glyphs by a fraction of a pixel in EVERY string on the site — not enough to
 * see, but enough that a pixel comparison lit up on almost every text element
 * on every page. Setting it here makes the two stacks lay text out identically.
 * ------------------------------------------------------------------------- */
body { text-rendering: optimizeLegibility; }

/* The newsletter placeholder is 500/15px on the live site, not the input's own
 * 400/16px. Ninja Forms styles it that way; the atomic form input inherits from
 * the field instead, so the pill read a size too large and a weight too light. */
.d4c-footer-input::placeholder { font-size: 15px; font-weight: 500; }
.d4c-footer-input::-webkit-input-placeholder { font-size: 15px; font-weight: 500; }

/* ---------------------------------------------------------------------------
 * The download / cluster icon badge.
 *
 * Elementor's `.elementor .e-div-block-base` sets `min-width: 30px`, and
 * min-width BEATS width — it is not a cascade tie, so the class's own
 * `width: 20px` could never win no matter where it was emitted. The badge came
 * out 30px wide instead of a 20px square. The same base rule forces
 * display:block over the class's inline-block.
 *
 * The glyph has the mirror problem: e-svg-base sizes the inner <svg> to
 * 100%/100%, so it filled the whole badge instead of sitting at 14px inside it.
 *
 * Doubled class => (0,3,0), which beats the (0,2,0) base rules outright rather
 * than depending on emission order.
 * ------------------------------------------------------------------------- */
.elementor .d4c-icon-link.d4c-icon-link {
  min-width: 20px;
  display: inline-block;
}
.elementor .d4c-icon.d4c-icon {
  min-width: 20px;
}
/* !important is not laziness here: e-svg writes `width:100%;height:100%` as an
 * INLINE STYLE on the <svg> element, and an inline style cannot be beaten by any
 * selector, however specific. This is the only lever. */
.elementor .d4c-icon.d4c-icon svg {
  height: 14px !important;
  width: auto !important;
  fill: currentColor;
}

/* ---------------------------------------------------------------------------
 * The single-post body.
 *
 * This is the one legacy widget in the build (theme-post-content), so its
 * inner markup is WordPress's, not the atomic system's, and it inherits from
 * whatever the active theme provides rather than from the design system:
 *
 *   - headings fell back to Roboto, hello-elementor's default, where the live
 *     site renders Inter. Same size, same weight, different typeface.
 *   - links came out #004789, Elementor's default link blue, against the live
 *     site's #444 — body colour, no underline. On the live site these read as
 *     plain text, so a blue link is a visible change in tone, not a nuance.
 * ------------------------------------------------------------------------- */
.d4c-post-body h1,
.d4c-post-body h2,
.d4c-post-body h3,
.d4c-post-body h4,
.d4c-post-body h5,
.d4c-post-body h6 {
  font-family: Inter, Helvetica, Arial, sans-serif;
}
.d4c-post-body a,
.d4c-post-body a:visited,
.d4c-post-body a:hover {
  color: #444;
}

/* ---------------------------------------------------------------------------
 * Consortium strip scrollbar.
 *
 * Drawn rather than native: macOS uses overlay scrollbars, which reserve no
 * space and stay invisible until you are already scrolling — so nothing told
 * the visitor that ten more partners existed. ::-webkit-scrollbar does not
 * override that (both overflow:auto and overflow:scroll reserve 0px here), so
 * the strip gets a real rail it owns.
 * ------------------------------------------------------------------------- */
.d4c-partners-rail {
  position: relative;
  height: 6px;
  margin-top: 14px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.10);
  cursor: pointer;
  touch-action: none;
}
.d4c-partners-thumb {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 28px;
  border-radius: 3px;
  background: #0db14b;
  cursor: grab;
  /* Only the colour transitions. The position is set every frame from the
   * scroll offset, so transitioning transform would lag the strip. */
  transition: background-color .2s ease;
}
.d4c-partners-thumb:hover { background: #007e3c; }
.d4c-partners-thumb:active { cursor: grabbing; background: #007e3c; }

@media (prefers-reduced-motion: reduce) {
  .d4c-partners-thumb { transition: none; }
}
