/* Términos y Condiciones - Estilos Específicos */

/* Legal Header */
.legal-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--light);
    text-align: center;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.legal-update {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.legal-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.legal-nav-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--light);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.legal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.legal-nav-btn.active {
    background: var(--light);
    color: var(--primary);
    border-color: var(--light);
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    left: 0;
    top: 120px;
    width: 280px;
    height: calc(100vh - 120px);
    background: var(--light);
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 2rem 1rem;
    z-index: 100;
    transition: transform 0.3s;
}

.toc-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.toc-nav {
    display: flex;
    flex-direction: column;
}

.toc-nav a {
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.toc-nav a:hover {
    background: var(--light-gray);
    border-left-color: var(--primary);
    color: var(--primary);
}

.toc-nav a.active {
    background: var(--light-gray);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Main Content */
.legal-content {
    margin-left: 280px;
    padding: 60px 0;
    min-height: 100vh;
}

.legal-document {
    max-width: 900px;
    margin: 0 auto;
}

/* Highlights Section */
.highlights-box {
    background: var(--light);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.highlights-box h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.highlight-card {
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid;
}

.highlight-card.warning {
    background: #fff5f5;
    border-left-color: #ff6b6b;
}

.highlight-card.info {
    background: #f0f4ff;
    border-left-color: var(--primary);
}

.highlight-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.highlight-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.highlight-card p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Legal Sections */
.legal-section {
    background: var(--light);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.legal-section h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-gray);
}

.legal-section h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin: 1.5rem 0 1rem;
}

.legal-section p {
    line-height: 1.8;
    color: var(--dark);
    margin-bottom: 1rem;
}

.legal-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.legal-section ul ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

/* Critical Sections */
.legal-section.critical {
    border-left: 4px solid #ff6b6b;
    background: #fffbfb;
}

.legal-section.warning-section {
    border-left: 4px solid #ffa500;
    background: #fffaf0;
}

.legal-section.acceptance-section {
    border-left: 4px solid #4ecdc4;
    background: #f0fffe;
}

/* Special Boxes */
.important-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.important-notice strong {
    color: #856404;
}

.caps-notice {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.caps-notice p {
    font-weight: 600;
    color: #721c24;
    margin: 0;
}

.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 10px;
}

.warning-box strong {
    color: #856404;
    font-size: 1.1rem;
}

.warning-box ul {
    margin-top: 1rem;
}

.acceptance-box {
    background: #e7f5ff;
    border: 2px solid var(--accent);
    padding: 2rem;
    border-radius: 10px;
}

.acceptance-box strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.checklist {
    list-style: none;
    margin-left: 0;
}

.checklist li {
    padding-left: 0;
    font-weight: 500;
}

/* Final Notice */
.final-notice {
    background: #dc3545;
    color: var(--light);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    margin: 3rem 0;
}

.final-notice p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Legal Footer */
.legal-footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 2px solid var(--light-gray);
    margin-top: 3rem;
}

.legal-footer p {
    margin: 0.5rem 0;
    color: var(--gray);
}

.legal-footer em {
    color: var(--primary);
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: var(--light);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Links */
.legal-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .toc-sidebar {
        transform: translateX(-100%);
    }

    .toc-sidebar.open {
        transform: translateX(0);
    }

    .legal-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-update {
        font-size: 1rem;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .legal-section {
        padding: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1.2rem;
    }

    .toc-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .legal-nav,
    .toc-sidebar,
    .back-to-top,
    .footer {
        display: none;
    }

    .legal-content {
        margin-left: 0;
    }

    .legal-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .legal-header {
        background: none;
        color: #000;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--light);
}

/* Scrollbar Styling */
.toc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.toc-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}