/* SITOX Council v14: orientation, deliberate interactions and a larger image view. */
html { scrollbar-gutter:stable; }
.hauptnav a[aria-current="location"]:not(.btn)::after { transform:scaleX(1); background:var(--messing); }
.hauptnav a[aria-current="location"].btn { outline:2px solid var(--messing); outline-offset:4px; }
.hauptnav a:focus-visible::after { transform:scaleX(1); }

/* Informative cards retain their normal cursor and do not move like buttons. */
.leistung { position:relative; }
.leistung::after {
  content:""; position:absolute; inset:-2px 0 auto; height:2px;
  background:var(--messing-text); transform:scaleX(.16); transform-origin:left;
}
.leistung:hover::after, .leistung:focus-within::after { transform:scaleX(1); }
.leistung:hover .leistung__index, .leistung:focus-within .leistung__index { color:var(--messing-text); }
.ablauf-kompakt > li { position:relative; padding-top:26px; }
.ablauf-kompakt > li::before {
  content:""; position:absolute; top:-1px; left:0; width:100%; height:2px;
  background:var(--messing-text); transform-origin:left; opacity:.75;
}
.ablauf-kompakt__nummer {
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border:1px solid #afbac4; border-radius:50%;
  background:#edf1f3; font-size:1.1rem; font-variant-numeric:tabular-nums;
}
.projektfragen__liste summary { transition:color 180ms ease; }
.projektfragen__liste summary:hover, .projektfragen__liste summary:focus-visible { color:var(--messing-text); }

/* Controls are hidden until the dialog has been wired successfully. */
.council-image-open[hidden], .council-gallery[hidden], .council-gallery:not([open]) { display:none; }
.council-image-open {
  position:absolute; top:12px; right:12px; z-index:1;
  display:inline-flex; align-items:center; gap:9px; min-height:44px;
  padding:10px 13px; border:1px solid #ffffffa6; border-radius:3px;
  background:#fbfbfaf2; color:#142335;
  font:600 .82rem/1.3 var(--font-text); cursor:pointer;
  box-shadow:0 3px 16px #101c2c14;
}
.council-image-open > span[aria-hidden] { font-size:1.2rem; line-height:1; }
.council-image-open:hover { background:#142335; color:#fff; border-color:#142335; }
.council-image-open:focus-visible { outline:3px solid #142335; outline-offset:3px; }
html.council-gallery-open { overflow:hidden; }
.council-gallery {
  box-sizing:border-box; width:min(1280px,calc(100vw - 32px));
  max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  margin:auto; padding:0; border:1px solid #425363; border-radius:5px;
  overflow:auto; color:#f5f6f7; background:#101c2c;
  box-shadow:0 28px 90px #0007;
}
.council-gallery::backdrop { background:#07121edb; }
.council-gallery__header {
  display:flex; justify-content:space-between; align-items:center; gap:20px;
  padding:18px 22px; border-bottom:1px solid #ffffff24;
}
.council-gallery__header h2 { margin:0; font-size:clamp(1.18rem,2.2vw,1.65rem); line-height:1.25; }
.council-gallery__status { margin:5px 0 0; font-size:.83rem; color:#bcc8d2; font-variant-numeric:tabular-nums; }
.council-gallery__close, .council-gallery__controls button {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:44px; padding:9px 14px; border:1px solid #8394a3; border-radius:3px;
  background:transparent; color:#fff; font:500 .9rem/1.3 var(--font-text); cursor:pointer;
}
.council-gallery__close { flex-shrink:0; }
.council-gallery button:hover { background:#ffffff12; border-color:#e9edf0; }
.council-gallery button:focus-visible { outline:3px solid var(--messing); outline-offset:3px; }
.council-gallery__body { padding:16px 22px 0; }
.council-gallery__frame { position:relative; width:fit-content; max-width:100%; margin:auto; }
.council-gallery__image {
  display:block; width:auto; max-width:100%; height:auto;
  max-height:calc(100vh - 250px); max-height:calc(100dvh - 250px);
  margin:auto; object-fit:contain; border-radius:2px;
}
.council-gallery__frame .bild-wasserzeichen { color:#172436; opacity:.62; }
.council-gallery__controls { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 22px 18px; }
.council-gallery__controls button { min-width:126px; }
.council-gallery__error { margin:12px 0 0; color:#fff; font-size:.95rem; }

@keyframes council-rule-in { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@keyframes council-answer-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
@keyframes council-dialog-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:no-preference) {
  .council-process-enter > li::before { animation:council-rule-in 560ms cubic-bezier(.22,.68,0,1) both; }
  .council-process-enter > li:nth-child(2)::before { animation-delay:90ms; }
  .council-process-enter > li:nth-child(3)::before { animation-delay:180ms; }
  .projektfragen__liste details[open] > div { animation:council-answer-in 220ms ease-out; }
  .council-gallery[open] { animation:council-dialog-in 230ms ease-out; }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .leistung::after { transition:transform 320ms ease; }
  .council-image-open { transition:background-color 180ms ease,color 180ms ease,border-color 180ms ease; }
}
@media (max-width:59.99em) {
  .hauptnav a[aria-current="location"]:not(.btn) { color:var(--messing); }
}
@media (max-width:47.99em) {
  .ablauf-kompakt > li { grid-template-columns:44px minmax(0,1fr); gap:6px 15px; padding-top:22px; }
  .ablauf-kompakt__nummer { margin:0; font-size:1rem; }
  .council-image-open { top:9px; right:9px; padding:9px 11px; font-size:.76rem; }
  .council-gallery { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  .council-gallery__header { align-items:flex-start; gap:12px; padding:16px 14px; }
  .council-gallery__close { padding-inline:11px; }
  .council-gallery__body { padding:12px 10px 0; }
  .council-gallery__controls { padding:14px 10px; gap:12px; }
  .council-gallery__controls button { min-width:0; flex:1; }
  .council-gallery__image { max-height:calc(100dvh - 220px); }
}
@media (prefers-reduced-motion:reduce) {
  .hauptnav a::after, .leistung::after, .projektfragen__liste summary,
  .projektfragen__liste details[open] > div, .council-image-open,
  .council-gallery, .council-process-enter > li::before {
    animation:none !important; transition:none !important;
  }
}
@media print {
  .council-image-open, .council-gallery { display:none !important; }
  .leistung::after, .ablauf-kompakt > li::before { animation:none !important; transform:none !important; }
  html.council-gallery-open { overflow:visible; }
}
