/*
Theme Name: STK Theme 2026
Theme URI: https://www.stadtkapelle-tulln.at
Description: Ein responsives Theme für Stadtkapelle Tulln
Author: Olaf the Rentier
Author URI: https://www.stadtkapelle-tulln.at
Version: 0.0.9
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stk-theme-2026
Domain Path: /languages
*/

/* Color variables */
:root {
    --bg-color: #082238;
    --text-color: #ffffff;
    --accent-color: var(--bg-color);
    --border-color: rgba(255, 255, 255, 0.18);
}

:root :where(.wp-element-button, .wp-block-button__link) {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: 1px solid transparent;
}

:root :where(.wp-element-button, .wp-block-button__link):hover {
    background-color: var(--bg-color);
    color: var(--text-color);
    border-color: var(--text-color);
}

body {
    margin: 5px auto;
    max-width: 90em;
    font-family: sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

.site-header {
    background: var(--bg-color);
    border: 0px;
    margin: 0px;
}

main a {
    color: var(--text-color);
    text-decoration: none;
}

main {
    display: block;
    /* für IE */
    background: var(--bg-color);
    border: 0px var(--text-color);
    margin: 0px;
    padding: 0px;
    color: var(--text-color);
}

nav {
    background: var(--bg-color);
    border: 0px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
}

nav a:hover {
    color: var(--text-color);
    background: var(--bg-color);
}

nav li {
    display: inline;
}

nav ul {
    display: inline;
    margin: 0px;
}

.Logo {
    height: 174px;
    width: auto;
    transition: height 0.35s ease;
}

.menu-toggle {
    display: none;
}

#primary-menu {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0px;
}

section {
    background: var(--bg-color);
    display: inline-block;
    width: 100%;
    border: 0px;
}

h1 {
    color: var(--text-color);
    margin: 0px;
    padding: 0px;
    margin-bottom: 10px;
    font-size: 2.2em;
}

h2 {
    color: var(--text-color);
    margin: 0px;
    padding: 0px;
    margin-bottom: 10px;
    font-size: 2em;
}

h3 {
    color: var(--text-color);
    margin: 0px;
    padding: 0px;
    margin-bottom: 10px;
    font-size: 1.8em;
}

h4 {
    color: var(--text-color);
    margin: 0px;
    padding: 0px;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 1.4em;
}

p {
    color: var(--text-color);
}

.article-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    line-height: 1.5;
}

.article-full h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 20px;
    word-break: keep-all;
}

.article-full p,
.article-full ul {
    margin-bottom: 20px;
    text-align: justify;
}

.article-full ul {
    list-style: none;
    padding-left: 0;
}

.article-full ul li::before {
    content: "– ";
}

.article-full ul.wp-block-latest-posts {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.article-full ul.wp-block-latest-posts > li {
    list-style: none;
    margin-block: 0;
    padding: 1.25rem 0;
    overflow-wrap: anywhere;
}

.article-full ul.wp-block-latest-posts > li::before,
.article-full ul.wp-block-latest-posts > li::marker {
    content: none;
}

.article-full ul.wp-block-latest-posts:not(.is-grid) > li + li {
    border-top: 1px solid var(--border-color);
}

.article-full ul.wp-block-latest-posts:not(.is-grid) > li:has(> .wp-block-latest-posts__featured-image) {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
}

.article-full ul.wp-block-latest-posts:not(.is-grid) > li:has(> .wp-block-latest-posts__featured-image) > * {
    grid-column: 2;
    min-width: 0;
}

.article-full ul.wp-block-latest-posts:not(.is-grid) > li > .wp-block-latest-posts__featured-image {
    grid-column: 1;
    grid-row: 1 / span 5;
    float: none;
    margin: 0;
}

.article-full ul.wp-block-latest-posts:not(.is-grid) .wp-block-latest-posts__featured-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

@media (max-width: 600px) {
    .article-full ul.wp-block-latest-posts:not(.is-grid) > li:has(> .wp-block-latest-posts__featured-image) {
        grid-template-columns: 5rem minmax(0, 1fr);
        column-gap: 0.75rem;
    }
}

.article-full .wp-block-latest-posts__post-title {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.4;
}

.article-full .wp-block-latest-posts__post-excerpt,
.article-full .wp-block-latest-posts__post-excerpt p {
    text-align: left;
}

.article-full img {
    max-width: 100%;
    height: auto;
}

.article-full img.tsc-lightbox-trigger {
    cursor: zoom-in;
}

.tsc-image-lightbox {
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: 96vw;
    max-height: 96vh;
    box-sizing: border-box;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: rgba(8, 34, 56, 0.92);
    color: var(--text-color);
    overflow: auto;
}

.tsc-image-lightbox[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tsc-image-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.76);
}

.tsc-image-lightbox__close {
    position: static;
    order: 2;
    align-self: flex-end;
    min-height: 44px;
    margin-top: 0.25rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid #ffffff;
    background: #ffffff;
    color: var(--bg-color);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.tsc-image-lightbox__close:hover,
.tsc-image-lightbox__close:focus-visible {
    background: #ffffff;
    color: var(--bg-color);
}

.tsc-image-lightbox__close:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 3px;
}

.tsc-image-lightbox__image {
    display: block;
    max-width: min(92vw, calc(96vw - 2.125rem));
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tsc-image-lightbox__caption {
    margin: 0.75rem 0 0;
    text-align: center;
}

.tsc-image-lightbox__caption:empty {
    display: none;
}

.article-loop {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
    line-height: 1.5;
}

.article-loop--with-thumbnail {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
}

.article-loop--with-thumbnail > .article-loop__featured-image {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.article-loop--with-thumbnail > .article-loop__featured-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.article-loop--with-thumbnail > header,
.article-loop--with-thumbnail > p {
    grid-column: 2;
    min-width: 0;
}

@media (max-width: 600px) {
    .article-loop--with-thumbnail {
        grid-template-columns: 5rem minmax(0, 1fr);
        column-gap: 0.75rem;
    }
}

.article-loop h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 10px;
}

.article-loop p {
    margin-bottom: 10px;
    text-align: justify;
}

/* headings in header have white color */
.site-header h1,
.site-header h2,
.site-header h3,
.site-header h4 {
    color: var(--text-color);
}

footer {
    background: var(--bg-color);
    text-align: center;
    border: 0px;
    margin-top: 20px;
    font-size: 0.8em;
    color: var(--text-color);
    padding: 5px;
}

footer a {
    text-decoration: none;
}

.site-footer,
.site-footer a,
.site-footer a:visited,
.site-footer a:hover,
.site-footer a:focus,
.site-footer a:active {
    color: #fff;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.social-links img {
    width: 30px;
    height: 30px;
}

/* Mobile styles */
@media (max-width: 1022px) {
    .site-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.4em 0.6em;
        position: relative;
    }

    .logo-container {
        flex-shrink: 0;
    }

    .Logo {
        height: 116px;
        width: auto;
        display: block;
    }

    .article-full,
    .article-loop {
        padding-top: 10px;
    }

    nav {
        position: static;
        float: none;
        font-size: 1.4em;
        height: auto;
        text-align: left;
        border-color: var(--accent-color);
        z-index: 10;
    }

    nav a {
        border-left: 5px solid var(--accent-color);
        border-right: 5px solid var(--accent-color);
        border-top: 0px;
        border-bottom: 0px;
    }

    nav a:hover {
        text-decoration: none;
        background-color: var(--text-color);
        color: var(--bg-color);
        border-left: 5px solid var(--text-color);
        border-right: 5px solid var(--text-color);
        border-top: 0px;
        border-bottom: 0px;
    }

    nav li {
        display: block;
        background-color: var(--accent-color);
        text-align: right;
    }

    nav .menu_head {
        display: inline-block;
        font-size: 1.5em;
        border: 0px;
    }

    nav .menu_head a {
        color: var(--accent-color);
        text-decoration: none;
    }

    nav .menu_head a:hover {
        color: var(--accent-color);
        text-decoration: none;
        background: var(--text-color);
        border: 0px;
    }

    nav .icon {
        background: var(--bg-color);
        border: 0px;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-color);
        border: 0px;
        color: var(--text-color);
        font-size: 1.5em;
        cursor: pointer;
        padding: 0.3em 0.5em;
        margin: 0;
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle:hover {
        opacity: 0.8;
    }

    #primary-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--accent-color);
        text-align: right;
        margin: 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 100;
    }
}

/* Desktop styles */
@media (min-width: 1023px) {
    .site-header {
        margin-bottom: 5px;
        margin-top: 30px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
        padding-bottom: 5px;
        transition: padding 0.35s ease, margin 0.35s ease;
    }

    nav {
        padding: 5px;
        text-align: left;
        display: block;
        float: none;
        height: 1.3em;
        font-size: 1.3em;
        position: relative;
        top: 0em;
        left: 0em;
        margin-left: 1em;
        margin-right: 1em;
        margin-top: 0.2em;
        margin-bottom: 0.2em;
    }

    main {
        margin-top: 5px;
    }

    nav a {
        border-left: 7px solid var(--accent-color);
        border-right: 7px solid var(--accent-color);
        border-top: 2px solid var(--accent-color);
        border-bottom: 2px solid var(--accent-color);
    }

    nav a:hover {
        background-color: var(--text-color);
        color: var(--bg-color);
        border-left: 7px solid var(--text-color);
        border-right: 7px solid var(--text-color);
        border-top: 2px solid var(--text-color);
        border-bottom: 2px solid var(--text-color);
    }

    nav ul {
        padding: 0px;
    }

    nav .menu_head {
        display: none;
    }

    .menu-toggle {
        display: none;
    }

    #primary-menu {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0px;
    }

    /* ── Scrolled / sticky state ── */
    .site-header.scrolled {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        box-sizing: border-box;
        z-index: 1000;
        margin: 0;
        padding: 0.4em 1.5em;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1.5em;
        background: var(--bg-color);
        border-bottom: 1px solid rgba(255, 255, 255, 0.4);
        text-align: left;
    }

    .site-header.scrolled .logo-container {
        flex-shrink: 0;
    }

    .site-header.scrolled .Logo {
        height: 38px;
    }

    .site-header.scrolled nav {
        flex: 1;
        margin: 0;
        padding: 4px 10px;
        height: auto;
        margin-top: 0;
        margin-bottom: 0;
    }

    /* Push body content down equal to fixed header height */
    body.header-scrolled {
        padding-top: 62px;
    }
}

.main-navigation {
    height: auto;
    min-width: 0;
}

.main-navigation #primary-menu,
.main-navigation #primary-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation #primary-menu li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    text-align: left;
}

.main-navigation #primary-menu a {
    display: block;
    padding: 0.4em 0.5em;
    overflow-wrap: anywhere;
    border: 0;
}

.main-navigation #primary-menu ul {
    display: block;
    grid-column: 1 / -1;
    padding-left: 0.75em;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.main-navigation.navigation-ready #primary-menu ul {
    display: none;
}

.main-navigation.navigation-ready #primary-menu .submenu-open > ul {
    display: block;
}

.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 1em;
    cursor: pointer;
}

.submenu-open > .submenu-toggle .fa {
    transform: rotate(180deg);
}

.main-navigation a:focus-visible,
.main-navigation button:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: -2px;
}

.main-navigation .submenu-toggle:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

@media (min-width: 1023px) {
    .main-navigation #primary-menu {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .main-navigation.navigation-ready #primary-menu > li > ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: min(22rem, calc(100vw - 3rem));
        max-height: min(65vh, 36rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        box-sizing: border-box;
        padding: 0.4em;
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: var(--bg-color);
        z-index: 1100;
        font-size: 0.9em;
    }

    .main-navigation.navigation-ready #primary-menu > li:nth-last-child(-n+2) > ul {
        left: auto;
        right: 0;
    }
}

@media (max-width: 1022px) {
    .main-navigation #primary-menu {
        display: block;
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .main-navigation.navigation-ready #primary-menu {
        display: none;
    }

    .main-navigation.navigation-ready.menu-open #primary-menu {
        display: block;
    }

    .main-navigation:not(.navigation-ready) .menu-toggle {
        display: none;
    }
}