/* ==========================================================================
   gichtzentrum-muenchen.de – Theme für Contao 5.7 (Layout-Typ "modern")

   Nachbau des Contao-3.5-Layouts (Kundenwunsch: so nah am Original wie
   möglich, auch auf kleinen Bildschirmen):
   - feste Box 960px, zentriert, grauer Hintergrund
   - Navigation links 240px, rechtsbündig, gepunktete Trennlinien
   - unter 768px: Inhalt volle Breite, Navigation darunter (wie bisher)
   Werte stammen aus dem alten Stylesheet (Contao-Reset + layout.css +
   Theme-CSS). Keine Abhängigkeiten, Schriften lokal (DSGVO).
   ========================================================================== */

@font-face {
    font-family: "Source Sans Pro";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v11-latin-regular.woff2") format("woff2");
}
@font-face {
    font-family: "Source Sans Pro";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v11-latin-700.woff2") format("woff2");
}
@font-face {
    font-family: "Lusitana";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/lusitana-v5-latin-regular.woff2") format("woff2");
}
@font-face {
    font-family: "Lusitana";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/lusitana-v5-latin-700.woff2") format("woff2");
}

:root {
    --c-brand: #006661;   /* altes CSS: rgb(0,102,97) */
    --c-strong: #004990;  /* fett gedruckter Text blieb im alten CSS blau */
    --font-body: "Source Sans Pro", Verdana, Arial, Helvetica, sans-serif;
    --font-head: Lusitana, serif;
}

/* ---------- Basis (Contao-3.5-Reset) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body, div, h1, h2, h3, h4, h5, h6, p, blockquote, pre, code, ol, ul, li, dl, dt, dd,
figure, table, th, td, form, fieldset, legend, input, textarea { margin: 0; padding: 0; }
header, footer, nav, section, aside, article, figure, figcaption, main { display: block; }
table { border-spacing: 0; border-collapse: collapse; font-size: inherit; }
caption, th, td { text-align: left; text-align: start; vertical-align: top; }
caption, th { font-weight: 700; }
fieldset, img { border: 0; }
ul { list-style-type: none; }
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
pre, code { font-family: Monaco, monospace; }
img { max-width: 100%; height: auto; }

body {
    background-color: #ccc;
    color: #000;
    overflow-y: scroll;
}
body, table {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5em;
}
a { color: #00f; }

h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; margin-top: 1em; }
h1 { font-size: 1.8333em; }
h2 { font-size: 1.6667em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.3333em; }
h1, h2, h3, h4, h5, h6, p, pre, blockquote, table, ol, ul, form { margin-bottom: 12px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3em; }

strong { color: var(--c-strong); }

hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
    border-bottom: 1px solid rgba(255, 255, 255, .3);
}

.invisible {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}
.block { overflow: hidden; }

/* Sprunglink: unsichtbar, erscheint nur bei Tastaturbedienung */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: .5em 1em;
    background: #fff;
    color: var(--c-brand);
}
.skip-link:focus { left: 1em; top: 1em; }

/* ---------- Seitenaufbau (alte layout.css + Layout-Einstellungen) ---------- */
#wrapper {
    width: 960px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #484c7f;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    -webkit-box-shadow: 0 1px 2px 2px #a6a6a6;
    box-shadow: 0 1px 2px 2px #a6a6a6;
}

#header {
    height: 78px;
    background-color: var(--c-brand);
    color: #fff;
    padding-left: 150px;
}
#header a {
    color: #fff;
    text-decoration: none;
    font-size: 2em;
    line-height: 2.5em;
    padding-left: 3.5em;
}

#container { position: relative; padding-left: 240px; background-color: whitesmoke; }
#container::after { content: ""; display: table; clear: both; }
#main, #left { float: left; position: relative; }
#main { width: 100%; }
#main .inside { min-height: 1px; padding: 20px 40px; background-color: #fff; }
#left { width: 240px; right: 240px; margin-left: -100%; }

#footer {
    clear: both;
    height: 2em;
    font-size: .9em;
    color: gray;
    padding: 10px;
    background-color: #f2f8f5;
    border-top: 1px solid #ccc;
    text-align: center;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

/* Kleine Bildschirme: wie im alten Layout Inhalt oben, Navigation darunter */
@media (max-width: 767px) {
    #wrapper { margin: 0; width: auto; }
    #container { padding-left: 0; padding-right: 0; }
    #main, #left { float: none; width: auto; }
    #left { right: 0; margin-left: 0; }
    /* Einzige Abweichung vom Original: dort lief der Seitentitel aus dem
       blauen Kopf heraus und war weiß auf weiß unsichtbar. */
    #header { padding-left: 20px; padding-right: 20px; height: auto; min-height: 78px; }
    #header .inside { padding: 18px 0; }
    #header a { padding-left: 0; line-height: 1.3em; }
}

/* ---------- Navigation ---------- */
#nav { border-top: 82px solid var(--c-brand); }
#nav ul { margin-bottom: 12px; }
#nav li,
#nav li a,
#nav li .active {
    text-decoration: none;
    color: var(--c-brand);
    text-align: right;
    font-size: 1em;
    font-weight: 400;
    line-height: 2em;
    display: block;
    padding: .3em 0;
    transition: background 200ms ease-in-out;
}
#nav li {
    background-color: #f2f8f5;
    padding: 0 15px 0 5px;
    border-bottom: 1px dotted #b8b8b8;
    border-right: 1px dotted #b8b8b8;
}
#nav li.active { background-color: #fff; border-right: 0; }
#nav li:hover { background-color: #d3e0f3; }

/* ---------- Inhalt ---------- */
#main h1 {
    color: var(--c-brand);
    font-size: 1.7em;
    font-weight: bolder;
}
#main h2 {
    color: var(--c-brand);
    font-size: 1.5em;
}
#main ul {
    list-style: disc;
    list-style-position: outside;
}
#main li {
    margin-left: 20px;
    padding: 4px 0;
}

.mod_article, .content-text, .content-image, .content-gallery, .content-hyperlink,
.content-list, .content-table, .mod_newslist, .mod_newsreader, .mod_form,
.ce_text, .ce_image, .ce_gallery, .ce_hyperlink { overflow: hidden; }

.citation {
    font-style: italic;
    margin-bottom: 1em;
}

/* Bilder */
.media--left > figure, .image_container.float_left { float: left; margin: .3em 1.5em .2em 0; }
.media--right > figure, .image_container.float_right { float: right; }

/* Bildabstand und Bildbreite aus Contao 3.5 (Klassen setzt migration/legacy_image_classes.php).
   Contao 5 kennt keinen Bildabstand mehr und vergrößert Bilder nicht über das Original hinaus. */
.img-ml-120 figure { margin-left: 120px; }
.img-ml-170 figure { margin-left: 170px; }
.img-w-300 figure img { width: 300px; }
.img-w-400 figure img { width: 400px; }

/* Galerien wie in Contao 3.5 (base.css + Theme):
   - Einträge floaten (Breite = Bildbreite), die erste Spalte beginnt eine neue Zeile.
     Das alte "li.col_last { float: none }" griff nicht, weil
     ".ce_gallery > ul li" spezifischer war.
   - 15px Abstand oben/unten, 4px Innenabstand aus "#main li".
   Die Paginierung steht wie früher über den Bildern (templates/content_element/gallery.html.twig). */
.content-gallery > ul { margin: 0; padding: 0; overflow: hidden; list-style: none; }
.content-gallery > ul > li { float: left; }
#main .content-gallery ul { list-style: none; }
#main .content-gallery li { margin: 15px 0; }
.content-gallery--cols-1 > ul > li,
.content-gallery--cols-2 > ul > li:nth-child(2n+1),
.content-gallery--cols-3 > ul > li:nth-child(3n+1),
.content-gallery--cols-4 > ul > li:nth-child(4n+1) { clear: left; }

/* Seitenzahlen (altes Theme) */
.pagination { overflow: hidden; }
.pagination li {
    float: left;
    display: block;
    height: 1em;
    line-height: 1em;
    border: 1px solid #cecece;
    border-radius: 5px;
    margin: 0 .2em !important;
}
.pagination li strong,
.pagination li a { padding: 1em !important; }
.pagination li a { text-decoration: none; }
.pagination li strong { font-weight: bolder; }

/* Hyperlinks */
.content-hyperlink, .ce_hyperlink { font-weight: bolder; }
.content-hyperlink a, .ce_hyperlink a { font-weight: normal; }

/* Publikationen (Nachrichtenliste) */
.layout_full { border-bottom: 1px solid #ccc; }

/* ---------- Formular (Contao-3.5-form.css + Theme) ---------- */
legend { width: 100%; display: block; font-weight: 700; border: 0; }
label {
    margin: 1.5em 0 .5em 0;
    display: block;
    vertical-align: middle;
}
input, button, textarea, select { font-family: inherit; font-size: 99%; font-weight: inherit; }
input, textarea { line-height: 2em; }
input[type="text"], input[type="password"], input[type="date"], input[type="email"],
input[type="number"], input[type="search"], input[type="tel"], input[type="url"],
input:not([type]), textarea {
    width: 100%;
    display: inline-block;
    padding: 3px 6px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: inset 0 1px 1px #eee;
    transition: all .15s linear;
    box-sizing: border-box;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus,
input[type="url"]:focus, input:not([type]):focus, textarea:focus {
    outline: 0;
    background: #fcfcfc;
    border-color: #bbb;
}
textarea { height: 200px; }
select { display: block; }
input[type="radio"], input[type="checkbox"] { margin: 0 3px 0 0; vertical-align: middle; width: auto; }
form fieldset { border: 0; min-width: 0; }
form .checkbox_container label, form .checkbox_container span label { display: inline; margin: 0; }
form .checkbox_container legend { margin: 1.5em 0 .5em 0; }
form span.mandatory { color: inherit; }

.widget-submit, .submit_container { text-align: right; margin-top: 12px; }
button.submit, input[type="submit"], .button {
    display: inline-block;
    padding: 4px 15px 4px 14px;
    margin-bottom: 0;
    text-align: center;
    vertical-align: middle;
    line-height: 16px;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #ececec;
    background-image: linear-gradient(to bottom, #fff, #ececec);
    background-repeat: repeat-x;
    transition: background .15s linear;
}
button.submit:hover, input[type="submit"]:hover, .button:hover { background-position: 0 -15px; }
button.submit:active, input[type="submit"]:active, .button:active { background-color: #e6e6e6; background-position: 0 -30px; }
p.error, .widget .error { color: #c55; margin: .25em 0; }

/* Spamschutz (ALTCHA, in Contao 5.7 eingebaut) */
.widget-altcha { margin-top: 1.5em; }
altcha-widget {
    --altcha-border-width: 1px;
    --altcha-border-radius: 3px;
    --altcha-color-border: #ccc;
    --altcha-color-border-focus: #bbb;
    --altcha-color-text: #000;
    --altcha-color-active: var(--c-brand);
    --altcha-max-width: 22rem;
    font-family: var(--font-body);
}

/* Meldungen aus dem TinyMCE-Stylesheet */
.warning { color: #c55; font-size: 1.1em; }
.confirmation { color: #090; font-size: 1.1em; }
.information { color: #999; font-size: .9em; }

/* ---------- Lightbox (theme.js, Optik wie die alte Colorbox) ---------- */
.lightbox {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 95vw;
    max-height: 95vh;
    overflow: visible;
}
.lightbox::backdrop { background: rgb(0 0 0 / .9); }
.lightbox img { display: block; max-width: 90vw; max-height: 85vh; width: auto; border: 5px solid #000; background: #fff; }
.lightbox__caption { position: absolute; top: -20px; left: 0; margin: 0; color: #ccc; }
.lightbox__close {
    position: fixed;
    top: 1rem; right: 1rem;
    width: 2.75rem; height: 2.75rem;
    border: 0;
    background: transparent;
    color: #ccc;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox__close:hover { color: #fff; }

/* ---------- Druck ---------- */
@media print {
    body { background: #fff; overflow: visible; }
    #wrapper { width: auto; border: 0; box-shadow: none; }
    #left, .skip-link { display: none !important; }
    #container { padding-left: 0; }
    #header { background: none; padding-left: 0; }
    #header a { color: #000; padding-left: 0; }
}
