/* CSS Variablen für Font-Families */
:root {
  --font-serif: Georgia, "Times New Roman", Times, "New York", "Noto Serif", serif;
  --font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
}

/* Grundlayout für E-Books */
body.ebook {
  font-family: var(--font-serif);
  color: #fff;
  margin: 0;
  padding: 0;
}

.ebook h1,
.ebook h2,
.ebook h3,
.ebook h4 {
  font-family: var(--font-sans-serif);
}

.ebook main a {
  color: var(--ebook-accent-color) !important;
}

/* Header */
.ebook__header {
  background-color: var(--ebook-accent-color);
  color: #000;
  padding: 1.5rem;
  text-align: center;
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 999;
  display: flex;
  flex-direction: row;
  justify-content: center;
  opacity: 0.95;
}

/* Innerer Header-Container */
.ebook__header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
}

.ebook__header__nav-wrapper {
  width: 800px;
}

.ebook__chapter-menu-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-15px);
  transition: all 0.3s ease-in-out;
  padding: 0;
  /* Padding erst beim Öffnen aktiv */
}

.ebook__chapter-menu-wrapper.open {
  max-height: 600px;
  /* genug Platz für Menüeinträge */
  opacity: 1;
  transform: translateY(0);
  padding: 2rem 0;
}

/* Kapitelmenü im Header */
.ebook__chapter-nav {
  margin-top: 10px;
}

.ebook__chapter-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ebook__chapter-menu li {
  text-align: right;
  font-family: var(--font-sans-serif);
  text-transform: uppercase;
  color: var(--ebook-bg-color);
  margin-bottom: 0.75rem;
}

.ebook__chapter-menu li.active {
  font-weight: bold;
  text-decoration: underline;
  color: #000;
  /* oder var(--ebook-bg-color), je nach gewünschtem Stil */
}

.ebook__chapter-menu a {
  text-decoration: none;
  color: inherit;
  font-size: 0.95rem;
}

.ebook__chapter-menu a:hover {
  text-decoration: underline;
}

a.ebook__title {
  color: var(--ebook-bg-color);
  font-size: 1.5rem;
  font-family: var(--font-sans-serif);
  letter-spacing: 0.03125rem;
  text-transform: uppercase;
}

/* Mini-Navigation (Pfeile) */
.ebook__mini-nav {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0.5rem;
}

.ebook__mini-nav-link {
  color: var(--ebook-bg-color);
  font-size: 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  width: 2.5rem;
}

/* Mobile Anpassungen für Header */
@media (max-width: 500px) {
  .ebook__header-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .ebook__mini-nav {
    position: static;
    transform: none;
    justify-content: center;
  }

  .ebook__mini-nav-link {
    width: 2.25rem;
  }

  .ebook__header {
    padding: 1rem 1.5rem;
  }
}

/* Main Content */
.ebook__main {
  max-width: 848px;
  margin: 12rem auto 8rem;
  padding: 0 1.5rem;
}

@media (max-width: 800px) {
  .ebook__main {
    padding: 0 1.5rem;
  }
}

.ebook__content-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-bottom: 4rem;
}

.ebook__chapter-title {
  font-size: 3rem;
  color: var(--ebook-accent-color);
  text-align: center;
  font-family: var(--font-sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
}

@media (max-width: 500px) {
  .ebook__chapter-title {
    font-size: 2.25rem;
  }

  .ebook__chapter-label {
    font-size: 1.25rem;
  }
}

.ebook__chapter-label {
  font-family: var(--font-sans-serif);
  font-size: 1.5rem;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.03125rem;
}

.ebook__content {
  line-height: 1.7;
  font-size: 1.125rem;
}

/* Initialbuchstaben --- Klasse dem jeweiligen Absatz in WP zuweisen */

p.initial:first-letter {
  font-size: 1.75em;
  font-weight: 600;
  color: var(--ebook-accent-color);
  line-height: normal;
}

/* Footer */
.ebook__footer {
  background-color: var(--ebook-accent-color);
  color: #fff;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.ebook__footer-content {
  width: 800px;
}

/* Footer Menu – horizontale Liste */
.ebook__footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ebook__footer-menu li {
  display: inline-block;
  /* nebeneinander */
  margin-right: 1.5rem;
  /* Abstand */
}

.ebook__footer-menu li:last-child {
  margin-right: 0;
  /* kein Abstand beim letzten */
}

.ebook__footer-menu a {
  color: var(--ebook-bg-color);
  text-decoration: none;
  font-size: 1rem;
  font-family: var(--font-sans-serif);
  text-transform: uppercase;
}

.ebook__footer-menu a:hover {
  text-decoration: underline;
}


/* Medien */
.ebook__content img:not(.wpgmp_map_container img),
.ebook__content video,
.ebook__content audio {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

/* Kapitel-Navigation */
.ebook__chapter-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
}

.ebook__chapter-nav-link {
  background-color: var(--ebook-bg-color);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
}

/* Hilda tippy tooltip Theme */
.tippy-box[data-theme~='hilda'] {
  color: #000;
  padding: 1rem;
  border-radius: 0;
}

/* Tooltips */
.tooltip-highlight {
  cursor: pointer;
}

.tippy-content {
  font-family: var(--font-sans-serif);
}


/*.ebook figure.wp-block-gallery.has-nested-images:has(figcaption) {
  margin-bottom: 2rem !important;
}*/

/* Bildunterschriften */

.ebook .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
.bildbeschreibung {
  color: var(--ebook-accent-color-2);
  font-family: var(--font-sans-serif);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin: 0.75rem 0 1.5rem 0;
}

/* Serifenlose Schrift im Fließtext*/

.ebook .sans {
  font-family: var(--font-sans-serif);
}

.ebook .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  margin-left: 0 !important;
  flex: 0 0 auto;
}

/* Einheitliche Höhe für Galerie-Bilder */
body.ebook .wp-block-gallery.has-nested-images figure.wp-block-image {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

body.ebook .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
  margin: 0;
}

/* Bildcontainer mit fester Höhe
body.ebook .wp-block-gallery.has-nested-images figure.wp-block-image a {
  display: block;
  height: 300px;
  overflow: hidden;
}
*/

/* Bild füllt den Container, wird bei Bedarf beschnitten
body.ebook .wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 1rem auto;
}*/

body.ebook .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static;
  /* aus dem absoluten Overlay lösen */
  background: none;
  /* kein Hintergrund */
  padding: 0;
  /* Abstand zum Bild */
  text-align: left;
  display: block;
  overflow: hidden;
}

/* Blur-Overlay komplett entfernen */
body.ebook .wp-block-gallery.has-nested-images figure.wp-block-image:before {
  content: none !important;
}


/* Layoutanpassung für Spalten, etc*/

.ebook .bg-white-transparent,
.ebook .wp-block-columns,
.ebook .wp-block-video figcaption,
.ebook .wpcf7 {
  background: none;
  padding: 0;
}

.ebook .wp-block-column:first-child,
.ebook .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
  padding-left: 0;
}

.ebook .wp-block-column:last-child,
.ebook .wp-block-media-text.has-media-on-the-left .wp-block-media-text__content {
  padding-right: 0;
}


/*Anpassungen für Maps-Einbindung über WP MAPS PRO*/

.ebook .wpgmp_tabs_container {
  font-family: var(--font-sans-serif);
}

@media only screen and (min-width: 1824px) {
  .ebook .wpgmp_tabs_container {
    width: 40%;
    max-width: 40%;
  }
}

.ebook .wpgmp_tabs_container .wpgmp_tabs li a.active {
  background-color: var(--ebook-accent-color);
  color: #000 !important;
}

.ebook .wpgmp_tab_item a {
  color: #000 !important;
}

.ebook .wpgmp_toggle_container {
  background-color: var(--ebook-bg-color) !important;
}

.ebook .btn-primary,
.ebook .wpcf7 .btn-submit [type=submit] {
  background-color: var(--ebook-accent-color);
  border-color: var(--ebook-accent-color);
  color: #000 !important;
}

.ebook .btn-primary:focus,
.ebook .btn-primary:hover,
.ebook .wpcf7 .btn-submit [type=submit]:focus,
.ebook .wpcf7 .btn-submit [type=submit]:hover {
  background-color: var(--ebook-bg-color);
  border-color: var(--ebook-bg-color);
  color: var(--ebook-accent-color) !important;
}

.ebook .wpgmp_infowindow .fc-item-content.fc-item-body-text-color.fc-item-top-space {
  text-align: center !important;
}