/* ============================================================
   IMMFIMA – RECHTLICHE SEITEN
   Verwendbar für:
   - Impressum
   - Datenschutz
   - Beschwerdemanagement
   - rechtliche Hinweise
============================================================ */

.legal-page {
    --legal-blue: #07396f;
    --legal-blue-dark: #052d58;
    --legal-gold: #c99a24;
    --legal-text: #24384e;
    --legal-muted: #66768a;
    --legal-border: #dce5ef;
    --legal-surface: #ffffff;
    --legal-background: #f5f8fc;
    --legal-notice-background: #fff9eb;

    min-height: 100vh;
    background: var(--legal-background);
    color: var(--legal-text);
}


/* ============================================================
   ALLGEMEINER CONTAINER
============================================================ */

.legal-page__container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}


/* ============================================================
   HERO
============================================================ */

.legal-page__hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 68px;
    background:
            radial-gradient(
                    circle at 85% 15%,
                    rgba(201, 154, 36, 0.17),
                    transparent 30%
            ),
            linear-gradient(
                    135deg,
                    var(--legal-blue-dark),
                    var(--legal-blue)
            );
    color: #ffffff;
}

.legal-page__hero::before {
    content: "";
    position: absolute;
    top: -130px;
    right: -80px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.legal-page__hero::after {
    content: "";
    position: absolute;
    right: 120px;
    bottom: -150px;
    width: 270px;
    height: 270px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.legal-page__hero .legal-page__container {
    position: relative;
    z-index: 1;
}

.legal-page__eyebrow {
    margin: 0 0 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--legal-gold);
}

.legal-page__hero h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: #ffffff;
}

.legal-page__intro {
    max-width: 740px;
    margin: 22px 0 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}


/* ============================================================
   INHALT
============================================================ */

.legal-page__content {
    padding-top: 48px;
    padding-bottom: 80px;
}


/* ============================================================
   KARTEN
============================================================ */

.legal-card {
    margin-bottom: 24px;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--legal-border);
    border-radius: 20px;
    background: var(--legal-surface);
    box-shadow: 0 14px 42px rgba(7, 57, 111, 0.07);
}

.legal-card:last-of-type {
    margin-bottom: 0;
}

.legal-card h2 {
    position: relative;
    margin: 0 0 26px;
    padding-bottom: 15px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.2;
    color: var(--legal-blue-dark);
}

.legal-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 58px;
    height: 3px;
    border-radius: 999px;
    background: var(--legal-gold);
}

.legal-card h3 {
    margin: 0 0 14px;
    font-size: 1.08rem;
    line-height: 1.4;
    color: var(--legal-blue-dark);
}

.legal-card p {
    margin: 0 0 16px;
    font-size: 0.98rem;
    line-height: 1.78;
    color: var(--legal-text);
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-card strong {
    color: var(--legal-blue-dark);
}

.legal-card address {
    margin: 0 0 20px;
    font-style: normal;
    line-height: 1.75;
    color: var(--legal-text);
}

.contact-phone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #25D366;
    border-radius: 8px;
    background: rgba(37, 211, 102, 0.08);
    color: #1b8f46;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.whatsapp-link:hover {
    background: #25D366;
    color: #ffffff;
    border-color: #25D366;
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.contact-phone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.contact-number {
    color: var(--legal-blue);
    font-weight: 750;
    letter-spacing: 0.01em;
}

.telefon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--legal-blue);
    border-radius: 8px;
    background: rgba(7, 57, 111, 0.05);
    color: var(--legal-blue);
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition:
            background 0.2s ease,
            color 0.2s ease,
            border-color 0.2s ease,
            transform 0.2s ease;
}

.telefon-link:hover {
    border-color: var(--legal-blue-dark);
    background: var(--legal-blue);
    color: #ffffff;
    transform: translateY(-1px);
}

.telefon-link:focus-visible {
    outline: 3px solid rgba(7, 57, 111, 0.2);
    outline-offset: 3px;
}

.telefon-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ============================================================
   LINKS
============================================================ */

.legal-page a {
    color: var(--legal-blue);
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.legal-page a:hover {
    color: var(--legal-gold);
}

.legal-page a:focus-visible {
    outline: 3px solid rgba(201, 154, 36, 0.35);
    outline-offset: 3px;
    border-radius: 3px;
}


/* ============================================================
   DETAILLISTEN
============================================================ */

.legal-details {
    margin: 26px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.legal-details > div {
    padding: 18px;
    border: 1px solid var(--legal-border);
    border-radius: 12px;
    background: #f9fbfd;
}

.legal-details dt {
    margin-bottom: 7px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--legal-muted);
}

.legal-details dd {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--legal-blue-dark);
}


/* ============================================================
   LISTEN
============================================================ */

.legal-list {
    margin: 18px 0 22px;
    padding: 0;
    list-style: none;
}

.legal-list li {
    position: relative;
    margin-bottom: 11px;
    padding-left: 29px;
    line-height: 1.7;
    color: var(--legal-text);
}

.legal-list li:last-child {
    margin-bottom: 0;
}

.legal-list li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(201, 154, 36, 0.13);
    color: var(--legal-gold);
    font-size: 0.72rem;
    font-weight: 900;
}


/* ============================================================
   HINWEISBOX
============================================================ */

.legal-notice {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid rgba(201, 154, 36, 0.35);
    border-left: 5px solid var(--legal-gold);
    border-radius: 14px;
    background: var(--legal-notice-background);
}

.legal-notice h3 {
    margin-bottom: 10px;
}

.legal-notice p {
    color: #594a23;
}


/* ============================================================
   UNTERABSCHNITTE
============================================================ */

.legal-subsection {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--legal-border);
}

.legal-subsection:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-subsection address {
    margin-bottom: 14px;
}


/* ============================================================
   KLEINGEDRUCKTES UND SEITENFUSS
============================================================ */

.legal-page__small-print {
    margin-top: 26px !important;
    padding: 16px 18px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 0.86rem !important;
    color: var(--legal-muted) !important;
}

.legal-page__footer {
    margin-top: 34px;
    padding: 24px 0 8px;
    border-top: 1px solid var(--legal-border);
    text-align: center;
}

.legal-page__footer p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--legal-muted);
}


/* ============================================================
   DATENSCHUTZ-SEITEN
   Bereits für datenschutz.php vorbereitet
============================================================ */

.legal-page__toc {
    margin-bottom: 28px;
    padding: 26px;
    border: 1px solid var(--legal-border);
    border-radius: 18px;
    background: var(--legal-surface);
    box-shadow: 0 12px 35px rgba(7, 57, 111, 0.05);
}

.legal-page__toc h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
    color: var(--legal-blue-dark);
}

.legal-page__toc ol {
    margin: 0;
    padding-left: 22px;
    columns: 2;
    column-gap: 50px;
}

.legal-page__toc li {
    margin-bottom: 9px;
    break-inside: avoid;
}

.legal-page__toc a {
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

.legal-table-wrap {
    width: 100%;
    margin: 22px 0;
    overflow-x: auto;
    border: 1px solid var(--legal-border);
    border-radius: 12px;
}

.legal-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: #ffffff;
}

.legal-table th,
.legal-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--legal-border);
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
}

.legal-table th {
    background: #f1f5f9;
    color: var(--legal-blue-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.legal-table td {
    font-size: 0.9rem;
}

.legal-table tr:last-child td {
    border-bottom: 0;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 760px) {

    .legal-page__container {
        width: min(100% - 28px, 1120px);
    }

    .legal-page__hero {
        padding: 58px 0 50px;
    }

    .legal-page__content {
        padding-top: 28px;
        padding-bottom: 55px;
    }

    .legal-card {
        margin-bottom: 18px;
        padding: 24px 18px;
        border-radius: 15px;
    }

    .legal-details {
        grid-template-columns: 1fr;
    }

    .legal-page__toc ol {
        columns: 1;
    }

}

@media (max-width: 480px) {

    .legal-page__hero h1 {
        font-size: 2.45rem;
    }

    .legal-card h2 {
        font-size: 1.45rem;
    }

    .legal-notice {
        padding: 20px 16px;
    }

}


/* ============================================================
   DRUCKANSICHT
============================================================ */

@media print {

    .legal-page {
        background: #ffffff;
        color: #000000;
    }

    .legal-page__hero {
        padding: 20px 0;
        background: #ffffff;
        color: #000000;
    }

    .legal-page__hero h1,
    .legal-page__intro,
    .legal-page__eyebrow {
        color: #000000;
    }

    .legal-card,
    .legal-page__toc {
        padding: 18px 0;
        border: 0;
        border-bottom: 1px solid #cccccc;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
    }

    .legal-card h2::after {
        background: #000000;
    }

    .legal-page a {
        color: #000000;
        text-decoration: none;
    }

    .legal-page__footer {
        border-top: 1px solid #000000;
    }

}