/*
 * HD Vision Systems brand overlay for the Antora default UI.
 * Colors and typography taken from the original InDesign manual:
 *   brand gold  #c8b32f   (headings, rules, links, note boxes)
 *   warning red #d2232a
 *   body text   #3f3f3f / #585856
 *   typeface    Solomon (Normal / Bold), code in Courier New
 */

@font-face {
  font-family: "Solomon";
  font-style: normal;
  font-weight: 400;
  src: url(../font/Solomon-Normal.otf) format("opentype");
}
@font-face {
  font-family: "Solomon";
  font-style: normal;
  font-weight: 700;
  src: url(../font/Solomon-Bold.otf) format("opentype");
}

:root {
  --hdv-gold: #c8b32f;
  --hdv-gold-dark: #a8961f;   /* hover / better contrast for small text */
  --hdv-red: #d2232a;

  /* default-UI variable overrides */
  --body-font-family: "Solomon", "Segoe UI", sans-serif;
  --body-font-color: #3f3f3f;
  --link-font-color: var(--hdv-gold-dark);
  --link_hover-font-color: var(--hdv-gold);
  --navbar-background: var(--hdv-gold);
  --navbar-font-color: #fff;
  --navbar_hover-background: var(--hdv-gold-dark);
  --nav-link-font-color: #3f3f3f;
}

html, body {
  font-family: "Solomon", "Segoe UI", sans-serif;
}

/* Headings: brand gold, regular weight like the manual */
.doc h1, .doc h2, .doc h3, .doc h4, .doc h5 {
  color: var(--hdv-gold);
  font-family: "Solomon", "Segoe UI", sans-serif;
  font-weight: 400;
}

/* Page title with the thin gold rule used on every page of the PDF */
.doc > h1.page {
  border-bottom: 2px solid var(--hdv-gold);
  padding-bottom: 0.3em;
}

/* Links */
.doc a, .doc a:link, .doc a:visited {
  color: var(--hdv-gold-dark);
}
.doc a:hover {
  color: var(--hdv-gold);
}

/* Navbar branding */
.navbar {
  background: linear-gradient(180deg, #1a1a1a 0%, #2c2c2c 100%);
  border-bottom: 2px solid var(--hdv-gold);
}
.navbar-brand .navbar-item, .navbar-brand .navbar-item:hover {
  color: #fff;
}
.navbar-item, .navbar-link {
  color: #f5f5f5;
}
.navbar-item:hover, .navbar-link:hover {
  color: var(--hdv-gold);
  background: rgba(255,255,255,0.05);
}
.navbar-dropdown {
  background: #2c2c2c;
  border: 1px solid var(--hdv-gold);
}
/* Brand-Title */
.navbar-brand-text {
  font-family: "Solomon", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* Disabled Language-Item */
.navbar-item.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
/* Burger-Menu Mobile */
@media (max-width: 767px) {
  .navbar-burger { display: block !important; }
  .navbar-menu:not(.is-active) { display: none !important; }

  /* Brand-Zeile: Titel schrumpft mit Ellipsis, Burger bleibt rechts sichtbar.
     Ohne diese Regeln nimmt der Brand-Text die volle Breite ein und drückt
     den Burger aus dem sichtbaren Bereich (site.css setzt .navbar-item
     uneingeschränkt auf display:flex). */
  .navbar-brand {
    display: flex !important;
    align-items: center;
    width: 100%;
  }
  .navbar-brand .navbar-item {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .navbar-burger {
    flex: 0 0 auto;
    margin-left: auto;
    width: 3rem;
    height: 3rem;
  }
  /* Burger-Linien: site.css blockifiziert die <span>-Elemente nur, wenn der
     Button selbst display:flex ist. Das inline display:block!important am
     Button (header-content.hbs) lässt die spans inline — Breite/Höhe greifen
     dann nicht und die Linien sind 0×0 unsichtbar. Absolute Positionierung
     macht die drei weißen Linien unabhängig vom Button-Layout sichtbar;
     die is-active-Transforms (X-Animation) aus site.css greifen weiterhin. */
  .navbar-burger span {
    display: block !important;
    position: absolute;
    left: calc(50% - 10px);
    width: 20px;
    height: 2px;
    background-color: #fff !important;
    border-radius: 1px;
  }
  .navbar-burger span:nth-child(1) { top: calc(50% - 7px); }
  .navbar-burger span:nth-child(2) { top: calc(50% - 1px); }
  .navbar-burger span:nth-child(3) { top: calc(50% + 5px); }

  .navbar-menu.is-active {
    display: block !important;
    position: fixed !important;
    top: 3.5rem !important; /* Höhe der Navbar */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important; /* Bis zum Bildschirmrand */
    width: 100% !important;
    height: calc(100vh - 3.5rem) !important;
    background: #1a1a1a !important;
    z-index: 9999 !important;
    padding: 1rem 0 !important;
    overflow-y: auto !important; /* Scrollbar wenn Menü zu lang */
    box-shadow: 0 8px 16px rgba(0,0,0,0.3) !important;
  }
  /* site.css hat eine UNBEGRENZTE Basis-Regel
     .navbar,.navbar-end,.navbar-item,.navbar-link,.navbar-menu { display:flex }
     - ohne Override bleiben start/end horizontale Flex-Reihen. */
  .navbar-menu.is-active .navbar-start,
  .navbar-menu.is-active .navbar-end {
    display: block !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  .navbar-menu.is-active .navbar-item,
  .navbar-menu.is-active .navbar-link {
    color: #f5f5f5 !important;
    padding: 0.75rem 1rem !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
  }
  .navbar-menu.is-active .navbar-item:hover,
  .navbar-menu.is-active .navbar-link:hover {
    color: #c8b32f !important;
    background: rgba(255,255,255,0.05) !important;
  }

}

/* Left navigation: gold highlight for the current page */
.nav-menu .is-current-page > .nav-link,
.nav-menu .is-current-page > .nav-text {
  color: var(--hdv-gold-dark);
}

/* NOTE boxes: thin gold-bordered box, exactly like the manual */
.doc .admonitionblock {
  background: #fff;
  border: 1px solid var(--hdv-gold);
  border-radius: 0;
  box-shadow: none;
}
.doc .admonitionblock td.icon .icon-note {
  background-color: var(--hdv-gold);
}
.doc .admonitionblock td.icon .icon-warning,
.doc .admonitionblock td.icon .icon-caution,
.doc .admonitionblock td.icon .icon-important {
  background-color: var(--hdv-red);
}
.doc .admonitionblock.warning,
.doc .admonitionblock.caution,
.doc .admonitionblock.important {
  border-color: var(--hdv-red);
}

/* Tables: gold header row like "TabelleKopf" in the manual */
.doc table.tableblock thead th {
  background: var(--hdv-gold);
  color: #fff;
  font-weight: 400;
}
.doc table.tableblock {
  border-color: var(--hdv-gold);
}

/* Code: the manual sets examples in Courier New */
.doc pre, .doc code, .doc .listingblock pre {
  font-family: "Courier New", Courier, monospace;
}

/* Footer rule echoing the page footer of the print manual */
footer.footer {
  border-top: 2px solid var(--hdv-gold);
  background: #f5f5f5;
  color: #585856;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand img {
  height: 32px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--hdv-gold-dark);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--hdv-gold);
}
.footer-copyright {
  color: #999;
  font-size: 0.85em;
}

/* ---- Manual cover, replicating the printed title page ---- */
.hdv-cover {
  position: relative;
  background: #bfb218 !important;
  background-color: #bfb218 !important;
  aspect-ratio: 707 / 1000;          /* A4 portrait like the PDF */
  max-height: 88vh;
  margin: 0 0 2rem;
  overflow: hidden;
  font-family: "Solomon", "Segoe UI", sans-serif;
}
.hdv-cover::before {                  /* light beam from the camera */
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(44% 38.5%, 0% 52%, 0% 100%, 66% 100%);
}
.hdv-cover-art {
  position: absolute;
  right: 0.5%;
  top: 36%;
  width: 95%;
  max-width: 100%;
  height: auto;
  z-index: 1;
  object-fit: contain;
}
.hdv-cover-text {
  position: absolute;
  left: 7%;
  top: 7%;
  z-index: 2;
  color: #fff;
}
.hdv-cover-manual {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  margin: 0 0 1.2em;
  line-height: 1;
}
.hdv-cover-product {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 0.6em;
  line-height: 1.1;
}
.hdv-cover-version {
  font-size: 0.45em;
  font-weight: 400;
  margin-left: 0.4em;
}
.hdv-cover-company {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 700;
  margin: 0;
}
.hdv-cover-logo {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  width: 22%;
  min-width: 110px;
  z-index: 2;
}

/* === Desktop: Force horizontal navbar layout === */
@media (min-width: 768px) {
  .navbar-burger { display: none !important; }
  .navbar {
    display: flex;
    align-items: stretch;
  }
  .navbar-menu {
    display: flex !important;
    align-items: stretch;
    flex-grow: 1;
  }
  .navbar-start,
  .navbar-end {
    display: flex !important;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .navbar-start {
    flex-grow: 1;
  }
  .navbar-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* Make "Products" item explicitly inline-flex like Home anchor */
  .navbar-item.has-dropdown {
    position: relative;
    display: flex;
    align-items: center;
  }
  .navbar-link {
    display: flex;
    align-items: center;
  }
}

/* === Mobile Cover Fix === */
@media (max-width: 767px) {
  .hdv-cover {
  background: #bfb218 !important;
  background-color: #bfb218 !important;
    aspect-ratio: 707 / 1000;
    /* Höhe darf nicht allein von aspect-ratio abhängen: Produktseiten haben
       (anders als die Startseite) keinen inline min-height-Fallback, und wenn
       die Ratio nicht greift, kollabiert die Box auf Text-Höhe — mit
       overflow:hidden werden cover-art (top:36%) und cover-logo (bottom:3%)
       dann komplett weggeclippt. Mindesthöhe hält die Box stabil. */
    min-height: 440px !important;
    max-height: 60vh;
    overflow: hidden;
    position: relative;
  }
  .hdv-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    clip-path: polygon(44% 38.5%, 0% 52%, 0% 100%, 66% 100%);
    z-index: 0;
  }
  .hdv-cover-text {
    position: relative;
    z-index: 2;
    color: #fff;
  }
  .hdv-cover-art {
    position: absolute;
    right: 2.5%;
    top: 36%;
    width: 95%;
    max-width: 100%;
    height: auto;
    z-index: 1;
    object-fit: contain;
  }
  .hdv-cover-logo {
    position: absolute;
    left: 50%;
    bottom: 3%;
    transform: translateX(-50%);
    width: 22%;
    min-width: 90px;
    max-width: 140px;
    height: auto;
    z-index: 2;
  }
  .hdv-cover-manual {
    font-size: clamp(1.2rem, 5vw, 2.4rem) !important;
    font-weight: 700 !important;
    margin: 0 0 0.5em !important;
    line-height: 1 !important;
    color: #fff !important;
  }
  .hdv-cover-product {
    font-size: clamp(0.8rem, 3vw, 1.4rem) !important;
    font-weight: 700 !important;
    margin: 0 0 0.3em !important;
    line-height: 1.1 !important;
    color: #fff !important;
  }
  .hdv-cover-company {
    font-size: clamp(0.7rem, 2vw, 1rem) !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #fff !important;
  }
}

/* Mobile Dropdown Activation */
@media (max-width: 767px) {
  .navbar-menu.is-active .navbar-item.has-dropdown.is-active .navbar-dropdown {
    display: block !important;
    position: static !important;
    background: #2c2c2c !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 1rem !important;
    margin: 0 !important;
    min-width: 100% !important;
  }
  /* Verhindert, dass nicht-aktive Dropdowns offen bleiben */
  .navbar-menu.is-active .navbar-item.has-dropdown:not(.is-active) .navbar-dropdown {
    display: none !important;
  }
}

/* Repaint-Härtung des Covers: Beim Scroll-Lock (html.is-clipped--navbar,
   gesetzt von site.js beim Öffnen des Burger-Menüs) zeichnet iOS Safari
   den goldenen Cover-Hintergrund gelegentlich nicht neu, während das
   <img> stehen bleibt. Eine eigene Compositing-Ebene erzwingt das Neuzeichnen. */
html.is-clipped--navbar .hdv-cover,
html.is-clipped--nav .hdv-cover {
  transform: translateZ(0);
}
/* === Mobile Brand Text Fix === */
@media (max-width: 767px) {
  .navbar-brand {
    overflow: hidden !important;
  }
  .navbar-brand .navbar-item:first-child {
    max-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .navbar-brand .navbar-item:first-child span,
  .navbar-brand .navbar-item:first-child a {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    display: inline-block !important;
  }
  /* Burger muss sichtbar bleiben */
  .navbar-burger {
    flex-shrink: 0 !important;
    min-width: 3rem !important;
  }
}
/* === Products Dropdown: scrollable for many entries === */
@media (min-width: 1024px) {
  .navbar-item.has-dropdown .navbar-dropdown {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c8b32f #1a1a1a;
  }
  .navbar-item.has-dropdown .navbar-dropdown::-webkit-scrollbar {
    width: 8px;
  }
  .navbar-item.has-dropdown .navbar-dropdown::-webkit-scrollbar-thumb {
    background-color: #c8b32f;
    border-radius: 4px;
  }
  .navbar-item.has-dropdown .navbar-dropdown::-webkit-scrollbar-track {
    background-color: #1a1a1a;
  }
}

/* Mobile: dropdown already scrolls via overlay, but ensure max-height */
@media (max-width: 1023px) {
  .navbar-item.has-dropdown .navbar-dropdown {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* === LumiScan X Full-Image Cover (Christoph's PNG, 05.09.2026) === */
.hdv-cover-fullimage {
  background: #bfb218 !important;
  aspect-ratio: 707 / 1000;
  max-height: 88vh;
  margin: 0 0 2rem;
  overflow: hidden;
  position: relative;
  border: 1px solid #ddd;
}
.hdv-cover-fullimage::before {
  display: none !important;  /* Kein CSS-Lichtkegel, ist im Bild */
}
.hdv-cover-art-full {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain !important;
  position: static !important;
  z-index: 1;
}

/* Mobile Anpassung */
@media (max-width: 767px) {
  .hdv-cover-fullimage {
    min-height: 500px !important;
    max-height: 70vh;
  }
  .hdv-cover-art-full {
    object-fit: contain !important;
  }
}
/* === LumiScan X Cover: Version Overlay (für Full-Image Cover) === */
.hdv-cover-fullimage {
  position: relative;
}
.hdv-cover-version-overlay {
  position: absolute;
  top: 21%;
  left: 41%;
  font-family: "Solomon", "Segoe UI", sans-serif;
  font-size: clamp(0.7rem, 1.8vw, 1.1rem);
  font-weight: 400;
  color: #fff;
  z-index: 3;
  text-shadow: 0 0 3px rgba(0,0,0,0.3);
}

@media (max-width: 767px) {
  .hdv-cover-version-overlay {
    top: 13%;
    left: 30%;
    font-size: 0.7rem;
  }
}
