/* ==========================================================================
   LEGALLYMAIL — Páginas legales · Diseño 2026
   Estilos compartidos por /terms, /privacy, /cookies y /specific-terms
   en todos los idiomas. El prefijo lm- evita colisiones con el resto del sitio.
   ========================================================================== */

.lm-terms-page {
    --lm-ink: #0b1220;
    --lm-navy: #101a30;
    --lm-blue: #2563eb;
    --lm-indigo: #4f46e5;
    --lm-cyan: #06b6d4;
    --lm-bg: #f5f7fb;
    --lm-line: #e6ebf3;
    --lm-muted: #64748b;
    background: var(--lm-bg);
    padding-bottom: 5rem;
    overflow: hidden;
}

.lm-terms-page *,
.lm-terms-page *::before,
.lm-terms-page *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.lm-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    padding: 4.75rem 0 7.5rem;
    background:
        radial-gradient(900px 520px at 10% -10%, rgba(79, 70, 229, .55), transparent 60%),
        radial-gradient(760px 480px at 90% 5%, rgba(6, 182, 212, .30), transparent 62%),
        linear-gradient(155deg, #0a1124 0%, #0d1b3a 48%, #0a142c 100%);
}

.lm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 88%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 88%);
    opacity: .5;
    z-index: -1;
}

.lm-hero::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: min(1100px, 92%);
    height: 90px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, .10), transparent 70%);
    pointer-events: none;
}

.lm-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.lm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #bfdbfe;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.lm-eyebrow i {
    color: #fbbf24;
}

.lm-hero h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.65rem);
    line-height: 1.08;
    letter-spacing: -.045em;
    font-weight: 800;
    margin: 0 0 1.1rem;
    background: linear-gradient(180deg, #ffffff 35%, #a9c6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lm-hero-sub {
    font-size: clamp(.98rem, 1.5vw, 1.12rem);
    line-height: 1.7;
    color: #b6c4dc;
    max-width: 700px;
    margin: 0 auto 1.9rem;
}

.lm-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
}

.lm-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #dbe6f7;
    font-size: .82rem;
    font-weight: 600;
}

.lm-meta-pill i {
    color: #67e8f9;
}

.lm-meta-pill strong {
    color: #fff;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   ESTRUCTURA: ÍNDICE + CONTENIDO
   -------------------------------------------------------------------------- */
.lm-layout {
    position: relative;
    z-index: 2;
    margin-top: -3.75rem;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.lm-toc {
    position: sticky;
    top: 100px;
}

.lm-toc-card {
    background: #fff;
    border: 1px solid var(--lm-line);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.lm-toc-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--lm-line);
    color: var(--lm-ink);
    font-weight: 800;
    font-size: .92rem;
}

.lm-toc-head i {
    color: var(--lm-blue);
}

.lm-toc-nav {
    padding: .7rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.lm-toc-link {
    display: block;
    padding: .5rem .7rem;
    border-radius: 9px;
    color: #475569;
    font-size: .83rem;
    line-height: 1.4;
    text-decoration: none;
    border-inline-start: 2px solid transparent;
    transition: background-color .2s ease, color .2s ease;
}

.lm-toc-link:hover,
.lm-toc-link.is-active {
    background: #eef4ff;
    color: var(--lm-blue);
    border-inline-start-color: var(--lm-blue);
}

.lm-toc-foot {
    border-top: 1px solid var(--lm-line);
    padding: .85rem 1.15rem;
    display: grid;
    gap: .55rem;
    background: #fbfcfe;
}

.lm-toc-foot a {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #475569;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.lm-toc-foot a:hover {
    color: var(--lm-blue);
}

.lm-toc-foot i {
    color: #94a3b8;
    width: 14px;
    text-align: center;
}

.lm-content-card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--lm-line);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .07);
    padding: 2.75rem 3rem;
}

/* Aviso de documento oficial */
.lm-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef4ff 0%, #f5f3ff 100%);
    border: 1px solid #dbe6ff;
    margin-bottom: 2.25rem;
}

.lm-notice-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    color: var(--lm-blue);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .12);
}

.lm-notice strong {
    display: block;
    color: var(--lm-ink);
    font-size: .95rem;
}

.lm-notice p {
    margin: .2rem 0 0;
    color: #475569;
    font-size: .86rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   CONTENIDO LEGAL
   -------------------------------------------------------------------------- */
.lm-article {
    counter-reset: lm-sec;
}

.lm-article .legal-content h2 {
    counter-increment: lm-sec;
    position: relative;
    display: flex;
    align-items: center;
    gap: .85rem;
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 1.32rem;
    line-height: 1.3;
    letter-spacing: -.02em;
    color: var(--lm-ink);
    margin: 2.75rem 0 1.15rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--lm-line);
    scroll-margin-top: 105px;
}

.lm-article .legal-content h2:first-child {
    margin-top: 0;
}

.lm-article .legal-content h2::before {
    content: counter(lm-sec, decimal-leading-zero);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .35rem;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .25);
    -webkit-text-fill-color: #fff;
}

.lm-article .legal-content p {
    color: #475569;
    font-size: .96rem;
    line-height: 1.85;
    margin: 0 0 1rem;
    text-align: justify;
}

.lm-article .legal-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.3rem;
    display: grid;
    gap: .55rem;
}

.lm-article .legal-content li {
    position: relative;
    padding-inline-start: 1.7rem;
    color: #475569;
    font-size: .94rem;
    line-height: 1.7;
}

.lm-article .legal-content li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: .62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lm-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.lm-article .legal-content strong {
    color: var(--lm-ink);
    font-weight: 700;
}

.lm-article .legal-content a {
    color: var(--lm-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.lm-article .legal-content a:hover {
    color: var(--lm-indigo);
}

/* --------------------------------------------------------------------------
   CTA FINAL Y DOCUMENTOS RELACIONADOS
   -------------------------------------------------------------------------- */
.lm-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.4rem;
    margin-top: 3rem;
    padding: 2rem 2.2rem;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, #101a30 0%, #1e3a8a 58%, #2563eb 100%);
}

.lm-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, .7), transparent 70%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, .7), transparent 70%);
    pointer-events: none;
}

.lm-cta-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 1.3rem;
    color: #fbbf24;
}

.lm-cta-copy {
    position: relative;
    z-index: 1;
    flex: 1 1 300px;
}

.lm-cta h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.18rem;
    font-weight: 800;
    margin: 0 0 .35rem;
}

.lm-cta p {
    margin: 0;
    color: #cbd8ee;
    font-size: .9rem;
    line-height: 1.6;
}

.lm-cta-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .72rem 1.2rem;
    border-radius: 11px;
    background: #fff;
    color: #1d4ed8;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
    transition: transform .2s ease, box-shadow .2s ease;
}

.lm-cta-btn:hover {
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
}

.lm-related {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1.5rem;
}

.lm-related a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--lm-line);
    color: #475569;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.lm-related a:hover {
    color: var(--lm-blue);
    border-color: #bfdbfe;
    transform: translateY(-1px);
}

.lm-related i {
    color: var(--lm-blue);
}

/* Subapartados (p. ej. 2.1. Datos recogidos) */
.lm-toc-link.lm-toc-sub {
    padding-inline-start: 1.6rem;
    font-size: .78rem;
    color: #94a3b8;
}

.lm-toc-foot a.is-current {
    color: var(--lm-blue);
}

.lm-toc-foot a.is-current i {
    color: var(--lm-blue);
}

.lm-article .legal-content section {
    margin: 0 0 1.75rem;
    padding: 0 !important;
}

.lm-article .legal-content h3 {
    color: #1e3a8a;
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 1.6rem 0 .8rem;
    scroll-margin-top: 105px;
}

.lm-article .legal-content .table-responsive {
    margin: 1.25rem 0 1.5rem;
    border: 1px solid var(--lm-line);
    border-radius: 14px;
    overflow: hidden;
}

.lm-article .legal-content .table {
    margin: 0;
    font-size: .87rem;
}

.lm-article .legal-content .table th {
    background: #f1f5fb;
    color: var(--lm-ink);
    font-weight: 700;
    border-color: var(--lm-line);
    padding: .8rem .9rem;
}

.lm-article .legal-content .table td {
    border-color: var(--lm-line);
    color: #475569;
    padding: .8rem .9rem;
    vertical-align: top;
}

.lm-article .legal-content .table tbody tr:nth-child(even) {
    background: #fafbfe;
}

.lm-article .legal-content .card.bg-light {
    background: #f8fafc !important;
    border: 1px solid var(--lm-line);
    border-radius: 16px;
    padding: .4rem;
}

.lm-article .legal-content .card.bg-light .card-body {
    padding: 1.4rem;
}

.lm-article .legal-content .form-check-label {
    color: var(--lm-ink);
    font-size: .91rem;
    cursor: pointer;
}

.lm-article .legal-content .form-check-input:checked {
    background-color: var(--lm-blue);
    border-color: var(--lm-blue);
}

.lm-article .legal-content .alert {
    border-radius: 14px;
    background: #eef4ff !important;
    border: 1px solid #dbe6ff !important;
    color: #334155;
    margin: 1.25rem 0;
}

.lm-article .legal-content .alert h4 {
    color: #1e3a8a;
}

/* Panel de configuración de cookies (sección 6) */
.lm-article .legal-content .lm-cookie-actions {
    gap: .6rem;
    margin-top: 1rem;
}

.lm-cookie-status {
    display: none;
    margin: .9rem 0 0;
    padding: .7rem 1rem;
    border-radius: 10px;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.5;
}

.lm-cookie-status.is-ok {
    display: block;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.lm-cookie-status.is-error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* --------------------------------------------------------------------------
   RTL (ÁRABE)
   -------------------------------------------------------------------------- */
[dir="rtl"] .lm-hero,
[dir="rtl"] .lm-toc-head,
[dir="rtl"] .lm-cta {
    text-align: right;
}

[dir="rtl"] .lm-article .legal-content h2 {
    text-align: right;
}

[dir="rtl"] .lm-article .legal-content li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .lm-cta::after {
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, .7), transparent 70%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, .7), transparent 70%);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .lm-layout {
        grid-template-columns: 1fr;
        margin-top: -3rem;
    }

    .lm-toc {
        position: static;
    }

    .lm-toc-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }

    .lm-content-card {
        padding: 2.25rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .lm-terms-page {
        padding-bottom: 3rem;
    }

    .lm-hero {
        padding: 3.25rem 0 6rem;
    }

    .lm-hero h1 {
        font-size: 2rem;
    }

    .lm-hero-sub {
        font-size: .93rem;
    }

    .lm-hero-meta {
        gap: .45rem;
    }

    .lm-meta-pill {
        font-size: .75rem;
        padding: .45rem .75rem;
    }

    .lm-toc-nav {
        grid-template-columns: 1fr;
    }

    .lm-content-card {
        padding: 1.6rem 1.2rem;
        border-radius: 16px;
    }

    .lm-article .legal-content h2 {
        font-size: 1.1rem;
        gap: .6rem;
    }

    .lm-article .legal-content h2::before {
        min-width: 32px;
        height: 32px;
        font-size: .68rem;
    }

    .lm-article .legal-content p,
    .lm-article .legal-content li {
        font-size: .9rem;
    }

    .lm-article .legal-content .table {
        font-size: .78rem;
    }

    .lm-article .legal-content .table th,
    .lm-article .legal-content .table td {
        padding: .55rem .6rem;
    }

    .lm-cta {
        padding: 1.5rem;
    }
}
