/* ==================================== */
/* === GRUNDLEGENDE GLOBALE STILE === */
/* ==================================== */

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #e5d7cf; /* Hintergrundfarbe */
    color: #4e342e; 
    line-height: 1.6;
    margin: 0;
    padding: 0;
    text-align: center; /* WICHTIG: Alles zentrieren */
}

h1 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: white;
    padding-top: 10px;
    font-size: 1.6em;
}

header {
    background-color: #916341; 
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

header h2 {
    font-size: 1.5em; /* Etwas kleiner als der Haupttitel */
    color: white; /* <--- HIER AUF WEISS GEÄNDERT */
    margin-top: -10px;
    margin-bottom: 20px;
    font-weight: normal;
}
/* ==================================== */
/* === STILE TITELSEITE & ÜBERSICHT === */
/* ==================================== */

/* --- Navigations-Buttons --- */
.nav-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #b5886d; 
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    margin: 15px;
    border: 1px solid #4e342e;
}

.nav-button:hover {
    background-color: #916341; 
}

/* --- Bild auf der Titelseite --- */
.chorgestuehl-foto {
    max-width: 900px; 
    width: 90%;
    height: auto;
    margin-top: 30px;
    border: 3px solid #4e342e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* --- Nord-Übersicht Layout --- */
.kompartiment-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;
}

.kompartiment-header {
    font-size: 1.2em; 
    margin-top: 10px;
    margin-bottom: 5px;
    margin-left: 0; /* stellt sicher, dass der Titel links beginnt */
    border-bottom: 2px solid #916341; 
    padding-bottom: 3px;
}
.relief-link-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Gewünschter Abstand von 1.5 cm */
    margin-bottom: 15px; /* Vertikaler Abstand auf 1.5 cm gesetzt */
    padding-left: 0; /* Entfernt unerwünschte Einzüge */
}
/* FINALER CODE: .kompartiment-item in style.css */
.kompartiment-item {
    box-sizing: border-box; /* Beibehalten */
    flex-grow: 1; /* Lässt das Element wachsen, wenn Platz ist */
    flex-shrink: 1; /* Lässt das Element schrumpfen, wenn wenig Platz ist */
    
    /* NEUE BREITE: Basiert auf 3 Spalten, mit Berücksichtigung des 15px Abstands */
    width: calc(33.333% - 10px); 
    
    /* MINDESTBREITE: Erzwingt den Umbruch auf dem Handy/iPad, verhindert Überlappung */
    min-width: 150px; 
    
    padding: 2px 0;
    line-height: 1.3;
}
.kompartiment-item a { 
    display: block;
    text-decoration: none;
    color: white; 
    background-color: #6d4c41; 
    border: 1px solid #4e342e; 
    padding: 5px 5px; 
    border-radius: 3px;
    
    /* WICHTIG: Begrenzt die Breite auf einen vernünftigen Wert */
    width: 22%; 
    min-width: 120px;
}
/* ==================================== */
/* === STILE RELIEF-SEITEN (N01A, N01B, etc.) === */
/* ==================================== */

/* --- Hauptcontainer für den Inhalt --- */
.content-box {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #b5886d; 
    border: 3px solid #4e342e;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: left; 
}

/* --- Bildrahmen und Verhalten --- */
.relief-image {
    max-width: 100%;
    height: auto;
    border: 5px solid #916341;
    margin: 20px auto;
    display: block;
    cursor: pointer;
    transition: border-color 0.3s;
}

.relief-image:hover {
     border-color: #4e342e;
}

/* --- Link zum Vollbild (DISKRETERE FORMATIERUNG) --- */
.text-link {
    text-decoration: none;
    color: #4e342e;
    font-weight: bold;
    font-size: 1.0em; /* SCHRIFT KLEINER */
    display: block; 
    padding: 8px 0; /* PADDING KLEINER */
    text-align: center; 
    border: 2px solid #916341;
    background-color: #f0ebe8;
    border-radius: 4px;
    margin-top: 15px;
    transition: background-color 0.3s;
    max-width: 350px; /* TEXTFELD SCHMALER */
    margin-left: auto; /* ZENTRIERUNG */
    margin-right: auto;
}

.text-link:hover {
    background-color: #d8c7c0;
}

/* --- Titel "Erläuterung" / "Hinweis" (KLEINER GEMACHT) --- */
.content-box h2 {
    font-size: 1.4em; /* SCHRIFT KLEINER (War 1.8em) */
    margin-top: 30px;
    color: #4e342e;
    border-bottom: 1px solid #916341; /* LINIE DÜNNER */
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* --- Fliess-Text (Zeilenabstand verkleinert) --- */
.content-box p {
    font-size: 1.05em; 
    line-height: 1.4; /* ZEILENABSTAND KLEINER (War 1.5) */
    color: #4e342e;
    margin-bottom: 8px;
}

/* --- Zurück-Link am Anfang der Relief-Seite --- */
.zurueck-link {
    font-weight: bold;
    text-decoration: none;
    color: #4e342e;
    display: block;
    margin-bottom: 15px;
}

 /* Stellt sicher, dass das Vollbild beim Anklicken auf Handys/iPads verkleinert wird */
body img {
    /* Setzt die maximale Breite des Bildes auf 100% des verfügbaren Raumes */
    max-width: 100%;
    /* Stellt sicher, dass die Höhe proportional angepasst wird */
    height: auto; 
}
/* Zentriert alle Bilder auf der Detailseite, indem der Container zentriert wird */
.content-box div {
    text-align: center; /* Zentriert inline-Elemente wie Bilder */
}

/* Zentriert das Bild selbst, falls es ein Block-Element ist */
.relief-image {
    display: block;
    margin: 0 auto;
}
/* Stil für den erklärenden Textblock zwischen den Kacheln */
.separator-text-block {
    width: 100%; 
    max-width: 800px; /* Begrenzt die Breite auf maximal 800px */
    margin: 30px auto; /* Zentriert den gesamten Block */
    padding: 20px;
    box-sizing: border-box;
    
    /* WICHTIG: Text linksbündig ausrichten, um Silbentrennung im Haupttext zu verhindern */
    text-align: left; 
    
    font-size: 1.1em;
    font-style: italic;
    color: #4e342e;
}

.separator-text-block p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #4e342e;
    
    /* Erzwungener Fix gegen Silbentrennung für den Haupttext (Salz-burg) */
    hyphens: none !important; 
    word-break: normal !important; 
}

/* Stil für die Links, die zentriert werden sollen */
.link-zentriert {
    /* 3. Zentriert die <p>-Elemente, die die Links enthalten */
    text-align: center !important;
    margin: 15px auto; 
    
    /* NEU & WICHTIG: Erzwingt, dass der INHALT NICHT umgebrochen wird! */
    white-space: nowrap !important; 
    overflow: hidden; /* Versteckt Reste, falls es doch überläuft */
}

/* Wir können die span-Regel jetzt entfernen oder vereinfachen, aber lassen wir sie zur Sicherheit */
/* .link-zentriert span { 
    white-space: nowrap !important;
    display: inline-block;
} */
/* Hält die Klammern und den Link auf einer Zeile */
.link-zentriert span {
    white-space: nowrap !important; /* Verhindert Trennung von Klammern und Link */
    display: inline-block; 
}
/* ==================================== */
/* === KORRIGIERTER BEREICH TITELSEITE (Nord/Südflügel) === */
/* ==================================== */

.main-image-container {
    /* Ästhetik-Stile */
    margin-bottom: 40px; 
    padding: 20px;
    background-color: #b5886d; 
    border: 3px solid #4e342e; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); 
    
    /* ZENTRIERUNGS-FIXES */
    max-width: 450px; 
    width: 90%; 
    margin: 0 auto 40px auto; /* ZENTRIERT DEN GESAMTEN RAHMEN */
    text-align: center !important; /* ZWINGT DIE INHALTE ZUR ZENTRIERUNG */
}

/* --- TITEL INNERHALB DES CONTAINERS --- */
.main-image-container h3 {
    color: #4e342e; 
    font-size: 1.8em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* --- DAS BILD SELBST --- */
.main-image {
    max-width: 100%;
    height: auto;
    border: 2px solid #4e342e; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    display: block; 
    margin: 0 auto 15px auto; 
}

/* --- CHIRURGISCHER EINGRIFF: LINK UND BILD ERZWUNGEN ZENTRIEREN --- */
.main-image-container a,
.main-image-container img {
    /* Wichtig: Auch das Link-Element zentrieren */
    display: block !important; 
    margin-left: auto !important; 
    margin-right: auto !important;
}

/* --- DIE VERBLEIBENDE DETAIL-SUBTITLE REGEL --- */
.detail-subtitle {
    color: white; /* Schriftfarbe Weiss */
    font-size: 0.9em; 
    margin-top: -10px; 
    margin-bottom: 20px;
}

/* ==================================== */
/* === STILE FÜR SCHEMATISCHE ÜBERSICHT (index.html) === */
/* ==================================== */
/* <<<--- FÜGEN SIE DEN NEUEN CODE HIER EIN! */
.schema-container {
    /* Macht den Container zentrierbar und gibt ihm etwas Abstand */
    max-width: 900px; 
    width: 90%;
    margin: 10px auto 10px auto; 
    text-align: center;
    padding: 20px;
}

.schema-container h3 {
    font-size: 1.2em; /* VON 1.4em AUF 1.2em GEÄNDERT */
    color: #4e342e;
    margin-bottom: 20px;
}

.schema-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #4e342e; 
    display: block;
    margin: 0 auto;
    background-color: white; /* NEU: Hintergrund für den Alt-Text */
    padding: 5px; /* NEU: Etwas Abstand vom Rahmen */
}
/* >>>--- BIS HIERHIN! */
/* ==================================== */
/* === KORREKTUR FÜR SEPARATOR TEXT BLOCK === */
/* ==================================== */

.separator-text-block {
    max-width: 800px; /* Optional: Text nicht zu breit machen */
    margin: 40px auto;
    padding: 20px;
    
    /* 1. Trennstriche und Blocksatz entfernen: Text linksbündig */
    text-align: left; 
}

.separator-text-block p {
    /* 2. Allgemeine Textformatierung */
    font-size: 1.1em;
    line-height: 1.6;
    color: #4e342e;
}

.link-zentriert {
    /* 3. Zentriert die <p>-Elemente, die die Links enthalten */
    text-align: center !important;
    margin: 15px auto; /* Etwas Abstand zu den umliegenden Absätzen */
}

.link-zentriert a {
    /* 4. Link-Stil: Keine Silbentrennung */
    text-decoration: underline;
    color: #916341;
    font-weight: bold;
    display: inline-block; /* Verhindert Silbentrennung */
    white-space: nowrap; /* WICHTIG: Verhindert den Trennstrich (z.B. Ab-bey) */
}

/* 5. Nur für den Quellenlink, um die Klammern nicht hervorzuheben */
.quelle a {
    font-weight: normal; 
    font-size: 0.9em;
}

/* ==================================== */
/* === ENDGÜLTIGER CHIRURGISCHER ZENTRIERUNGS-FIX FÜR ALLE BILDER === */
/* ==================================== */
.relief-image {
    /* ... (Dieser Fix bleibt als letzter Block) ... */
}
/* ... Rest der Datei ... */
/* ==================================== */
/* === ENDGÜLTIGER CHIRURGISCHER ZENTRIERUNGS-FIX FÜR ALLE BILDER === */
/* ==================================== */

/* 1. KORREKTUR: Erzwingt Block-Status und Zentrierung für das Bild */
.relief-image {
    display: block !important;
    margin: 20px auto !important;
    max-width: 100%;
    height: auto;
    border: 5px solid #916341; 
    cursor: pointer;
    transition: border-color 0.3s;
}

/* 2. KORREKTUR: Erzwingt Block-Status und Zentrierung für Link-Elemente (Bildlink und Textlink) */
.content-box a {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 3. KORREKTUR: Zentriert den Text-Link-Text selbst */
.text-link {
    text-align: center !important;
    max-width: 350px; 
    padding: 10px 0;
    border: 2px solid #916341;
    background-color: #f0ebe8;
    border-radius: 4px;
    margin-top: 20px;
    text-decoration: none;
    color: #4e342e;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s;
}

/* 4. BEHEBUNG DES KONFLIKTS: Stellt sicher, dass die Box den Inhalt zentrieren KANN */
.content-box {
    text-align: center !important; /* Wichtig: Muss auch hier mit !important sein */
    margin: 40px auto;
    max-width: 800px;
}
/* ==================================== */
/* === STILE FÜR SPRUNGMARKEN (Inhaltsverzeichnis) === */
/* ==================================== */

.sprungmarken {
    text-align: center;
    margin-top: -20px; 
    margin-bottom: 30px; 
}
/* KEINE REGEL FÜR .sprungmarken p MEHR HIER! */

.sprungmarken ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap; 
    display: flex; 
    justify-content: center; 
}

.sprungmarken li {
    /* Macht die Box um den Link klickbar */
    display: inline-block;
    margin: 5px 10px; /* Etwas vertikalen Abstand hinzufügen */
}

.sprungmarken a {
    /* FENSTER-SCHALTFLÄCHEN-STIL ERZWINGEN */
    display: block !important; /* MUSS block sein, um padding zu akzeptieren */
    color: white !important; /* WICHTIG: Überschreibt jede andere Farbe */
    background-color: #795548; 
    padding: 8px 15px; 
    border-radius: 5px; 
    text-decoration: none !important; /* Unterstreichung entfernen */
    font-weight: bold;
    font-size: 0.95em;
    transition: background-color 0.3s;
    border: 1px solid #4e342e;
}

.sprungmarken a:hover {
    background-color: #4e342e; /* Dunklere Farbe beim Hover */
    color: white !important;
}
/* Stil für fehlende, nicht-klickbare Elemente (Mit höchster Priorität) */
.fehlend {
    /* MUSS auf Block stehen, damit Padding und Abmessungen funktionieren */
    display: block !important; 
    
    /* ABSTAND & GRÖSSE */
    padding: 10px 20px !important; 
    font-size: 1.2em !important; /* MUSS die korrekte Schriftgröße erzwingen */
    font-weight: bold !important; 
    border-radius: 5px !important;
    
    /* RAHMEN */
    border: 2px solid #a1a1a1 !important; /* Erzwingt das korrekte Rahmenmaß */
    
    /* FARBE */
    background-color: #d8d8d8 !important; 
    color: #4e4e4e !important; 
    cursor: default !important;
}