/*
 * media city leipzig – Theme (übernommen aus dem Drupal-Theme „mcl“).
 * Ohne Drupal-Core-CSS; Layout mit Flexbox/Grid statt Floats.
 */

/* --- Grundlagen --------------------------------------------------------- */

body {
    margin: 0;
    background-color: #c7c9cb;
    font-size: 11px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #fff;
}
p {
    margin: 0.7em 0;
    line-height: 135%;
}
h1,
h2 {
    margin: 15px 0 10px 0;
}
h3,
h4 {
    margin: 15px 0 7px 0;
}
ul {
    list-style: square;
    padding-left: 2em;
}
li {
    margin: 0.4em 0;
}
a {
    color: #fda937;
    text-decoration: none;
    font-weight: bold;
}
a:hover {
    text-decoration: underline;
}
input {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    padding-top: 2px;
    margin: 0 2px;
}
figure {
    padding: 0;
    margin: 0;
}
/* nur für Screenreader (früher Drupal system.base.css) */
.element-invisible {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    overflow: hidden;
    height: 1px;
    width: 1px;
}

/* --- Seitenlayout ------------------------------------------------------- */

#container {
    width: 984px;
    margin: 0 auto;
}
#main {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 984px;
    background: url(../images/back.jpg) repeat-y;
}
#left_col {
    position: relative;
    width: 174px;
    padding: 185px 15px 50px 40px;
}
#right_col {
    width: 702px;
}
#footer {
    flex: 0 0 100%;
    height: 41px;
    padding: 0;
    background: url(../images/footer.jpg) no-repeat;
    text-align: center;
    font-size: 10px;
    color: #000;
}

/* --- Kopf: Sprachflaggen, Quer-Navigation, Suche ------------------------- */

#header {
    position: relative;
    width: 100%;
    height: 261px;
    background: url(../images/header.jpg) no-repeat;
}
#header .nav-language {
    position: absolute;
    left: 10px;
    bottom: 4px;
}
#header .block-menu-block {
    position: absolute;
    left: 75px;
    bottom: 7px;
    margin: 0;
    padding: 0;
    font-size: 10px;
}
#header .block-menu-block h2 {
    display: none;
}
#header .block-menu-block ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
#header .block-menu-block li {
    margin: 0;
    padding: 0;
}
#header .block-menu-block a {
    margin: 0 10px;
    color: #494949;
    font-weight: normal;
}
#header .block-menu-block a:hover,
#header .block-menu-block a.active {
    color: #fff;
}
#header .block-menu-block .last {
    display: none;
}
#header .search {
    position: absolute;
    right: 10px;
    bottom: 4px;
}
#header .search-form {
    margin: 0;
    padding: 0;
}
#header .search .form-wrapper,
#header .search .form-item {
    display: flex;
    align-items: center;
}
#header .search .form-text {
    width: 128px;
    margin: 0;
    font-size: 10px;
}
#header .search-form .form-submit {
    width: 20px;
    border: 0;
    background: url(../images/search-submit.png) no-repeat 50% 50% transparent;
    text-indent: -9999px;
    overflow: hidden;
    cursor: pointer;
}

/* --- Linke Spalte: Logo, Hauptmenü, Zitat -------------------------------- */

#mcl-logo {
    position: absolute;
    left: 30px;
    top: 15px;
}
#mcl-logo img {
    width: 185px;
    height: auto;
}
.region-sidebar-left img {
    max-width: 100%;
    height: auto;
}
.region-sidebar-left .block-menu h2 {
    display: none;
}
.region-sidebar-left .block-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.region-sidebar-left .block-menu li {
    margin: 0;
    padding: 0;
}
.region-sidebar-left .block-menu a {
    display: block;
    width: 154px;
    padding: 2px 0 2px 20px;
    background: url(../images/linkelement_menu_off.jpg) no-repeat 0 6px;
    color: #fff;
    font-size: 13px;
    font-weight: normal;
}
.region-sidebar-left .block-menu a.active,
.region-sidebar-left .block-menu a:hover {
    background-image: url(../images/linkelement_menu_on.jpg);
}
.region-sidebar-left .block-menu a.external::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 0 2px 5px;
    background: url(../images/external-link.png) no-repeat 50% 50%;
}
.region-sidebar-left .block-menu .separator {
    display: block;
    height: 0;
    margin: 10px 0;
    border-bottom: 1px #535c5c solid;
}
.region-sidebar-left .view-quotation {
    margin-top: 10px;
    border-top: 1px #535c5c solid;
}
.region-sidebar-left .view-quotation .view-content {
    width: 160px;
}

/* --- Fuß: Quer-Navigation ------------------------------------------------ */

#footer .block-menu h2 {
    display: none;
}
#footer .block-menu ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
#footer .block-menu li {
    margin: 0;
    padding: 0;
}
#footer .block-menu a {
    display: inline-block;
    margin: 10px 5px 0 5px;
    color: #1975b1;
    font-weight: normal;
}
#footer .block-menu .last a {
    margin-left: 30px;
}

/* --- Inhaltsbereich ------------------------------------------------------ */

#page-title {
    display: none;
}
#content {
    position: relative;
    width: 672px;
    min-height: 500px;
    padding: 15px 15px 50px 15px;
}
#content img {
    max-width: 100%;
    height: auto;
}
.back-button {
    position: absolute;
    left: 10px;
    bottom: 10px;
}
.back-button a {
    display: block;
    padding: 3px 3px 3px 25px;
    background: url(../images/linkelement_off.jpg) no-repeat 5px 5px;
}

/* Regionen einer Seite: oben volle Breite, darunter Hauptspalte + rechte Spalte */
article.node-page > .content,
article.node-news > .content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
article.node-page > .content > *,
article.node-news > .content > * {
    flex: 0 0 100%;
}
#content .field-name-content-nodes-content {
    flex: 0 0 400px;
}
#content .field-name-content-nodes-content-right {
    flex: 0 0 242px;
    margin-left: 25px;
}

/* --- Rechte Spalte: Boxen und Bilder ------------------------------------- */

#content .field-name-content-nodes-content-right > .field-items > .field-item {
    margin: 15px 0;
}
#content .field-name-content-nodes-content-right .node-content-text-images .content-headline {
    display: none;
}
#content .field-name-content-nodes-content-right .field-name-field-content-images .field-item {
    margin-bottom: 10px;
}
#content .field-name-content-nodes-content-right .field-name-field-content-images img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 -1px;
    border: 1px #fff solid;
}
#content .field-name-content-nodes-content-right .node-content-text .content-headline {
    height: 28px;
    margin: 0;
    padding: 0 0 0 30px;
    background: url(../images/boxHeader.jpg) no-repeat;
    color: #025ea9;
    font-size: 12px;
    font-weight: bold;
    line-height: 28px;
}
#content .field-name-content-nodes-content-right .node-content-text .content {
    padding: 10px;
    background: url(../images/back_box.png);
}

/* --- Hauptspalte: Bildergalerie in zwei Spalten -------------------------- */

#content .field-name-content-nodes-content .node-content-text-images .content-headline {
    display: none;
}
#content .field-name-content-nodes-content .field-name-field-content-images > .field-items {
    display: flex;
    flex-wrap: wrap;
}
#content .field-name-content-nodes-content .field-name-field-content-images > .field-items > .field-item {
    flex: 0 0 50%;
}
#content .field-name-content-nodes-content .field-name-field-content-images a {
    display: block;
    border: 1px #fff solid;
}
#content .field-name-content-nodes-content .field-name-field-content-images figure {
    padding: 7px;
}
#content .field-name-content-nodes-content .field-name-field-content-images img {
    display: block;
}

/* --- Firmen: Glossar und Liste ------------------------------------------- */

.view-firmen ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.view-firmen ul li {
    margin: 10px 0;
    padding: 0 0 0 25px;
    background: url(../images/linkelement_off.jpg) no-repeat 5px 5px;
    line-height: 175%;
}
.view-firmen .glossary-list {
    word-spacing: 5px;
}
.view-firmen p {
    margin: 0.2em 0;
}

/* --- Teaser (News, Kunst, Startseite) ----------------------------------- */

.teaser-node {
    position: relative;
    margin: 15px -15px;
    padding: 15px;
    border: 0;
    background: #4b4b4b;
}
.teaser-node .teaser-node-content {
    position: relative;
    min-height: 122px;
    padding-right: 282px;
}
.teaser-node .node-headline {
    margin: 0 0 7px 0;
    font-size: 18px;
}
.teaser-node .node-date {
    font-weight: bold;
}
.teaser-node .field-name-field-teaser-image img {
    position: absolute;
    right: 0;
    top: 0;
    width: 240px;
    height: 120px;
    border: 1px #fff solid;
}
.teaser-node .node-readmore {
    margin-bottom: 0;
}

/*
 * Teaser in drei Spalten (Startseite „Aktuelle News“).
 * Überschriften, Bilder und Texte stehen per Subgrid jeweils auf einer Linie;
 * „weiterlesen“ folgt direkt dem Text (gemeinsam in .teaser-node-body).
 * Ersetzt das frühere mcl.js (gleiche Überschriftenhöhe).
 */
.content-node-teaser-3cols {
    margin: 15px -15px;
    padding: 15px;
    background: #4b4b4b;
}
.content-node-teaser-3cols .field-name-field-content-node-reference > .field-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 15px;
}
.content-node-teaser-3cols .field-name-field-content-node-reference > .field-items > .field-item,
.content-node-teaser-3cols .teaser-node {
    display: contents;
}
.content-node-teaser-3cols .teaser-node .teaser-node-content {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    min-height: 0;
    padding: 0;
}
.content-node-teaser-3cols .teaser-node .node-headline {
    grid-row: 1;
    align-self: start;
    font-size: 14px;
}
.content-node-teaser-3cols .teaser-node .field-name-field-teaser-image {
    grid-row: 2;
}
.content-node-teaser-3cols .teaser-node .teaser-node-body {
    grid-row: 3;
}
.content-node-teaser-3cols .teaser-node .node-date {
    display: none;
}
.content-node-teaser-3cols .teaser-node .field-name-field-teaser-image img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    margin: -1px;
}

/* --- Pager (früher Drupal system.theme.css) ------------------------------ */

.item-list .pager {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 15px 0 0 0;
    padding: 0;
    list-style: none;
}
.item-list .pager li {
    margin: 0;
}
.pager-current {
    font-weight: bold;
}

/* --- Downloads ----------------------------------------------------------- */

.content-file {
    position: relative;
    margin: 10px 0;
    padding: 0 0 0 35px;
}
.content-file img {
    position: absolute;
    left: 0;
    top: 0;
}

/* --- Sonderinhalte ------------------------------------------------------- */

.google-maps-anfahrt {
    width: 242px;
    height: 250px;
    margin: -10px;
}

/* --- Suche /suche/ (Pagefind Default UI) ---------------------------------- */

.search-page {
    --pagefind-ui-scale: 0.75;
    --pagefind-ui-primary: #fda937;
    --pagefind-ui-text: #fff;
    --pagefind-ui-background: #4b4b4b;
    --pagefind-ui-border: #7a7a7a;
    --pagefind-ui-tag: #4b4b4b;
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 0;
    --pagefind-ui-image-border-radius: 0;
    --pagefind-ui-image-box-ratio: 2 / 1;
    --pagefind-ui-font: Verdana, Arial, Helvetica, sans-serif;
}
.search-page .pagefind-ui__result-image {
    border: 1px #fff solid;
}
.search-page .pagefind-ui mark {
    background: none;
    color: #fda937;
    font-weight: bold;
}

/* --- Bildergalerie-Lightbox (ersetzt Colorbox) --------------------------- */

.lightbox {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
}
.lightbox:focus {
    outline: none;
}
.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
}
.lightbox-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 10px 34px 10px;
    border-radius: 5px;
    background: #fff;
}
.lightbox-frame img {
    display: block;
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
}
.lightbox-bar {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.lightbox-title {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.lightbox-counter {
    color: #949494;
}
.lightbox button {
    padding: 2px 6px;
    border: 0;
    background: none;
    color: #555;
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.lightbox button:hover,
.lightbox button:focus-visible {
    color: #000;
}
.lightbox button[hidden] {
    display: none;
}

/*
 * --- Responsive (rudimentär) ---------------------------------------------
 * Nur per Media Queries: ab 984px greift ausschließlich das Desktop-Layout oben.
 *  ≤ 983px: fluide Breite, Sidebar bleibt links, rechte Inhaltsspalte rutscht ggf. unter den Text
 *  ≤ 760px: alles untereinander (Logo + Menü, Kopfbild + Leiste, Inhalt, Fuß)
 *  ≤ 600px: Teaser mit Bild über dem Text, Startseiten-Teaser einspaltig
 */

@media (max-width: 983px) {
    #container,
    #main {
        width: auto;
    }
    #main {
        background-color: #393939;
    }
    #right_col {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }
    #content {
        width: auto;
        overflow-wrap: break-word;
    }
    #header {
        background-size: cover;
        background-position: right bottom;
    }
    #footer {
        background-size: 100% 100%;
    }

    article.node-page > .content,
    article.node-news > .content {
        column-gap: 25px;
    }
    #content .field-name-content-nodes-content {
        flex: 1 1 300px;
        min-width: 0;
    }
    #content .field-name-content-nodes-content-right {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    /* #right_col auflösen, damit Kopf und Inhalt direkt Flex-Items von #main werden */
    #right_col {
        display: contents;
    }
    #main {
        background: #393939;
    }
    #left_col {
        order: 1;
    }
    #header {
        order: 2;
    }
    #content {
        order: 3;
    }
    #footer {
        order: 4;
    }
    #left_col,
    #header,
    #content {
        flex: 0 0 100%;
        box-sizing: border-box;
    }

    /* Logo + Hauptmenü als Kopfzeile */
    #left_col {
        display: flex;
        align-items: center;
        gap: 15px;
        width: auto;
        padding: 10px 15px;
        background: #2c2c2c;
    }
    #mcl-logo {
        position: static;
        flex: none;
    }
    #mcl-logo img {
        display: block;
        width: 90px;
    }
    #left_col .section {
        flex: 1 1 0;
        min-width: 0;
    }
    .region-sidebar-left .block-menu ul {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 10px;
    }
    .region-sidebar-left .block-menu li:has(.separator),
    .region-sidebar-left .view-quotation {
        display: none;
    }
    .region-sidebar-left .block-menu a {
        width: auto;
        padding-left: 14px;
        background-position: 0 7px;
        font-size: 12px;
    }

    /* Kopfbild im Seitenverhältnis, Flaggen/Quer-Navigation/Suche als Leiste darunter */
    #header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        height: auto;
        padding: 0 10px 6px 10px;
        background: #cc6f1f;
    }
    #header::before {
        content: '';
        flex: 0 0 calc(100% + 20px);
        margin: 0 -10px;
        aspect-ratio: 702 / 261;
        background: url(../images/header.jpg) no-repeat center / cover;
    }
    #header .nav-language,
    #header .block-menu-block,
    #header .search {
        position: static;
    }
    #header .block-menu-block ul {
        flex-wrap: wrap;
    }
    #header .search {
        margin-left: auto;
    }

    #content {
        min-height: 0;
    }
    .google-maps-anfahrt {
        max-width: calc(100% + 20px);
    }

    #footer {
        height: auto;
        padding-bottom: 12px;
    }
    #footer .block-menu ul {
        flex-wrap: wrap;
    }
    #footer .block-menu .last a {
        margin-left: 5px;
    }
}

@media (max-width: 600px) {
    .teaser-node .teaser-node-content {
        min-height: 0;
        padding-right: 0;
    }
    .teaser-node .field-name-field-teaser-image img {
        position: static;
        display: block;
        width: 100%;
        max-width: 480px;
        height: auto;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    .content-node-teaser-3cols .field-name-field-content-node-reference > .field-items {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 25px;
    }
    .content-node-teaser-3cols .teaser-node .teaser-node-content {
        row-gap: 7px;
    }
    .content-node-teaser-3cols .teaser-node .field-name-field-teaser-image img {
        margin: 0;
    }

    #content .field-name-content-nodes-content .field-name-field-content-images figure {
        padding: 4px;
    }

    #footer {
        background: #393939;
    }
}
