/*
 * MyCMS Frontend Base Theme
 * Generic, project-neutral styles. Project designs should extend this through
 * layout colors, custom frontend CSS/JS, collections, blocks and layout classes.
 */

:root {
  --cms-bg: var(--theme-bg, #f7f4ef);
  --cms-surface: var(--theme-surface, #ffffff);
  --cms-surface-2: var(--theme-surface-2, #eee8df);
  --cms-text: var(--theme-text, #282520);
  --cms-muted: var(--theme-muted, #6f6a61);
  --cms-line: var(--theme-line, #e3ddd2);
  --cms-accent: var(--theme-accent, #b8673d);
  --cms-accent-dark: var(--theme-accent-dark, #7e422b);
  --cms-accent-soft: var(--theme-accent-soft, #ead1c2);
  --cms-shadow: 0 18px 50px rgba(40, 37, 32, .12);
  --cms-radius: 16px;
  --cms-radius-sm: 10px;
  --cms-container: 1180px;
  --cms-gap: clamp(18px, 2vw, 30px);
  --cms-space-section: clamp(56px, 7vw, 104px);
  --cms-font-body: Avenir Next, Montserrat, Verdana, sans-serif;
  --cms-font-headline: Georgia, Cambria, Times New Roman, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mycms-front {
  margin: 0;
  min-height: 100vh;
  background: var(--cms-bg);
  color: var(--cms-text);
  font-family: var(--cms-font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}
body.mycms-cookie-open,
body.cms-lightbox-open,
body.download-preview-open,
body.mobile-nav-open { overflow: hidden; }

img, svg, video, canvas { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--cms-accent); text-decoration: underline; text-underline-offset: .18em; }
a:hover { color: var(--cms-accent-dark); }
p { margin: 0 0 1rem; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .75em;
  color: var(--cms-text);
  font-family: var(--cms-font-headline);
  line-height: 1.12;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.4rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.7rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
h4 { font-size: 1.15rem; }

.container {
  width: min(calc(100% - 32px), var(--cms-container));
  margin-inline: auto;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cms-gap);
  align-items: stretch;
  width: 100%;
}
.content-grid-full { width: 100%; }
.content-selector,
.main-screen,
.teaser { position: relative; padding-block: var(--cms-space-section); }
.content-selector.grey,
.main-screen.grey { background: var(--cms-surface-2); }
#slider-wrapper { position: relative; overflow: hidden; }
#slider { position: relative; min-height: clamp(360px, 58vh, 720px); background: var(--cms-surface-2); }
#slider .content-node-gallery,
#slider .owl-carousel,
#slider .gallery-style,
#slider img { width: 100%; height: 100%; }
#slider img { object-fit: cover; }
#slider-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  padding: 32px;
  color: #fff;
  text-align: center;
}
#slider-title h1,
#slider-title h2,
#slider-title h3,
#slider-title p { color: inherit; text-shadow: 0 2px 28px rgba(0,0,0,.34); }

.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--cms-surface) 94%, transparent);
  border-bottom: 1px solid var(--cms-line);
  backdrop-filter: blur(18px);
  transition: box-shadow .2s ease, background .2s ease;
}
.header-wrapper.fixed-header { box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.header-wrapper header > .container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 88px;
}
.front-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--cms-text); text-decoration: none; font-weight: 800; }
.front-logo img,
.front-logo-image { max-height: 58px; width: auto; object-fit: contain; }
.front-nav-inline { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
#header_2 ul { list-style: none; margin: 0; padding: 0; }
#header_2 .level_1 { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#header_2 .level_1 > li { position: relative; }
#header_2 a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--cms-text);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}
#header_2 a:hover,
#header_2 a.active_tree { background: var(--cms-accent-soft); color: var(--cms-text); }
#header_2 .level_2 {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  min-width: 240px;
  padding: 10px;
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
  box-shadow: var(--cms-shadow);
}
#header_2 li:hover > .level_2,
#header_2 li:focus-within > .level_2 { display: block; }
#header_2 .level_2 a { width: 100%; justify-content: flex-start; border-radius: var(--cms-radius-sm); }
.level_2_title { margin: 0; font: inherit; }
.nav_description { display: none; }

#toggle_navigation {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--cms-line);
  border-radius: 999px;
  background: var(--cms-surface);
  color: var(--cms-text);
  cursor: pointer;
}
.hamburg { display: grid; gap: 5px; justify-content: center; }
.hamburg .line { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
#toggle_navigation.is-open .line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#toggle_navigation.is-open .line:nth-child(2) { opacity: 0; }
#toggle_navigation.is-open .line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger-menu[hidden] { display: none; }
.hamburger-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 96px 24px 32px;
  background: color-mix(in srgb, var(--cms-accent) 94%, #000 6%);
  color: #fff;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}
.hamburger-menu.is-open { opacity: 1; transform: translateY(0); }
.hamburger-menu ul { list-style: none; margin: 0; padding: 0; }
.hamburger-menu a { display: block; padding: 14px 0; color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: 800; }
.hamburger-menu .level_2 { padding-left: 18px; opacity: .88; }

.front-language-switch { display: inline-flex; align-items: center; }
.front-language-toggle,
.front-language-select {
  min-height: 38px;
  border: 1px solid var(--cms-line);
  border-radius: 999px;
  background: var(--cms-surface);
  color: var(--cms-text);
  padding: 6px 12px;
  text-decoration: none;
}

.content-node { min-width: 0; flex: 0 0 100%; max-width: 100%; }
.content-grid > .col-xs-12,
.content-node-children > .col-xs-12 { flex-basis: 100%; max-width: 100%; }
.content-node-children {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cms-gap);
  width: 100%;
}
.textcontent > :first-child { margin-top: 0; }
.textcontent > :last-child { margin-bottom: 0; }
.content-html,
.content-html-custom { width: 100%; }
.content-image img,
.imgcontent img {
  width: 100%;
  border-radius: var(--cms-radius);
  object-fit: cover;
}
.content-node-group { width: 100%; }

button,
.button,
.download-btn,
.content-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--cms-accent);
  border-radius: 999px;
  background: var(--cms-accent);
  color: #fff;
  font: inherit;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
button:hover,
.button:hover,
.download-btn:hover,
.content-form button[type="submit"]:hover {
  background: transparent;
  color: var(--cms-accent);
  transform: translateY(-1px);
}
button[disabled] { opacity: .62; cursor: not-allowed; transform: none; }

.content-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
  box-shadow: 0 12px 34px rgba(0,0,0,.06);
}
.form-field { display: grid; gap: 7px; font-weight: 700; }
.content-form-label-text { color: var(--cms-muted); font-size: .92rem; }
.content-form input,
.content-form textarea,
.content-form select,
.collection-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius-sm);
  background: var(--cms-surface);
  color: var(--cms-text);
  font: inherit;
}
.content-form textarea { min-height: 150px; resize: vertical; }
.content-form input:focus,
.content-form textarea:focus,
.content-form select:focus,
.collection-search input:focus {
  outline: 3px solid color-mix(in srgb, var(--cms-accent) 24%, transparent);
  border-color: var(--cms-accent);
}
.content-form-captcha-note { display: block; color: var(--cms-muted); font-size: .85rem; }

.collection-search,
.collection-group-filter {
  width: 100%;
  margin-bottom: 24px;
}
.collection-group-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.collection-group-filter-btn {
  min-height: 36px;
  padding: 7px 14px;
  background: var(--cms-surface);
  color: var(--cms-text);
  border-color: var(--cms-line);
}
.collection-group-filter-btn:hover,
.collection-group-filter-btn.is-active { background: var(--cms-accent); border-color: var(--cms-accent); color: #fff; }
.collection-search-count,
.collection-search-empty { margin-top: 10px; color: var(--cms-muted); font-size: .94rem; }
.collection-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--cms-gap);
  width: 100%;
}
.collection_list { min-width: 0; }
.collection_container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: clamp(18px, 2vw, 26px);
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
  box-shadow: 0 10px 28px rgba(0,0,0,.06);
  overflow: hidden;
}
.collection_content { min-width: 0; }
.collection_content.title,
.collection_content.entry__title { margin: 0; }
.collection_content img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--cms-radius) - 4px);
}
.collection_link { margin-top: auto; padding-top: 8px; }
.collection_link .button { width: fit-content; }
.is-hidden-by-search,
.is-hidden-by-group { display: none !important; }

.collection_full .collection_container {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.collection_full .collection_content { margin-bottom: 18px; }
.collection_full .collection_content img { border-radius: var(--cms-radius); }

.gallery-slider,
.collection-gallery { width: 100%; }
.gallery-slider .splide__track { overflow: hidden; border-radius: var(--cms-radius); }
.gallery-slider figure { margin: 0; height: 100%; }
.gallery-slider img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--cms-radius);
}
.splide__arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--cms-line);
  background: var(--cms-surface);
  color: var(--cms-text);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}
.splide__arrow:hover { background: var(--cms-accent); color: #fff; border-color: var(--cms-accent); }
.splide__pagination { gap: 6px; }
.splide__pagination__page.is-active { background: var(--cms-accent); }

.content-faq { display: grid; gap: 24px; width: 100%; }
.faq-group-title { margin-bottom: 16px; }
.faq-group-items { display: grid; gap: 10px; }
.faq-group details {
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius-sm);
  padding: 0;
}
.faq-group summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 800;
}
.faq-answer { padding: 0 18px 18px; color: var(--cms-muted); }

.content-downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: var(--cms-gap);
}
.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  border-radius: var(--cms-radius);
}
.download-card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--cms-radius-sm); }
.download-card-badge {
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--cms-accent-soft);
  color: var(--cms-accent-dark);
  font-weight: 900;
  font-size: .76rem;
}
.download-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.content-map { width: 100%; }
.content-map-canvas {
  min-height: 420px;
  border-radius: var(--cms-radius);
  border: 1px solid var(--cms-line);
  overflow: hidden;
  background: var(--cms-surface-2);
}
.content-map .leaflet-container img { max-width: none !important; }

.front-alerts {
  position: fixed;
  inset: 24px 24px auto auto;
  z-index: 120;
  display: grid;
  gap: 10px;
}
.front-alert {
  padding: 12px 16px;
  border-radius: var(--cms-radius-sm);
  background: var(--cms-surface);
  border: 1px solid var(--cms-line);
  box-shadow: var(--cms-shadow);
}
.front-alert-success { border-color: #3a9a5d; }
.front-alert-error { border-color: #be3f3f; }

.front-feedback-modal,
.download-preview-overlay,
.cms-lightbox-fallback,
.mycms-cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
}
.front-feedback-modal[hidden],
.download-preview-overlay[hidden],
.cms-lightbox-fallback[hidden],
.mycms-cookie-overlay[hidden] { display: none !important; }
.front-feedback-backdrop,
.download-preview-overlay,
.cms-lightbox-fallback,
.mycms-cookie-overlay { background: rgba(0,0,0,.54); }
.front-feedback-dialog,
.download-preview-dialog,
.cms-lightbox-fallback__dialog,
.mycms-cookie-banner,
.mycms-cookie-settings {
  width: min(calc(100% - 32px), 720px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 8vh auto;
  padding: clamp(22px, 4vw, 40px);
  background: var(--cms-surface);
  color: var(--cms-text);
  border-radius: var(--cms-radius);
  box-shadow: var(--cms-shadow);
}
.front-feedback-close,
.download-preview-close,
.cms-lightbox-fallback__close,
.mycms-cookie-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
}
.front-feedback-modal { display: grid; place-items: center; }
.front-feedback-dialog { position: relative; margin: 0; text-align: center; }
.front-feedback-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--cms-accent-soft);
  color: var(--cms-accent-dark);
  font-weight: 900;
}

.download-preview-dialog,
.cms-lightbox-fallback__dialog { position: relative; width: min(calc(100% - 32px), 980px); }
.download-preview-body img,
.cms-lightbox-fallback__image { width: 100%; max-height: 76vh; object-fit: contain; border-radius: var(--cms-radius-sm); }
.download-preview-pdf-frame,
.cms-lightbox-fallback__frame { width: 100%; height: 72vh; border: 0; border-radius: var(--cms-radius-sm); background: #fff; }
.cms-lightbox-fallback { display: grid; place-items: center; }
.cms-lightbox-fallback__nav { position: fixed; top: 50%; transform: translateY(-50%); }
.cms-lightbox-fallback__nav--prev { left: 24px; }
.cms-lightbox-fallback__nav--next { right: 24px; }
.cms-lightbox-fallback__caption { color: var(--cms-muted); text-align: center; }

.mycms-cookie-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 150;
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 999px;
  box-shadow: var(--cms-shadow);
}
.mycms-cookie-fab svg { width: 28px; height: 28px; fill: currentColor; }
.mycms-cookie-overlay { display: grid; place-items: center; padding: 16px; }
.mycms-cookie-banner,
.mycms-cookie-settings { position: relative; margin: 0; }
.mycms-cookie-banner-actions,
.mycms-cookie-settings-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.mycms-cookie-btn { flex: 1 1 160px; }
.mycms-cookie-btn-outline { background: transparent; color: var(--cms-accent); }
.mycms-cookie-banner-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; font-size: .92rem; }
.mycms-cookie-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--cms-line);
}
.mycms-cookie-setting-row h5 { margin-bottom: 4px; }
.mycms-cookie-setting-row p { margin: 0; color: var(--cms-muted); font-size: .94rem; }
.mycms-cookie-switch { display: inline-flex; align-items: center; cursor: pointer; }
.mycms-cookie-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mycms-cookie-switch-track {
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: var(--cms-line);
  position: relative;
  transition: background .18s ease;
}
.mycms-cookie-switch-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: transform .18s ease;
}
.mycms-cookie-switch input:checked + .mycms-cookie-switch-track { background: var(--cms-accent); }
.mycms-cookie-switch input:checked + .mycms-cookie-switch-track::after { transform: translateX(22px); }
.mycms-cookie-embed-placeholder {
  padding: 24px;
  border: 1px dashed var(--cms-line);
  border-radius: var(--cms-radius);
  background: var(--cms-surface);
  text-align: center;
}

#footer-header,
footer {
  background: var(--cms-text);
  color: #fff;
}
#footer-header a,
footer a { color: #fff; }
#footer-header { padding-block: 38px; }
footer { padding-block: 56px 28px; }
.footer-grid,
footer .container { display: flex; flex-wrap: wrap; gap: var(--cms-gap); }
#privacy-policy { padding-block: 18px; background: color-mix(in srgb, var(--cms-text) 92%, #fff 8%); color: #fff; }

@media (min-width: 576px) {
  .content-grid > .col-sm-6,
  .content-node-children > .col-sm-6 { flex: 0 0 calc(50% - var(--cms-gap) / 2); max-width: calc(50% - var(--cms-gap) / 2); }
  .content-grid > .col-sm-12,
  .content-node-children > .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}

@media (min-width: 768px) {
  .content-grid > .col-md-3,
  .content-node-children > .col-md-3 { flex: 0 0 calc(25% - var(--cms-gap) * .75); max-width: calc(25% - var(--cms-gap) * .75); }
  .content-grid > .col-md-4,
  .content-node-children > .col-md-4 { flex: 0 0 calc(33.333% - var(--cms-gap) * .67); max-width: calc(33.333% - var(--cms-gap) * .67); }
  .content-grid > .col-md-9,
  .content-node-children > .col-md-9 { flex: 0 0 calc(75% - var(--cms-gap) * .25); max-width: calc(75% - var(--cms-gap) * .25); }
  .content-grid > .col-md-12,
  .content-node-children > .col-md-12 { flex-basis: 100%; max-width: 100%; }
}

@media (min-width: 992px) {
  .content-grid > .col-lg-2,
  .content-node-children > .col-lg-2 { flex: 0 0 calc(16.666% - var(--cms-gap) * .84); max-width: calc(16.666% - var(--cms-gap) * .84); }
  .content-grid > .col-lg-3,
  .content-node-children > .col-lg-3 { flex: 0 0 calc(25% - var(--cms-gap) * .75); max-width: calc(25% - var(--cms-gap) * .75); }
  .content-grid > .col-lg-4,
  .content-node-children > .col-lg-4 { flex: 0 0 calc(33.333% - var(--cms-gap) * .67); max-width: calc(33.333% - var(--cms-gap) * .67); }
  .content-grid > .col-lg-6,
  .content-node-children > .col-lg-6 { flex: 0 0 calc(50% - var(--cms-gap) / 2); max-width: calc(50% - var(--cms-gap) / 2); }
  .content-grid > .col-lg-8,
  .content-node-children > .col-lg-8 { flex: 0 0 calc(66.666% - var(--cms-gap) * .34); max-width: calc(66.666% - var(--cms-gap) * .34); }
}

@media (max-width: 1249px) {
  .header-wrapper header > .container { grid-template-columns: auto 1fr auto; min-height: 74px; }
  #header_2 { display: none; }
  #toggle_navigation { display: inline-grid; place-items: center; }
}

@media (max-width: 767px) {
  :root { --cms-space-section: 48px; }
  .container { width: min(calc(100% - 24px), var(--cms-container)); }
  .content-selector,
  .main-screen,
  .teaser { padding-block: 46px; }
  #slider { min-height: 420px; }
  .collection-search-results,
  .content-downloads-grid { grid-template-columns: 1fr; }
  .mycms-cookie-banner-actions,
  .mycms-cookie-settings-actions { flex-direction: column; }
  .mycms-cookie-btn { width: 100%; }
  .mycms-cookie-setting-row { grid-template-columns: 1fr; gap: 12px; }
  .front-feedback-dialog,
  .download-preview-dialog,
  .cms-lightbox-fallback__dialog,
  .mycms-cookie-banner,
  .mycms-cookie-settings { width: min(calc(100vw - 24px), 720px); padding: 24px; }
  .cms-lightbox-fallback__nav--prev { left: 8px; }
  .cms-lightbox-fallback__nav--next { right: 8px; }
  .footer-grid,
  footer .container { display: grid; gap: 18px; text-align: center; }
}
