/* Grundlayout: Auf großen Bildschirmen bleiben die bisherigen 985 px erhalten. */
#top,
#content_main,
#bottom_copy {
  box-sizing: border-box;
  width: min(985px, calc(100% - 2rem));
  margin-inline: auto;
}

#content-home-umzug,
#content,
#content-datenschutz.begriff-inhalt {
  height: auto;
  padding-bottom: 3.5rem;
}

#content {
  min-height: 900px;
  box-sizing: border-box;
}

/* Auf Detailseiten folgen auf den Inhalt genau 60 px bis zum Footer. */
#content:has(> #content_main > .ofen-detail) {
  min-height: 0;
  padding-bottom: 60px;
}

#content_top img,
#bottom_shadow img,
#standardlayout img,
#detail_image img,
#detail_text img {
  max-width: 100%;
  height: auto;
}

/* Kopfbereich und Navigation: Links bleiben direkt erreichbar.
   Die kleinen Pfeile öffnen die Untermenüs auch per Touch und Tastatur. */
#logo,
#logo-home {
  right: 76px;
  margin-left: 0;
}

#logo img,
#logo-home img {
  display: block;
  max-width: 100%;
  height: auto;
}

#logo-home.logo-home-svg {
  width: 285px;
  height: auto;
}

#logo-home.logo-home-svg img {
  width: 100%;
  aspect-ratio: 285 / 118;
  object-fit: contain;
  object-position: center top;
}


#nav {
  bottom: 20px;
  width: 100%;
  margin-top: 0;
  font: 13px/1.35 'Ruda', sans-serif;
}

#menue-overlay:not([open]) {
  display: none;
}

.hauptmenu,
.hauptmenu ul,
#ofentypen ul {
  list-style: none;
}

.hauptmenu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
}

.hauptmenu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.hauptmenu > li > a {
  display: block;
  padding: 12px 7px 12px 4px;
  color: #fff;
  text-decoration: none;
}

.hauptmenu > .mit-untermenu > a {
  padding-right: 0;
}

.hauptmenu > li > a:hover {
  text-decoration: underline;
}

.hauptmenu summary {
  display: grid;
  place-items: center;
  width: 24px;
  height: 42px;
  color: #fff;
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/* Kreis und Pfeil liegen mittig in derselben Rasterzelle. */
.hauptmenu summary::before,
.hauptmenu summary::after {
  grid-area: 1 / 1;
}

.hauptmenu summary::before {
  content: '';
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.hauptmenu summary::after,
#ofentypen summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.hauptmenu summary::after {
  transform: translateY(-2px) rotate(45deg);
}

.hauptmenu details[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

#ofentypen[open] > summary::after {
  transform: rotate(225deg);
}

.hauptmenu ul {
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  width: 220px;
  background: #f6f7f7;
  box-shadow: 1px 2px 2px #999;
}

.hauptmenu ul a,
#ofentypen li a {
  display: block;
  padding: 6px 8px;
  border-bottom: 1px solid #d3d6d9;
  color: #4a565f;
  text-decoration: none;
}

.hauptmenu ul a:hover,
#ofentypen li a:hover {
  text-decoration: underline;
}

#nav :focus-visible,
#ofentypen :focus-visible {
  outline: 2px solid #183f72;
  outline-offset: -2px;
}

.hauptmenu > li > a:focus-visible,
.hauptmenu summary:focus-visible {
  outline-color: #fff;
}

/* Seitenüberschrift und der jeweilige Hinweis stehen in einer flexiblen Zeile. */
.seitenkopf {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

#head1 {
  display: block;
  float: none;
  width: auto;
  margin: -8px 0 0 -2px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
}

#neu {
  position: static;
  flex: 0 1 345px;
  width: auto;
  height: auto;
  margin: 0 40px 0 0;
  background: none;
}

#neu .neu_text {
  display: block;
  padding: 0.5em 1em;
border-radius: 5px;
  color: #fff;
  background: #68a2f0;
  line-height: 1.1;
}

#neu p {
  margin: 0.35rem 0 0 25px;
}

#standardlayout {
  position: static;
  width: auto;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

.begriff-inhalt #head1 {
  overflow-wrap: anywhere;
}

/* Textseiten bekommen die Höhe ihres Inhalts und Platz für die vorhandenen Bilder. */
.hauptseiten-inhalt:is(#content, #content-medium, #content-datenschutz) {
  height: auto;
  min-height: 0;
  padding-bottom: 3.5rem;
}

.hauptseiten-inhalt #head1 {
  overflow-wrap: anywhere;
}

.hauptseiten-inhalt #standardlayout {
  display: flow-root;
}

.hauptseiten-inhalt #standardlayout img:is(.img, .left) {
  box-sizing: border-box;
  margin-inline-end: 1rem;
  padding-inline-end: 0;
}

.hauptseiten-zitat {
  max-width: min(100%, 356px);
}

.hauptseiten-zitat img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Die Abschnitte beginnen unterhalb des vorherigen Textes und seines Bildes. */
.zielsetzung-abschnitt,
.persoenlich-abschnitt {
  display: flow-root;
}

#schlussbemerkung,
section.persoenlich-abschnitt {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d4d4d4;
}

#schlussbemerkung-titel,
.persoenlich-abschnitt > h2 {
  color: #55626b;
  font: 400 clamp(1.65rem, 4vw, 2.25rem)/1.2 'Ruda', sans-serif;
}

/* Der Märchenofen-Datenschutz hat eine eigene Navigation und Kontaktspalte. */
.datenschutz-kopf #logo {
  width: min(228px, calc(100% - 1rem));
}

.datenschutz-spalten {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
  font-family: 'Open Sans', Arial, sans-serif;
}

.datenschutz-spalten #head1 {
  margin: 0;
}

/* Die Neuheiten übernehmen den Seitenrahmen und passen ihre Höhe dem Inhalt an. */
#content.neuheiten-inhalt {
  min-height: 0;
}

.neuheiten-inhalt #head1 {
  overflow-wrap: anywhere;
}

.neuheiten-folgen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.875rem;
}

.neuheiten-folgen .button_neu {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
}

#standardlayout img {
  display: block;
  margin-bottom: 1rem;
}

#standardlayout p,
#standardlayout h2 {
  margin-bottom: 1rem;
}

#standardlayout blockquote .text-zitat {
  margin-bottom: 0.25rem;
}

#standardlayout hr {
  margin-block: 2.5rem;
}

/* Ofentypen: Die aufklappbare Liste liegt auf dem Desktop über dem Inhalt. */
#ofentypen {
  position: relative;
  z-index: 5;
  flex: 0 0 215px;
  font: 14px/1.35 'Ruda', sans-serif;
}

#ofentypen summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  background: #68a2f0;
  cursor: pointer;
}

#ofentypen ul {
  position: absolute;
  right: 0;
  width: max-content;
  min-width: 100%;
  background: #f4f4f4;
  box-shadow: 1px 2px 2px #999;
  font-size: 12px;
}

/* Die drei Spalten enthalten Rücklink, Foto und Beschreibung.
   Die Maßangaben und kleinen Fotos dürfen innerhalb der Textspalte umbrechen. */
.ofen-detail {
  display: grid;
  grid-template-columns: 60px minmax(0, 310px) minmax(0, 530px);
  align-items: start;
  gap: 1.875rem;
  margin-top: 4.2rem;
}

#detail_back,
#detail_image,
#detail_text {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
}

#detail_back a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

#detail_image {
  width: min(100%, 290px);
}

#detail_image a,
#detail_image img,
.ofen-detail .box_bottom img,
.gal img {
  display: block;
}

.ofen-beschreibung {
  margin-top: 1rem;
}

#detail_text {
  overflow-wrap: anywhere;
}

#moreinfo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 15px;
  float: none;
  width: auto;
}

#box {
  float: none;
  width: min(100%, 190px);
  height: auto;
  padding: 0;
}

.box_head a {
  display: grid;
  place-items: center;
  float: right;
  width: 28px;
  height: 28px;
}

.box_bottom,
.gal_bottom {
  max-width: 100%;
}

.ofen-galerie {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  width: min(100%, 321px);
}

#bottom_copy {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
padding-bottom: 25px;
}

.bottom_copy_link {
  float: none;
}

@media (max-width: 950px) {
  .ofen-detail {
    grid-template-columns: 44px minmax(0, min(35%, 290px)) minmax(0, 1fr);
    gap: 1rem;
  }

  #neu {
    margin-right: 0;
  }
}

/* Auf dem Handy folgen die Bereiche in Lesereihenfolge untereinander. */
@media (max-width: 700px) {
  #top {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    height: auto;
    background-position: right top;
  }

  #logo,
  #logo-home {
    position: static;
    width: min(296px, calc(100% - 1rem));
    height: auto;
    margin-right: 1rem;
  }
	
  #logo-home.logo-home-svg {
    width: min(285px, calc(100% - 2rem));
    margin-inline: 1rem;
    margin-bottom: 8px;
  }

  #nav {
    position: relative;
    bottom: auto;
    box-sizing: border-box;
    padding: 0 1rem;
    background: #55626b;
    font-size: 14px;
  }

  .hauptmenu summary {
    width: 36px;
    height: 44px;
  }

  .hauptmenu > li > a {
    padding-block: 13px;
  }

  .hauptmenu > li {
    position: static;
  }

  /* Das Untermenü richtet sich an der gesamten Navigation aus. */
  .hauptmenu ul {
    width: auto;
    right: 1rem;
    left: 1rem;
  }

  .hauptmenu ul a,
  #ofentypen li a {
    padding: 11px 10px;
  }

  /* Das geöffnete Burgermenü bedeckt das ganze Browserfenster.
     Bei wenig Platz scrollt nur die Linkliste. */
  .menue-taste:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    background: #55626b;
    color: #fff;
    font: 700 1rem/1.35 'Ruda', sans-serif;
    cursor: pointer;
  }

  #menue-oeffnen {
    align-self: stretch;
    text-align: left;
	justify-content: flex-end;
  }

  .menue-symbol {
    width: 1.25rem;
    text-align: center;
    font: 1.5rem/1 Arial, sans-serif;
  }

  .menue-taste:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
  }

  #menue-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    flex-direction: column;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: hidden;
    background: #55626b;
    opacity: 0;
    transition: opacity 220ms ease;
    /* Der Dialog bleibt bis zum Ende der Überblendung sichtbar. */
    transition-property: opacity, display, overlay;
    transition-behavior: allow-discrete;
  }

  #menue-overlay[open] {
    display: flex;
    opacity: 1;
  }

  @starting-style {
    #menue-overlay[open] {
      opacity: 0;
    }
  }

  #menue-overlay::backdrop {
    background: transparent;
  }

  @media (prefers-reduced-motion: reduce) {
    #menue-overlay {
      transition: none;
    }
  }

  html:has(#menue-overlay[open]) {
    overflow: hidden;
  }

  #menue-overlay form {
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  #menue-overlay #nav {
    flex: 1;
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 1rem;
  }

  #menue-overlay .hauptmenu {
    display: block;
    max-width: 32rem;
    margin-inline: auto;
  }

  #menue-overlay .hauptmenu > li {
    position: relative;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  #menue-overlay .hauptmenu > li > a {
    box-sizing: border-box;
    min-height: 3rem;
    overflow-wrap: anywhere;
  }

  #menue-overlay .hauptmenu > .mit-untermenu > a {
    padding-right: 3.5rem;
  }

  #menue-overlay .hauptmenu summary {
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 3rem;
  }

  #menue-overlay .hauptmenu > li > a:focus-visible,
  #menue-overlay .hauptmenu summary:focus-visible {
    outline-color: #fff;
  }

  #menue-overlay .hauptmenu ul {
    position: static;
    margin-bottom: 0.5rem;
    box-shadow: none;
  }

  #content_main {
    margin-top: 2rem;
  }

  #content {
    min-height: 0;
  }

  .seitenkopf {
    flex-direction: column;
    align-items: stretch;
  }

  #head1 {
    margin: 0;
  }

  #neu,
  #ofentypen {
    flex: auto;
  }

  #neu .neu_text {
    font-size: 1.25rem;
  }

  #ofentypen {
    font-size: 1rem;
  }

  #ofentypen summary {
    min-height: 34px;
  }

  #ofentypen ul {
    position: static;
    width: auto;
    font-size: 14px;
  }

  .ofen-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
  }

  #detail_image {
    margin-inline: auto;
  }

  .ofen-beschreibung,
  #detail_text .large,
  .begriff-inhalt .subhead_4,
  .hauptseiten-inhalt .subhead_4,
  #standardlayout .subhead_1,
  #standardlayout .text-zitat {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hauptseiten-inhalt #standardlayout img:is(.img, .left) {
    float: none;
    margin-inline-end: 0;
  }

  .datenschutz-spalten {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .begriff-inhalt .modal-button {
    box-sizing: border-box;
    max-width: 100%;
    padding: 0.55rem 0.75rem;
  }

  .neuheiten-folgen .button_neu {
    min-height: 44px;
  }

  .typo-umzug {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .box_head {
    background-size: cover;
    font-size: 14px;
    line-height: 1.4;
  }

  .box_head a {
    width: 44px;
    height: 44px;
  }

  #moreinfo {
    flex-direction: column;
  }

  /* Shadowbox zeigt die Originalbilder. Größere Tasten helfen beim Tippen. */
  #sb-title-inner {
    height: 48px;
    padding: 0;
    font-size: 14px;
  }

  #sb-info-inner,
  #sb-nav,
  #sb-nav a {
    height: 44px;
  }

  #sb-nav,
  #sb-counter {
    width: auto;
  }

  #sb-nav {
    padding: 0;
  }

  #sb-nav a {
    width: 44px;
    margin: 0;
    background-position: center;
  }
}

