:root {
  --mahabux-size-0-5: 0.5rem;
  --mahabux-size-1: 1rem;
  --mahabux-size-1-5: 1.5rem;
  --mahabux-size-2: 2rem;
  --mahabux-size-2-5: 2.5rem;
  --mahabux-size-3: 3rem;
  --mahabux-size-3-5: 3.5rem;
  --mahabux-size-4: 4rem;
  --mahabux-size-4-5: 4.5rem;
  --mahabux-size-5: 5rem;
  --mahabux-size-6: 6rem;
  --mahabux-size-7-5: 7.5rem;
  --mahabux-size-8: 8rem;
  --mahabux-size-9: 9rem;
  --mahabux-size-10: 10rem;
  --mahabux-size-20: 20rem;
  --mahabux-size-40: 40rem;
  --mahabux-size-50: 50rem;
  --mahabux-size-60: 60rem;
  --mahabux-border-thin: 1px;
  --mahabux-master-height: 50vh;
  --mahabux-master-bg-inset: -12%;
  --mahabux-master-bg-inset-mobile: -8%;
  --mahabux-logo-height: var(--mahabux-size-4);
  --mahabux-shell-gap-x: var(--mahabux-size-2-5);
  --mahabux-raised-offset: -5.5rem;
  --mahabux-shadow-color: rgba(0, 0, 0, 0.18);
  --mahabux-header-shadow-color: rgba(37, 50, 45, 0.12);
  --mahabux-editor-shadow-color: rgba(0, 0, 0, 0.12);
  --mahabux-hero-tint-soft: rgba(19, 28, 25, 0.18);
  --mahabux-hero-tint-strong: rgba(19, 28, 25, 0.55);
  --mahabux-outline-light: rgba(255, 255, 255, 0.55);
  --mahabux-shadow: 0 var(--mahabux-size-1-5) var(--mahabux-size-4-5)
    var(--mahabux-shadow-color);
  --mahabux-header-shadow: 0 var(--mahabux-size-1) var(--mahabux-size-3)
    var(--mahabux-header-shadow-color);
  --mahabux-editor-shadow: 0 var(--mahabux-size-0-5) var(--mahabux-size-2)
    var(--mahabux-editor-shadow-color);
}

html {
  scroll-behavior: smooth;
}

a:visited {
  color: var(--wp--preset--color--muted);
}

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mahabux-header-part {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
  display: block;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition:
    background-color 180ms ease,
    backdrop-filter 180ms ease;
}

.mahabux-header-part.is-scrolled {
  background: var(--wp--preset--color--accent);
  -webkit-backdrop-filter: blur(var(--mahabux-size-1));
  backdrop-filter: blur(var(--mahabux-size-1));
}

.mahabux-header-part .wp-block-group p {
  margin-top: 0;
}

body.admin-bar .mahabux-header-part {
  top: var(--mahabux-size-2);
}

@media screen and (max-width: 49rem) {
  body.admin-bar .mahabux-header-part {
    top: var(--mahabux-size-3);
  }
}

.mahabux-site-header {
  transition:
    padding-top 180ms ease,
    color 180ms ease;
  color: var(--wp--preset--color--white);
  width: 100%;
}

.mahabux-site-header > .wp-block-group,
.master-content,
.mahabux-main-shell,
.mahabux-site-footer {
  width: min(
    calc(100vw - var(--mahabux-shell-gap-x) * 2),
    var(--wp--style--global--wide-size, var(--mahabux-size-60))
  );
  max-width: calc(100vw - var(--mahabux-shell-gap-x) * 2);
  margin: 0 auto;
}

.mahabux-nav-shell {
  padding: var(--mahabux-size-1) var(--mahabux-size-1-5);
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.mahabux-site-header .wp-block-site-title a,
.mahabux-site-header .wp-block-site-tagline,
.mahabux-site-header .wp-block-navigation-item__content,
.mahabux-site-header .wp-block-social-link-anchor {
  color: inherit;
}

.mahabux-site-header.is-scrolled {
  padding-top: 0;
  color: var(--wp--preset--color--white);
}

.mahabux-site-header.is-scrolled .mahabux-nav-shell {
  box-shadow: var(--mahabux-header-shadow);
}

.mahabux-brand .custom-logo {
  max-width: 100%;
  height: var(--mahabux-logo-height);
  max-height: var(--mahabux-size-10);
  object-fit: contain;
  border-radius: var(--mahabux-size-50);
}

.master {
  position: relative;
  min-height: var(--mahabux-master-height);
  margin-top: 0;
  padding-top: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: var(--wp--preset--color--white);
}

.master-bg,
.master-overlay {
  position: absolute;
  inset: 0;
  margin: 0 !important;
}

.master-bg {
  background-color: var(--wp--preset--color--accent);
  background-image:
    linear-gradient(
      135deg,
      var(--mahabux-hero-tint-soft),
      var(--mahabux-hero-tint-strong)
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%2393a5a1'/%3E%3Cstop offset='1' stop-color='%2346524d'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23g)'/%3E%3Ccircle cx='1220' cy='180' r='210' fill='%23dfe7e2' fill-opacity='.18'/%3E%3Cpath d='M0 640C180 560 350 520 520 540C690 560 860 660 1030 660C1200 660 1390 560 1600 480V900H0Z' fill='%232f3b37' fill-opacity='.58'/%3E%3Cpath d='M0 720C180 660 340 640 520 660C700 680 870 760 1030 760C1190 760 1390 680 1600 610V900H0Z' fill='%2319221f' fill-opacity='.78'/%3E%3C/svg%3E");
  inset: var(--mahabux-master-bg-inset);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 1;
  will-change: transform, opacity;
  transition: opacity 1400ms ease;
  transform: translate3d(0, 0, 0) scale(1.08);
}

.master-bg--extra {
  z-index: 0;
  opacity: 0;
}

.master-overlay {
  background: var(--wp--preset--color--hero-overlay);
}

.master-content {
  position: relative;
  z-index: 1;
  padding: clamp(var(--mahabux-size-8), 14vw, var(--mahabux-size-10))
    clamp(var(--mahabux-size-1), 4vw, var(--mahabux-size-2))
    clamp(var(--mahabux-size-4), 9vw, var(--mahabux-size-8));
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.master-content.is-fading {
  opacity: 0;
  transform: translateY(var(--mahabux-size-0-5));
}

.wp-site-blocks > .mahabux-header-part + .mahabux-main-shell {
  margin-top: clamp(var(--mahabux-size-7-5), 12vw, var(--mahabux-size-9));
}

.wp-site-blocks > .mahabux-header-part + .mahabux-main-shell.is-raised {
  margin-top: clamp(var(--mahabux-size-2), 5vw, var(--mahabux-size-3));
}

.master-content > :first-child {
  margin-top: 0;
}

.master-content > :last-child {
  margin-bottom: 0;
}

.master-content h1,
.master-content p {
  color: var(--wp--preset--color--white);
}

.master-content h1 {
  margin-bottom: var(--mahabux-size-0-5);
  font-size: clamp(var(--mahabux-size-2-5), 8vw, var(--mahabux-size-6));
}

.master-content p {
  font-size: clamp(var(--mahabux-size-1), 2vw, var(--mahabux-size-1));
}

.wp-element-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--mahabux-border-thin) solid transparent;
  text-decoration: none;
}

.wp-element-button:hover,
.wp-element-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--white);
  border-color: var(--mahabux-outline-light);
}

.mahabux-main-shell {
  padding: clamp(var(--mahabux-size-2), 4vw, var(--mahabux-size-3))
    clamp(var(--mahabux-size-1), 3vw, var(--mahabux-size-2))
    clamp(var(--mahabux-size-4), 6vw, var(--mahabux-size-5));
}

.mahabux-main-shell.is-raised {
  margin-top: var(--mahabux-raised-offset);
  margin-bottom: var(--mahabux-size-4);
  background: var(--wp--preset--color--surface);
  border-radius: 0;
  box-shadow: var(--mahabux-shadow);
  overflow: hidden;
  position: relative;
  z-index: 5;
}

.mahabux-main-shell
  > :where(
    :not(.alignwide):not(.alignfull):not(.mahabux-sidebar-layout):not(
        .wp-block-query
      ):not(.wp-block-post-featured-image)
  ) {
  width: min(
    100%,
    var(--wp--style--global--content-size, var(--mahabux-size-50))
  );
  max-width: var(--wp--style--global--content-size, var(--mahabux-size-50));
  margin-inline: auto;
}

.mahabux-main-shell
  > :where(
    .wp-block-query,
    .mahabux-sidebar-layout,
    .wp-block-post-featured-image,
    .alignwide,
    .alignfull
  ) {
  width: 100%;
  max-width: 100%;
}

.mahabux-card,
.mahabux-search-result,
.mahabux-listing,
.wp-block-comment-template .wp-block-columns {
  background: linear-gradient(
    180deg,
    var(--wp--preset--color--surface) 0%,
    var(--wp--preset--color--surface-alt) 100%
  );
  border: var(--mahabux-border-thin) solid var(--wp--preset--color--line);
  border-radius: var(--mahabux-size-1);
  overflow: hidden;
}

.mahabux-card .wp-block-post-featured-image img,
.mahabux-listing-media .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mahabux-card-body,
.mahabux-search-result,
.mahabux-not-found,
.mahabux-listing-body {
  padding: var(--mahabux-size-1-5);
}

.wp-block-post-template {
  gap: clamp(var(--mahabux-size-1), 2vw, var(--mahabux-size-1-5));
}

.mahabux-listing {
  display: grid;
  grid-template-columns: minmax(
      var(--mahabux-size-10),
      var(--mahabux-size-20)
    ) 1fr;
  gap: 0;
}

.mahabux-listing-media {
  min-height: 100%;
}

.mahabux-listing-body > *:first-child,
.mahabux-card-body > *:first-child,
.mahabux-search-result > *:first-child {
  margin-top: 0;
}

.mahabux-sidebar-layout {
  gap: clamp(var(--mahabux-size-1-5), 3vw, var(--mahabux-size-2-5));
}

.mahabux-sidebar-column {
  flex: 0 0 300px;
  max-width: 300px;
}

.mahabux-sidebar-featured-image {
  margin-bottom: var(--mahabux-size-1-5);
  border-radius: var(--mahabux-size-1);
  overflow: hidden;
}

.mahabux-sidebar-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.mahabux-sidebar {
  position: sticky;
  top: clamp(var(--mahabux-size-1), 2vw, var(--mahabux-size-2));
}

.mahabux-sidebar-stack {
  display: grid;
  gap: 0;
}

.mahabux-sidebar-card {
  padding: var(--mahabux-size-1-5);
}

.mahabux-sidebar-card > *:first-child,
.mahabux-sidebar-main > *:first-child,
.mahabux-sidebar-post > *:first-child {
  margin-top: 0;
}

.mahabux-sidebar-heading {
  margin-bottom: var(--mahabux-size-1);
}

.mahabux-sidebar-nav,
.mahabux-sidebar-nav .wp-block-page-list,
.mahabux-sidebar-posts .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

:where(.mahabux-sidebar-nav .wp-block-pages-list__item, .mahabux-sidebar-post) {
  border-top: var(--mahabux-border-thin) solid var(--wp--preset--color--line);
  padding-top: var(--mahabux-size-1);
}

:where(
  .mahabux-sidebar-nav .wp-block-pages-list__item,
  .mahabux-sidebar-post
):first-child {
  border-top: 0;
  padding-top: 0;
}

:where(.mahabux-sidebar-nav .wp-block-pages-list__item, .mahabux-sidebar-post)
  + :where(
    .mahabux-sidebar-nav .wp-block-pages-list__item,
    .mahabux-sidebar-post
  ) {
  margin-top: var(--mahabux-size-1);
}

.mahabux-sidebar-nav a {
  display: block;
  color: var(--wp--preset--color--ink);
  font-weight: 600;
}

.mahabux-sidebar-post .wp-block-post-date {
  color: var(--wp--preset--color--muted);
}

.mahabux-sidebar-tree > *:first-child,
.mahabux-sidebar-posts > *:first-child {
  margin-top: 0;
}

.mahabux-sidebar-tree-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mahabux-sidebar-root-link {
  color: inherit;
  text-decoration: none;
}

.mahabux-sidebar-root-link:hover {
  text-decoration: underline;
}

.mahabux-sidebar-tree-item + .mahabux-sidebar-tree-item {
  margin-top: 0.85rem;
}

.mahabux-sidebar-tree-item a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--wp--preset--color--ink);
  font-weight: 500;
  text-decoration: none;
}

.mahabux-sidebar-tree-item a::before {
  content: '';
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;
  border: 2px solid currentColor;
  box-sizing: border-box;
}

.mahabux-sidebar-tree-item.is-current a,
.mahabux-sidebar-tree-item.is-ancestor a {
  font-weight: 700;
}

.mahabux-sidebar-tree-item.is-current a::before,
.mahabux-sidebar-tree-item.is-ancestor a::before {
  box-shadow: inset 0 0 0 3px var(--wp--preset--color--surface), inset 0 0 0 999px currentColor;
}

.mahabux-journal-shell {
  display: grid;
  gap: clamp(var(--mahabux-size-1-5), 3vw, var(--mahabux-size-3));
}

.mahabux-section-head,
.mahabux-archive-head {
  gap: var(--mahabux-size-1-5);
}

.mahabux-section-head-copy {
  max-width: 40rem;
}

.mahabux-archive-head {
  text-align: center;
}

.mahabux-category-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.mahabux-section-head .mahabux-category-cloud {
  justify-content: flex-start;
}

.mahabux-category-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: var(--mahabux-border-thin) solid var(--wp--preset--color--line);
  border-radius: 999px;
  background: var(--wp--preset--color--surface-alt);
  color: var(--wp--preset--color--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
}

.mahabux-category-cloud a:hover {
  background: var(--wp--preset--color--surface);
}

.mahabux-post-grid-query .wp-block-post-template {
  gap: clamp(var(--mahabux-size-1), 2vw, var(--mahabux-size-1-5));
}

.mahabux-post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mahabux-post-card .mahabux-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.85rem;
}

.mahabux-post-card-terms,
.mahabux-post-card-terms a {
  color: var(--wp--preset--color--muted);
  font-weight: 600;
  text-decoration: none;
}

.mahabux-post-card .wp-block-post-excerpt {
  margin-bottom: auto;
}

.mahabux-post-card .wp-block-post-date {
  color: var(--wp--preset--color--muted);
}

.mahabux-footer-part {
  margin-top: auto;
  background: var(--wp--preset--color--accent);
  width: 100%;
}

.mahabux-site-footer {
  padding: var(--mahabux-size-2) 0;
  color: var(--wp--preset--color--white);
}

.mahabux-site-footer > :where(:not(.alignwide):not(.alignfull)) {
  width: min(
    100%,
    var(--wp--style--global--content-size, var(--mahabux-size-50))
  );
  max-width: var(--wp--style--global--content-size, var(--mahabux-size-50));
  margin-inline: auto;
}

.mahabux-site-footer a,
.mahabux-site-footer .wp-block-site-title {
  color: var(--wp--preset--color--white);
}

.mahabux-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mahabux-comment-avatar {
  flex-basis: var(--mahabux-size-4);
}

.wp-block-query-pagination {
  margin-top: var(--mahabux-size-1);
}

.wp-block-query-pagination a,
.wp-block-query-pagination span,
.wp-block-comments-pagination a,
.wp-block-comments-pagination span {
  padding: var(--mahabux-size-0-5) var(--mahabux-size-1);
  border: var(--mahabux-border-thin) solid var(--wp--preset--color--line);
  border-radius: var(--mahabux-size-50);
}

.wp-block-post-comments-form,
.wp-block-search {
  margin-top: var(--mahabux-size-2);
}

.wp-block-search__input,
.wp-block-post-comments-form input,
.wp-block-post-comments-form textarea {
  border-radius: var(--mahabux-size-1);
  border: var(--mahabux-border-thin) solid var(--wp--preset--color--line);
  padding: var(--mahabux-size-1) var(--mahabux-size-1);
}

.wp-block-navigation__responsive-container.is-menu-open {
  padding: var(--mahabux-size-1-5);
}

@media (max-width: 50rem) {
  .master-bg {
    inset: var(--mahabux-master-bg-inset-mobile);
  }

  .master-content h1 {
    max-width: 100%;
  }

  .mahabux-listing,
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: 1fr;
  }

  .mahabux-section-head {
    align-items: flex-start;
  }

  .mahabux-section-head .mahabux-category-cloud {
    justify-content: flex-start;
  }

  .mahabux-main-shell.is-raised {
    margin-top: calc(var(--mahabux-size-2) * -1);
    padding-left: var(--mahabux-size-1);
    padding-right: var(--mahabux-size-1);
  }

  .mahabux-sidebar {
    position: static;
  }

  .mahabux-sidebar-column {
    flex-basis: 100%;
    max-width: none;
  }

  .mahabux-nav-shell {
    padding-left: var(--mahabux-size-1);
    padding-right: var(--mahabux-size-1);
  }
}

@media (max-width: 40rem) {
  .master-content {
    padding-top: var(--mahabux-size-7-5);
    padding-bottom: var(--mahabux-size-4);
  }
}

/*
 * Editor-Overrides – Regeln hier brauchen .editor-styles-wrapper Präfix,
 * damit sie auf dem Frontend nichts bewirken. Die eigentlichen Hiding-Regeln
 * sind in editor.css OHNE Präfix (WordPress scoped sie automatisch).
 */

.editor-styles-wrapper .mahabux-header-part {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  background: var(--wp--preset--color--accent);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.editor-styles-wrapper .mahabux-header-part.is-scrolled {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.editor-styles-wrapper .master {
  min-height: min(42vh, var(--mahabux-size-20));
}

.editor-styles-wrapper .master-content {
  padding-top: clamp(var(--mahabux-size-3-5), 8vw, var(--mahabux-size-5));
  padding-bottom: clamp(var(--mahabux-size-2), 5vw, var(--mahabux-size-3));
}

.editor-styles-wrapper
  .wp-site-blocks
  > .mahabux-header-part
  + .mahabux-main-shell,
.editor-styles-wrapper
  .wp-site-blocks
  > .mahabux-header-part
  + .mahabux-main-shell.is-raised,
.editor-styles-wrapper .mahabux-main-shell.is-raised {
  margin-top: 0;
  margin-bottom: 0;
}

.editor-styles-wrapper .mahabux-main-shell.is-raised {
  box-shadow: var(--mahabux-editor-shadow);
}

.editor-styles-wrapper .mahabux-footer-part {
  margin-top: 0;
}
