/* =============================================================
   legal.css — Páginas de Textos Legales
   ============================================================= */

/* ---- BODY ---- */
.legal-page-body {
    background-color: var(--bg-body);
    color: var(--color-gray-800);
    overflow-x: hidden;
}

/* ---- LOADER ---- */
#loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-body);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loader img {
    width: 200px;
}

.loader-progress-container {
    width: 250px;
    height: 4px;
    background: rgba(var(--color-primary-rgb), 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    animation: legalLoadProgress 0.6s ease-out forwards;
}

@keyframes legalLoadProgress {
    from { width: 0%; }
    to   { width: 100%; }
}


/* ---- MAIN WRAPPER ---- */
.legal-main {
    position: relative;
    background-color: var(--bg-body);
    min-height: 100vh;
}


/* ============================================================
   HERO — Legal
   ============================================================ */
.legal-hero {
    position: relative;
    min-height: 42vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 10rem 5% 8rem;
    overflow: hidden;
    background-color: var(--color-dark-bg);
}

/* Aurora layer 1 — tonos cálidos, composición centrada */
.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%,
            rgba(var(--color-aurora-pink-rgb), 0.32) 0%,
            transparent 60%),
        radial-gradient(ellipse 55% 50% at 10% 80%,
            rgba(var(--color-aurora-violet-rgb), 0.28) 0%,
            transparent 60%),
        radial-gradient(ellipse 45% 40% at 90% 75%,
            rgba(var(--color-primary-rgb), 0.18) 0%,
            transparent 55%);
    filter: blur(70px);
    animation: legalAurora1 22s ease-in-out infinite;
    z-index: 0;
    will-change: transform;
}

/* Aurora layer 2 — azul frío, sutil */
.legal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 45% at 75% 20%,
            rgba(var(--color-aurora-blue-rgb), 0.18) 0%,
            transparent 55%),
        radial-gradient(ellipse 40% 35% at 30% 60%,
            rgba(var(--color-primary-rgb), 0.15) 0%,
            transparent 50%);
    filter: blur(55px);
    animation: legalAurora2 28s ease-in-out infinite;
    z-index: 0;
    will-change: transform;
}

@keyframes legalAurora1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    35%       { transform: translate(-3%, 4%) scale(1.05); }
    70%       { transform: translate(4%, -3%) scale(0.97); }
}

@keyframes legalAurora2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    45%       { transform: translate(4%, -4%) scale(1.04); }
    80%       { transform: translate(-2%, 3%) scale(0.98); }
}

/* Viñeta */
.legal-hero__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 75% at 50% 50%,
        transparent 35%,
        rgba(var(--color-dark-bg-rgb), 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.legal-hero__line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(var(--color-primary-rgb), 0.35) 30%,
        rgba(var(--color-primary-rgb), 0.35) 70%,
        transparent 100%);
    z-index: 2;
}

.legal-hero__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 680px;
    width: 100%;
    animation: fadeIn 0.8s ease-out forwards;
}

.legal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(var(--color-primary-rgb), 0.14);
    border: 1px solid rgba(var(--color-primary-rgb), 0.32);
    border-radius: 999px;
    padding: 0.42rem 1.1rem;
    animation: slideDown 0.85s ease-out 0.1s forwards;
    opacity: 0;
}

.legal-hero__eyebrow i {
    color: var(--color-primary-light);
    font-size: 0.82rem;
}

.legal-hero__eyebrow-text {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    color: rgba(var(--color-white-rgb), 0.75);
    text-transform: uppercase;
}

.legal-hero__title {
    font-family: var(--font-primary);
    font-size: clamp(1.9rem, 4.5vw, 3.4rem);
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 0;
    animation: fadeInUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.22s forwards;
    opacity: 0;
}

.legal-hero__updated {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(var(--color-primary-rgb), 0.14);
    border: 1px solid rgba(var(--color-primary-rgb), 0.32);
    border-radius: 999px;
    padding: 0.42rem 1.1rem;
    animation: slideDown 0.85s ease-out 0.1s forwards;
    opacity: 0;
}

.legal-hero__updated i {
    color: var(--color-primary-light);
    font-size: 0.82rem;
}

.legal-hero__updated span {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    color: rgba(var(--color-white-rgb), 0.75);
    text-transform: uppercase;
}


/* ============================================================
   CUERPO DEL CONTENIDO LEGAL
   ============================================================ */
.legal-body {
    max-width: 1040px;
    margin: 0 auto;
    padding: 4rem 5% 7rem;
    position: relative;
    z-index: 1;
}

.legal-body::before {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    margin: 0 auto 3.5rem;
    opacity: 0.5;
}

.legal-intro {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem 1.5rem;
    border-left: 3px solid rgba(var(--color-primary-rgb), 0.4);
    background: rgba(var(--color-primary-rgb), 0.04);
    border-radius: 0 10px 10px 0;
    margin-bottom: 3rem;
}

.legal-intro p {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.6;
}

.legal-intro p strong {
    color: var(--color-gray-800);
    font-weight: 600;
}

.legal-content {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-gray);
}

.legal-content h2 {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--color-gray-800);
    margin: 3rem 0 1rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-content h2::before {
    content: attr(data-num);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.18);
    border: 1px solid rgba(var(--color-primary-rgb), 0.35);
    color: var(--color-primary-light);
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.legal-content h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(var(--color-primary-rgb), 0.2) 0%,
        transparent 100%);
}

.legal-content p {
    margin: 0 0 1.1rem;
}

.legal-content ul,
.legal-content ol {
    margin: 0.5rem 0 1.4rem;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.legal-content li {
    position: relative;
    padding-left: 1.4rem;
}

.legal-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary-light);
    opacity: 0.7;
}

.legal-content strong {
    color: var(--color-gray-800);
    font-weight: 600;
}

.legal-content em {
    color: var(--text-muted);
    font-style: italic;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.3);
    transition: color 0.25s ease, border-color 0.25s ease;
}

.legal-content a:hover {
    color: var(--color-primary-hover);
    border-color: var(--color-primary);
}

.legal-contact-block {
    margin-top: 3rem;
    padding: 1.5rem 1.75rem;
    background: rgba(var(--color-primary-rgb), 0.04);
    border: 1px solid rgba(var(--color-primary-rgb), 0.14);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-contact-block p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.legal-contact-block strong {
    color: var(--color-gray-800);
}

.legal-contact-block a {
    color: var(--color-primary);
    border-bottom: none;
    text-decoration: none;
    font-weight: 500;
}

.legal-contact-block a:hover {
    text-decoration: underline;
    color: var(--color-primary-hover);
}

/* Firma final */
.legal-signature {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.1);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .legal-hero {
        padding: 7.5rem 5% 3.5rem;
        min-height: 38vh;
    }

    .legal-body {
        padding: 3rem 5% 5rem;
    }

    .legal-content h2 {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        padding: 7rem 5% 3rem;
        min-height: 34vh;
    }

    .legal-hero__title {
        font-size: clamp(1.7rem, 8vw, 2.5rem);
    }

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

    .legal-content {
        font-size: 0.97rem;
        line-height: 1.8;
    }
}

/* ============================================================
   ANIMACIONES (compartidas con about)
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
