:root {
    --maedler-yellow: #ffed00;
    --maedler-dark: #1d1d1b;
    --maedler-black: #000000;
    --maedler-white: #ffffff;
    --maedler-gray-light: #f4f4f4;
    --maedler-error: #cf2e2e;
    --font-primary: "Helvetica Neue", Helvetica, "Roboto", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--maedler-yellow);
    color: var(--maedler-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.is-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;
}

/* Header (MÄDLER Yellow Bar) */
.site-header {
    background-color: var(--maedler-yellow);
    padding: 1.5rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.site-logo {
    height: 80px;
    width: auto;
    display: block;
}

.header-url {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--maedler-dark);
    text-decoration: none;
    display: inline-block;
}

.header-url:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Main Content Area (MÄDLER White Content Band) */
.site-main {
    flex: 1;
    background-color: var(--maedler-white);
    padding: 5rem 0;
    display: flex;
    align-items: center;
}

.site-main--home {
    background-color: var(--maedler-yellow);
    background-image: url("/assets/background.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    min-height: clamp(680px, 58vw, 940px);
    padding: 13rem 0 5rem;
    align-items: flex-end;
}

.site-main--calendar {
    padding: 2rem 0;
}

.card {
    max-width: 760px;
    margin: 0 auto;
    background-color: var(--maedler-white);
    border: 2px solid var(--maedler-dark);
    border-radius: 0;
    padding: 3.5rem 2.5rem;
    text-align: center;
}

.site-main--home .card {
    width: 100%;
    max-width: min(580px, 45vw);
    margin: 0;
    padding: 2.75rem 2.25rem;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--maedler-dark);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.section-text {
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--maedler-dark);
    margin-bottom: 2rem;
}

.section-text p {
    margin-block: 1em;
}

.section-text p.text-signature {
    margin-block: 2em;
}

.section-text a {
    color: var(--maedler-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.section-text:last-child {
    margin-bottom: 0;
}

/* CTA Button (MÄDLER Style) */
.cta-wrapper {
    margin-bottom: 2.25rem;
}

.cta-wrapper:last-child,
.cta-wrapper:has(+ .code-form.is-hidden) {
    margin-bottom: 0;
}

.maedler-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--maedler-dark);
    background-color: var(--maedler-yellow);
    border: 2px solid var(--maedler-dark);
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.maedler-btn:hover {
    background-color: var(--maedler-black);
    color: var(--maedler-white);
    border-color: var(--maedler-black);
}

/* Code Form */
.code-form {
    max-width: 480px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

.code-input {
    flex: 1;
    padding: 0.85rem 1rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    border: 2px solid var(--maedler-dark);
    border-radius: 0;
    color: var(--maedler-dark);
    background-color: var(--maedler-white);
}

.code-input:focus {
    outline: 2px solid var(--maedler-black);
    outline-offset: 2px;
}

.submit-btn {
    padding: 0.85rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--maedler-dark);
    background-color: var(--maedler-yellow);
    border: 2px solid var(--maedler-dark);
    border-radius: 0;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--maedler-black);
    color: var(--maedler-white);
    border-color: var(--maedler-black);
}

.form-error {
    margin-top: 0.75rem;
    color: var(--maedler-error);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
}

/* Embed Host */
.embed-section {
    width: 100%;
    margin: 0 auto;
}

.embed-host {
    width: 100%;
}

/* Legal Content Pages (Impressum, Datenschutz, Teilnahmebedingungen, So funktioniert's) */
.subpage-nav {
    max-width: 820px;
    margin: 0 auto;
}

.subpage-nav--top {
    margin-bottom: 2rem;
}

.subpage-nav--bottom {
    margin-top: 2.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--maedler-dark);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.legal-content {
    max-width: 820px;
    margin: 0 auto;
    color: var(--maedler-dark);
    hyphens: auto;
}

.legal-content h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.legal-content section {
    margin-bottom: 1.75rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
}

.legal-content a {
    color: var(--maedler-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

/* Footer (MÄDLER Yellow Footer) */
.site-footer {
    background-color: var(--maedler-yellow);
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-link {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--maedler-dark);
    text-decoration: none;
    transition: transform 0.2s ease;
    display: inline-block;
}

.footer-link:hover,
.footer-link.is-active {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--maedler-dark);
}

.lang-select {
    font-family: var(--font-primary);
    background-color: var(--maedler-white);
    border: 2px solid var(--maedler-dark);
    color: var(--maedler-dark);
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.lang-select:focus {
    outline: 2px solid var(--maedler-black);
    outline-offset: 2px;
}

@media (max-width: 991px) {
    .site-main--home {
        min-height: auto;
        padding: 6rem 0 4rem;
        align-items: center;
    }

    .site-main--home .card {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .site-logo {
        height: 60px;
        width: auto;
    }

    .header-url {
        font-size: 1rem;
    }

    .site-main {
        padding: 3rem 0;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-text {
        font-size: 1.1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .submit-btn {
        width: 100%;
    }

    .legal-content h1 {
        font-size: 2rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}
