/* --- 1. Header: Gesamte Breite & Sticky --- */
.header {
    background-image: linear-gradient(180deg, #D9C5B2 0%, #B8A691 100%) !important;
    background-color: #C7B39D !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    border-bottom: 2px solid #8C7A66 !important;
    padding: 20px 40px !important;
    min-height: 180px !important;
    display: block !important;
    box-shadow: 30px 5px 30px hsla(0,0%,0%,0.3);
    --header-height: 180px;
}

/* --- 2. Das Logo --- */
.header::before {
    content: "" !important;
    display: block !important;
    width: 150px !important;
    height: 150px !important;
    background-image: url('/images/logo_theresienstadt.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    position: absolute !important;
    left: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* --- 3. Titel & Untertitel --- */
.navbar-brand {
    display: flex !important;
    flex-direction: column !important;
    margin-left: 170px !important;
}

.brand-logo {
    color: #1A365D !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 2.2rem !important;
    line-height: 1.1 !important;
}

.site-description {
    color: #4A3C28 !important;
    font-size: 1.2rem !important;
    margin-top: 5px !important;
}

/* --- 4. Modul 498: Rechts Unten --- */
#mod-custom498 {
    position: absolute !important;
    right: 15px !important;
    bottom: 5px !important;
    z-index: 999 !important;
}

#mod-custom498 p, #mod-custom498 a {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 15px !important;
}

#mod-custom498 img {
    width: 120px !important;
    height: auto !important;
    margin-bottom: -5px !important;
}

#mod-custom498 a {
    color: #FFFFFF !important;
    font-size: 1.2rem !important;
    text-decoration: none !important;
}

/* --- 5. Layout-Fixes & ECHTE volle Breite --- */

/* Die gesamte Seiten-Struktur auf volle Höhe zwingen */
html, body {
    height: auto !important;
    min-height: 100% !important; /* mindestens Viewport-Höhe */
    margin: 0 !important;
}


/* Der Haupt-Container: Er muss wachsen UND darf kein einschränkendes Grid sein */
.site-grid {
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* Den Inhaltsbereich innerhalb des Grids ebenfalls wachsen lassen */
.container-component {
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding-top: 0 !important;
    margin-top: -40px !important; /* Menü nach oben schieben */
}

/* Child-Elemente auf volle Breite */
.grid-child {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Inhalt einrücken, damit er nicht am Rand klebt */
main, .icons, .fields-container, #system-message-container {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* --- 6. Der Footer (Immer ganz unten) --- */
.main-bottom {
    flex-shrink: 0 !important;
    background-image: linear-gradient(180deg, #D9C5B2 0%, #B8A691 100%) !important;
    background-color: #C7B39D !important;
    border-top: 2px solid #8C7A66 !important;
    padding: 30px 40px !important;
    width: 100% !important;
}

.footer1, .footer1 a {
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    text-align: center !important;
}

.footer1 a:hover {
    color: #F5E5C0 !important;
    text-decoration: underline !important;
}

/* --- 7. Die STICKY Menü-Leiste (FIXIERT) --- */
.navbar {
width: 100% !important;
position: sticky !important;
top: var(--header-height,180px) !important;
z-index: 1010 !important;
background-color: #f0f0f0 !important;
margin: 0 !important;
padding: 0 !important;
border-bottom: 1px solid #ccc !important;
}

ul.metismenu.mod-list {
display: flex !important;
flex-direction: row !important;
margin: 0 !important;
padding: 10px 40px !important;
list-style: none !important;
}

/* --- 8. MENÜ-FIX (Pfeil neben dem Text) --- */

/* Das Listen-Element als Flexbox, damit Inhalt nebeneinander steht */
ul.metismenu.mod-list li.metismenu-item {
display: flex !important;
flex-direction: row !important;
align-items: center !important;
justify-content: center !important;
flex-wrap: nowrap !important; /* Verhindert das Umbrechen des Pfeils */
}

/* Der Link selbst */
ul.metismenu.mod-list li.metismenu-item > a {
color: #333 !important;
text-decoration: none !important;
font-size: 1.1rem !important;
white-space: nowrap !important; /* Text bricht nicht um */
}

/* Der Pfeil-Button (Toggler) */
.mm-toggler {
position: relative !important;
display: inline-flex !important;
margin-left: 8px !important; /* Abstand zum Text */
padding: 0 !important;
background: transparent !important;
border: none !important;
width: auto !important;
height: auto !important;
min-width: 20px !important;
}

/* Korrektur für den kleinen Pfeil-Haken (Pseudo-Element) */
.mm-toggler::after {
display: inline-block !important;
vertical-align: middle !important;
}

/* --- 9. ARTIKEL LAYOUT (Sidebar & Text nebeneinander) --- */

.article-layout-wrapper {
display: flex !important;
flex-direction: row !important;
gap: 40px !important;
align-items: flex-start !important;
width: 100% !important;
margin-top: 20px !important;
}

.article-sidebar {
flex: 0 0 25% !important;
min-width: 200px !important;
}

.article-body-content {
flex: 0 0 70% !important;
}

/* --- 10. SIDEBAR BOXEN STYLING --- */

.sidebar-field-box {
margin-bottom: 25px !important;
padding: 15px !important;
background-color: #fdfaf5 !important;
border-left: 4px solid #B8A691 !important;
}

.field-label-custom {
display: block !important;
font-weight: bold !important;
font-size: 0.85rem !important;
color: #8C7A66 !important;
text-transform: uppercase !important;
}

.field-value-custom {
font-size: 1.5rem !important;
font-weight: bold !important;
color: #1A365D !important;
display: block !important;
}

/* --- 11. TEXT-STYLING (Datum & Abstände) --- */

.article-body-content p::first-line {
font-weight: bold !important;
font-size: 1.6rem !important;
color: #1A365D !important;
}

.article-body-content p {
line-height: 1.6 !important;
margin-top: 0 !important;
font-size: 1.6em;
}

/* --- 12. REIHENFOLGE DER RESTE --- */

.com-content-article.item-page {
display: flex !important;
flex-direction: column !important;
}

.fields-container {
order: 3 !important;
border-top: 1px solid #eee !important;
padding-top: 20px !important;
margin-top: 20px !important;
}
/* --- 13. TAGESBILANZ VOLLBREITE (Identisch mit Sidebar 225/226) --- */

.field-entry.tagesbilanz-full-width {
display: block !important;
width: 100% !important;
background-color: #fdfaf5 !important; /* Beige Hintergrund */
border-left: 4px solid #B8A691 !important; /* Brauner Rand links */
padding: 10px 20px !important;
margin: 30px 0 !important;
clear: both !important;
box-sizing: border-box !important;
}

/* Text-Stile angleichen */
.tagesbilanz-full-width .field-label-custom {
display: block !important;
font-weight: bold !important;
font-size: 0.85rem !important;
color: #8C7A66 !important;
text-transform: uppercase !important;
margin-bottom: 5px !important;
}

.tagesbilanz-full-width .field-value-custom {
display: block !important;
font-size: 1.5rem !important; /* Gleiche Größe wie Sidebar-Werte */
font-weight: bold !important;
color: #1A365D !important;
}

/* Klapp-Mechanismus für die Beschreibung */
.field-extra-info {
margin-top: 15px !important;
}

.field-extra-info summary {
list-style: none !important;
cursor: pointer !important;
color: #8C7A66 !important;
font-weight: bold !important;
font-size: 0.85rem !important;
text-transform: uppercase !important;
outline: none !important;
}

.field-extra-info summary::-webkit-details-marker {
display: none !important; /* Versteckt Standard-Pfeil in Chrome/Safari */
}

.field-description {
margin-top: 10px !important;
padding: 15px 0 !important;
border-top: 1px dashed #B8A691 !important;
color: #4A3C28 !important;
font-style: italic !important;
line-height: 1.6 !important;
}

.field-row-wrapper {
display : flex !important;
flex-wrap : wrap !important;
gap : 40px !important;
width : 100% !important;
margin : 30px 0 !important;
padding : 0 40px !important;
box-sizing : border-box !important;
}

.field-column.half-width {
flex : 0 0 calc(50% - 20px) !important;
min-width : 300px !important;
}

.field-column.full-width {
flex : 0 0 100% !important;
}

.gebaeude-box, .personen-box {
padding : 20px !important;
margin-left: -40px !important; /* gleiche Abstände */
background-color : #fdfaf5 !important;
border-left : 4px solid #B8A691 !important;
box-sizing : border-box !important;
}

.field-row-wrapper h3 {
display : block !important;
font-weight : bold !important;
font-size : 0.85rem !important;
color : #8C7A66 !important;
text-transform : uppercase !important;
margin-top : 0 !important;
margin-bottom : 15px !important;
}

.field-row-wrapper .field-content {
font-size : 1.1rem !important;
font-weight : bold !important;
color : #1A365D !important;
}

.field-row-wrapper .field-column.full-width.gebaeude-box .field-entry + .field-entry {
    margin-top: 1.5em; /* Abstand einer Zeile */
}

/* Kachel-Grid: vier gleich große Kacheln, farblich an Tagesbilanz angeglichen */
.custom-links-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important; /* Abstand zwischen Kacheln */
    margin: 30px 0 !important;
  
    box-sizing: border-box !important;
}

.link-tile {
    flex: 0 1 calc(25% - 15px) !important; /* exakt 4 pro Reihe, Abstand berücksichtigt */
    max-width: calc(25% - 15px) !important; /* keine größere Breite */
    min-width: 0 !important; /* Schrumpft bei Bedarf */
    background-color: #fdfaf5 !important; /* beige Hintergrund wie Tagesbilanz */
    border-left: 4px solid #B8A691 !important; /* brauner Rand links */
    border-radius: 6px !important;
    text-align: center !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}

.tile-content {
    width: 100% !important;
    padding: 15px !important; /* Innenabstand wie bei Sidebar/Tagesbilanz */
    box-sizing: border-box !important;
}

.tile-content img {
    width: 100% !important; /* volle Breite der Kachel */
    height: auto !important; /* Höhe proportional */
    object-fit: contain !important; /* Bild verzerrt nicht */
    display: block !important;
    margin: 0 0 10px 0 !important;
}

.tile-label {
    display: block !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    color: #1A365D !important; /* gleiche Schriftfarbe wie Sidebar-Werte */
    margin-top: 5px !important;
}

/* --- Absender-Links in Paketen --- */
.paket-absender a {
    font-size: 1.5rem !important;
    font-weight: bold !important; /* optional, falls sie hervorgehoben werden sollen */
}

/* --- Genannte Personen --- */
.personen-box .field-content {
    font-size: 1.5rem !important;
    font-weight: bold !important;
    list-style: none !important; /* li-Punkte entfernen */
    padding-left: 0 !important;   /* Einrückung entfernen */
    margin: 0 !important;
}

.personen-box .field-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.personen-box .field-content li {
    margin-bottom: 0.5em !important; /* optional: Abstand zwischen den Einträgen */
}

/* --- Gebäude / sonstige Listeneinträge --- */
.gebaeude-box .field-content {
    font-size: 1.5rem !important;
    font-weight: bold !important;
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.gebaeude-box .field-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.gebaeude-box .field-content li {
    margin-bottom: 0.5em !important; /* optional */
}

/* Kategorieliste */
/* Kategorieliste */
.com-content-category table.category {
    --table-striped-bg: #fdfaf5;
    --table-striped-color: #1A365D;
    --table-border-color: transparent;
    --bs-border-color: transparent;
    border: none !important;
}

.com-content-category .table-bordered > :not(caption) > *,
.com-content-category .table-bordered > :not(caption) > * > * {
    border: none !important;
}

.com-content-category .cat-list-row0 > th,
.com-content-category .cat-list-row0 > td {
    background-color: #fdfaf5 !important;
    border-left: 4px solid #B8A691 !important;
}

.com-content-category table.category tbody tr:hover > * {
    background-color: #e8d9c8 !important;
    cursor: pointer !important;
}

.com-content-category table.category th,
.com-content-category table.category td {
    font-weight: normal !important;
}

.com-content-category table.category a {
    text-decoration: none !important;
}

/* ===== BIOGRAFIE LAYOUT ===== */

.bio-layout .bio-name {
    font-size: 1.6rem !important;
    font-weight: bold !important;
    color: #1A365D !important;
    margin-bottom: 1.5rem !important;
}

.bio-layout .bio-maedchenname {
    font-weight: normal !important;
    font-size: 1.2rem !important;
}

/* Alle Sektions-Boxen: beige mit braunem Rand wie Tagebuch */
.bio-layout .bio-section {
    background-color: #fdfaf5 !important;
    border-left: 4px solid #B8A691 !important;
    padding: 15px 20px !important;
    margin-bottom: 1.5rem !important;
    box-sizing: border-box !important;
}

/* Zeilen innerhalb einer Box */
.bio-layout .bio-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4em !important;
    align-items: baseline !important;
    margin-bottom: 0.7rem !important;
    line-height: 1.6 !important;
}

.bio-layout .bio-row:last-child {
    margin-bottom: 0 !important;
}

/* Labels: gleich wie field-label-custom im Tagebuch */
.bio-layout .bio-label {
    display: inline !important;
    font-weight: bold !important;
    font-size: 0.85rem !important;
    color: #8C7A66 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

/* Values: dunkelblau */
.bio-layout .bio-value {
    color: #1A365D !important;
    font-size: 1rem !important;
}

/* Fließtexte (Deportation, Verfolgung): Tagebucheintrag-Größe */
.bio-layout .bio-fliesstext {
    font-size: 1.6rem !important;
    line-height: 1.6 !important;
    color: #1A365D !important;
}

/* NS-Schicksal & Biographie: Tagebucheintrag-Größe */
.bio-layout .bio-texte .bio-value,
.bio-layout .bio-biographie,
.bio-layout .bio-biographie p {
    font-size: 1.6rem !important;
    line-height: 1.6 !important;
    color: #1A365D !important;
    margin-top: 0.5rem !important;
}

/* Buchlinks (Geburtsbuch, Heiratsbuch etc.) inline */
.bio-layout .bio-buch-link {
    color: #8C7A66 !important;
    font-style: italic !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
}

.bio-layout .bio-buch-link:hover {
    text-decoration: underline !important;
}

/* Links in Values */
.bio-layout .bio-value a {
    color: #1A365D !important;
    text-decoration: none !important;
}

.bio-layout .bio-value a:hover {
    text-decoration: underline !important;
}

/* Biographie-Block ohne Label */
.bio-layout .bio-biographie {
    margin-top: 0.3rem !important;
}

/* Bearbeiten-Button */
.bio-edit-button {
    margin-bottom: 1rem !important;
}

/* Anmerkungen etwas dezenter */
.bio-layout .bio-anmerkungen .bio-value {
    font-size: 0.95rem !important;
    color: #4A3C28 !important;
    font-style: italic !important;
}

/* Tagebuch-Nennungen */
.bio-tagebuch-liste {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 0.5rem !important;
}

.bio-tagebuch-link {
    display: inline-block !important;
    background-color: #f0e8dc !important;
    border: 1px solid #B8A691 !important;
    color: #1A365D !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
}

.bio-tagebuch-link:hover {
    background-color: #e8d9c8 !important;
    text-decoration: none !important;
}

.mod-category-article-item {
    scroll-margin-top: 260px !important;
}

/* Gebäude Karten-Layout */
.gebaeude-karten-wrapper {
    display: flex !important;
    gap: 20px !important;
    width: 100% !important;
}

.gebaeude-karte-panel,
.gebaeude-streetview-panel {
    flex: 0 0 calc(50% - 10px) !important;
}

.gebaeude-map-iframe {
    width: 100% !important;
    height: 400px !important;
    border: none !important;
    border-radius: 4px !important;
    display: block !important;
}

.gebaeude-karten-label {
    margin-bottom: 8px !important;
}

.gebaeude-karten-link {
    margin-top: 6px !important;
    font-size: 0.85rem !important;
}

.gebaeude-karten-link a {
    color: #8C7A66 !important;
    text-decoration: none !important;
}

.gebaeude-karten-link a:hover {
    text-decoration: underline !important;
}

.gebaeude-adresse {
    color: #8C7A66 !important;
    font-size: 0.9rem !important;
    margin-left: 4px !important;
}

/* Stammbaum */
.bio-stammbaum-details {
    background-color: #fdfaf5 !important;
    border-left: 4px solid #B8A691 !important;
    padding: 15px 20px !important;
    margin-bottom: 1.5rem !important;
}

.bio-stammbaum-summary {
    font-weight: bold !important;
    font-size: 0.85rem !important;
    color: #8C7A66 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    list-style: none !important;
}

.bio-stammbaum-summary::-webkit-details-marker { display: none !important; }
.bio-stammbaum-summary::before { content: '▶ '; font-size: 0.7rem; }
details[open] .bio-stammbaum-summary::before { content: '▼ '; }

.bio-stammbaum-wrap {
    margin-top: 1rem !important;
}