/* ==========================================================================
   Markad Publicidad Estudio — Documento legal
   ========================================================================== */

.mk-legal-document {
    --legal-dark: var(--color-primary, #0b143d);
    --legal-dark-soft: #121d50;
    --legal-accent: var(--color-accent, #bd32d4);
    --legal-text: #20263a;
    --legal-muted: #667085;
    --legal-line: #e2e6ef;
    --legal-surface: #ffffff;
    --legal-surface-soft: #f7f8fc;
    --legal-warning-text: #6b4d05;
    --legal-warning-line: #e8cd87;
    --legal-warning-surface: #fff9e9;

    position: relative;
    overflow: clip;
    color: var(--legal-text);
    background: var(--legal-surface);
}


/* ==========================================================================
   Hero legal
   ========================================================================== */

.mk-legal-document__hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(4.5rem, 8vw, 7.5rem);
    color: #ffffff;
    background: var(--legal-dark);
}

/* Sin círculos decorativos */

.mk-legal-document__hero::before,
.mk-legal-document__hero::after {
    display: none;
    content: none;
}

.mk-legal-document__hero-container {
    position: relative;
    z-index: 1;
}


/* ==========================================================================
   Volver al inicio
   ========================================================================== */

.mk-legal-document__back {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    margin: 0 0 2.25rem;
    color: rgb(255 255 255 / 76%);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.mk-legal-document__back:hover,
.mk-legal-document__back:focus-visible {
    color: #ffffff;
    transform: translateX(-3px);
}

.mk-legal-document__back-icon {
    display: grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    color: var(--legal-accent);
}

.mk-legal-document__back-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mk-legal-document__back-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================================
   Etiqueta superior
   ========================================================================== */

.mk-legal-document__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    margin: 0 0 1.25rem;
    color: var(--legal-accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.3;
    text-transform: uppercase;
}

.mk-legal-document__eyebrow::before {
    width: 2rem;
    height: 2px;
    flex: 0 0 2rem;
    background: currentColor;
    content: "";
}


/* ==========================================================================
   Volver al inicio
   ========================================================================== */

.mk-legal-document__back {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    margin-bottom: 2.25rem;
    color: rgb(255 255 255 / 76%);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.mk-legal-document__back:hover,
.mk-legal-document__back:focus-visible {
    color: #ffffff;
    transform: translateX(-3px);
}

.mk-legal-document__back-icon {
    display: grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    color: var(--legal-accent);
}

.mk-legal-document__back-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mk-legal-document__back-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================================
   Introducción del documento
   ========================================================================== */

.mk-legal-document__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    color: var(--legal-accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.3;
    text-transform: uppercase;
}

.mk-legal-document__eyebrow::before {
    width: 2rem;
    height: 2px;
    flex: 0 0 2rem;
    background: currentColor;
    content: "";
}

.mk-legal-document__title {
    max-width: 900px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.65rem, 6vw, 5.5rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 1;
    text-wrap: balance;
}

.mk-legal-document__subtitle {
    max-width: 760px;
    margin: 1.6rem 0 0;
    color: rgb(255 255 255 / 76%);
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    line-height: 1.75;
}

.mk-legal-document__metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.mk-legal-document__metadata-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 2.35rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 999px;
    color: rgb(255 255 255 / 78%);
    background: rgb(255 255 255 / 5%);
    font-size: 0.79rem;
    font-weight: 650;
}

.mk-legal-document__metadata-item strong {
    color: #ffffff;
    font-weight: 800;
}


/* ==========================================================================
   Contenedor general
   ========================================================================== */

.mk-legal-document__container {
    position: relative;
}


/* ==========================================================================
   Aviso de borrador
   ========================================================================== */

.mk-legal-document__notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--legal-warning-line);
    border-radius: 0.9rem;
    color: var(--legal-warning-text);
    background: var(--legal-warning-surface);
}

.mk-legal-document__notice-icon {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    margin-top: 0.1rem;
    color: #a36d00;
}

.mk-legal-document__notice-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mk-legal-document__notice-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mk-legal-document__notice strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #4e3803;
    font-size: 0.9rem;
}

.mk-legal-document__notice p {
    margin: 0;
    color: var(--legal-warning-text);
    font-size: 0.88rem;
    line-height: 1.6;
}


/* ==========================================================================
   Distribución principal
   ========================================================================== */

.mk-legal-document__layout {
    display: grid;
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    padding-block: clamp(4rem, 8vw, 7rem);
}

.mk-legal-document__sidebar {
    min-width: 0;
}


/* ==========================================================================
   Navegación lateral
   ========================================================================== */

.mk-legal-document__navigation {
    position: sticky;
    top: 7rem;
    max-height: calc(100vh - 8.5rem);
    overflow-y: auto;
    padding-right: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: var(--legal-line) transparent;
}

.mk-legal-document__navigation-title {
    display: block;
    margin-bottom: 1.15rem;
    color: var(--legal-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mk-legal-document__navigation-list {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--legal-line);
    list-style: none;
}

.mk-legal-document__navigation-list li {
    margin: 0;
    padding: 0;
}

.mk-legal-document__navigation-list a {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.66rem 0.9rem 0.66rem 1.1rem;
    border-radius: 0 0.55rem 0.55rem 0;
    color: var(--legal-muted);
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.mk-legal-document__navigation-list a::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    background: transparent;
    content: "";
}

.mk-legal-document__navigation-list a > span {
    flex: 0 0 auto;
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.mk-legal-document__navigation-list a:hover,
.mk-legal-document__navigation-list a:focus-visible {
    color: var(--legal-dark);
    background: var(--legal-surface-soft);
    transform: translateX(3px);
}

.mk-legal-document__navigation-list a.is-active {
    color: var(--legal-accent);
    background: rgb(189 50 212 / 7%);
}

.mk-legal-document__navigation-list a.is-active::before {
    background: var(--legal-accent);
}


/* ==========================================================================
   Contenido
   ========================================================================== */

.mk-legal-document__content {
    min-width: 0;
}

.mk-legal-document__section {
    position: relative;
    padding-block: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid var(--legal-line);
    scroll-margin-top: 8rem;
}

.mk-legal-document__section:first-child,
.mk-legal-document__section--summary {
    padding-top: 0;
    border-top: 0;
}

.mk-legal-document__section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    padding-inline: 0.45rem;
    border: 1px solid rgb(189 50 212 / 22%);
    border-radius: 999px;
    color: var(--legal-accent);
    background: rgb(189 50 212 / 6%);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
}

.mk-legal-document__section h2 {
    max-width: 790px;
    margin: 0 0 1.25rem;
    color: var(--legal-dark);
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.16;
    text-wrap: balance;
}

.mk-legal-document__section p {
    max-width: 800px;
    margin: 0 0 1rem;
    color: var(--legal-muted);
    font-size: 1rem;
    line-height: 1.82;
}

.mk-legal-document__section p:last-of-type {
    margin-bottom: 0;
}

.mk-legal-document__section a:not(
    .mk-legal-document__section-top
) {
    color: var(--legal-accent);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.mk-legal-document__section a:not(
    .mk-legal-document__section-top
):hover,
.mk-legal-document__section a:not(
    .mk-legal-document__section-top
):focus-visible {
    color: var(--legal-dark);
}


/* ==========================================================================
   Datos del titular
   ========================================================================== */

.mk-legal-document__holder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.75rem 0 0;
}

.mk-legal-document__holder div {
    min-width: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--legal-line);
    border-radius: 0.85rem;
    background: var(--legal-surface-soft);
}

.mk-legal-document__holder dt {
    margin-bottom: 0.4rem;
    color: var(--legal-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mk-legal-document__holder dd {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--legal-dark);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.55;
}

.mk-legal-document__holder a {
    color: var(--legal-accent);
    text-decoration: none;
}

.mk-legal-document__holder a:hover,
.mk-legal-document__holder a:focus-visible {
    color: var(--legal-dark);
}


/* ==========================================================================
   Listas legales
   ========================================================================== */

.mk-legal-document__list {
    display: grid;
    gap: 0.85rem;
    max-width: 800px;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.mk-legal-document__list li {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    align-items: start;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    color: var(--legal-muted);
    line-height: 1.7;
}

.mk-legal-document__list-icon {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.17rem;
    border-radius: 50%;
    color: #ffffff;
    background: var(--legal-accent);
}

.mk-legal-document__list-icon svg {
    display: block;
    width: 0.76rem;
    height: 0.76rem;
}

.mk-legal-document__list-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================================
   Volver arriba
   ========================================================================== */

.mk-legal-document__section-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    margin-top: 1.5rem;
    color: var(--legal-accent);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.mk-legal-document__section-top svg {
    display: block;
    width: 0.95rem;
    max-width: 0.95rem;
    height: 0.95rem;
    max-height: 0.95rem;
    flex: 0 0 0.95rem;
    overflow: visible;
}

.mk-legal-document__section-top svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mk-legal-document__section-top:hover,
.mk-legal-document__section-top:focus-visible {
    color: var(--legal-dark);
    transform: translateY(-2px);
}


/* ==========================================================================
   Foco accesible
   ========================================================================== */

.mk-legal-document a:focus-visible {
    outline: 3px solid rgb(189 50 212 / 35%);
    outline-offset: 4px;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 980px) {
    .mk-legal-document__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .mk-legal-document__navigation {
        position: static;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 0.65rem;
    }

    .mk-legal-document__navigation-title {
        margin-bottom: 0.8rem;
    }

    .mk-legal-document__navigation-list {
        display: flex;
        width: max-content;
        gap: 0.5rem;
        border-left: 0;
    }

    .mk-legal-document__navigation-list a {
        min-height: 2.65rem;
        padding: 0.72rem 1rem;
        border: 1px solid var(--legal-line);
        border-radius: 999px;
        white-space: nowrap;
    }

    .mk-legal-document__navigation-list a::before {
        display: none;
    }

    .mk-legal-document__navigation-list a:hover,
    .mk-legal-document__navigation-list a:focus-visible {
        transform: none;
    }

    .mk-legal-document__navigation-list a.is-active {
        border-color: var(--legal-accent);
    }
}


/* ==========================================================================
   Móvil
   ========================================================================== */

@media (max-width: 640px) {
   
    .mk-legal-document__title {
        font-size: clamp(2.3rem, 12vw, 3.6rem);
        line-height: 1;
    }

    .mk-legal-document__subtitle {
        line-height: 1.65;
    }

    .mk-legal-document__metadata {
        gap: 0.5rem;
    }

    .mk-legal-document__metadata-item {
        min-height: 2.15rem;
        padding: 0.48rem 0.75rem;
        font-size: 0.74rem;
    }

    .mk-legal-document__notice {
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 1rem;
    }

    .mk-legal-document__layout {
        padding-block: 3.5rem;
    }

    .mk-legal-document__section {
        scroll-margin-top: 6rem;
    }

    .mk-legal-document__section p {
        line-height: 1.72;
    }

    .mk-legal-document__holder {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ==========================================================================
   Movimiento reducido
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .mk-legal-document *,
    .mk-legal-document *::before,
    .mk-legal-document *::after {
        scroll-behavior: auto;
        transition-duration: 0.01ms;
    }
}


/* ==========================================================================
   Impresión
   ========================================================================== */

@media print {
    .mk-legal-document {
        overflow: visible;
        color: #000000;
        background: #ffffff;
    }

    .mk-legal-document__hero {
        padding-block: 1.5rem;
        color: #000000;
        background: #ffffff;
    }

    .mk-legal-document__hero::before,
    .mk-legal-document__hero::after,
    .mk-legal-document__back,
    .mk-legal-document__navigation,
    .mk-legal-document__section-top {
        display: none;
    }

    .mk-legal-document__title,
    .mk-legal-document__eyebrow {
        color: #000000;
    }

    .mk-legal-document__subtitle,
    .mk-legal-document__metadata-item {
        color: #333333;
    }

    .mk-legal-document__metadata-item {
        border-color: #cccccc;
        background: #ffffff;
    }

    .mk-legal-document__notice {
        border-color: #999999;
        color: #000000;
        background: #ffffff;
    }

    .mk-legal-document__layout {
        display: block;
        padding-block: 1.5rem;
    }

    .mk-legal-document__section {
        break-inside: avoid;
    }

    .mk-legal-document__holder div {
        border-color: #cccccc;
        background: #ffffff;
    }
}

/* ==========================================================================
   Blindaje del hero frente a estilos globales
   ========================================================================== */

.mk-legal-document .mk-legal-document__hero {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    padding: clamp(4.5rem, 8vw, 7.5rem) 0;
    color: #ffffff;
    background-color: var(--legal-dark);
    background-image: none;
    isolation: isolate;
}

/* Eliminar cualquier decoración heredada */

.mk-legal-document .mk-legal-document__hero::before,
.mk-legal-document .mk-legal-document__hero::after {
    display: none;
    width: 0;
    height: 0;
    border: 0;
    background: none;
    content: none;
}

/* Evitar que mk-container convierta el contenido en fila */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container {
    position: relative;
    z-index: 1;
    display: block;
    width: min(calc(100% - 3rem), 1240px);
    max-width: 1240px;
    margin-right: auto;
    margin-left: auto;
    padding: 0;
}


/* Volver al inicio en una fila independiente */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__back {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 2.5rem;
    padding: 0;
    color: rgb(255 255 255 / 76%);
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}


/* Icono del enlace */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__back
.mk-legal-document__back-icon {
    display: grid;
    place-items: center;
    width: 1.15rem;
    min-width: 1.15rem;
    max-width: 1.15rem;
    height: 1.15rem;
    min-height: 1.15rem;
    max-height: 1.15rem;
    flex: 0 0 1.15rem;
    padding: 0;
    color: var(--legal-accent);
    background: transparent;
    border: 0;
}

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__back-icon
svg {
    display: block;
    width: 1.15rem;
    max-width: 1.15rem;
    height: 1.15rem;
    max-height: 1.15rem;
}

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__back-icon
svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Etiqueta legal debajo del enlace */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__eyebrow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 1.25rem;
    padding: 0;
    color: var(--legal-accent);
    background: transparent;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1.3;
    text-transform: uppercase;
}

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__eyebrow::before {
    display: block;
    width: 2rem;
    min-width: 2rem;
    height: 2px;
    flex: 0 0 2rem;
    border: 0;
    border-radius: 0;
    background: currentColor;
    content: "";
}


/* Título */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__title {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0;
    padding: 0;
    color: #ffffff;
    background: transparent;
    font-size: clamp(2.65rem, 6vw, 5.5rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 1;
}


/* Descripción */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__subtitle {
    display: block;
    width: 100%;
    max-width: 760px;
    margin: 1.6rem 0 0;
    padding: 0;
    color: rgb(255 255 255 / 76%);
    background: transparent;
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    line-height: 1.75;
}


/* Metadata */

.mk-legal-document
.mk-legal-document__hero
.mk-legal-document__hero-container
> .mk-legal-document__metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 2rem 0 0;
    padding: 0;
}


/* ==========================================================================
   Blindaje responsive
   ========================================================================== */

@media (max-width: 640px) {
    .mk-legal-document .mk-legal-document__hero {
        padding: 3.5rem 0 4rem;
    }

    .mk-legal-document
    .mk-legal-document__hero
    .mk-legal-document__hero-container {
        width: min(calc(100% - 2rem), 1240px);
    }

    .mk-legal-document
    .mk-legal-document__hero
    .mk-legal-document__hero-container
    > .mk-legal-document__back {
        margin-bottom: 2rem;
    }

    .mk-legal-document
    .mk-legal-document__hero
    .mk-legal-document__hero-container
    > .mk-legal-document__title {
        font-size: clamp(2.3rem, 12vw, 3.6rem);
    }
}