﻿/* =========================================================
   MÁGICOS MOMENTOS
   Páginas legales
   ========================================================= */

.legal-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    padding: 8.5rem 0 6rem;
    background: linear-gradient( 180deg, #08080a 0%, #0b0910 42%, #08080a 100% );
}

    .legal-page::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -3;
        background: linear-gradient( rgba(5, 5, 7, 0.8), rgba(5, 5, 7, 0.95) ), url("/images/backgrounds/hero-royal-purple.webp") center top / cover no-repeat;
        opacity: 0.65;
        pointer-events: none;
    }

    .legal-page::after {
        content: "";
        position: absolute;
        top: -20rem;
        left: 50%;
        z-index: -2;
        width: min(75rem, 100vw);
        height: 42rem;
        border-radius: 50%;
        background: radial-gradient( circle, rgba(212, 175, 55, 0.14), transparent 70% );
        filter: blur(55px);
        transform: translateX(-50%);
        pointer-events: none;
    }

    .legal-page .container {
        position: relative;
        z-index: 2;
    }


/* =========================================================
   CABECERA
   ========================================================= */

.legal-hero {
    max-width: 58rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.35rem;
    margin: 0 auto 4.5rem;
    text-align: center;
}

.legal-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

    .legal-hero__back:hover {
        color: #f5d76e;
        transform: translateX(-4px);
    }

.legal-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.62rem 1.05rem;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 999px;
    color: #e9c957;
    background: rgba(212, 175, 55, 0.085);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.legal-hero h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 7vw, 5.8rem);
    font-weight: 700;
    line-height: 1.01;
    letter-spacing: -0.045em;
}

    .legal-hero h1 span {
        display: block;
        color: #d4af37;
    }

.legal-hero__description {
    max-width: 45rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: clamp(1rem, 1.5vw, 1.08rem);
    line-height: 1.8;
}

.legal-hero__updated {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.72rem;
}


/* =========================================================
   DISTRIBUCIÓN
   ========================================================= */

.legal-layout {
    display: grid;
    grid-template-columns: minmax(14rem, 0.32fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 5rem);
}


/* =========================================================
   ÍNDICE
   ========================================================= */

.legal-index {
    position: sticky;
    top: 7.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 55px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

    .legal-index h2 {
        margin: 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .legal-index nav {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .legal-index a {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.55rem 0.65rem;
        border-radius: 0.7rem;
        color: rgba(255, 255, 255, 0.48);
        font-size: 0.75rem;
        line-height: 1.35;
        text-decoration: none;
        transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    }

        .legal-index a::before {
            content: "";
            width: 0.3rem;
            height: 0.3rem;
            flex: 0 0 auto;
            border-radius: 50%;
            background: #d4af37;
            opacity: 0.42;
        }

        .legal-index a:hover {
            color: #f5d76e;
            background: rgba(212, 175, 55, 0.075);
            transform: translateX(4px);
        }


/* =========================================================
   DOCUMENTO
   ========================================================= */

.legal-document {
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 2rem;
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.065), 0 40px 100px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.legal-intro {
    margin-bottom: 2.5rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(212, 175, 55, 0.19);
    border-radius: 1.2rem;
    color: rgba(255, 255, 255, 0.63);
    background: rgba(212, 175, 55, 0.055);
    font-size: 0.9rem;
    line-height: 1.75;
}

.legal-section {
    scroll-margin-top: 8rem;
    padding: 0 0 2.6rem;
    margin: 0 0 2.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

    .legal-section:last-child {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 0;
    }

    .legal-section h2 {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin: 0 0 1.2rem;
        color: #ffffff;
        font-family: Georgia, "Times New Roman", serif;
        font-size: clamp(1.55rem, 3vw, 2.1rem);
        line-height: 1.15;
    }

        .legal-section h2::before {
            content: "";
            width: 0.35rem;
            height: 1.75rem;
            flex: 0 0 auto;
            border-radius: 999px;
            background: linear-gradient( #f5d76e, #b8861f );
        }

    .legal-section h3 {
        margin: 1.6rem 0 0.7rem;
        color: rgba(255, 255, 255, 0.88);
        font-size: 1rem;
    }

    .legal-section p,
    .legal-section li {
        color: rgba(255, 255, 255, 0.58);
        font-size: 0.9rem;
        line-height: 1.82;
    }

    .legal-section p {
        margin: 0 0 1rem;
    }

    .legal-section ul,
    .legal-section ol {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        margin: 0.8rem 0 1.2rem;
        padding-left: 1.35rem;
    }

    .legal-section li::marker {
        color: #d4af37;
    }

    .legal-section strong {
        color: rgba(255, 255, 255, 0.86);
        font-weight: 750;
    }

    .legal-section a {
        color: #e9c957;
        text-decoration: none;
    }

        .legal-section a:hover {
            text-decoration: underline;
        }


/* =========================================================
   BLOQUES ESPECIALES
   ========================================================= */

.legal-callout {
    margin: 1.3rem 0;
    padding: 1.15rem 1.25rem;
    border-left: 3px solid #d4af37;
    border-radius: 0 1rem 1rem 0;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(212, 175, 55, 0.06);
    font-size: 0.85rem;
    line-height: 1.7;
}

.legal-warning {
    margin: 1.3rem 0;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(255, 150, 110, 0.25);
    border-radius: 1rem;
    color: #ffc0a6;
    background: rgba(255, 105, 70, 0.07);
    font-size: 0.82rem;
    line-height: 1.65;
}

.legal-contact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.035);
}

.legal-contact__icon {
    width: 3.2rem;
    height: 3.2rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    color: #f5d76e;
    background: rgba(212, 175, 55, 0.1);
}

.legal-contact__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

    .legal-contact__content small {
        color: rgba(255, 255, 255, 0.38);
        font-size: 0.7rem;
    }

    .legal-contact__content a {
        overflow: hidden;
        color: #ffffff;
        font-size: 0.9rem;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }

    .legal-index {
        position: relative;
        top: auto;
    }

        .legal-index nav {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
}

@media (max-width: 600px) {
    .legal-page {
        padding: 7.5rem 0 4.5rem;
    }

    .legal-hero {
        margin-bottom: 3rem;
    }

        .legal-hero h1 {
            font-size: clamp(2.7rem, 14vw, 4rem);
        }

    .legal-index nav {
        grid-template-columns: 1fr;
    }

    .legal-document {
        padding: 1.25rem;
        border-radius: 1.5rem;
    }

    .legal-section h2 {
        align-items: flex-start;
    }
}


/* =========================================================
   IMPRESIÓN
   ========================================================= */

@media print {
    .legal-page {
        padding: 0;
        color: #000000;
        background: #ffffff;
    }

        .legal-page::before,
        .legal-page::after,
        .legal-index,
        .legal-hero__back {
            display: none;
        }

    .legal-document {
        padding: 0;
        border: 0;
        color: #000000;
        background: #ffffff;
        box-shadow: none;
    }

    .legal-section p,
    .legal-section li,
    .legal-section h2,
    .legal-section h3,
    .legal-section strong {
        color: #000000;
    }
}
