:root {
  --blue: #004494;
  --blue-light: #5f9efe;
  --ink: #111;
  --line: #b7c9dd;
  --paper: #fff;
  --muted: #626262;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #3e3c41 url("../images/hinter_str.jpg") top center repeat-x;
  font: 12px/1.42 Arial, Helvetica, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus-visible { color: var(--blue-light); text-decoration: underline; }
img { max-width: 100%; height: auto; border: 0; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  color: #fff;
  background: var(--blue);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-shell {
  position: relative;
  width: min(900px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 22px rgb(0 0 0 / 25%);
}

.site-header, .site-header a, .site-header img { display: block; width: 100%; }
.site-header img { aspect-ratio: 6 / 1; object-fit: cover; }

.credentials {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 39px;
  padding: 3px 14px 5px;
  gap: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  background: url("../images/hinter_k_str.jpg") bottom repeat-x;
}
.credentials span { display: block; width: 100%; }

.menu-toggle { display: none; }

.main-grid {
  display: grid;
  grid-template-columns: 154px minmax(0, 595px) 151px;
  min-height: 420px;
  background: url("../images/hinter_l.jpg") left top no-repeat;
}

.site-nav {
  min-width: 0;
  padding-bottom: 120px;
}
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav li {
  min-height: 24px;
  padding: 3px 6px 3px 14px;
  border-bottom: 1px solid var(--blue);
  background: url("../images/pfeil_2.gif") left 1px no-repeat;
}
.site-nav li a { display: block; color: #111; }
.site-nav li.active > a { color: var(--blue); font-weight: 700; }
.site-nav li.subnav { padding-left: 24px; font-size: 11px; background: none; }
.site-nav .meta-nav { margin-top: 12px; }

.page-content {
  min-width: 0;
  padding: 8px 11px 24px;
  overflow-wrap: anywhere;
}
.page-content h1 {
  margin: 0 0 15px;
  color: #111;
  font-size: 16px;
  line-height: 1.25;
}
.page-content h2, .page-content h3, .page-content h4, .page-content h5 {
  margin: 16px 0 8px;
  color: #111;
  line-height: 1.3;
}
.page-content h2 { font-size: 14px; }
.page-content h3, .page-content h4 { font-size: 13px; }
.page-content h5 { font-size: 12px; }
.page-content p { margin: 0 0 10px; }
.page-content ul, .page-content ol { padding-left: 24px; }
.legacy-content { min-height: 260px; }
.legacy-content table { width: 100% !important; max-width: 100%; border-collapse: collapse; }
.legacy-content td, .legacy-content th { padding: 2px; vertical-align: top; }
.legacy-content hr { border: 0; border-top: 1px solid var(--blue); }
.legacy-content img[style*="float: right"] { margin: 0 0 10px 15px; }
.question-links { margin-bottom: 12px; }
.question-links a { font-weight: 700; }
.legacy-content li[id] { scroll-margin-top: 16px; }

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 207px;
  gap: 16px;
  align-items: start;
  margin: 20px 0 14px;
}
.home-certifications table { margin-bottom: 6px; }
.home-certifications td:first-child { width: 150px; }
.home-certifications td:first-child img {
  display: block;
  width: 150px;
  max-width: none;
}
.home-portrait img { display: block; width: 207px; }

.sidebar {
  min-width: 0;
  padding: 4px 7px 24px;
  background: url("../images/hinter_r.jpg") top no-repeat;
  font-size: 10px;
}
.sidebar h2 { margin: 0 0 8px; font-size: 13px; }
.sidebar h3 { margin: 0 0 5px; color: var(--blue); font-size: 12px; }
.sidebar p { margin: 0 0 8px; }
.side-contact, .side-news { padding: 0 0 10px; border-bottom: 1px solid var(--blue); }
.side-news { padding-top: 10px; }
.phone { display: flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; }
.phone img { width: 20px; }
.more-link { font-weight: 700; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 14px 18px 18px 165px;
  color: #333;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.site-footer ul { display: flex; margin: 0; padding: 0; gap: 12px; list-style: none; }

.bildergalerie {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: start;
}
.bildergalerie > div { min-width: 0; text-align: left; }
.bildergalerie img { display: block; width: 100%; aspect-ratio: 170 / 96; object-fit: cover; }

.accordion-list { margin-top: 12px; }
.accordion { border-top: 1px solid var(--line); }
.accordion:last-child { border-bottom: 1px solid var(--line); }
.accordion summary {
  position: relative;
  padding: 8px 28px 8px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; position: absolute; right: 10px; top: 6px; font-size: 16px; }
.accordion[open] summary::after { content: "−"; }
.accordion-content { padding: 0 10px 12px; }

.news-entry { padding-top: 8px; border-top: 1px solid var(--blue); }
.news-entry h2 { margin-top: 0; }
.news-date { color: var(--muted); font-size: 11px; font-style: italic; }

.download-note { padding: 10px; background: #eef4fa; border-left: 3px solid var(--blue); }
.download-list { margin: 16px 0; padding: 0 !important; list-style: none; }
.download-list li { position: relative; padding: 8px 8px 8px 21px; border-bottom: 1px solid #dbe4ee; }
.download-list li::before { content: "■"; position: absolute; left: 3px; color: var(--blue); font-size: 8px; }
.download-list span { display: block; color: var(--muted); font-size: 10px; }

.contact-form { display: block; max-width: 470px; }
.contact-form fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.contact-form legend { float: left; width: 118px; padding: 5px 8px 0 0; }
.contact-form .salutation label { display: inline-flex; margin: 0 18px 0 0; gap: 5px; align-items: center; }
.form-row { display: grid; grid-template-columns: 118px 1fr; margin-bottom: 7px; align-items: start; }
.form-row label { padding: 5px 8px 0 0; }
.form-row input, .form-row textarea {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  color: var(--blue);
  background: #fff;
  border: 1px solid #b9b9b9;
  border-radius: 0;
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid #8fb7e4; outline-offset: 1px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-actions button {
  padding: 6px 14px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  cursor: pointer;
}
.form-actions .secondary { color: var(--blue); background: #fff; }
.required-note, .privacy-note { margin-left: 118px !important; font-size: 10px; }
.form-status { margin-bottom: 12px; padding: 9px 11px; border: 1px solid #93b2d4; background: #eef4fa; }
.form-status.error { color: #8d1b12; border-color: #d3a39f; background: #fff1f0; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.lightbox {
  width: min(92vw, 920px);
  max-height: 92vh;
  padding: 38px 12px 12px;
  background: #111;
  border: 0;
  color: #fff;
}
.lightbox::backdrop { background: rgb(0 0 0 / 82%); }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; margin: auto; }
.lightbox p { margin: 8px 0 0; text-align: center; }
.lightbox-close { position: absolute; top: 3px; right: 8px; color: #fff; background: transparent; border: 0; font-size: 28px; cursor: pointer; }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%;
  width: 48px;
  height: 64px;
  padding: 0;
  color: #fff;
  background: rgb(0 0 0 / 58%);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 3px;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}
.lightbox-prev { left: max(12px, calc(50% - 490px)); }
.lightbox-next { right: max(12px, calc(50% - 490px)); }
.lightbox-prev:hover, .lightbox-next:hover,
.lightbox-prev:focus-visible, .lightbox-next:focus-visible { background: var(--blue); }

@media (max-width: 900px) {
  body { background: #fff; }
  .site-shell { width: 100%; box-shadow: none; }
  .main-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f4f6f8; border-top: 1px solid var(--line); font-size: 12px; }
  .side-news { padding-top: 0; }
  .site-footer { padding-left: 202px; }
}

@media (max-width: 680px) {
  body { font-size: 15px; line-height: 1.5; }
  .site-header img { min-height: 0; aspect-ratio: 6 / 1; object-fit: contain; }
  .credentials { gap: 4px; padding: 7px 12px 8px; font-size: 11px; }
  .menu-toggle {
    display: block;
    width: 100%;
    padding: 10px 14px;
    color: #fff;
    background: var(--blue);
    border: 0;
    text-align: left;
    font-weight: 700;
  }
  .main-grid { display: block; background: #fff; }
  .site-nav { display: none; padding: 0; background: #f4f6f8; }
  .site-nav.open { display: block; }
  .site-nav li { min-height: 40px; padding: 9px 12px 8px 22px; background-position: 4px 8px; font-size: 14px; }
  .site-nav li.subnav { padding-left: 34px; font-size: 13px; }
  .page-content { padding: 18px 16px 28px; }
  .page-content h1 { font-size: 21px; }
  .page-content h2 { font-size: 17px; }
  .page-content h3, .page-content h4 { font-size: 16px; }
  .home-intro { grid-template-columns: minmax(0, 1fr) minmax(150px, 207px); }
  .sidebar { display: block; padding: 18px 16px; }
  .side-contact, .side-news { padding: 0 0 14px; margin-bottom: 14px; }
  .side-news { border-bottom: 0; }
  .site-footer { display: block; padding: 18px 16px; font-size: 12px; }
  .site-footer ul { margin-top: 12px; flex-wrap: wrap; }
  .bildergalerie { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .accordion summary { padding: 11px 34px 11px 8px; font-size: 15px; }
  .form-row { grid-template-columns: 1fr; gap: 3px; }
  .form-row label { padding-top: 0; }
  .contact-form legend { float: none; width: auto; margin-bottom: 5px; }
  .required-note, .privacy-note { margin-left: 0 !important; }
  .lightbox { width: 100vw; max-height: 100vh; }
  .lightbox-prev, .lightbox-next { width: 44px; height: 56px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

@media (max-width: 580px) {
  .home-intro { grid-template-columns: 1fr; }
  .home-portrait { order: 2; }
  .home-portrait img { width: min(207px, 100%); margin: 0 auto; }
  .home-certifications table { max-width: 390px; margin-right: auto; margin-left: auto; }
}

@media (max-width: 390px) {
  .bildergalerie { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { background: #fff; }
  .site-shell { width: 100%; box-shadow: none; }
  .site-nav, .sidebar, .menu-toggle, .credentials, .site-footer { display: none !important; }
  .main-grid { display: block; }
  .page-content { padding: 0; }
  a { color: #000; text-decoration: underline; }
}
