@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

.legal-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #1a202c;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    min-height: 100vh;
    position: relative;
}

.legal-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.legal-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 60px;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-top: 40px;
    margin-bottom: 40px;
    z-index: 1;
}

.legal-content-wrapper {
    flex: 1;
}

.legal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.legal-container::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* Animaciones sutiles */
@keyframes legal-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-container {
    animation: legal-fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.legal-p1 {
    margin: 0 0 24px 0;
    text-align: justify;
    font-size: 17px;
    font-weight: 400;
    color: #2d3748;
    line-height: 1.8;
    text-indent: 20px;
}

.legal-p1:first-of-type {
    text-indent: 0;
    font-weight: 600;
    color: #667eea;
    font-size: 18px;
}

.legal-p2 {
    margin: 0 0 16px 0;
    text-align: justify;
    font-size: 15px;
    font-weight: 300;
    color: #718096;
    min-height: 8px;
}

.legal-p3 {
    margin: 0 0 20px 0;
    text-align: justify;
    font-size: 15px;
    font-weight: 400;
    color: #2d3748;
    line-height: 1.7;
}

.legal-p4 {
    margin: 0 0 16px 24px;
    text-align: justify;
    font-size: 15px;
    font-weight: 300;
    color: #718096;
    min-height: 8px;
}

.legal-li3 {
    margin: 0 0 16px 0;
    text-align: justify;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.legal-li3::before {
    content: '';
    width: 6px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    flex-shrink: 0;
}

.legal-s1 {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
}

.legal-s1:hover {
    color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom-color: #764ba2;
    transform: translateY(-1px);
}

.legal-s2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
}

.legal-s3 {
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #a0aec0;
    font-weight: 400;
}

.legal-s4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.1em;
}

.legal-s5 {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    transition: all 0.3s ease;
}

.legal-s5:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.legal-body {
    counter-reset: legal-section;
}

.legal-ol1 {
    list-style: none;
    margin: 24px 0;
    padding: 0 0 0 50px;
}

.legal-ol1 li {
    counter-increment: legal-section;
    margin: 0 0 20px 0;
    padding: 0;
    position: relative;
}

.legal-ol1 li::before {
    content: counter(legal-section);
    position: absolute;
    left: -50px;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Estilo especial para el título principal */
.legal-main-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
    margin: 0 0 40px 0;
    padding: 0 0 20px 0;
    position: relative;
    width: 350px;
    flex-shrink: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.legal-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.legal-main-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    z-index: -1;
}

/* Mejoras para enlaces */
.legal-a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.legal-a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Tabla de cookies */
.legal-cookies-table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.legal-cookies-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 18px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.legal-cookies-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.legal-cookies-table td {
    padding: 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    color: #2d3748;
    vertical-align: top;
    transition: all 0.2s ease;
}

.legal-cookies-table tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-cookies-table tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.legal-cookies-table tr:last-child td {
    border-bottom: none;
}

.legal-cookies-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.legal-cookies-table tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

/* Responsive design */
@media (max-width: 1024px) {
    .legal-container {
        max-width: 95%;
        padding: 40px;
        gap: 40px;
    }
    
    .legal-main-title {
        width: 280px;
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .legal-body {
        padding: 20px 10px;
    }

    .legal-container {
        padding: 30px 20px;
        border-radius: 16px;
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .legal-main-title {
        font-size: 36px;
        text-align: center;
        width: 100%;
        margin-bottom: 30px;
    }

    .legal-main-title::before {
        display: none;
    }

    .legal-p1 {
        font-size: 16px;
        text-indent: 0;
    }

    .legal-p1:first-of-type {
        font-size: 17px;
    }

    .legal-li3 {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 0;
    }

    .legal-li3::before {
        width: 100%;
        height: 3px;
        border-radius: 2px;
    }

    .legal-cookies-table {
        font-size: 13px;
        margin: 30px 0;
    }

    .legal-cookies-table th,
    .legal-cookies-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .legal-body {
        padding: 15px 5px;
    }

    .legal-container {
        padding: 25px 15px;
        border-radius: 12px;
    }

    .legal-main-title {
        font-size: 28px;
    }

    .legal-p1 {
        font-size: 15px;
    }

    .legal-p1:first-of-type {
        font-size: 16px;
    }

    .legal-li3 {
        font-size: 16px;
    }

    .legal-cookies-table {
        font-size: 12px;
        border-radius: 12px;
    }

    .legal-cookies-table th,
    .legal-cookies-table td {
        padding: 10px 6px;
    }
}
