:root {
    --bg: #f2eee7;
    --surface: #fffdf8;
    --surface-soft: #f8f1e5;
    --surface-warm: #f3e7d4;

    --text: #382315;
    --muted: #756558;

    --brown: #5d3719;
    --brown-dark: #3e2514;
    --brown-soft: #76502f;

    --gold: #d99318;
    --gold-light: #f0c45b;
    --gold-pale: #fff0c7;

    --green: #3f7b2c;
    --red: #b94d27;

    --border: #dccfbd;
    --border-light: #eadfce;

    --sidebar-width: 270px;
    --content-max: 1500px;
    --radius: 10px;
    --radius-small: 7px;
    --shadow: 0 6px 22px rgba(77, 49, 27, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1em;
    line-height: 1.55;
}

body.menu-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    max-width: var(--content-max);
    margin: 0 auto;
    background: var(--surface);
    box-shadow: 0 3px 18px rgba(62, 37, 20, 0.12);
}

.site-header-image {
    position: relative;
    min-height: 250px;
    background-image:
        linear-gradient(90deg, rgba(255, 248, 226, 0.86) 0%, rgba(255, 248, 226, 0.48) 34%, rgba(255,255,255,0) 58%),
        url('../images/header3.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.site-header-copy {
    position: absolute;
    left: clamp(20px, 5vw, 68px);
    top: 50%;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%);
    text-shadow: 0 1px 0 rgba(255,255,255,0.9);
}

.site-title {
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2.25rem, 5.6vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: 0.035em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-tagline {
    margin-top: 13px;
    color: var(--brown);
    font-size: clamp(0.72rem, 1.6vw, 1.1rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.menu-button {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px 9px;
    background: rgba(255, 248, 226, 0.90);
    border: 1px solid rgba(93, 55, 25, 0.22);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(62, 37, 20, 0.16);
}

.menu-button span {
    height: 2px;
    background: var(--brown-dark);
    border-radius: 2px;
}

.top-nav {
    display: none;
    min-height: 51px;
    background: linear-gradient(180deg, #70461f, var(--brown));
    border-top: 1px solid rgba(255,255,255,0.15);
}

.top-nav a {
    display: flex;
    align-items: center;
    min-height: 51px;
    padding: 0 22px;
    color: #fff8ed;
    font-size: 0.94rem;
    text-decoration: none;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.top-nav a:hover,
.top-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.09);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(45, 29, 16, 0.55);
}

.site-shell {
    max-width: var(--content-max);
    min-height: 70vh;
    margin: 0 auto;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(62, 37, 20, 0.10);
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: min(88vw, 310px);
    background: #fbf7f0;
    color: var(--text);
    border-right: 1px solid var(--border);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    overflow-y: auto;
}

body.menu-open .sidebar {
    transform: translateX(0);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 18px 16px;
}

.sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--border);
}

.sidebar-mobile-head strong {
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.18rem;
}

.close-menu-button {
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    color: var(--brown);
    border: 0;
    font-size: 1.7rem;
    line-height: 1;
}

.nav-search-wrap {
    position: relative;
    margin-bottom: 22px;
}

.nav-search {
    width: 100%;
    min-height: 44px;
    padding: 9px 40px 9px 12px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid #d9c9b2;
    border-radius: var(--radius-small);
    outline: none;
    box-shadow: inset 0 1px 2px rgba(62, 37, 20, 0.04);
}

.nav-search:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(217, 147, 24, 0.14);
}

.clear-search {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    padding: 0;
    background: transparent;
    color: var(--brown-soft);
    border: 0;
    font-size: 1.45rem;
    line-height: 1;
}

.nav-section {
    margin-bottom: 22px;
}

.nav-section-title {
    margin: 0 0 8px;
    color: var(--brown-dark);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

#favoritesSection .nav-section-title::before {
    content: '★';
    margin-right: 7px;
    color: var(--gold);
    font-size: 1rem;
}

.nav-list {
    display: grid;
    gap: 3px;
}

.nav-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    min-height: 38px;
    background: rgba(255,255,255,0.36);
    border-radius: 4px;
}

.nav-item:hover,
.nav-item:focus-within {
    background: var(--surface-warm);
}

.nav-link {
    grid-column: 2;
    min-width: 0;
    padding: 7px 8px 7px 2px;
    color: #4b3828;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.favorite-button {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 40px;
    height: 38px;
    padding: 0;
    background: transparent;
    color: #b8750c;
    border: 0;
    font-size: 1.26rem;
}

.favorite-button:hover,
.favorite-button.is-favorite {
    color: #e29812;
    transform: scale(1.05);
}

.favorite-copy {
    background: #f4eadc;
}

.nav-no-results {
    margin: 12px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.sidebar-hint {
    margin-top: auto;
    padding: 14px;
    background: var(--surface-warm);
    color: var(--muted);
    border-radius: var(--radius-small);
    font-size: 0.8rem;
}

.sidebar-hint strong {
    color: var(--brown-dark);
}

.sidebar-hint p {
    margin: 3px 0 0;
}

.main-content {
    width: 100%;
    min-width: 0;
    padding: 24px 16px 48px;
}

.welcome {
    max-width: 820px;
    padding: 4px 0 8px;
}

.eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.welcome h1,
.page-header h1 {
    margin: 5px 0 6px;
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 1.08;
}

.welcome h2 {
    margin: 0 0 14px;
    color: var(--brown);
    font-size: clamp(1.05rem, 3.8vw, 1.35rem);
}

.welcome p,
.page-header p {
    margin: 0;
    color: #54473d;
}

.content-section {
    margin-top: 28px;
}

.section-heading {
    margin-bottom: 15px;
}

.section-heading h2 {
    margin: 3px 0 0;
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.55rem, 5vw, 2rem);
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.generator-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffefa 0%, #fbf5eb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 14px rgba(77, 49, 27, 0.06);
    overflow: hidden;
}

.generator-image-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: none;
}

.generator-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.generator-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 17px 17px 18px;
    text-align: center;
}

.generator-card h3 {
    margin: 0 0 7px;
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
}

.generator-card p {
    margin: 0 0 17px;
    color: var(--muted);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 43px;
    margin-top: auto;
    padding: 9px 20px;
    background: linear-gradient(180deg, #70451f, var(--brown));
    color: #fff9f0;
    border: 1px solid #4e2e14;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
    font-weight: 700;
    text-decoration: none;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: linear-gradient(180deg, #85562b, #68401f);
}

.feature-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 18px;
    background: #fffdf8;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.feature-strip article {
    padding: 17px 12px;
    text-align: center;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.feature-strip article:nth-child(2n) {
    border-right: 0;
}

.feature-strip article:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.feature-icon {
    display: block;
    min-height: 32px;
    color: var(--gold);
    font-size: 1.8rem;
    line-height: 1;
}

.feature-strip article:nth-child(1) .feature-icon {
    color: var(--green);
}

.feature-strip article:nth-child(3) .feature-icon {
    color: var(--red);
}

.feature-strip h3 {
    margin: 7px 0 4px;
    color: var(--brown-dark);
    font-size: 0.95rem;
}

.feature-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.notice-box {
    margin-top: 20px;
    padding: 13px 15px;
    background: #fff6df;
    color: #6b4a18;
    border: 1px solid #e7ca86;
    border-radius: var(--radius-small);
    font-size: 0.91rem;
}

.plain-section,
.generator-placeholder,
.page-header {
    margin-top: 18px;
    padding: 21px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.page-header {
    margin-top: 0;
    background: linear-gradient(135deg, #fff9eb, #f3dfb2);
}

.plain-section h2,
.generator-placeholder h2 {
    margin: 0 0 8px;
    color: var(--brown-dark);
    font-family: Georgia, 'Times New Roman', serif;
}

.plain-section p,
.generator-placeholder p {
    margin-bottom: 0;
    color: var(--muted);
}

.site-footer {
    max-width: var(--content-max);
    margin: 0 auto;
    background: linear-gradient(180deg, #6b431f, var(--brown));
    color: #f4eadb;
    box-shadow: 0 8px 24px rgba(62, 37, 20, 0.12);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #fff7eb;
    text-decoration: none;
}

.footer-motto {
    color: var(--gold-light);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-style: italic;
}

.footer-note {
    padding: 0 20px 22px;
    color: #ddcbb8;
    font-size: 0.77rem;
}

@media (min-width: 620px) {
    .site-header-image {
        min-height: 225px;
    }

    .main-content {
        padding: 32px 26px 60px;
    }

    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .feature-strip {
        grid-template-columns: repeat(4, 1fr);
    }

    .feature-strip article,
    .feature-strip article:nth-child(2n),
    .feature-strip article:nth-last-child(-n + 2) {
        border-right: 1px solid var(--border-light);
        border-bottom: 0;
    }

    .feature-strip article:last-child {
        border-right: 0;
    }

    .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 960px) {
    body {
        padding: 10px 0 24px;
    }

    body.menu-open {
        overflow: auto;
    }

    .site-header {
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }

    .site-header-image {
        min-height: 270px;
        background-position: center 46%;
    }

    .menu-button,
    .nav-overlay,
    .sidebar-mobile-head {
        display: none !important;
    }

    .top-nav {
        display: flex;
    }

    .site-shell {
        display: grid;
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }

    .sidebar {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        z-index: 1;
        width: auto;
        min-height: 100%;
        transform: none;
        overflow: visible;
    }

    .sidebar-inner {
        position: sticky;
        top: 0;
        min-height: auto;
        padding: 20px 16px 28px;
    }

    .sidebar-hint {
        margin-top: 18px;
    }

    .main-content {
        padding: 34px 26px 62px;
        border-left: 1px solid var(--border-light);
    }

    .site-footer {
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 619px) {
    .site-header-image {
        min-height: 165px;
        background-position: 67% center;
    }

    .site-header-image::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(255,249,232,0.82) 0%, rgba(255,249,232,0.34) 55%, rgba(255,255,255,0) 78%);
    }

    .site-header-copy {
        z-index: 2;
        left: 68px;
        top: 23px;
        transform: none;
    }

    .site-title {
        font-size: 1.65rem;
    }

    .site-tagline {
        max-width: 180px;
        margin-top: 6px;
        font-size: 0.58rem;
        line-height: 1.45;
        letter-spacing: 0.16em;
    }

    .generator-image-wrap {
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Generator-Unterseiten */
.page-header-with-image {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: center;
    gap: 18px;
    overflow: hidden;
}

.page-header-with-image img {
    display: block;
    width: 300px;
    height: 200px;
    object-fit: cover;
    border: 1px solid rgba(93, 55, 25, 0.20);
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(62, 37, 20, 0.12);
}

@media (max-width: 520px) {
    .page-header-with-image {
        grid-template-columns: 1fr;
    }

    .page-header-with-image img {
        width: 100%;
        height: auto;
        max-height: 185px;
    }
}
