/*
Theme Name: KlangfarbenTheme
Theme URI: 
Author: KlangfarbenAdmin
Description: Minimales WordPress-Theme. Website mit schwarzem Header, konfigurierbarem Main-Slider, flexibel anpassbaren Bereichen, mobilem Burger-Menü und zweispaltigem Footer mit fixierten Background-Image.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: klangfarben-theme
*/

:root {
    --aks-header-bg: #000000;
    --aks-content-bg: #f4f0eb;
    --aks-footer-bg: #111111;
    --aks-accent: #c0c0c0;
    --aks-text: #171717;
    --aks-light-text: #ffffff;
    --aks-container: 1200px;
    --aks-slider-height: 400px;
    --aks-header-height: 96px;
    --aks-header-height-scrolled: 68px;
    --aks-logo-height: 62px;
    --aks-logo-height-scrolled: 44px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--aks-text);
    background: #ffffff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.7;
}

body.admin-bar .site-header {
    top: 32px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--aks-accent);
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--aks-header-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--aks-light-text);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-shrunk {
    box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}

.site-header__inner,
.site-main__inner,
.site-footer__inner {
    width: min(100% - 32px, var(--aks-container));
    margin: 0 auto;
}

.site-header__inner {
    min-height: var(--aks-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: min-height 0.3s ease, padding 0.3s ease;
}

.site-header.is-shrunk .site-header__inner {
    min-height: var(--aks-header-height-scrolled);
}

.site-branding {
    min-width: 0;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.site-logo,
.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo-link img,
.site-logo img {
    width: auto;
    max-height: var(--aks-logo-height);
    transition: max-height 0.3s ease, transform 0.3s ease;
}

.site-header.is-shrunk .custom-logo-link img,
.site-header.is-shrunk .site-logo img {
    max-height: var(--aks-logo-height-scrolled);
}

.site-title--fallback {
    margin: 0;
    font-size: clamp(1.1rem, 1rem + 0.8vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-title--fallback a {
    color: var(--aks-light-text);
}

.site-header__nav-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.22);
    background: transparent;
    color: var(--aks-light-text);
    align-items: center;
    justify-content: center;
    position: relative;
}

.menu-toggle__lines,
.menu-toggle__lines::before,
.menu-toggle__lines::after {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle__lines {
    position: relative;
}

.menu-toggle__lines::before {
    position: absolute;
    top: -7px;
    left: 0;
}

.menu-toggle__lines::after {
    position: absolute;
    top: 7px;
    left: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines {
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before {
    transform: rotate(90deg) translateX(0);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after {
    opacity: 0;
}

.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 22px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--aks-light-text);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-navigation .current-menu-item > a,
.main-navigation a:hover,
.main-navigation a:focus {
    color: var(--aks-accent);
}

.aks-slider {
    position: relative;
    height: var(--aks-slider-height);
    overflow: hidden;
    background: #111111;
}

.aks-slider__track,
.aks-slide,
.aks-slide__image {
    position: absolute;
    inset: 0;
}

.aks-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.aks-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.aks-slide__image {
    background-size: cover;
    background-position: center center;
    transform: scale(1.12);
    transition: transform 8s ease;
}

.aks-slide.is-active .aks-slide__image {
    transform: scale(1);
}

.site-main {
    background-color: var(--aks-content-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 56px 0 72px;
}

.site-main__inner {
    background: rgba(255,255,255,0.86);
    padding: clamp(24px, 3vw, 48px);
    box-shadow: 0 0px 0px rgba(0,0,0,0.06);
}

.entry-header {
    margin-bottom: 26px;
}

.entry-title,
.page-title {
    margin: 0 0 18px;
    font-size: clamp(1.8rem, 1.3rem + 1.5vw, 3rem);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.entry-content > *:first-child,
.archive-description > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.2;
    margin-top: 1.8em;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
    margin-bottom: 1.15em;
}

.entry-content blockquote {
    margin-left: 0;
    padding-left: 20px;
    border-left: 4px solid var(--aks-accent);
    color: #444;
}

.wp-block-button__link,
button,
input[type="submit"],
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--aks-accent);
    color: #fff;
    border: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover,
.more-link:hover {
    color: #fff;
    opacity: 0.94;
    transform: translateY(-1px);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.post-card {
    background: #fff;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.post-card__title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.site-footer {
    background-color: var(--aks-footer-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--aks-light-text);
    padding: 56px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-widget-area .widget {
    margin-bottom: 24px;
}

.footer-widget-area .widget-title {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget-area li {
    margin-bottom: 10px;
}

.site-info {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.9rem;
    opacity: 0.85;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 860px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .site-header__inner {
        min-height: 74px;
        gap: 16px;
    }

    .site-header.is-shrunk .site-header__inner {
        min-height: 66px;
    }

    .custom-logo-link img,
    .site-logo img {
        max-height: 48px;
    }

    .site-header.is-shrunk .custom-logo-link img,
    .site-header.is-shrunk .site-logo img {
        max-height: 42px;
    }

    .menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .site-header__nav-wrap {
        gap: 12px;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        margin-left: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .main-navigation.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: rgba(0,0,0,0.96);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 18px 40px rgba(0,0,0,0.26);
        padding: 10px 0;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        display: block;
        padding: 14px 18px;
        font-size: 0.92rem;
    }

    .aks-slider {
        height: min(var(--aks-slider-height), 58vh);
        min-height: 240px;
    }

    .site-main {
        padding: 36px 0 48px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .site-header__inner,
    .site-main__inner,
    .site-footer__inner {
        width: min(100% - 24px, var(--aks-container));
    }

    .site-main__inner {
        padding: 22px;
    }

    .entry-title,
    .page-title {
        letter-spacing: 0.04em;
    }
}
