.legal-page {
    background:
        radial-gradient(circle at top right, rgba(23, 165, 137, 0.08), transparent 26%),
        linear-gradient(180deg, #f8fafb 0%, #ffffff 320px, #f8fbfc 100%);
}

.legal-page-hero {
    padding: 176px 0 44px;
    position: relative;
}

.legal-page-hero::before,
.legal-page-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.legal-page-hero::before {
    inset: 72px auto auto 8%;
    width: 190px;
    height: 190px;
    background: rgba(23, 165, 137, 0.08);
    filter: blur(16px);
}

.legal-page-hero::after {
    inset: 48px 9% auto auto;
    width: 240px;
    height: 240px;
    background: rgba(26, 82, 118, 0.08);
    filter: blur(20px);
}

.legal-page-hero-inner,
.legal-content-inner,
.legal-nav .container {
    position: relative;
    z-index: 1;
}

.legal-page-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.legal-page-badge {
    margin-bottom: 20px;
}

.legal-page-title {
    font-size: clamp(36px, 5vw, 54px);
    color: var(--primary-dark);
    margin-bottom: 0;
}

.legal-nav {
    position: sticky;
    top: 110px;
    z-index: 90;
    padding-bottom: 18px;
}

.legal-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(26, 82, 118, 0.08);
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.08);
    backdrop-filter: blur(18px);
}

.legal-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    background: #f7fafc;
    border: 1px solid var(--border-light);
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
    color: var(--white);
    background: var(--gradient-accent);
    border-color: transparent;
    transform: translateY(-1px);
}

.legal-content {
    padding: 10px 0 90px;
}

.legal-content-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
}

.legal-group {
    scroll-margin-top: 190px;
    min-width: 0;
    max-width: 100%;
}

.legal-group-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    color: var(--white);
    background: linear-gradient(135deg, #0a2540 0%, #1a5276 60%, #17a589 100%);
    border-radius: 28px 28px 0 0;
}

.legal-group-header i {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #d9fff7;
    font-size: 22px;
    flex-shrink: 0;
}

.legal-group-header h2 {
    color: inherit;
    font-size: clamp(24px, 3vw, 32px);
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.legal-group-body {
    padding: 30px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(26, 82, 118, 0.08);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 22px 48px rgba(10, 37, 64, 0.08);
    min-width: 0;
}

.legal-section + .legal-section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
}

.legal-section h3 {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.legal-section,
.legal-group-header,
.legal-info-card,
.legal-contact-card,
.legal-note,
.legal-disclaimer {
    min-width: 0;
    max-width: 100%;
}

.legal-section p,
.legal-section li {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

.legal-section p + p {
    margin-top: 12px;
}

.legal-section ul {
    margin: 16px 0 0;
    padding-left: 22px;
}

.legal-section li + li {
    margin-top: 10px;
}

.legal-info-card,
.legal-contact-card {
    margin-top: 18px;
    padding: 22px 24px;
    border-radius: 20px;
    border: 1px solid rgba(23, 165, 137, 0.14);
    background: linear-gradient(180deg, #f8fbfc 0%, #ffffff 100%);
}

.legal-info-card h4,
.legal-contact-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-teal);
    font-family: 'Source Sans 3', sans-serif;
    margin-bottom: 10px;
}

.legal-contact-card {
    color: var(--white);
    background: linear-gradient(135deg, #0a2540 0%, #1a5276 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(10, 37, 64, 0.18);
}

.legal-contact-card h4,
.legal-contact-card p,
.legal-contact-card a {
    color: inherit;
}

.legal-contact-card strong {
    color: #f3d77a;
}

.legal-contact-card p + p {
    margin-top: 8px;
}

.legal-contact-card p {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    overflow-wrap: anywhere;
}

.legal-contact-card i {
    margin-right: 0;
    margin-top: 0.28em;
    color: #7ff0d7;
}

.legal-contact-card a,
.legal-page-title,
.legal-disclaimer p {
    overflow-wrap: anywhere;
}

.legal-contact-card a:hover {
    color: #f3d77a;
}

.legal-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    border-left: 4px solid transparent;
    font-size: 15px;
    line-height: 1.8;
}

.legal-note i {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.legal-note-info {
    background: #e8f8f5;
    border-left-color: var(--accent-teal);
    color: var(--text-dark);
}

.legal-note-info i {
    color: var(--accent-teal);
}

.legal-note-warning {
    background: #fdecec;
    border-left-color: #e74c3c;
    color: var(--text-dark);
}

.legal-note-warning i {
    color: #e74c3c;
}

.legal-table-wrap {
    margin-top: 18px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
}

.legal-table thead th {
    padding: 14px 16px;
    text-align: left;
    color: var(--white);
    background: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

.legal-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.98);
    font-size: 15px;
}

.legal-table tbody tr:nth-child(even) td {
    background: #f8fafb;
}

.legal-cookie-action {
    margin-top: 18px;
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    background: var(--gradient-accent);
    box-shadow: 0 12px 28px rgba(23, 165, 137, 0.2);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.legal-cookie-action:hover,
.legal-cookie-action:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(23, 165, 137, 0.26);
}

.legal-disclaimer {
    padding: 26px 28px;
    border-radius: 24px;
    background: #fdecec;
    border: 1px solid rgba(231, 76, 60, 0.16);
    box-shadow: 0 16px 34px rgba(10, 37, 64, 0.05);
}

.legal-disclaimer h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d63626;
    font-size: 22px;
    margin-bottom: 10px;
}

.legal-disclaimer p {
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-dark);
}

@media (max-width: 1200px) {
    .legal-nav {
        top: 98px;
    }
}

@media (max-width: 992px) {
    .legal-page-hero {
        padding-top: 160px;
    }

    .legal-nav {
        top: 82px;
    }

    .legal-nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legal-group-body {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .legal-page-title {
        font-size: 34px;
    }

    .legal-section p,
    .legal-section li {
        font-size: 15px;
    }

    .legal-group {
        scroll-margin-top: 170px;
    }

    .legal-group-header {
        padding: 20px 22px;
        align-items: flex-start;
    }

    .legal-group-header i {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .legal-group-body,
    .legal-disclaimer {
        padding: 22px 20px;
    }
}

@media (max-width: 576px) {
    .legal-page-hero {
        padding-top: 146px;
    }

    .legal-nav {
        position: static;
        padding-bottom: 10px;
    }

    .legal-nav-grid {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .legal-group {
        scroll-margin-top: 120px;
    }

    .legal-group-header,
    .legal-group-body {
        border-radius: 22px;
    }

    .legal-group-body {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .legal-group-header {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
        align-items: stretch;
    }

    .legal-group-header h2 {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: clamp(22px, 7vw, 28px);
        line-height: 1.22;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
    }

    .legal-section h3 {
        font-size: 20px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .legal-info-card,
    .legal-contact-card,
    .legal-note,
    .legal-disclaimer {
        padding: 18px 16px;
    }

    .legal-contact-card p {
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 8px;
    }

    .legal-cookie-action {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .legal-table {
        min-width: 480px;
    }
}
