/* Branchen: quiet border draw and accessible, two-sided cards. */
#branchen-grid .industry-card {
  display: grid;
  position: relative;
  min-width: 0;
  perspective: 1100px;
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: none;
}
/* Both faces carry their own contour, so the border shares the complete 3D flip. */
@property --industry-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
#branchen-grid .industry-card__face::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  padding: 2px;
  pointer-events: none;
  border-radius: inherit;
  background: conic-gradient(from var(--industry-border-angle),
    rgba(242,140,40,.24) 0deg,
    rgba(242,140,40,.24) 190deg,
    rgba(242,140,40,.60) 240deg,
    #f28c28 272deg,
    rgba(255,255,255,.96) 288deg,
    #f28c28 304deg,
    rgba(242,140,40,.60) 336deg,
    rgba(242,140,40,.24) 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 480ms cubic-bezier(.22,1,.36,1);
  animation: industry-border-orbit var(--energy-speed, 9.6s) linear infinite paused;
}
#branchen-grid .industry-card:hover .industry-card__face::before,
#branchen-grid .industry-card:focus-within .industry-card__face::before {
  opacity: .88;
  animation-play-state: running;
}
@keyframes industry-border-orbit {
  to { --industry-border-angle: 360deg; }
}
#branchen-grid .industry-card__toggle {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  perspective: 1100px;
}
#branchen-grid .industry-card__toggle:focus-visible { outline: none; }
#branchen-grid .industry-card__toggle:focus-visible .industry-card__face {
  outline: 2px solid #f28c28;
  outline-offset: 5px;
}
#branchen-grid .industry-card__turner {
  display: grid;
  min-height: clamp(360px,31vw,560px);
  border-radius: inherit;
  box-shadow: 0 20px 50px rgba(3,9,14,.22);
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  translate: 0 0;
  rotate: 0deg;
  scale: 1;
  transition:
    transform 900ms cubic-bezier(.22,.7,.2,1.055),
    translate 260ms cubic-bezier(.22,1,.36,1),
    rotate 260ms cubic-bezier(.22,1,.36,1),
    scale 260ms cubic-bezier(.22,1,.36,1),
    box-shadow 300ms ease;
}
#branchen-grid .industry-card.is-turning .industry-card__turner {
  translate: 0 -7px;
  rotate: -.65deg;
  scale: 1.012;
  box-shadow: 0 24px 34px rgba(3,9,14,.34);
}
#branchen-grid .industry-card.is-flipped.is-turning .industry-card__turner {
  rotate: .65deg;
}
#branchen-grid .industry-card.is-flipped .industry-card__turner {
  transform: rotateY(180deg);
}
#branchen-grid .industry-card__face {
  grid-area: 1 / 1;
  position: relative;
  min-width: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
#branchen-grid .industry-card__face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255,255,255,.16), transparent 42%, rgba(0,0,0,.2));
  opacity: 0;
  transition: opacity 280ms ease;
}
#branchen-grid .industry-card.is-turning .industry-card__face::after { opacity: 1; }
#branchen-grid .industry-card__front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px,1.8vw,30px);
  background-image:
    linear-gradient(180deg,rgba(7,14,19,0) 25%,rgba(7,14,19,.16) 46%,rgba(7,14,19,.93) 100%),
    var(--industry-image);
  background-position: center,var(--industry-image-position,center);
  background-size: cover;
  transform: rotateY(0deg);
}
#branchen-grid .industry-card__front-content {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: clamp(15px,1.3vw,24px);
  align-items: center;
}
#branchen-grid .industry-card__title {
  display: block;
  color: #fff;
  font-size: clamp(1.18rem,1.55vw,2.15rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.025em;
  text-align: right;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
#branchen-grid .industry-card__intro {
  display: block;
  padding-left: clamp(15px,1.3vw,24px);
  border-left: 2px solid rgba(242,140,40,.8);
  color: rgba(255,255,255,.87);
  font-size: clamp(.82rem,.92vw,.98rem);
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
  hyphens: auto;
}
#branchen-grid .industry-card__hint {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .6em;
  padding-top: 20px;
  color: rgba(255,255,255,.75);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
}
#branchen-grid .industry-card__hint > span { color: #f28c28; font-size: 1rem; }
#branchen-grid .industry-card__back {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px,2vw,34px);
  background: var(--hk-dark-solid,#172229);
  transform: rotateY(180deg);
}
#branchen-grid .industry-card__eyebrow {
  display: block;
  margin-bottom: 16px;
  color: #f3a55a;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .055em;
  text-transform: uppercase;
}
#branchen-grid .industry-card__headline {
  display: block;
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(1.5rem,1.9vw,2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: balance;
}
#branchen-grid .industry-card__description {
  display: block;
  margin-bottom: 20px;
  color: rgba(255,255,255,.86);
  font-size: clamp(.9rem,.98vw,1rem);
  font-weight: 400;
  line-height: 1.65;
  hyphens: auto;
  overflow-wrap: break-word;
}
#branchen-grid .industry-card__keywords {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.64);
  font-size: .72rem;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: break-word;
}
#branchen-grid .industry-card__return {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  margin-top: 20px;
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.4;
}
#branchen-grid .industry-card__return > span { color: #f28c28; font-size: 1.2rem; }
@media (max-width: 760px) {
  #branchen-grid .industry-card__turner { min-height: 390px; }
  #branchen-grid .industry-card__title { font-size: 1.4rem; }
}
@media (max-width: 420px) {
  #branchen-grid .industry-card__front-content { grid-template-columns: 1fr; gap: 12px; }
  #branchen-grid .industry-card__title { text-align: left; text-wrap: balance; }
  #branchen-grid .industry-card__intro { padding-left: 14px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  #branchen-grid .industry-card__face::before,
  #branchen-grid .industry-card__turner { transition: none; }
  #branchen-grid .industry-card__face::before { animation: none; }
  #branchen-grid .industry-card__face::after { display: none; }
  #branchen-grid .industry-card.is-turning .industry-card__turner {
    translate: none;
    rotate: none;
    scale: none;
    box-shadow: none;
  }
}

/* Asset URLs stay relative to this stylesheet for nested server deployments. */
#branchen-grid [data-industry-card="automotive"] { --industry-image: url("../Bilder/branches/branch-automotive.webp"); --industry-image-position: 68% center; }
#branchen-grid [data-industry-card="funvehicle"] { --industry-image: url("../Bilder/branches/branch-atv.webp"); --industry-image-position: 70% center; }
#branchen-grid [data-industry-card="electromotive"] { --industry-image: url("../Bilder/branches/branch-electromotive-realistic-v686t7.webp"); --industry-image-position: 55% center; }
#branchen-grid [data-industry-card="bahn"] { --industry-image: url("../Bilder/media-3x2/branch-bahn.webp"); --industry-image-position: 66% center; }
#branchen-grid [data-industry-card="luftfahrt"] { --industry-image: url("../Bilder/branches/branch-aerospace.webp"); --industry-image-position: 72% center; }
#branchen-grid [data-industry-card="robotik"] { --industry-image: url("../Bilder/media-3x2/branch-robotik.webp"); --industry-image-position: 72% center; }
#branchen-grid [data-industry-card="maschinenbau"] { --industry-image: url("../Bilder/media-3x2/branch-maschinenbau.webp"); --industry-image-position: 68% center; }
#branchen-grid [data-industry-card="erneuerbare"] { --industry-image: url("../Bilder/branches/branch-renewable.webp"); --industry-image-position: 72% center; }
#branchen-grid [data-industry-card="marine"] { --industry-image: url("../Bilder/branches/branch-marine-luxury-card-v686t9.webp"); --industry-image-position: 60% center; }
