/* ── Legal pages (Terms, Privacy, Data Protection) ── */

.legal-page {
    background: #f8fafc;
    min-height: 60vh;
}

.legal-hero {
    background: linear-gradient(135deg, #1e4274 0%, #2a5a96 55%, #1d4373 100%);
    color: #fff;
    padding: 2.5rem 0 3rem;
}

.legal-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    margin-bottom: 1.75rem;
    opacity: 0.9;
}

.legal-breadcrumb a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.legal-breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.legal-breadcrumb span:last-child {
    color: rgba(255, 255, 255, 0.75);
}

.legal-hero__content {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 780px;
}

.legal-hero__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.legal-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.legal-hero__subtitle {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
    opacity: 0.92;
    max-width: 600px;
}

.legal-hero__date {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.legal-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-top: 1.75rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.35);
    border-radius: 12px;
    max-width: 780px;
}

.legal-alert i {
    color: #ffc107;
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.legal-alert p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.legal-body {
    padding: 2.5rem 0 4rem;
}

.legal-toc {
    position: sticky;
    top: 6rem;
    background: #fff;
    border: 1px solid rgba(30, 66, 116, 0.1);
    border-radius: 14px;
    padding: 1.35rem 1.25rem;
    box-shadow: 0 4px 20px rgba(30, 66, 116, 0.06);
}

.legal-toc__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1e4274;
    margin: 0 0 1rem;
}

.legal-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
}

.legal-toc__list li {
    counter-increment: toc;
    margin-bottom: 0.35rem;
}

.legal-toc__list a {
    display: block;
    padding: 0.45rem 0.65rem;
    font-size: 0.84rem;
    line-height: 1.35;
    color: #4a6278;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.legal-toc__list a::before {
    content: counter(toc) ". ";
    font-weight: 600;
    color: #1e4274;
}

.legal-toc__list a:hover,
.legal-toc__list a:focus {
    background: rgba(30, 66, 116, 0.06);
    color: #1e4274;
}

.legal-content {
    background: #fff;
    border: 1px solid rgba(30, 66, 116, 0.1);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 4px 24px rgba(30, 66, 116, 0.05);
}

.legal-intro {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(30, 66, 116, 0.1);
}

.legal-intro p {
    font-size: 1rem;
    line-height: 1.7;
    color: #3d5166;
    margin-bottom: 0.85rem;
}

.legal-intro p {
    font-size: 1rem;
    line-height: 1.7;
    color: #3d5166;
    margin-bottom: 0.85rem;
}

.legal-intro__heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 0.85rem;
}

.legal-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.legal-rights-card {
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(30, 66, 116, 0.1);
    border-radius: 12px;
    scroll-margin-top: 6rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-rights-card:hover {
    border-color: rgba(30, 66, 116, 0.2);
    box-shadow: 0 4px 16px rgba(30, 66, 116, 0.06);
}

.legal-rights-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e4274, #2a5a96);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.85rem;
}

.legal-rights-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 0.65rem;
    line-height: 1.35;
}

.legal-rights-card p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #3d5166;
    margin-bottom: 0.5rem;
}

.legal-rights-card .legal-list {
    margin-top: 0.5rem;
}

.legal-rights-card .legal-list li {
    font-size: 0.86rem;
    padding: 0.35rem 0 0.35rem 1.5rem;
}

.legal-section {
    padding: 1.75rem 0;
    border-bottom: 1px solid rgba(30, 66, 116, 0.08);
    scroll-margin-top: 6rem;
}

.legal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 1rem;
    line-height: 1.35;
}

.legal-section__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #1e4274, #2a5a96);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    flex-shrink: 0;
}

.legal-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3d5166;
    margin-bottom: 0.85rem;
}

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

.legal-list {
    list-style: none;
    margin: 0.75rem 0 1rem;
    padding: 0;
}

.legal-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    font-size: 0.94rem;
    line-height: 1.55;
    color: #3d5166;
}

.legal-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e4274;
}

.legal-list--cross li::before {
    content: "✕";
    width: auto;
    height: auto;
    background: none;
    color: #c0392b;
    font-size: 0.75rem;
    font-weight: 700;
    top: 0.6rem;
}

.legal-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.legal-callout--emergency {
    background: #fff5f5;
    border: 1px solid rgba(192, 57, 43, 0.2);
}

.legal-callout--emergency i {
    color: #c0392b;
    font-size: 1.15rem;
    margin-top: 0.1rem;
}

.legal-callout--emergency p {
    margin: 0;
    color: #922b21;
    font-weight: 500;
    font-size: 0.92rem;
}

.legal-callout--warning {
    background: #fffbf0;
    border: 1px solid rgba(243, 156, 18, 0.25);
}

.legal-callout--warning i {
    color: #f39c12;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.legal-callout--warning p {
    margin: 0;
    color: #7d6608;
    font-weight: 500;
    font-size: 0.92rem;
}

.legal-callout--positive {
    background: #f0faf4;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.legal-callout--positive i {
    color: #27ae60;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.legal-callout--positive p {
    margin: 0;
    color: #1e6f3f;
    font-weight: 500;
    font-size: 0.92rem;
}

.legal-subsection {
    margin: 1.25rem 0 1.5rem;
    padding: 1.15rem 1.25rem;
    background: rgba(30, 66, 116, 0.03);
    border-radius: 12px;
    border-left: 3px solid #1e4274;
}

.legal-subsection h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 0.75rem;
}

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

.legal-contact-card--inline {
    margin-top: 0.75rem;
    padding: 1rem 1.15rem;
}

.legal-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.55rem 1rem;
    background: rgba(30, 66, 116, 0.06);
    color: #1e4274;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.legal-inline-link:hover {
    background: rgba(30, 66, 116, 0.12);
    color: #16345c;
}

.legal-inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.legal-contact-card {
    background: linear-gradient(135deg, rgba(30, 66, 116, 0.04), rgba(42, 90, 150, 0.08));
    border: 1px solid rgba(30, 66, 116, 0.12);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 0.5rem;
}

.legal-contact-card__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.1rem;
    color: #1e4274;
    margin-bottom: 1rem;
}

.legal-contact-card__brand i {
    font-size: 1.35rem;
}

.legal-contact-card__details {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legal-contact-card__details li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.94rem;
}

.legal-contact-card__details i {
    color: #1e4274;
    width: 1.1rem;
    text-align: center;
}

.legal-contact-card__details a {
    color: #2a5a96;
    text-decoration: none;
    font-weight: 500;
}

.legal-contact-card__details a:hover {
    text-decoration: underline;
}

.legal-commitment-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(30, 66, 116, 0.05), rgba(42, 90, 150, 0.1));
    border: 1px solid rgba(30, 66, 116, 0.12);
    border-radius: 16px;
}

.legal-commitment-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e4274, #2a5a96);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.legal-commitment-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 1rem;
}

.legal-commitment-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3d5166;
    margin-bottom: 0.85rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.legal-commitment-card__footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(30, 66, 116, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.legal-commitment-card__footer strong {
    font-size: 1rem;
    color: #1e4274;
}

.legal-commitment-card__footer span {
    font-size: 0.88rem;
    color: #5a7a9a;
    font-style: italic;
}

.legal-steps {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    counter-reset: steps;
}

.legal-steps li {
    position: relative;
    padding: 0.65rem 0 0.65rem 2.75rem;
    font-size: 0.94rem;
    line-height: 1.55;
    color: #3d5166;
    border-bottom: 1px solid rgba(30, 66, 116, 0.06);
    counter-increment: steps;
}

.legal-steps li:last-child {
    border-bottom: none;
}

.legal-steps li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e4274, #2a5a96);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50%;
}

.legal-principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.legal-principles-card {
    padding: 1.25rem;
    background: rgba(30, 66, 116, 0.03);
    border: 1px solid rgba(30, 66, 116, 0.1);
    border-radius: 12px;
    scroll-margin-top: 6rem;
}

.legal-principles-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    background: linear-gradient(135deg, #1e4274, #2a5a96);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    margin-bottom: 0.65rem;
}

.legal-principles-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 0.65rem;
    line-height: 1.35;
}

.legal-principles-card p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #3d5166;
    margin-bottom: 0.5rem;
}

.legal-principles-card .legal-list {
    margin-top: 0.5rem;
}

.legal-principles-card .legal-inline-links {
    margin-top: 0.65rem;
}

.legal-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    background: rgba(30, 66, 116, 0.08);
    border: 1px solid rgba(30, 66, 116, 0.12);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e4274;
}

.legal-badge i {
    font-size: 0.82rem;
    opacity: 0.85;
}

.legal-section--closing {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-related {
    margin-top: 2rem;
}

.legal-related__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e4274;
    margin: 0 0 1rem;
}

.legal-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.legal-related__card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid rgba(30, 66, 116, 0.1);
    border-radius: 12px;
    color: #1e4274;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.legal-related__card:hover {
    border-color: rgba(30, 66, 116, 0.25);
    box-shadow: 0 6px 20px rgba(30, 66, 116, 0.08);
    transform: translateY(-2px);
    color: #16345c;
}

.legal-related__card > i:first-child {
    font-size: 1.1rem;
    opacity: 0.85;
}

.legal-related__arrow {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.legal-related__card:hover .legal-related__arrow {
    transform: translateX(4px);
    opacity: 1;
}

@media (max-width: 991.98px) {
    .legal-toc {
        position: static;
        margin-bottom: 0.5rem;
    }

    .legal-toc__list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.25rem 0.5rem;
    }

    .legal-content {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .legal-hero {
        padding: 2rem 0 2.5rem;
    }

    .legal-hero__content {
        flex-direction: column;
        gap: 1rem;
    }

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