/* ============================================
   LEGAL PAGES (Impressum & Datenschutz)
   ============================================ */

 body.legal-page {
    --primary-color: #004b8b;
    --secondary-color: #004b8b;
    --light-gray: #f5f5f5;
    --white: #ffffff;

    background: var(--light-gray);
    padding-top: 0 !important;
}
 body.legal-page::before {
    background-position: center -360px !important;
}

/* ---------- Navigation ----------  */
body.legal-page .navigation {
    position: absolute !important;
    inset: 0 auto auto 0;
    right: 0;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    z-index: 10;
    padding: 0;
}

body.legal-page .nav-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 40px;
    margin-left: 40px;
}

body.legal-page .nav-logo img {
    height: 75px;
    width: auto;
    filter: brightness(0) invert(1);  
}

body.legal-page .nav-menu,
body.legal-page .mobile-menu-toggle {
    display: none !important;
}

/* --- Hero --- */
body.legal-page .legal-hero {
    position: relative;
    background: transparent;
    color: var(--white);
    text-align: center;
    padding: 0;
    min-height: 310px;           
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: visible;            
    z-index: 5;                   
}

 body.legal-page .legal-hero::before {
    content: none;
    position: absolute;
    inset: 0;
    background:
        url("https://www.kraus-rechtsanwaelte.de/wp-content/uploads/2021/03/kraus-rechtsanwaelte-justitia.jpg") center -300px / cover no-repeat;
    opacity: 1;
    z-index: 0;
}

/* Pfeil / Shape unten */
.impressum-shape-bottom {
    position: absolute;
    bottom: -27px;       
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    z-index: 6;         
}

.impressum-shape-bottom svg {
    display: block;
    height: 100%;
    width: 100%;
}

.impressum-shape-bottom path {
    fill: white;
}

body.legal-page .legal-hero::after {
    content: "";
    position: absolute;
 }

/* --- Main --- */
body.legal-page .legal-main {
    position: relative;
    z-index: 1;
    margin-top: 26px;   
}

body.legal-page .legal-main::before {
    z-index: 0;
}

body.legal-page .legal-hero .container {
    position: relative;
    z-index: 1;
    padding-bottom: 20px;  
}

body.legal-page .legal-hero h1 {
    margin: 0 0 8px;
    font-family: Georgia;
    font-weight: normal;
    font-size: 40px;
    line-height: 1;
    margin-bottom: 20px;
}

body.legal-page .legal-hero .legal-meta {
    margin: 0;
    font-size: clamp(13px, 1.7vw, 15px);
    opacity: 0.9;
    color: #fff;
}

 body.legal-page .legal-container {
    max-width: none;
    padding: 0;
    display: flex;
    justify-content: center;
    background: var(--white);
}

body.legal-page .legal-card {
    width: clamp(720px, 60vw, 980px);
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
    background: var(--white);
    padding: clamp(40px, 6vw, 80px) clamp(20px, 7vw, 100px);
    text-align: left;
    color: #1f1f1f;
}

 body.legal-page .legal-section + .legal-section {
    margin-top: clamp(40px, 6vw, 60px);
    padding-top: clamp(32px, 5vw, 50px);
    border-top: 1px solid color-mix(in srgb, var(--primary-color) 18%, transparent);
}

body.legal-page .legal-section h2 {
    margin: 0 0 18px;
    color: #004b8b;
    font-family: Helvetica;
    font-weight: bold;
    font-size: 40px;
    line-height: 40px;
}

body.legal-page .legal-section p {
    color: #004b8b;
    font-family: Helvetica;
    font-weight: semibold;
    font-size: 15px;
    line-height: 17.25px;
}

body.legal-page .legal-section h3 {
    margin-top: 25px;
    color: #004b8b;
    font-family: Georgia;
    font-size: 21px;
    line-height: auto;
    font-weight: normal;
}

body.legal-page .legal-section h4 {
    margin-top: 25px;
    color: #004b8b;
    font-family: Georgia;
    font-size: 18px;
    line-height: 20.7px;
    font-weight: normal;
}

body.legal-page .legal-section h5 {
    color: #004b8b;
    font-family: Helvetica;
    font-size: 21px;
    line-height: auto;
    font-weight: bold;
}

body.legal-page .legal-section li {
    font-size: 15px;
    line-height: 20.7px;
    color: #004b8b;
    font-family: Helvetica;
    font-weight: semibold;
}

body.legal-page .legal-section address {
    margin: 0 0 18px;
    color: #004b8b;
    font-family: Helvetica;
    font-weight: semibold;
    font-size: 15px;
    line-height: auto;
}

body.legal-page .legal-section ul,
body.legal-page .legal-section ol {
    margin: 20px 0 20px 25px;
    padding-left: 0;
}

body.legal-page .legal-section .legal-list li {
    font-size: 15px;
    line-height: 17.25px;
    color: #004b8b;
    font-family: Helvetica;
    margin-bottom: 10px;
}

body.legal-page .legal-section .legal-list .legal-title {
    color: #004b8b;
    font-family: Georgia;
    font-size: 18px;
    line-height: 20.7px;
    font-weight: normal;
    margin-right: 4px;
        display: inline;  
    }

body.legal-page .legal-section .legal-h4 {
    color: #004b8b;
    font-family: Georgia;
    font-size: 18px;
    line-height: 20.7px;
    font-weight: normal;
    display: inline;
    margin: 0;
    margin-right: 6px;
}

body.legal-page .legal-section li::marker {
    color: var(--primary-color);
}

body.legal-page .legal-section a {
    color: var(--primary-color);
    text-decoration: none;
}

body.legal-page .legal-section a:hover,
body.legal-page .legal-section a:focus-visible {
    text-decoration: underline;
}

body.legal-page .legal-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 18px;
    font-size: clamp(14px, 1.5vw, 16px);
}

body.legal-page .legal-section th,
body.legal-page .legal-section td {
    border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 14%, transparent);
    padding: 10px 6px;
    vertical-align: top;
    text-align: left;
}

 .main-footer {
    background: #004b8b;
    color: #ffffff;
    padding-block: 18px;
    padding-inline: 0;
}

.main-footer .container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-inline: clamp(8px, 2vw, 16px);
}

.footer-links a:hover {
    text-decoration: underline;
}

 
@media (max-width: 1024px) {
    body.legal-page .legal-hero {
        min-height: 280px;        
        padding: 80px 0 32px;
    }

    body.legal-page .legal-main {
        margin-top: 22px;          
    }

    body.legal-page .impressum-shape-bottom {
        bottom: -22px;             
    }

    body.legal-page .legal-card {
        width: min(92vw, 980px);
        padding: clamp(36px, 5vw, 56px) clamp(20px, 5vw, 36px);
    }
}

 @media (max-width: 768px) {
    body.legal-page .legal-hero {
        min-height: 260px;
        padding: 80px 0 32px;
        text-align: left;
    }

    body.legal-page .legal-hero h1 {
        font-size: 24px;
        line-height: 1;
        text-align: left;
    }

    body.legal-page .legal-hero .legal-meta {
        font-size: clamp(12px, 3.6vw, 15px);
        text-align: left;
    }

    body.legal-page .legal-main {
        margin-top: 20px;
    }

    body.legal-page .impressum-shape-bottom {
        bottom: -20px;
    }

    body.legal-page .legal-section h2 {
        font-size: clamp(22px, 5.5vw, 28px);
        line-height: 1.25;
    }

    body.legal-page .legal-section h3 {
        font-size: clamp(17px, 4.6vw, 20px);
        line-height: 1.3;
    }

    body.legal-page .legal-section p,
    body.legal-page .legal-section address,
    body.legal-page .legal-section li {
        font-size: clamp(14px, 3.8vw, 15px);
        line-height: 1.65;
    }

    .footer-content {
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

 @media (max-width: 480px) {
    body.legal-page .legal-hero {
        min-height: 230px;
        padding: 70px 0 28px;
    }

    body.legal-page .legal-hero h1 {
        font-size: clamp(22px, 7vw, 20px);
        line-height: 1.2;
    }

    body.legal-page .legal-main {
        margin-top: 18px;
    }

    body.legal-page .impressum-shape-bottom {
        bottom: -18px;
    }

    body.legal-page .legal-card {
        padding: 24px 16px;
    }

    body.legal-page .legal-section h2 {
        font-size: clamp(20px, 6.5vw, 24px);
        line-height: 1.25;
        color: var(--primary-color);
    }

    body.legal-page .legal-section h3 {
        font-size: clamp(16px, 5.2vw, 17px);
        line-height: 1.3;
        color: var(--primary-color);
    }

    body.legal-page .legal-section p,
    body.legal-page .legal-section address,
    body.legal-page .legal-section li {
        font-size: clamp(14px, 4.4vw, 14.5px);
        line-height: 1.6;
        color: var(--primary-color);
    }
}

 @media print {
    body.legal-page .navigation,
    body.legal-page .legal-hero,
    .main-footer {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    body.legal-page .legal-card {
        width: 100% !important;
        padding: 0 !important;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 90%;
    }
}

 @media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

 html {
    scroll-behavior: smooth;
}

 .scroll-to-top {
    position: fixed;
    right: 16px;
    bottom: calc(40px + env(safe-area-inset-bottom, 0));
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: var(--primary-color, #004b8b);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    cursor: pointer;
    z-index: 1000;

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    filter: brightness(1.03);
}

.scroll-to-top:focus {
    outline: 3px solid rgba(0, 75, 139, .35);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .scroll-to-top {
        transition: none;
    }
}
