:root {
  --ekcsr-green: #0b7659;
  --ekcsr-dark: #123e34;
  --ekcsr-mint: #eaf6f0;
  --ekcsr-line: #d9e7e1;
  --ekcsr-cream: #fbfaf5;
}

html,
body.ekcsr-active {
  max-width: 100%;
  overflow-x: clip;
}

/* Twenty Twenty-Five block-template parts duplicated the custom site chrome. */
body.ekcsr-active > .wp-site-blocks > header.wp-block-template-part,
body.ekcsr-active > .wp-site-blocks > footer.wp-block-template-part {
  display: none !important;
}

body.ekcsr-active > .wp-site-blocks {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Neutralize the block theme's negative alignfull margins that caused overflow. */
body.ekcsr-active .wp-site-blocks > main > .alignfull,
body.ekcsr-active .wp-site-blocks > main .entry-content.alignfull {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* The custom hero already contains the visible homepage heading. */
body.ekcsr-active.home .wp-site-blocks main .wp-block-post-title {
  display: none !important;
}

body.ekcsr-active.home .wp-site-blocks > main > .alignfull {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.ekcsr-active .ekr-site-header {
  position: relative;
  z-index: 1000;
  box-sizing: border-box;
}

body.ekcsr-active .ekr-brand b {
  white-space: nowrap;
}

.ekcsr-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ekcsr-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ekcsr-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.ekcsr-menu-toggle span,
.ekcsr-menu-toggle span::before,
.ekcsr-menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.ekcsr-menu-toggle span {
  position: relative;
}

.ekcsr-menu-toggle span::before,
.ekcsr-menu-toggle span::after {
  position: absolute;
  left: 0;
  content: "";
}

.ekcsr-menu-toggle span::before {
  top: -6px;
}

.ekcsr-menu-toggle span::after {
  top: 6px;
}

.ekcsr-menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.ekcsr-menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.ekcsr-menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.ekcsr-menu-toggle:focus-visible,
body.ekcsr-active .ekr-site-header a:focus-visible,
.ekcsr-read-more:focus-visible,
.ekcsr-category-card:focus-visible,
.ekcsr-guide-card a:focus-visible {
  outline: 3px solid rgba(11, 118, 89, 0.35);
  outline-offset: 3px;
}

/* Ratgeber hub. */
.ekcsr-ratgeber-hub {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 72px;
}

.ekcsr-category-grid,
.ekcsr-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 44px;
}

.ekcsr-category-card,
.ekcsr-guide-card {
  border: 1px solid var(--ekcsr-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(21, 59, 52, 0.05);
}

.ekcsr-category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  color: var(--ekcsr-dark) !important;
  text-decoration: none !important;
}

.ekcsr-category-card:hover,
.ekcsr-guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(21, 59, 52, 0.09);
}

.ekcsr-category-card strong {
  font-size: 1.1rem;
}

.ekcsr-category-card span,
.ekcsr-guide-card p {
  color: #526963;
}

.ekcsr-guide-card {
  padding: 22px;
}

.ekcsr-guide-card h3 {
  margin: 0 0 12px !important;
  font-size: 1.25rem;
  line-height: 1.35;
}

.ekcsr-guide-card h3 a {
  color: var(--ekcsr-dark);
  text-decoration: none;
}

.ekcsr-read-more {
  color: var(--ekcsr-green) !important;
  font-weight: 750;
  text-decoration: none !important;
}

.ekcsr-archive-excerpt {
  max-width: 760px;
}

/* Calculator input feedback styles used by repair.js. */
body.ekcsr-active .ekr-input.ekcsr-invalid {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.ekcsr-error-summary {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 4px solid #b42318;
  border-radius: 4px 10px 10px 4px;
  background: #fff1f0;
  color: #7a271a;
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  body.ekcsr-active .ekr-site-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  body.ekcsr-active .ekr-site-header .ekcsr-menu-toggle {
    display: inline-flex;
  }

  body.ekcsr-active .ekr-site-header nav {
    display: none !important;
  }

  body.ekcsr-active .ekr-site-header nav.ekcsr-menu-open {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    left: 18px;
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--ekcsr-line);
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(18, 62, 52, 0.16);
  }

  body.ekcsr-active .ekr-site-header nav.ekcsr-menu-open a {
    padding: 13px 12px;
    border-bottom: 1px solid #edf2ef;
  }

  body.ekcsr-active .ekr-site-header nav.ekcsr-menu-open a:last-child {
    border-bottom: 0;
  }

  .ekcsr-category-grid,
  .ekcsr-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body.ekcsr-active .ekr-brand b {
    font-size: 17px;
  }

  body.ekcsr-active .ekr-brand small {
    font-size: 9px;
  }

  .ekcsr-ratgeber-hub {
    padding-right: 18px;
    padding-left: 18px;
  }

  .ekcsr-category-grid,
  .ekcsr-guide-grid {
    grid-template-columns: 1fr;
  }
}

