/* KAPLS polish layer: fixes header, typography, spacing and adds motion.
   Loaded after the theme styles. Remove this file + kapls-polish.js to revert. */

/* ---------- Base typography ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: filson-pro, "Nunito Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
#eut-theme-wrapper p,
#eut-theme-wrapper li {
  -webkit-hyphens: auto; hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
  text-wrap: pretty;
}
#eut-theme-wrapper h1, #eut-theme-wrapper h2, #eut-theme-wrapper h3,
#eut-theme-wrapper h4, #eut-theme-wrapper h5, #eut-theme-wrapper h6,
#eut-theme-wrapper [class*="eut-h"],
#eut-theme-wrapper .eut-menu a,
#eut-theme-wrapper .maxbutton, #eut-theme-wrapper .eut-btn,
#eut-theme-wrapper strong, #eut-theme-wrapper b,
.pum-container, .pum-container * {
  -webkit-hyphens: manual !important; hyphens: manual !important;
}
#eut-theme-wrapper h1, #eut-theme-wrapper h2, #eut-theme-wrapper h3,
#eut-theme-wrapper h4, #eut-theme-wrapper h5, #eut-theme-wrapper h6 {
  text-wrap: balance;
  letter-spacing: -0.005em;
}
#eut-theme-content h1 { line-height: 1.15; }
#eut-theme-content h2, #eut-theme-content h3 { line-height: 1.22; }
#eut-theme-content h4, #eut-theme-content h5, #eut-theme-content h6 { line-height: 1.3; }
#eut-theme-content .eut-text h3 + h3,
#eut-theme-content .eut-text h3 + h4,
#eut-theme-content .eut-text h1 + h3 { margin-top: .35em; }
#eut-theme-content a { transition: color .2s ease, opacity .2s ease; text-underline-offset: .18em; }
#eut-theme-content .eut-text p a:hover { text-decoration: underline; }
::selection { background: #cff492; color: #000; }
:focus-visible { outline: 2px solid #0097af; outline-offset: 3px; border-radius: 4px; }

/* ---------- Header (desktop): one tidy row ---------- */
@media only screen and (min-width: 1024px) {
  #eut-header, #eut-main-header { height: auto !important; }
  #eut-main-header > .eut-wrapper > .eut-container {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; min-height: 112px;
  }
  #eut-main-header .eut-container::before,
  #eut-main-header .eut-container::after { display: none; }
  #eut-main-header .eut-logo { float: none; height: auto !important; flex: 0 0 auto; }
  #eut-main-header .eut-logo .eut-wrapper,
  #eut-main-header .eut-logo a { height: auto !important; display: block; line-height: 0; }
  #eut-main-header .eut-logo img { height: 78px !important; width: auto !important; max-height: none !important; position: static !important; margin: 0 !important; padding: 0 !important; top: auto !important; transform: none !important; }
  #eut-main-header .eut-header-elements-wrapper:empty { display: none; }
  #eut-main-header .eut-header-elements-wrapper { order: 3; }
  #eut-main-menu { float: none !important; flex: 0 1 auto; margin-left: auto; }
  #eut-main-menu .eut-wrapper > ul { display: flex; flex-wrap: nowrap; align-items: center; }
  #eut-main-menu .eut-wrapper > ul > li { float: none; }
  #eut-main-menu .eut-wrapper > ul > li > a {
    font-family: filson-pro, "Nunito Sans", sans-serif !important;
    font-size: 17px !important; font-weight: 500 !important;
    line-height: 44px !important; height: 44px;
    margin: 0 0 0 6px !important; padding: 0 12px !important;
    border-radius: 999px; white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
  }
  #eut-main-menu .eut-wrapper > ul > li:hover > a,
  #eut-main-menu .eut-wrapper > ul > li.sfHover > a { background: #eff9e0; }
  #eut-main-menu .eut-wrapper > ul > li ul {
    border-radius: 14px; overflow: hidden;
    box-shadow: 0 14px 40px rgba(20, 40, 60, .14) !important;
    padding: 8px 0 !important;
  }
  #eut-main-menu .eut-wrapper > ul > li ul li a {
    font-family: filson-pro, "Nunito Sans", sans-serif !important;
    font-size: 15px !important; font-weight: 500 !important; line-height: 1.35 !important;
    padding-top: 9px !important; padding-bottom: 9px !important;
  }
}
@media only screen and (min-width: 1024px) and (max-width: 1260px) {
  #eut-main-header .eut-logo img { height: 62px !important; }
  #eut-main-menu .eut-wrapper > ul > li > a { font-size: 15px !important; padding: 0 9px !important; margin-left: 2px !important; }
}

/* ---------- Hero / title rows with photo background ---------- */
#eut-theme-content .eut-section.eut-bg-parallax > .eut-background-wrapper::after,
#eut-theme-content .eut-section > .eut-background-wrapper:has(.eut-bg-image)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.45) 55%, rgba(255,255,255,.1) 100%);
}
#eut-theme-content .eut-section h1 span[style*="#42addc"],
#eut-theme-content .eut-section h3 span[style*="#42addc"],
#eut-theme-content .eut-section h1[style*="#42addc"],
#eut-theme-content .eut-section h3[style*="#42addc"] { color: #1b86b8 !important; }
#eut-theme-content h1.eut-title > span > br:first-child { display: none; }

/* ---------- Spacing rhythm ---------- */
#eut-main-content .eut-main-content-wrapper { padding-top: 48px !important; }
#eut-main-content .eut-main-content-wrapper:has(> div > .eut-section:first-child > .eut-background-wrapper .eut-bg-image) { padding-top: 0 !important; }
#eut-theme-content .eut-text > :last-child { margin-bottom: 0; }
#eut-theme-content .eut-text p:empty { display: none; }
#eut-theme-content .eut-text ul { padding-left: 1.2em; }
#eut-theme-content .eut-text li { margin-bottom: .2em; }
#eut-theme-content .eut-empty-space.eut-height-6x { height: clamp(72px, 9vw, 150px); }
@media only screen and (max-width: 767px) {
  #eut-theme-content .eut-empty-space.eut-height-4x { height: 56px; }
  #eut-theme-content .eut-empty-space.eut-height-3x { height: 44px; }
  #eut-theme-content .eut-section.eut-padding-bottom-6x { padding-bottom: 96px !important; }
}

/* ---------- Buttons ---------- */
#eut-theme-wrapper a.maxbutton {
  height: auto !important; min-height: 48px; box-sizing: border-box;
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 11px 14px !important; margin: 6px 8px !important; max-width: 100%;
  border-radius: 14px !important; border-width: 2px !important;
  box-shadow: 0 2px 0 rgba(0,0,0,.12) !important;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease, background-color .2s ease !important;
  vertical-align: middle;
}
#eut-theme-wrapper a.maxbutton .mb-text {
  padding: 0 !important; line-height: 1.25 !important; font-family: filson-pro, sans-serif !important;
  font-size: 15px !important; display: block !important; text-shadow: none !important;
  white-space: normal !important; overflow-wrap: anywhere; max-width: 100%;
  -webkit-hyphens: auto !important; hyphens: auto !important;
}
#eut-theme-wrapper a.maxbutton:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(60,90,20,.22) !important; }
#eut-theme-wrapper a.maxbutton:active { transform: translateY(0); }
#eut-theme-wrapper .eut-btn { border-radius: 999px; transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease, background-color .2s ease, color .2s ease; }
#eut-theme-wrapper .eut-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,60,90,.18); }

/* ---------- Colour boxes: use the site's own soft green instead of neon ---------- */
#eut-theme-content [style*="rgba(0,238,0,0.6)"] { background-color: #cff492 !important; border-radius: 14px; padding-top: 22px; padding-bottom: 26px; }
#eut-theme-content [style*="rgba(0,238,0,0.6)"] h2.eut-title > span > br:first-child { display: none; }
#eut-theme-content [style*="rgba(0,238,0,0.6)"] h2 { margin-bottom: 0; }
#eut-theme-content [style*="rgba(0,238,0,0.6)"] .eut-text + h2 { margin-top: 2px; }
#eut-theme-content .eut-column-wrapper[style*="background-color"],
#eut-theme-content .eut-column-wrapper-inner[style*="background-color"] { border-radius: 14px; }

/* ---------- Images ---------- */
#eut-theme-content .eut-image a img,
#eut-theme-content .eut-image-wrapper a .eut-thumbnail-wrapper { transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
#eut-theme-content .eut-image a:hover img { transform: scale(1.04); }
#eut-theme-content .eut-gallery .eut-isotope-item-inner { border-radius: 12px; overflow: hidden; }

/* ---------- Forms ---------- */
#eut-theme-content .fluentform input[type="text"],
#eut-theme-content .fluentform input[type="email"],
#eut-theme-content .fluentform input[type="tel"],
#eut-theme-content .fluentform input[type="number"],
#eut-theme-content .fluentform select,
#eut-theme-content .fluentform textarea {
  font-family: inherit; font-size: 16px; border-radius: 10px; padding: 11px 14px; height: auto;
  border: 1.5px solid #cfd6dc; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#eut-theme-content .fluentform input:focus,
#eut-theme-content .fluentform select:focus,
#eut-theme-content .fluentform textarea:focus { border-color: #0097af; box-shadow: 0 0 0 4px rgba(0,151,175,.14); outline: 0; }
#eut-theme-content .fluentform .ff-el-input--label label { font-weight: 500; font-size: 15px; }
#eut-theme-content .fluentform .ff-btn-submit { border-radius: 999px; padding: 13px 28px; font-family: inherit; font-weight: 700; font-size: 16px; transition: transform .2s ease, box-shadow .2s ease; }
#eut-theme-content .fluentform .ff-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(5,1,255,.22); }

/* ---------- Footer ---------- */
#eut-footer a { transition: color .2s ease; }
#eut-footer a:hover { color: #0097af !important; }

/* ---------- News popup ---------- */
.pum-container.pum-container { border-radius: 20px !important; border-width: 0 !important; box-shadow: 0 30px 80px rgba(0,0,0,.35) !important; max-height: 88vh; overflow-y: auto; }
.pum-container .pum-content p { text-wrap: balance; }
.pum-container .pum-close { transition: transform .2s ease; }
.pum-container .pum-close:hover { transform: scale(1.12) rotate(90deg); }

/* ---------- Back-to-top ---------- */
.eut-back-top { transition: transform .25s ease, opacity .25s ease; }
.eut-back-top:hover { transform: translateY(-3px); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.kp-motion .kp-reveal {
    opacity: 0; transform: translate3d(0, 22px, 0);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--kp-d, 0ms);
    will-change: opacity, transform;
  }
  html.kp-motion .kp-reveal.kp-in { opacity: 1; transform: none; }
  html.kp-motion .kp-float { animation: kp-float 6s ease-in-out infinite; }
  html.kp-motion #eut-header { animation: kp-fade .6s ease both; }
  @keyframes kp-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-1.5deg); } }
  @keyframes kp-fade { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print { .kp-reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- Small screens: long German words may break in headings ---------- */
@media only screen and (max-width: 767px) {
  #eut-theme-wrapper h1, #eut-theme-wrapper h2, #eut-theme-wrapper h3,
  #eut-theme-wrapper h4, #eut-theme-wrapper h5, #eut-theme-wrapper h6,
  #eut-theme-wrapper strong, #eut-theme-wrapper b {
    -webkit-hyphens: auto !important; hyphens: auto !important;
    hyphenate-limit-chars: 14 6 6; overflow-wrap: break-word;
  }
  #eut-theme-content h1 { font-size: 30px; }
  #eut-theme-content .eut-section.eut-bg-parallax h3,
  #eut-theme-content .eut-section > .eut-container h3.p1 { font-size: 20px; line-height: 1.3; }
}
