@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400,700&display=swap');

@font-face {
  font-family: 'FontAwesome';
  src: url('../templates/fontaine_j3/warp/fonts/fontawesome-webfont.woff') format('woff'),
       url('../templates/fontaine_j3/warp/fonts/fontawesome-webfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

h1, h2, h3, h4, h5, h6, .uk-event-date, p.dropcap:first-letter, blockquote, blockquote p, .iceModuleTile {
  font-family: 'Roboto', sans-serif;
}

/* Toolbar social icons (Facebook, YouTube) */
#toolbar .social-icons a,
#toolbar .uk-icon-button.uk-icon-facebook,
#toolbar .uk-icon-button.uk-icon-youtube {
  font-family: FontAwesome, sans-serif;
  display: inline-block;
  width: 30px;
  height: 25px;
  line-height: 25px;
  text-align: center;
  font-size: 18px;
  color: #F56C13;
  text-decoration: none;
  border: 0;
  box-shadow: none;
  background: transparent;
  vertical-align: middle;
}

#toolbar .uk-icon-facebook:before {
  content: "\f09a";
}

#toolbar .uk-icon-youtube:before {
  content: "\f167";
}

#toolbar .uk-icon-button.uk-icon-facebook:hover,
#toolbar .uk-icon-button.uk-icon-youtube:hover {
  color: #E85E19;
  background: transparent !important;
}

#toolbar .social-icons {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

/* Hero slideshow: show first slide before home-slideshow.js initializes */
.wk-slideshow-home {
  visibility: visible !important;
  position: relative;
  overflow: hidden;
}

.wk-slideshow-home:not(.wk-ready) .slides > li:first-child {
  position: relative !important;
}

.wk-slideshow-home:not(.wk-ready) .slides > li:not(:first-child) {
  display: none !important;
}

.wk-slideshow-home > div {
  position: relative;
}

/* Caption: bottom-left white box (matches original WidgetKit home-slide) */
.wk-slideshow-home > div > .caption {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  right: auto;
  z-index: 6;
  box-sizing: border-box;
}

/* Prev arrow sits to the right of the caption box */
.wk-slideshow-home > div .prev {
  display: block !important;
  z-index: 7;
  cursor: pointer;
}

.wk-slideshow-home > div .next {
  display: block !important;
  z-index: 7;
  cursor: pointer;
}

/* Dot navigation: bottom-right of slideshow */
.wk-slideshow-home > ul.nav {
  position: absolute;
  bottom: 12px;
  right: 25px;
  z-index: 8;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wk-slideshow-home > ul.nav li {
  display: inline-block;
  cursor: pointer;
}

.wk-slideshow-home > ul.nav li.active span:before {
  content: "\f192";
}

/* WAREHOUSE mini-slideshow: hide empty caption overlay */
.wk-slideshow-default .caption:empty {
  display: none !important;
}

.wk-slideshow-default:not(.wk-ready) {
  visibility: visible !important;
}

.wk-slideshow-default:not(.wk-ready) .slides > li:first-child {
  position: relative !important;
}

.wk-slideshow-default:not(.wk-ready) .slides > li:not(:first-child) {
  display: none !important;
}

/* Index #top-a product column photos (DE warehouse + EN client opinions) */
#top-a .uk-grid > .uk-width-medium-1-4 img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 9px;
  border: 2px solid #e85e19;
  box-sizing: border-box;
  object-fit: contain;
  object-position: top center;
}

section#top-a > div.wrapper.grid-block > div.grid-box.width100 {
  width: 100% !important;
  float: none;
}

/* Product / content screenshots: rounded orange border */
#content .content img[src*="/Produkte/"],
#content .content img[src*="/mai2016/"]:not([src*="/logos/"]),
#content .content img[src*="/MEGAmattrace/"] {
  border-radius: 9px;
  border: 2px solid #e85e19;
  box-sizing: border-box;
}

/* PDF.js inline preview containers */
.pdf-preview iframe,
.referenzen-pdf iframe,
.agb-pdf iframe {
  display: block;
  width: 100%;
  min-height: 1200px;
}

/* AGB page: full text content (no PDF embed) — two-column layout like PDF */
.agb-text {
  max-width: none;
  line-height: 1.55;
  font-size: 14px;
  column-count: 2;
  column-gap: 3em;
  column-fill: balance;
}

.agb-text .agb-lead {
  column-span: all;
  margin-bottom: 1.5em;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

.agb-text h2 {
  column-span: all;
  margin: 1.75em 0 0.35em;
  font-size: 18px;
  font-weight: bold;
  color: inherit;
  text-align: center;
}

.agb-text h3 {
  column-span: all;
  margin: 0 0 0.75em;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.agb-text h4 {
  margin: 1.25em 0 0.35em;
  font-size: 15px;
  font-weight: bold;
  color: inherit;
  text-align: center;
  text-decoration: underline;
  break-after: avoid;
}

.agb-text p {
  margin: 0 0 0.85em;
  text-align: justify;
  hyphens: auto;
}

@media (max-width: 768px) {
  .agb-text {
    column-count: 1;
  }
}

/* Newsletter: two-column layout for Rückblick + Megalith sections */
#system .items.items-col-2.grid-block {
  overflow: hidden;
}

#system .items.items-col-2 > .grid-box.width50 {
  float: left;
  width: 50%;
  box-sizing: border-box;
}

#system .items.items-col-2 > .grid-box.width100.leading {
  float: left;
  width: 100%;
  clear: both;
}

/* Newsletter: constrain top section to same text width as other blocks */
#system .items.items-col-2 > .grid-box.width100.leading .content.clearfix {
  max-width: 710px;
  margin: 0 auto;
}

/* Newsletter: text blocks in columns stay within column width */
#system .items.items-col-2 .blockNewsletter,
#system .items.items-col-2 #rueckblick_anwe_2018 {
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Newsletter images: scale to text/column width, never upscale */
#system .items.items-col-2 .content.clearfix img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

#system .items.items-col-2 img.newsletter-img-bordered {
  border: 1px solid #ccc;
  box-sizing: border-box;
}

#system .items.items-col-2 p.img {
  display: block;
  width: 100%;
  text-align: center;
}

/* Homepage: unify column titles (WAREHOUSE matches WORKFLOW etc.) */
#top-a .module-title {
  font-size: 28px;
  line-height: 44px;
  font-weight: normal;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}

#top-a .block-icon {
  float: none;
  clear: none;
  display: inline-block;
  margin: 5px 0;
}

#top-a .uk-grid > div > div:has(.block-icon) {
  text-align: center;
}

/* Homepage partner logos — centered, original HTML sizes */
#top-a .partner-logos {
  text-align: center;
  margin-top: 1.5em;
}

#top-a .partner-logos img {
  display: inline;
  vertical-align: middle;
  float: none;
  border: none;
  border-radius: 0;
}

#top-a .partner-logos img[width="32"] { width: 32px; height: 40px; }
#top-a .partner-logos img[width="51"] { width: 51px; height: 35px; }
#top-a .partner-logos img[width="58"] { width: 58px; height: 31px; }
#top-a .partner-logos img[width="60"] { width: 60px; height: 38px; }
#top-a .partner-logos img[width="99"] { width: 99px; height: 30px; }
#top-a .partner-logos img[width="102"] { width: 102px; height: 30px; }
#top-a .partner-logos img[width="111"] { width: 111px; height: 25px; }
#top-a .partner-logos img[width="116"] { width: 116px; height: 25px; }
#top-a .partner-logos img[width="181"] { width: 181px; height: 51px; }

/* Mobile / tablet: homepage + nav (desktop 960px+ unchanged) */
@media (max-width: 1024px) {
  /* Original + JS-cloned IceMegaMenu (template.js clones #header-right → .header-right) */
  #header-right .icemegamenu,
  #header-right #icemegamenu,
  #header-responsive .header-right,
  #header-responsive .icemegamenu,
  #header-responsive .ice-megamenu-toggle {
    display: none !important;
  }

  #header-bottom,
  #menubar {
    display: none !important;
  }

  #at-navbar.uk-navbar-toggle,
  #header-responsive .at-navbar {
    display: block !important;
  }
}

@media (max-width: 959px) {
  #top-a .uk-width-medium-1-4 {
    width: 100%;
    margin-bottom: 1.5em;
  }

  #logo img {
    max-width: 100%;
    height: auto;
  }

  #slide-zone .wk-slideshow-home {
    overflow: hidden !important;
    height: auto !important;
  }

  #slide-zone .wk-slideshow-home > div {
    overflow: hidden !important;
    height: auto !important;
  }

  #slide-zone .wk-slideshow-home > div .prev,
  #slide-zone .wk-slideshow-home > div .next {
    display: block !important;
    position: absolute;
    z-index: 7;
    transform: translateY(-50%);
    padding: 12px 10px;
  }

  #slide-zone .wk-slideshow-home > div .prev {
    left: 12px !important;
    right: auto !important;
  }

  #slide-zone .wk-slideshow-home > div .next {
    right: 12px !important;
    left: auto !important;
  }

  #slide-zone .wk-slideshow-home .caption {
    display: block !important;
    position: static !important;
    width: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    padding: 16px !important;
    background: #f4f4f4 !important;
    color: #545151 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    border: none !important;
  }

  #slide-zone .wk-slideshow-home .caption p,
  #slide-zone .wk-slideshow-home .caption .blocksatz,
  #slide-zone .wk-slideshow-home .caption strong {
    display: block !important;
    color: #545151 !important;
    margin: 0 0 0.5em !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  #slide-zone .wk-slideshow-home .caption p[style*="margin"] {
    margin: 0 0 0.5em !important;
  }
}

@media (max-width: 959px) {
  #system .items.items-col-2 > .grid-box.width50 {
    float: none;
    width: 100%;
    clear: both;
  }
}

@media (max-width: 767px) {
  #spotlight {
    overflow-x: hidden;
    max-width: 100%;
  }

  #spotLightBalken {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    line-height: normal !important;
    height: auto !important;
    padding: 12px 16px;
    font-size: 14px;
    white-space: normal;
  }
}
