/* ============================================
   LEGAL PAGES STYLES
   ============================================ */

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 40px;
}

.legal-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-date {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.legal-content {
    background: rgba(20, 15, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 50px;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section h2::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.legal-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--color-primary);
}

.legal-section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.legal-section ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.legal-section ul li {
    padding: 12px 0 12px 32px;
    position: relative;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.legal-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 18px;
}

.legal-section a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
}

.legal-section a:hover {
    color: var(--color-blue-light);
    border-bottom-color: var(--color-blue-light);
}

.legal-section strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Caja de resumen especial para privacidad */
.privacy-summary {
    margin-top: 40px;
    padding: 30px;
    background: rgba(74, 144, 226, 0.05);
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 16px;
}

.privacy-summary h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text);
}

.privacy-summary ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.privacy-summary ul li {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 14px;
}

.privacy-summary ul li::before {
    content: attr(data-icon);
    margin-right: 8px;
}

/* Efectos hover en secciones */
.legal-section {
    padding: 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.legal-section:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Tabla de contenidos (opcional) */
.table-of-contents {
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.table-of-contents h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents ul li {
    padding: 8px 0;
}

.table-of-contents ul li a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.table-of-contents ul li a:hover {
    color: var(--color-primary);
    transform: translateX(8px);
}

/* Nota importante */
.important-note {
    padding: 20px;
    background: rgba(230, 57, 70, 0.1);
    border-left: 4px solid var(--color-rocket);
    border-radius: 8px;
    margin: 24px 0;
}

.important-note p {
    color: var(--color-text);
    margin: 0;
}

/* Información destacada */
.info-box {
    padding: 20px;
    background: rgba(74, 144, 226, 0.1);
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    margin: 24px 0;
}

.info-box p {
    color: var(--color-text);
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-container {
        padding: 80px 20px;
    }
    
    .legal-title {
        font-size: 36px;
    }
    
    .legal-content {
        padding: 30px 24px;
    }
    
    .legal-section h2 {
        font-size: 24px;
    }
    
    .legal-section h3 {
        font-size: 18px;
    }
    
    .privacy-summary ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .legal-title {
        font-size: 28px;
    }
    
    .legal-content {
        padding: 24px 20px;
    }
    
    .legal-section h2 {
        font-size: 20px;
    }
    
    .legal-section p,
    .legal-section ul li {
        font-size: 14px;
    }
}

/* Animación de scroll */
.legal-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSection 0.6s ease-out forwards;
}

@keyframes fadeInSection {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-section:nth-child(1) { animation-delay: 0.1s; }
.legal-section:nth-child(2) { animation-delay: 0.15s; }
.legal-section:nth-child(3) { animation-delay: 0.2s; }
.legal-section:nth-child(4) { animation-delay: 0.25s; }
.legal-section:nth-child(5) { animation-delay: 0.3s; }
.legal-section:nth-child(6) { animation-delay: 0.35s; }
.legal-section:nth-child(7) { animation-delay: 0.4s; }
.legal-section:nth-child(8) { animation-delay: 0.45s; }
.legal-section:nth-child(9) { animation-delay: 0.5s; }
.legal-section:nth-child(10) { animation-delay: 0.55s; }
.legal-section:nth-child(11) { animation-delay: 0.6s; }
.legal-section:nth-child(12) { animation-delay: 0.65s; }
.legal-section:nth-child(13) { animation-delay: 0.7s; }

/* Botón volver arriba */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}
