/* Adjustments for WordPress block markup and Contact Form 7, on top of the original template CSS. */

/* The TYPO3 template printed a stray BOM before .page, which pushed the whole page down by one line. */
.page { padding-top: 24px; }

/* Blocks wrap images in <figure>; the template expects bare <img>. */
.wp-block-image { margin: 0; }

/* Contact section: rd-parallax set this background from data-url on the old site. */
.parallax.p2 {
  background: #323136 url("../images/parallax3.jpg") center / cover no-repeat;
  padding-top: 48px;
  padding-bottom: 55px;
}
.parallax.p2 .container { position: relative; }

/* Contact Form 7 wraps every field in a span and adds its own response box. */
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 .wpcf7-not-valid-tip { position: absolute; right: 10px; top: 2px; font-size: 11px; line-height: 11px; color: #f28f94; }
.wpcf7 .wpcf7-response-output { margin: 20px 0 0; padding: 10px 15px; border: 2px solid #fff; color: #fff; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #46b450; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-color: #f28f94; }
.wpcf7 .wpcf7-spinner { display: none; }
.wpcf7 form.submitting .wpcf7-spinner { display: inline-block; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.cnc-privacy-note { color: #fff; font-size: 13px; line-height: 18px; margin: 0 0 20px; }
.cnc-privacy-note a { color: #fff; text-decoration: underline; }

/*
 * Project galleries: core Gallery block with the class "lightgallery" and "Enlarge on click" (WordPress lightbox).
 * Tiles as on the old site: 200 x 200, cropped, no gaps. ":not(#individual-image)" matches the specificity of the
 * core gallery CSS, which would otherwise set column widths and gaps.
 */
.wp-block-gallery.lightgallery { display: flex; flex-wrap: wrap; gap: 0; margin: 0; }
.wp-block-gallery.lightgallery figure.wp-block-image:not(#individual-image) {
  flex: 0 0 200px; width: 200px; height: 200px; margin: 0;
}
.wp-block-gallery.lightgallery figure.wp-block-image img {
  width: 200px; height: 200px; max-width: none; object-fit: cover; cursor: zoom-in;
}
/* WordPress' standard class for text that only screen readers announce (the lightbox uses it for "Bild 2 von 12"). */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); word-wrap: normal !important;
}
/* Without a theme.json the core lightbox uses a white background; keep it dark like lightGallery. */
.wp-lightbox-overlay .scrim { background-color: #000 !important; opacity: .9; }
.wp-lightbox-overlay .wp-lightbox-close-button,
.wp-lightbox-overlay .wp-lightbox-navigation-button { fill: #fff !important; color: #fff; }

/*
 * Slider (MetaSlider slideshows with the CSS class "cnc-slider"): the look of the old camera.js slider.
 * 8:3 (height 37.5 % of the width), at least 300 px high (cropped), white dots on the image, active dot blue.
 * The colors use !important because MetaSlider themes (e.g. "Base") print ID-based color rules inline;
 * so the look stays the same whichever MetaSlider theme is selected.
 */
.metaslider.cnc-slider .flexslider { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.metaslider.cnc-slider .flexslider .slides img {
  width: 100%; height: auto; aspect-ratio: 8 / 3; min-height: 300px; object-fit: cover;
}
.metaslider.cnc-slider .flexslider .flex-control-nav {
  position: absolute; left: 0; right: 0; bottom: 62px; width: 100%; line-height: 14px; text-align: center; z-index: 3;
}
@media (max-width: 1450px) { .metaslider.cnc-slider .flexslider .flex-control-nav { bottom: 45px; } }
.metaslider.cnc-slider .flexslider .flex-control-nav li { margin: 0 0 0 7px; }
.metaslider.cnc-slider .flexslider .flex-control-nav li:first-child { margin-left: 0; }
.metaslider.cnc-slider .flexslider .flex-control-paging li a {
  width: 14px; height: 14px; margin: 0; border: 0; border-radius: 50%; background: #fff !important; box-shadow: none; transition: .3s all ease;
}
.metaslider.cnc-slider .flexslider .flex-control-paging li a:hover,
.metaslider.cnc-slider .flexslider .flex-control-paging li a.flex-active { background: #2169ff !important; }
/* Arrows: dark round buttons with Font Awesome chevrons (the template's "to top" button style). */
.metaslider.cnc-slider .flexslider .flex-direction-nav li a {
  width: 42px !important; height: 42px !important; margin: -21px 0 0 !important; top: 50% !important; transform: none !important;
  border: 0; border-radius: 50%; opacity: .8;
  background: rgba(0, 0, 0, .55) none !important; text-indent: 0; overflow: hidden; font-size: 0; color: #fff;
}
.metaslider.cnc-slider .flexslider .flex-direction-nav li a:hover,
.metaslider.cnc-slider .flexslider .flex-direction-nav li a:focus { opacity: 1; background-color: #2169ff !important; }
.metaslider.cnc-slider .flexslider .flex-direction-nav li a:before {
  content: "\f104" !important; display: block; font: 400 32px/40px "FontAwesome"; text-align: center; color: #fff; text-shadow: none;
}
.metaslider.cnc-slider .flexslider .flex-direction-nav li a:after { content: none !important; }
.metaslider.cnc-slider .flexslider .flex-direction-nav li a.flex-next:before { content: "\f105" !important; padding-left: 3px; }
.metaslider.cnc-slider .flexslider .flex-direction-nav li a.flex-prev:before { padding-right: 3px; }
.metaslider.cnc-slider .flexslider .flex-direction-nav .flex-prev { left: 20px; }
.metaslider.cnc-slider .flexslider .flex-direction-nav .flex-next { right: 20px; }
@media (max-width: 767px) {
  .metaslider.cnc-slider .flexslider .flex-direction-nav li a { width: 34px !important; height: 34px !important; margin-top: -17px !important; }
  .metaslider.cnc-slider .flexslider .flex-direction-nav li a:before { font-size: 26px; line-height: 32px; }
  .metaslider.cnc-slider .flexslider .flex-direction-nav .flex-prev { left: 10px; }
  .metaslider.cnc-slider .flexslider .flex-direction-nav .flex-next { right: 10px; }
}

/*
 * Menu without jQuery (theme 1.2.0). The template CSS above is unchanged; these rules take over what superfish,
 * TMStickUp, UItoTop and RD Navbar did with inline styles. The script is assets/js/theme.js.
 */

/* Desktop dropdown (was superfish): opens on hover and keyboard focus, slides down like before (0.4 s) and closes
   0.8 s after the pointer has left. "sfHover" is set by the script for touch (first tap), "sf-closed" by Escape. */
.sf-menu ul {
  display: block; visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path .2s ease .8s, visibility 0s linear 1s;
}
.sf-menu li:hover > ul,
.sf-menu li:focus-within > ul,
.sf-menu li.sfHover > ul {
  visibility: visible; clip-path: inset(0);
  transition: clip-path .4s ease, visibility 0s;
}
.sf-menu li.sf-closed > ul { visibility: hidden; clip-path: inset(0 0 100% 0); transition: none; }
.sf-menu > li:hover > a,
.sf-menu > li:focus-within > a,
.sf-menu ul > li > a:focus-visible { color: #2169ff; }
/* The template switches off focus outlines; keyboard users need to see where they are. */
.sf-menu a:focus-visible,
.stuck_container .inline-list a:focus-visible,
.rd-mobilemenu_ul a:focus-visible,
.rd-mobilepanel_toggle:focus-visible,
.toTop:focus-visible { outline: 2px solid #2169ff; outline-offset: 2px; }

/* Sticky bar (was TMStickUp): the script appends a copy of the bar with the class "isStuck" and adds "is-visible"
   once the real bar has scrolled out of view. Slides in (0.4 s) and out (0.2 s) like before. style.css gives it
   the dark background and hides it below 980 px. */
.isStuck {
  position: fixed; top: 0; left: 0; width: 100%;
  visibility: hidden; transform: translateY(-100%);
  transition: transform .2s ease-in-out, visibility 0s linear .2s;
}
.isStuck.is-visible { visibility: visible; transform: none; transition: transform .4s ease-in-out, visibility 0s; }

/* "To top" button (was UItoTop): fades in after 500 px of scrolling; style.css shows it only from 1400 px. */
#toTop { display: none; opacity: 0; transition: opacity .8s, display .8s allow-discrete; }
#toTop.is-visible { display: inline-block; opacity: 1; transition: opacity .6s, display 0s; }
@starting-style { #toTop.is-visible { opacity: 0; } }

/* Mobile menu (was RD Navbar): the page behind the open menu does not scroll; the menu list scrolls on its own. */
html.rd-mobilemenu-open,
html.rd-mobilemenu-open body { overflow: hidden; }
.rd-mobilemenu_ul { overscroll-behavior: contain; }

@media (prefers-reduced-motion: reduce) {
  .sf-menu ul, .sf-menu li:hover > ul, .sf-menu li:focus-within > ul, .sf-menu li.sfHover > ul,
  .isStuck, .isStuck.is-visible, #toTop, #toTop.is-visible { transition-duration: 0s; }
}
