/*!
 * Brand palette overrides — loaded after theme.css.
 *
 * The original brand green (#90c471) is a pastel: it scores 2.03:1 against
 * white, failing WCAG AA for normal text (4.5:1) and even large text (3.0:1).
 * It is kept here as a decorative accent for dark backgrounds only, and a
 * darker green of the same hue (98°) takes over wherever text is involved.
 *
 * Kept separate from theme.css so it survives a gulp rebuild and can be
 * reverted by removing one <link>.
 */

:root {
  /* accessible working green — same hue as the original, dark enough for text */
  --baer-green: #4a7c2f;          /* 4.98:1 on white, 4.98:1 behind white text */
  --baer-green-hover: #3d6b26;    /* 6.31:1 */
  --baer-green-soft: #eaf3e4;     /* tint for card / section fills */

  /* decorative pastel — only over dark backgrounds */
  --baer-green-accent: #90c471;   /* 5.13:1 on --baer-teal */

  --baer-teal: #20454a;           /* 10.44:1 on white — unchanged, already good */
  --baer-teal-soft: #2b5a61;
  --baer-teal-mist: #edf1f2;      /* teal at 8% on white — page-section fill */

  --baer-red: #d1003c;            /* was #ff0046 (3.93:1) */
  --baer-muted: #767676;          /* was #949494 (3.03:1) */
}

/*-----------------------------------------------
|   Sticky top navigation
|
|   theme.css redefines Bootstrap's .fixed-top as position:absolute, so
|   the whole bar scrolled off the page with the content and the menu —
|   below 1200px the only way into the navigation at all — became
|   unreachable. A later rule put it back to fixed, but only up to
|   992px, which left 993–1199px (the widest hamburger range) without a
|   sticky bar. Pin it at every width instead.
-----------------------------------------------*/
#mainNav.fixed-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
}

/* Once the page has moved, the bar sits over arbitrary content, so it
   needs its own ground. theme.css only did this up to 992px.
   It stays translucent so the section underneath shows through, and
   the veil thickens towards the right, where the menu items are: the
   logo only needs enough ground to stay a shape, the nav text needs
   enough to stay readable. 50% black over a white section composites
   to #808080 — 3.95:1 against the white logo, so the light edge still
   clears the 3:1 floor for graphics.
   The blur is what keeps the text calm over a busy background; without
   backdrop-filter support the gradient alone still carries it.
   background-color must be reset too: .navbar-fix (subpages) paints
   #000 with !important, and a solid layer under the gradient would
   swallow the transparency on those two pages. */
#mainNav.scrolled {
  background-color: transparent !important;
  background-image: linear-gradient(to right,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.72) 50%,
      rgba(0, 0, 0, 0.88) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* The colour logo's wordmark is #1F454A and disappears on the black
   scrolled bar; the sw variant is the light-on-dark cut (it is what the
   subpages use for their permanently black bar). Both <img> are already
   in the markup, so scrolling just swaps which one shows — and the
   smaller mark keeps the fixed bar from eating ~113px of viewport. */
@media (min-width: 1200px) {

  #mainNav.scrolled .logo-color {
    display: none;
  }

  #mainNav.scrolled .logo-sw {
    display: inline-block;
    width: 160px;
  }
}

/* Hamburger panel: opaque rather than a 50% black inset over whatever
   section happens to be behind it, and scrollable so a short landscape
   viewport can still reach the last item. */
@media (max-width: 1199.98px) {

  #mainNav .navbar-collapse {
    background-color: rgba(0, 0, 0, 0.94);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
}

/* The bar now covers the top of whatever an anchor lands on. The nav
   links are plain hash links (no data-fancyscroll), so the native
   smooth scroll honours scroll-margin. */
#services,
#projects,
#automationbg,
#about,
#contact {
  scroll-margin-top: 4.5rem;
}

@media (min-width: 1200px) {

  #services,
  #projects,
  #automationbg,
  #about,
  #contact {
    scroll-margin-top: 6rem;
  }
}

/*-----------------------------------------------
|   Green: text, links, fills
-----------------------------------------------*/
a {
  color: var(--baer-green);
}

a:hover,
a:focus {
  color: var(--baer-green-hover);
}

.text-baer,
.text-bear {
  color: var(--baer-green) !important;
}

.text-acc2 {
  color: var(--baer-green) !important;
}

.bg-baer {
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
}

/* .text-white is !important in theme.css, so beat it on specificity */
.bg-baer.text-white,
.bg-baer .text-white,
span.text-white.bg-baer,
h1.bg-baer.text-white,
h2.bg-baer.text-white {
  color: var(--baer-teal) !important;
}

.btn-baer {
  background-color: var(--baer-green-accent);
  border-color: var(--baer-green-accent);
  color: var(--baer-teal);
}

.btn-baer:hover,
.btn-baer:focus {
  background-color: var(--baer-green-hover);
  border-color: var(--baer-green-hover);
  color: #fff;
}

.ul-ani:before {
  background-color: var(--baer-green);
}

/* the pastel stays legible on the dark teal, so keep it there */
.bg-baer-dark .text-baer,
.bg-baer-dark .text-bear,
.bg-baer-dark .text-acc2,
.bg-baer-lightdark .text-baer,
footer .text-baer {
  color: var(--baer-green-accent) !important;
}

/*-----------------------------------------------
|   Hero — the three capability lines
|
|   They were &#8226; bullets inside one <p>, so the header's most
|   important claim looked like a plain-text afterthought. Each line is
|   its own discipline, so each gets the icon medallion the #services
|   cards already use (pastel disc, teal glyph, 5.13:1) — hero and
|   section below then read as one system instead of two designs.
|
|   The <ul> is inline-block: the hero column is .text-center below lg,
|   which would leave three ragged centred rows; as one block it centres
|   as a unit while the rows stay aligned to each other. max-width keeps
|   the long third label from pushing the column open on small phones.
-----------------------------------------------*/
.hero-caps {
  list-style: none;
  display: inline-block;
  max-width: 100%;
  padding: 0;
  margin-bottom: 0;
  text-align: left;
}

.hero-cap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.55rem 0;
}

/* hairlines between the rows, not around them — the block stays open
   towards the headline above and the button below */
.hero-cap + .hero-cap {
  border-top: 1px solid #e4ebe0;
}

.hero-cap-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* the icons are CSS masks sized in em, so the disc scales the glyph */
.hero-cap-icon .fas {
  font-size: 1.25rem;
}

.hero-cap-label {
  font-size: 1.333rem;   /* .fs-1, the size the <p> carried */
  line-height: 1.3;
  color: var(--baer-teal);
  overflow-wrap: break-word;
}

/* "Infra | Automation | OpsDev | SRE" — the pipes are separators, not
   content, so they step back and let the four terms read as terms */
.hero-cap-sep {
  color: var(--baer-muted);
  padding: 0 0.15rem;
}

/* the row is the hover target, not just the label: the medallion fills
   and the existing .ul-ani underline sweeps in together */
.hero-cap:hover .hero-cap-icon {
  background-color: var(--baer-green);
  color: #fff;
}

.hero-cap:hover .ul-ani::before {
  transform: translate(-50%, 0) scaleX(1);
}

@media (max-width: 575.98px) {

  .hero-cap {
    gap: 0.7rem;
  }

  .hero-cap-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .hero-cap-icon .fas {
    font-size: 1rem;
  }

  .hero-cap-label {
    font-size: 1.125rem;
  }
}

/*-----------------------------------------------
|   Teal mist — the #about text column
|
|   The photo next to it is cool and desaturated; its pale sky (~#dbe9ea)
|   meets this column at the top edge, where the previous .bg-light
|   (#fafafa, a neutral grey with no blue in it) left a visible seam.
|   Body copy (#404040) sits at 8.9:1 here.
-----------------------------------------------*/
.bg-baer-mist {
  background-color: var(--baer-teal-mist);
}

/*-----------------------------------------------
|   Footer region — the contact / profiles block
|
|   It used to be a white section between the white certifications
|   section above and the black copyright bar below, so it read as the
|   tail of the certifications rather than as the closing block. On the
|   dark teal it closes the page and steps down into the black bar.
|
|   White on #20454a is 10.44:1; the working green (#4a7c2f) only manages
|   2.1:1 there, so links take the decorative pastel (5.13:1) — the same
|   swap the footer bar already makes for .text-baer.
-----------------------------------------------*/
.footer-region {
  color: #fff;
}

.footer-region h4,
.footer-region address,
.footer-region p {
  color: #fff;
}

.footer-region a {
  color: var(--baer-green-accent);
}

.footer-region a:hover,
.footer-region a:focus {
  color: #fff;
}

.footer-region a:focus-visible {
  outline-color: var(--baer-green-accent);
}

/*  Invitation column
 *
 *  "Haben Sie Interesse …" / "Dann nehmen Sie Kontakt …" were two
 *  same-size paragraphs, so the block had no entry point. It now reads
 *  kicker → claim → line, the same three-step the .cta-band uses.
 */
.footer-region .footer-kicker {
  color: var(--baer-green-accent);
  letter-spacing: 0.08em;
}

.footer-region .footer-claim {
  color: #fff;
  line-height: 1.25;
}

/*  Two blocks, not three.
 *
 *  Profiles used to be a third column carrying the same weight as the
 *  contact data, which made the row read as a link farm. The footer is
 *  now one primary column on the left — kicker, claim, and past a rule
 *  the two contact tiles, so the invitation and the way to answer it are
 *  one uninterrupted read — and one secondary column on the right
 *  carrying the identity: logo, and past a second rule the profile links
 *  with the postal address closing the column.
 *
 *  Both column headings share .footer-sublabel; they are <h4> so the
 *  outline stays intact, and the claim above stays the only larger
 *  voice.
 */
.footer-rule {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 1.75rem 0;
}

/*  Tracking is 0.06em rather than the 0.09em the smaller kickers use:
 *  letterspacing that separates 11px text reads as gappy at 18px.
 */
.footer-region .footer-sublabel {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
}

/*  Contact tiles
 *
 *  "Telefon: <nummer>" and "E-Mail: <adresse>" were label-plus-link text
 *  lines: the only clickable part was the value itself, a target a few
 *  characters wide, and nothing marked the two most important pieces of
 *  data on the page as actionable. Each is now a full-width tile that is
 *  itself the <a>, so the whole row is the hit area.
 *
 *  On --baer-teal the 6% white fill composites to ~#2d5054, which still
 *  carries white text at ~9.6:1; the label above the value takes the
 *  decorative pastel (5.13:1), the same pairing as .cta-kicker.
 */
.contact-tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.06);
  /* Bootstrap underlines links on hover; on a tile that would drag a
     rule under both lines of text */
  text-decoration: none;
  /* The number and the address have to stay copyable. Dragging across
     the text of an <a> starts a link drag instead of a selection, so
     the drag has to be turned off — here for WebKit/Blink, and via
     draggable="false" in the markup for Gecko, which ignores this. */
  -webkit-user-drag: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-region a.contact-tile:hover,
.footer-region a.social-btn:hover {
  text-decoration: none;
}

.contact-tile-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(144, 196, 113, 0.18);
  color: var(--baer-green-accent);
  font-size: 1.25rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-tile-kicker {
  color: var(--baer-green-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.6;
}

/* the address and the mail address are both long strings in a narrow
   column, so they have to be allowed to break */
.contact-tile-value {
  color: #fff;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.footer-region a.contact-tile:hover,
.footer-region a.contact-tile:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--baer-green-accent);
  transform: translateY(-2px);
}

.contact-tile:hover .contact-tile-icon,
.contact-tile:focus .contact-tile-icon {
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
}

/*  Postal address — deliberately not a tile: it is the legal / NAP
 *  block, not something to click, so it keeps the icon rhythm of the
 *  tiles above but none of their affordance.
 */
.contact-address {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  /* it closes the column under the profile buttons and is a different
     kind of information than the links above it, so it needs more air
     than the gap inside the button row */
  margin-top: 2.25rem;
  margin-bottom: 0;
  font-style: normal;
  line-height: 1.5;
}

.contact-address-icon {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  width: 2.5rem;
  color: var(--baer-green-accent);
  font-size: 1.25rem;
  line-height: 1.5;
}

/*  Profile links
 *
 *  Were four bare glyphs separated by <br><br><br>, which left the
 *  spacing at the mercy of the line height and gave each link only the
 *  hit area of the glyph itself. They are round buttons in a flex row
 *  now, at 2.75rem ≈ the 44px touch target.
 */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-region a.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--baer-green-accent);
  font-size: 1.25rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-region a.social-btn:hover,
.footer-region a.social-btn:focus {
  background-color: var(--baer-green-accent);
  border-color: var(--baer-green-accent);
  color: var(--baer-teal);
  transform: translateY(-2px);
}


/*-----------------------------------------------
|   Red + muted grey
-----------------------------------------------*/
.bg-baer-red,
.color-acc {
  background-color: var(--baer-red);
}

.text-acc,
.baer-underline {
  color: var(--baer-red);
}

.text-500,
.text-muted {
  color: var(--baer-muted) !important;
}

/*-----------------------------------------------
|   Focus visibility (was relying on the pastel)
-----------------------------------------------*/
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--baer-green);
  outline-offset: 2px;
}

/*-----------------------------------------------
|   Services: cards + icon medallions
|   Pure CSS over the existing markup — no HTML changes.
-----------------------------------------------*/
#services {
  background-color: #f6f9f4;
}

#services > .container > .row > .col-lg-6 {
  display: flex;
}

#services .media {
  background-color: #fff;
  border: 1px solid #e4ebe0;
  border-radius: 0.5rem;
  padding: 1.75rem;
  width: 100%;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#services .media:hover {
  border-color: var(--baer-green);
  box-shadow: 0 6px 20px rgba(32, 69, 74, 0.09);
}

/* the div wrapping each icon becomes the medallion */
#services .media > .overflow-hidden:first-child {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  margin-right: 1.25rem;
  border-radius: 50%;
  background-color: var(--baer-green-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

#services .media .svg-icon {
  width: 1.6rem !important;
  margin-right: 0 !important;
}

#services .media .svg-icon.text-baer,
#services .media .svg-icon.text-bear {
  color: var(--baer-teal) !important;   /* 5.13:1 on the pastel disc */
}

/*-----------------------------------------------
|   Certifications
|
|   The section used to be one chronological run: two Azure badges at
|   the top, then six certificates back to 2003, then twelve trainings
|   back to 2002, all at the same weight. A 2003 Citrix certificate
|   standing next to Azure does not add depth, it dates the whole block,
|   and the trailing training list ended in 2017 — which says "nothing
|   since then" louder than any of the entries say anything.
|
|   Two claims instead: what is valid now, and what the twenty years
|   behind it consist of. The history keeps every entry, but behind the
|   same disclosure the project cards use, so it is available without
|   being the first thing read.
-----------------------------------------------*/
/*  "Aktuell gültig" was a badge in its own half of the row, and one
 *  object in half a screen claims a gap where a reader would not have
 *  looked for one. It is a line now: the mark at list size, the name,
 *  and the fact that Fundamentals does not expire — stated once, calmly,
 *  and done. The section runs at a readable measure (col-lg-9) instead
 *  of two columns, so the weight of the page stays with the projects.
 */
.cert-current {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.cert-current-body {
  min-width: 0;
}

.cert-current-name {
  color: var(--baer-teal);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0;
}

/* same step-up the footer headings take: 1.125rem with the tracking
   pulled back to 0.06em, which reads gappy at this size otherwise */
.cert-label {
  color: var(--baer-green);
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.cert-note {
  color: var(--baer-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.cert-sublabel {
  color: var(--baer-teal);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

/* .list-checked only drops the marker, so the lists still carry the
   browser's 40px indent — with the tick doing the marker's job that is
   an empty gutter. Flush left inside the disclosure instead. */
.cert-more-body .list-checked {
  padding-left: 0;
}

/*  The Azure Administrator badge keeps its artwork and its Credly link
 *  inside the history list. At 4.5rem it is a mark next to a line, not a
 *  claim of its own like the 245px badge in the "Aktuell gültig" column
 *  — which is the whole point: the credential is shown and verifiable,
 *  without being presented as current.
 */
/*  Issuer chips instead of vendor logos.
 *
 *  Certification logos may generally only be carried by whoever holds
 *  the certification in the vendor's current programme — for retired
 *  ones (MCP, MCSE, the old Citrix CCA) no usable mark exists at all.
 *  The issuer as a chip gives the list the same left rail a logo column
 *  would, costs no third-party artwork and raises no trademark question.
 *  Same recipe as .proj-tech, so the two lists read as one family.
 *
 *  The rail is what makes it work: fixed-width chip, text in its own
 *  flex column, so a wrapping entry indents under itself instead of
 *  running back under the chip.
 */
.cert-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.cert-chip {
  flex: 0 0 auto;
  min-width: 5.5rem;
  text-align: center;
  background-color: var(--baer-green-soft);
  color: #2f5d1e;
  border: 1px solid #d5e6c9;
  border-radius: 0.375rem;
  padding: 0.22rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.cert-badge-item,
.cert-list .cert-badge-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.cert-badge-img {
  display: block;
  width: 4.5rem;
  height: auto;
}

/*-----------------------------------------------
|   Contact band
-----------------------------------------------*/
.cta-band {
  background-color: var(--baer-teal);
  color: #fff;
}

.cta-band .cta-kicker {
  color: var(--baer-green-accent);
  letter-spacing: 0.08em;
}

.cta-band .btn-cta {
  background-color: #fff;
  color: var(--baer-teal);
  border: 0;
  font-weight: 700;
}

.cta-band .btn-cta:hover,
.cta-band .btn-cta:focus {
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
}

.cta-band a.cta-link {
  color: #fff;
  text-decoration: underline;
}

.cta-band a.cta-link:hover {
  color: var(--baer-green-accent);
}

/*-----------------------------------------------
|   Carousels on small screens
|
|   #automationbg nests three levels of horizontal padding
|   (container 15 + column 15 + .px-4 28.8), leaving each slide only
|   ~227px of a 345px viewport. Headings wrap to four or five lines.
|   Reclaim the innermost padding below the md breakpoint; this is
|   parsed before owl.carousel initialises, so owl measures the wider
|   box and sizes its slides accordingly.
-----------------------------------------------*/
@media (max-width: 767.98px) {

  #automationbg .owl-carousel.px-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #automationbg .owl-stage-outer {
    overflow: hidden;
  }
}

/*-----------------------------------------------
|   Projects — heading and card grid share one section
|
|   The heading banner and the cards used to be two sections, which
|   stacked section padding on container padding (7.5rem + 10rem above
|   the first card on desktop). They are now one #projects section, so
|   the parallax image runs behind the cards too and only one set of
|   paddings applies.
|
|   The grid replaces the autoplay carousel, which showed one project at
|   a time and hid the other three behind a timer. All four are now
|   scannable at once; the long task lists sit behind a native <details>
|   so the section stays short without losing detail.
-----------------------------------------------*/
#projects > .container {
  /* .bg-holder is absolutely positioned and comes first in the DOM, so
     it would paint over the static cards without this */
  position: relative;
  z-index: 1;
}

#projects .bg-holder {
  /* rellax translates the holder vertically; over a section this tall
     the shift would otherwise expose an edge */
  top: -15%;
  min-height: 130%;
}

.proj-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .proj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    /* size each card to its own content; the task lists differ a lot in
       length and stretching them leaves a dead gap above the disclosure */
    align-items: start;
  }
}

.proj-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid #e4ebe0;
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.proj-card:hover {
  border-color: var(--baer-green-accent);
  box-shadow: 0 10px 28px rgba(32, 69, 74, 0.10);
  transform: translateY(-2px);
}

.proj-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.proj-date {
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.proj-flag {
  background-color: var(--baer-teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.proj-title {
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--baer-teal);
  margin: 0 0 0.4rem;
}

.proj-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--baer-green);
  margin: 0 0 0.9rem;
}

.proj-summary {
  color: #404040;
  margin: 0 0 1.1rem;
}

/* technology chips */
.proj-tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 1.25rem;
}

.proj-tech li {
  background-color: var(--baer-green-soft);
  color: #2f5d1e;
  border: 1px solid #d5e6c9;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.22rem 0.6rem;
  border-radius: 0.375rem;
}

/*  Progressive disclosure — the long task lists, and the certification
 *  history in #certifications.
 *
 *  The trigger was a small uppercase text link and read as a caption
 *  rather than a control, so the detail went unnoticed. It is now a
 *  full-width bar in the accent green — the widest element in the card
 *  and the only filled one, which makes it the obvious thing to click.
 *  #90c471 carries --baer-teal at 5.13:1, the same pairing as .proj-date.
 *
 *  .cert-more rides on the same rules rather than a second copy of them:
 *  it is the same control doing the same job in a different section, and
 *  two copies would drift apart on the next change.
 */
.proj-more {
  /* stick to the bottom edge of the card when the grid stretches it */
  margin-top: auto;
  padding-top: 1.1rem;
}

.proj-more > summary,
.cert-more > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem 0.7rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--baer-green-accent);
  color: var(--baer-teal);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.proj-more > summary::-webkit-details-marker,
.cert-more > summary::-webkit-details-marker {
  display: none;
}

/* chevron sits in its own disc on the trailing edge */
.proj-more > summary::after,
.cert-more > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0.5rem 2px, 2px 0.5rem;
  background-position: center, center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

/* open: the vertical stroke collapses, leaving a minus */
.proj-more[open] > summary::after,
.cert-more[open] > summary::after {
  background-size: 0.5rem 2px, 0 0.5rem;
  transform: rotate(180deg);
}

.proj-more > summary:hover,
.proj-more[open] > summary,
.cert-more > summary:hover,
.cert-more[open] > summary {
  background-color: var(--baer-green);
  color: #fff;
}

.proj-more > summary:hover,
.cert-more > summary:hover {
  box-shadow: 0 4px 14px rgba(32, 69, 74, 0.18);
}

.proj-more > summary:hover::after,
.proj-more[open] > summary::after,
.cert-more > summary:hover::after,
.cert-more[open] > summary::after {
  background-color: rgba(255, 255, 255, 0.22);
}

.proj-more > summary:focus-visible,
.cert-more > summary:focus-visible {
  outline: 3px solid var(--baer-teal);
  outline-offset: 2px;
}

.proj-more-body,
.cert-more-body {
  padding-top: 1rem;
}

.proj-more-body ul,
.cert-more-body ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.proj-more-body li,
.cert-more-body li {
  margin-bottom: 0.35rem;
}

.proj-more-body ul ul {
  margin-top: 0.35rem;
}

/*-----------------------------------------------
|   Narrow-screen overflow guards
|
|   .media is a flex row; a flex item defaults to min-width:auto, so it
|   refuses to shrink below its longest word. German compounds
|   ("Entwicklungsunterstützung") then push the card past the viewport.
|   min-width:0 lets the text column shrink and wrap instead.
-----------------------------------------------*/
#services .media-body {
  min-width: 0;
}

#services .media-body h3,
#services .media-body p,
.proj-title,
.proj-summary,
.proj-more-body li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (max-width: 575.98px) {

  #services .media {
    padding: 1.25rem;
  }

  #services .media > .overflow-hidden:first-child {
    width: 3rem;
    height: 3rem;
    margin-right: 0.9rem;
  }

  .proj-card {
    padding: 1.25rem;
  }

  .proj-title {
    font-size: 1.25rem;
  }
}

/*-----------------------------------------------
|   Automatisierungsbeispiele — card grid
|
|   Was a 9-slide autoplay carousel showing one example at a time.
|   These are short, self-contained snippets that benefit from being
|   compared side by side, so they are now a three-up grid.
-----------------------------------------------*/
.auto-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 768px) {
  .auto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .auto-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.auto-card {
  background-color: #fff;
  border: 1px solid #e4ebe0;
  border-left: 3px solid var(--baer-green-accent);
  border-radius: 0.5rem;
  padding: 1.4rem 1.5rem;
  transition: box-shadow 0.2s ease, border-left-color 0.2s ease, transform 0.2s ease;
}

.auto-card:hover {
  border-left-color: var(--baer-green);
  box-shadow: 0 8px 22px rgba(32, 69, 74, 0.09);
  transform: translateY(-2px);
}

.auto-title {
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--baer-teal);
  margin: 0 0 0.75rem;
  overflow-wrap: break-word;
}

.auto-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auto-list li {
  position: relative;
  padding-left: 1.05rem;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #404040;
  overflow-wrap: break-word;
}

.auto-list li:last-child {
  margin-bottom: 0;
}

.auto-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--baer-green);
}

/*-----------------------------------------------
|   Section banner headings
|
|   The utility ladder jumps from .fs-md-5 (4.199rem) to .fs-md-6
|   (5.584rem) with nothing in between, so the size both headings want
|   is set here; .fs-md-6 in the markup is the fallback.
|   "Automatisierungsbeispiele" is a single 25-character word and does
|   not fit on one line at any of these sizes in a 1140px container, so
|   it has to be allowed to hyphenate rather than overflow. Below md
|   neither .fs-5 nor .display-1 has a step-down, hence the explicit
|   mobile size; id selectors (1,0,1) outrank the utility classes, so no
|   !important is needed.
-----------------------------------------------*/
#automationbg h2,
#projects h2 {
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (min-width: 768px) {

  #automationbg h2,
  #projects h2 {
    font-size: 4.75rem;
  }
}

@media (max-width: 767.98px) {

  #automationbg h2,
  #projects h2 {
    font-size: 1.9rem;
    line-height: 1.15;
    margin-bottom: 1.75rem;
  }
}
