﻿*, *::before, *::after {
  box-sizing: border-box;
}
/* für Sprung links */
.jumpTarget{
  scroll-margin-top: 28vh;   /* 20vh..40vh je nach gewünschter Lage */
}
/* Der Hover-Effekt für Bilder */
.bild-link img {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border-radius: 4px;
}
.bild-link img:hover {
  box-shadow: 3px 18px 25px -5px rgba(0, 0, 0, 0.35);
  transform: translateY(-5px);
}
.container {
  display: flex;
  flex-direction: column;
}
.main-content {
  display: flex;
  flex-direction: row;
}
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}
.container2 {
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
  padding: 0px;
  background-color:#ffffff;
}
/* begrenzt eventuelle breitere Elemente durch verbergen
   (Hinweis: overflow:hidden auf div kann Schatten/Popups abschneiden.
   Ich lasse es unverändert, weil es bei dir offenbar so gewollt ist.) */
  img, table, div {
  max-width: 100%;
  overflow: hidden;
}
.textfenster1,
.textfenster2{
  width: min(86vw, 640px);
  margin: clamp(1.2rem, 6vh, 4rem) auto 0;
  padding: clamp(1rem, 2.6vw, 2.2rem);
  background: #ffffff;
  color: #222;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: clamp(1.1rem, 0.9vw + 0.85rem, 1.3rem);  
  line-height: clamp(1.6, 0.8vw + 1.45, 1.9);
  /* Kastenhöhe responsiv, aber nicht absurd */
  
  overflow-y: auto;
  box-sizing: border-box;
  border-radius: 6px;}
/* Höhe */
.textfenster1{
  max-height: clamp(3428rem, 2960vh, 3546rem);
}
.textfenster2{
  max-height: clamp(2428rem, 1960vh, 2546rem);
}
/* CSS-Eigenschaft, um das scrollen zu animieren */
html {
  scroll-behavior: smooth;
}
/* eine Trennlinie formatieren */
hr{
  width: clamp(40%, 52vw, 62%);
  margin: 3rem auto;
}
/* Flex-container, skaliert mehrere divs gleichmäßig in der Breite */
.flex-cont {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  font-family: Arial, Helvetica, sans-serif;
  background-color: white;
}
.flex-cont > * {
  padding: 0px;
  -webkit-flex: 1 100%;
  flex: 1 100%;
}
.flex-cont a:link {
  text-decoration: none;
}
/* Boxenverhältnis für den Flex-container */
@media all and (min-width: 768px) {
  .divis-0 { -webkit-order:0; order:0; }
  .divis-1 { -webkit-flex:1 10px; flex:1 10px; ms-flex:1 10px; -webkit-order:0; order:0; }

  .divis-4 { -webkit-flex:4 10px; flex:4 10px; ms-flex:4 10px; -webkit-order:0; order:0; }
  .divis-5 { -webkit-flex:5 10px; flex:5 10px; ms-flex:5 10px; -webkit-order:0; order:0; }

  .divis-10 { -webkit-flex:10 10px; flex:10 10px; ms-flex:10 10px; -webkit-order:0; order:0; }
  .divis-16 { -webkit-flex:16 10px; flex:16 10px; ms-flex:16 10px; -webkit-order:0; order:0; }
  .divis-32 { -webkit-flex:32 10px; flex:32 10px; ms-flex:32 10px; -webkit-order:0; order:0; }
}
/* scaled das div beim zoomen der page, belässt als letztes Höhenmaß aber den Wert des padding */
.first-item-div-1{
  position: relative;
  width: 100%;
}
.first-item-div-1:before{
  content: "";
  display: block;
  padding-top: 15%;
}
.fuss-div{
  position: relative;
  width: 100%;
}
.fuss-div:before{
  content: "";
  display: block;
  padding-top: 30%;
}
/* Unterliner-Text style */
.utext-2 {
  position: relative;
  text-decoration: none;
  font-size: clamp(1.0rem, 4vw, 3rem) !important;
  font-family: Arial, sans-serif !important;
  color: #41413f;
  background-color: transparent !important;
  padding: 0;
}
/* Format Fußbereich */
.footer {
  background: #aaa;
  color: white;
  text-align: center;
}
.texte {
  font-size: 18px;
  color: #808080;
  text-align: left;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: lighter;
  background-color: #ffffff !important;
}
/* SPEZIAL-KORREKTUR FÜR DIE GALERIE */
/* 1. Platz für den Schatten schaffen, ohne das Grid zu sprengen */
.galerie-item img {
  width: calc(100% - 20px) !important;
  margin: 0 auto !important;
  display: block !important;
}
/* 2. Den Schatten sauber nach rechts unten fallen lassen */
.galerie-item img:hover {
  box-shadow: 4px 4px 7px 0px rgba(0, 0, 0, 0.25) !important;
}
/* 3. Sicherstellen, dass die Galerie-Container nicht beschnitten werden */
.galerie-container, .galerie-container-2 {
  overflow: visible !important;
}
.galerie-item p.caption{
  font-family: Arial, Helvetica, sans-serif;
  font-size: 3vw;
  margin: 10px 0 0 0;
  background: transparent;
  text-align: left;
  color: gray;
}
.galerie-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(12px, 3vw, 40px);
  row-gap: clamp(18px, 4vw, 60px);  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.galerie-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: box-shadow 0.3s ease;
  border-radius: 4px;
  background-color:#ffffff;
}
.galerie-item img:hover {
  box-shadow: 8px 8px 12px 0px rgba(0, 0, 0, 0.25);
}
.galerie-container-2 {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  column-gap: 0.3vw;
  row-gap: 0.5vw;
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px;
}
.galerie-item-2 img:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.icon-label{
  text-align:center;
  font-size:clamp(0.72rem, 1.2vw, 0.95rem);
  line-height:1.15;
  color:gray;
  margin-top:clamp(0.25rem, 0.8vw, 0.55rem);
  max-width:clamp(64px, 9vw, 112px);
  margin-inline:auto;
}
/* Darstellung aktiver Icons */
.page-wassertier   .icon-wassertier   .icon-text,
.page-landtier     .icon-landtier     .icon-text,
.page-lufttier     .icon-lufttier     .icon-text,
.page-phantastisch .icon-phantastisch .icon-text,
.page-gegenwaertig .icon-gegenwaertig .icon-text,
.page-historisch   .icon-historisch   .icon-text,
.page-amtsgestalt  .icon-amtsgestalt  .icon-text{
  display: inline-block;
  border-top: 1px solid rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(0,0,0,0.45);
  padding: 0.12rem 0;
  margin: 0.18rem auto;
  letter-spacing: 0.03em;
}

.kachelreihe{
  margin-bottom: clamp(2.5rem, 8vh, 6rem);
  /* alternativ: padding-bottom statt margin-bottom */
}
.portal-title{
  margin-top: 0; /* damit du nicht doppelt Abstand hast */
  text-align:center;
  color:gray;
  font-size:clamp(1.2rem, 3.2vw, 2rem);
  line-height:1.35;
  font-family:Arial, Helvetica, sans-serif;
  padding:0 clamp(12px, 3vw, 28px);
}
.portal-title a{ 
  color:gray; text-decoration:none;
}

/* optional: etwas dezenter, aber sichtbar */
.toc{
  display:grid;
  grid-template-columns: 6rem 1fr; /* Abstand = Position der ersten Titelzeile */
}
.k{
  white-space:nowrap;
  font-weight:400;
}
.silentLink,
.silentLink:visited,
.silentLink:hover,
.silentLink:active,
.silentLink:focus{
  color: inherit;          /* exakt gleiche Farbe wie Text */
  text-decoration: none;   /* keine Unterstreichung */
  outline: none;           /* kein Fokus-Rahmen */
}
.tocLink,
.tocLink:visited,
.tocLink:hover,
.tocLink:active,
.tocLink:focus{
  color: inherit;
  text-decoration: none;
  outline: none;
}
.nav-widget{
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-bg{
  width: 100%;
  display: block;
  position: relative; /* optional */
  z-index: 1;         /* optional */
}

.nav-zone{
  position:absolute;
  top:0; bottom:0;
  z-index: 2;
  display:block
}

/* Zonen von links nach rechts */
.nav-zone.first{ left: 32.7%;  width: 7.3%; }
.nav-zone.prev { left: 44.8%; width: 3.7%; }
.nav-zone.next { right: 38.9%; width: 3.8%; }
.nav-zone.last { right: 26.8%;  width: 7.4%; }

/* Navi Icons */
.arrow-stack{
  position: fixed;
  right: clamp(10px, 2.2vw, 28px);
  bottom: 26vh;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  /* responsiver Zwischenraum */
  gap: 0;
}
/* Gemeinsames Verhalten aller Pfeile */
.arrow-stack a{
  position: static;          /* wichtig: im Flex-Flow */
  margin: 0;
  padding: 0;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  opacity: 0.5;
}
.arrow-stack a:hover{
  opacity: 1;
}
/* Semantische Klassen (funktional getrennt) */
.quicktotop{   /* Pfeil nach oben */ }
.to_source{    /* Pfeil nach links */ }

/* Sicherheitsnetz gegen alte Regeln */
#upArrow,
#leftArrow{
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
}
.arrow-stack img{
  width: clamp(34px, 3.2vw, 64px) !important;
  height: clamp(34px, 3.2vw, 64px) !important;
  display: block;
}
.tooltip::after{
  margin-top: 10px;
}



