/* MeerHeimatLiebe 2.5.2-r39
   - alle fünf Startkarten standardmäßig geschlossen
   - nur der Klick auf die fünf Wege öffnet genau eine Karte
   - Header bleibt fest sichtbar; Inhalte laufen nicht darüber
   - Dropdown-Menüs liegen sicher über dem Seiteninhalt
   - Logbuch-Detailseite nutzt nur ein einziges großes Bild */

:root {
  --r39-header-height: 96px;
  --r39-card-closed-height: 72px;
}

html {
  scroll-padding-top: calc(var(--r39-header-height) + 1rem) !important;
}

body {
  padding-top: var(--r39-header-height) !important;
}

/* Der Header bleibt dauerhaft oben und über allen Inhalten. */
.site-header {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  isolation: isolate !important;
  z-index: 10000 !important;
  background: rgba(2, 30, 46, .97) !important;
  box-shadow: 0 7px 28px rgba(0, 0, 0, .32) !important;
  backdrop-filter: blur(16px) saturate(1.14) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.14) !important;
}

.header-inner {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-height: var(--r39-header-height) !important;
  margin: 0 !important;
  overflow: visible !important;
  border-radius: 0 0 18px 18px !important;
  z-index: 10001 !important;
}

.site-nav,
.nav-dropdown,
.nav-dropdown__toggle,
.header-tools {
  position: relative;
  z-index: 10010 !important;
  overflow: visible !important;
}

.nav-dropdown__menu {
  z-index: 10100 !important;
}

.nav-dropdown.open .nav-dropdown__menu,
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown__toggle:focus + .nav-dropdown__menu {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.top-panel,
.service-panel,
.display-panel {
  z-index: 10200 !important;
}

.site-main {
  position: relative !important;
  z-index: 10 !important;
  padding-top: clamp(.8rem, 1.6vw, 1.35rem) !important;
}

.site-main > *,
.site-main [id] {
  scroll-margin-top: calc(var(--r39-header-height) + 1rem) !important;
}

/* Hintergründe beginnen erst unter dem festen Header. */
.site-backdrop,
.site-vignette {
  top: var(--r39-header-height) !important;
  height: calc(100dvh - var(--r39-header-height)) !important;
}

/* Fünf Wege: alle Inhaltskarten zunächst wirklich geschlossen. */
.scene-home .home-module-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: .8rem !important;
}

.scene-home .home-module[data-home-module-card] {
  min-height: var(--r39-card-closed-height) !important;
  max-height: var(--r39-card-closed-height) !important;
  padding: .9rem 1rem !important;
  overflow: hidden !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  order: 1;
  cursor: default !important;
  transition: max-height .32s ease, min-height .32s ease, transform .25s ease,
              box-shadow .25s ease, border-color .25s ease, opacity .25s ease !important;
}

/* Bei geschlossenen Karten bleibt nur der Titel sichtbar. */
.scene-home .home-module:not(.is-expanded) > img,
.scene-home .home-module:not(.is-expanded) > p,
.scene-home .home-module:not(.is-expanded) > strong,
.scene-home .home-module:not(.is-expanded) > span,
.scene-home .home-module:not(.is-expanded) > dl,
.scene-home .home-module:not(.is-expanded) > .crew-placeholders,
.scene-home .home-module:not(.is-expanded) > .module-link,
.scene-home .home-module:not(.is-expanded) .home-module__body > p,
.scene-home .home-module:not(.is-expanded) .home-module__body > .module-link {
  display: none !important;
}

.scene-home .home-module:not(.is-expanded) .home-module__body {
  padding: 0 !important;
}

.scene-home .home-module:not(.is-expanded) .home-module__head {
  min-height: 40px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Nur die per Fünf-Wege-Schalter gewählte Karte klappt auf. */
.scene-home .home-module-grid.has-expanded .home-module {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.scene-home .home-module[data-home-module-card].is-expanded {
  grid-column: 1 / -1 !important;
  order: 10;
  min-height: 300px !important;
  max-height: 1200px !important;
  padding: 1.15rem !important;
  overflow: visible !important;
  cursor: default !important;
  transform: translateY(-4px) !important;
  border-color: rgba(157, 236, 244, .92) !important;
  box-shadow: 0 0 0 3px rgba(112, 228, 244, .16), 0 26px 52px rgba(0, 0, 0, .32) !important;
}

.scene-home .home-module.is-expanded > img {
  display: block !important;
  width: 100% !important;
  height: clamp(240px, 38vw, 560px) !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.scene-home .home-module.is-expanded .home-module__body,
.scene-home .home-module.is-expanded > p,
.scene-home .home-module.is-expanded > strong,
.scene-home .home-module.is-expanded > span,
.scene-home .home-module.is-expanded > dl,
.scene-home .home-module.is-expanded > .crew-placeholders,
.scene-home .home-module.is-expanded > .module-link,
.scene-home .home-module.is-expanded .home-module__body > p,
.scene-home .home-module.is-expanded .home-module__body > .module-link {
  display: revert !important;
}

.scene-home .home-module.is-expanded .home-module__body {
  padding: 1rem !important;
}

/* Startseitenhintergrund bleibt beim Öffnen einer Karte unverändert. */
.scene-home {
  --r35-home-scene-image: var(--scene-desktop) !important;
}

/* Logbuch-Detail: nur ein Bild, nicht zusätzlich als Seitenhintergrund. */
body[data-route="news.show"] .site-backdrop,
body[data-route="news.show"] .site-vignette {
  display: none !important;
}

body[data-route="news.show"] {
  background: #06263a !important;
}

body[data-route="news.show"] .site-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-inline: 0 !important;
}

body[data-route="news.show"] .article,
body[data-route="news.show"] .article-card {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body[data-route="news.show"] .article img,
body[data-route="news.show"] .article-card img {
  display: block !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: calc(100dvh - var(--r39-header-height)) !important;
  min-height: 520px !important;
  margin-left: calc(50% - 50vw) !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
}







@media (prefers-reduced-motion: reduce) {
  .scene-home .home-module[data-home-module-card] {
    transition: none !important;
  }
}
