@media (min-width: 769px) and (max-width: 1280px) {
    .legal-slider {
        display: block;
        width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .legal-page {
        width: 100%;
        min-width: 100%;
        height: auto;
        display: block;
        overflow: visible;
    }

    #legal-view .hero-sidebar,
    #privacy::after,
    .legal-next-link {
        display: none;
    }

    .portfolio-back-link {
        display: flex;
        position: absolute;
        top: 113px;
        left: 20px;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
    }

    .portfolio-back-link img {
        width: 18px;
    }

     .impressum-layout,
    .privacy-page {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 120px clamp(56px, 8vw, 96px) 80px;
        box-sizing: border-box;
    }

    .impressum-layout {
        padding-top: 100px;
        padding-bottom: 2px;
    }

    .privacy-page {
        display: flex;
        flex-direction: column;
        padding-top: 0;
        padding-bottom: 0;
    }

    .privacy-page .legal-content {
        order: 1;
    }

    .legal-title {
        writing-mode: horizontal-tb;
        transform: none;
        width: auto;
        display: block;
        font-size: 32px;
        font-weight: 100;
        margin: 0 0 32px;
        font-size: clamp(36px, 4vw, 48px);
        color: transparent;
    }

    .legal-content {
        max-width: 100%;
        height: auto;
        overflow: visible;
        font-size: 16px;
        line-height: 1.45;
    }

    .legal-content p {
        font-size: 16px;
        margin: 0;
        line-height: 1.2;
    }

    .legal-content h3,
    .legal-content h4,
    .legal-column h3 {
        font-size: 23px;
        margin: 18px 0 2px;
        color: var(--highlight-main);
    }

    .legal-layout {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .legal-column {
        width: 100%;
    }

    .legal-right-footer {
        order: 99;
        position: static;

        width: calc(100% + 2 * clamp(48px, 8vw, 90px));
        margin-left: calc(-1 * clamp(48px, 8vw, 90px));
        margin-right: calc(-1 * clamp(48px, 8vw, 90px));
        margin-top: 48px;
        margin-bottom: 0;
        padding: 24px 0 16px;
        box-sizing: border-box;
        background: linear-gradient(
            to top,
            #5c817f,
            var(--highlight-main)
        );
        color: #4a4a4a;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .legal-right-footer a,
    .legal-right-footer button,
    .legal-right-footer p {
        color: #4a4a4a;
        margin: 0;
    }

    .legal-right-footer button {
        font-family: inherit;
        font-size: 14px;
        order: 2;
    }

    .legal-contact-info {
        display: none;
        order: 2;
    }

    .legal-content ul {
        padding-left: 18px;
        margin-top: 8px 0 16px;
    }

    .legal-content li {
        margin-bottom: 4px;
    }

    .legal-prev-link {
        display: flex;
        justify-content: center;
        position: static;
        transform: rotate(90deg);
        margin: 0 0 24px;
        align-self: center;
    }

    .legal-prev-link img {
        width: 54px;
    }

    #legal-view > .social-links {
        display: none;
    }

    .legal-mobile-actions {
        display: flex;
        flex-direction: column;
        align-self: center;
        order: 98;
        margin: 48px 0 0;
        gap: 54px;
    }

    #legal-view .legal-mobile-actions .social-links {
        display: flex;
        flex-direction: row-reverse;
        position: static;
        top: auto;
        right: auto;
        order: 2;
    }

    .legal-mobile-actions .social-links nav,
    .legal-mobile-actions .social-links ul {
        display: flex;
        justify-content: center;
    }

    .legal-mobile-actions .social-links ul {
        gap: 24px;
        margin: 0;
        padding: 0;
    }

    .legal-mobile-actions .language-link {
        display: none;
    }

    .legal-desktop-socials {
        display: none;
    }

}

@media (max-width: 768px) {
    .legal-slider {
        display: block;
        width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .legal-page {
        width: 100%;
        min-width: 100%;
        height: auto;
        display: block;
        overflow: visible;
    }

    .impressum-layout,
    .privacy-page {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 100px 24px 0;
        box-sizing: border-box;
        padding-top: 0;
        padding-bottom: 0;
    }

    .legal-title {
        writing-mode: horizontal-tb;
        transform: none;
        width: auto;
        display: block;
        font-size: 32px;
        margin: 0 0 28px;
    }

    .legal-content {
        width: 100%;
        max-width: 100%;
        margin-top: 40px;
        height: auto;
        overflow: visible;
    }

    .legal-layout {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .legal-column {
        width: 100%;
    }

    #privacy::after,
    .legal-next-link,
    .legal-desktop-socials {
        display: none;
    }

    .legal-right-footer {
        order: 99;
        position: static;
        width: calc(100% + 48px);
        margin-left: -24px;
        margin-right: -24px;
        margin-top: 32px;
        padding: 24px 24px 41px;
        box-sizing: border-box;

        background: linear-gradient(
            to top,
            #5c817f,
            var(--highlight-main)
        );

        color: #4a4a4a;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    .legal-right-footer a,
    .legal-right-footer button,
    .legal-right-footer p {
        color: #4a4a4a;
        margin: 0;
    }

    .portfolio-back-link {
        display: flex;
        position: absolute;
        top: 93px;
        left: 20px;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
    }

    .portfolio-back-link img {
        width: 18px;
    }

    .legal-contact-info {
        display: none;
    }
}