/* ============================================
   PÁGINAS LEGALES - CSS
   Para Términos, Privacidad y páginas similares
   ============================================ */

/* Page Header */
.legal-page .page-header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(31, 41, 55, 0.3);
    grid-column: 1 / -1;
}

.legal-page .page-header h1 {
    font-size: 3rem;
    margin: 0 0 0.75rem 0;
    font-weight: 800;
}

.legal-page .page-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

/* Layout - SOLUCIÓN DEFINITIVA */
.legal-page > .container {
    max-width: 1400px;
    padding: 2rem 1.5rem 4rem 1.5rem;
}

.legal-page .container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Asegurar que page-header tome todo el ancho */
.legal-page > .container > .page-header {
    grid-column: 1 / -1;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
}

.toc-card h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toc-link {
    padding: 0.4rem 0.5rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.3;
}

.toc-link:hover {
    background: #f3f4f6;
    color: #1f2937;
    transform: translateX(4px);
}

.toc-link.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    font-weight: 600;
}

/* Legal Content */
.legal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
}

.legal-content article {
    max-width: 100%;
}

/* Sections */
.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f3f4f6;
    scroll-margin-top: 100px;
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #3b82f6;
}

.legal-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin: 2rem 0 1rem 0;
}

.legal-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4b5563;
    margin: 1.5rem 0 0.75rem 0;
}

.legal-section p {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1.25rem 0 1.25rem 2rem;
    line-height: 1.8;
}

.legal-section li {
    margin-bottom: 0.75rem;
    color: #4b5563;
    padding-left: 0.5rem;
}

.legal-section strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-section a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-section a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    text-align: center;
}

.service-item h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    color: #1f2937;
}

.service-item p {
    font-size: 0.9375rem;
    margin: 0;
    color: #6b7280;
}

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.highlight-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 0.75rem 0;
}

.highlight-box p {
    color: #1e40af;
    margin: 0;
    line-height: 1.7;
}

.highlight-box.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
}

.highlight-box.warning h4,
.highlight-box.warning p {
    color: #92400e;
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.warning-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0 0 0.75rem 0;
}

.warning-box p {
    color: #991b1b;
    margin: 0;
    line-height: 1.7;
    font-weight: 500;
}

/* Contact Info Box */
.contact-info-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 1rem 0;
}

.contact-info-box p {
    color: #065f46;
    margin: 0.5rem 0;
    line-height: 1.7;
}

.contact-info-box a {
    color: #059669;
    font-weight: 600;
}

.contact-info-box a:hover {
    color: #047857;
}

/* Acceptance Box */
.acceptance-box {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 3px solid #3b82f6;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.acceptance-box h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e40af;
    margin: 0 0 1rem 0;
}

.acceptance-box p {
    color: #1e40af;
    margin: 0.75rem 0;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .legal-page .container {
        grid-template-columns: 1fr;
    }

    .toc-sidebar {
        position: static;
        order: -1;
    }

    .toc-card {
        margin-bottom: 2rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-page .page-header h1 {
        font-size: 2rem;
    }

    .legal-content {
        padding: 2rem 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1.25rem;
    }

    .toc-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .legal-page .page-header {
        padding: 2rem 1.5rem;
    }

    .legal-content {
        padding: 1.5rem 1rem;
    }

    .legal-section ul,
    .legal-section ol {
        margin-left: 1.5rem;
    }

    .highlight-box,
    .warning-box,
    .contact-info-box,
    .acceptance-box {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .toc-sidebar,
    header,
    footer {
        display: none;
    }

    .legal-page .container {
        grid-template-columns: 1fr;
    }

    .legal-content {
        box-shadow: none;
        border: none;
    }

    .legal-section {
        page-break-inside: avoid;
    }
}