/* Estilos específicos para páginas legales */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

/* Navegación */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #1d4ed8 !important;
}

/* Header de páginas legales */
.legal-header {
    background: #2563eb; /* Color azul base */
    color: white;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.legal-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

.legal-header p {
    font-size: 0.95rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.legal-header .last-updated {
    display: block;
    margin: 1rem;
    font-style: italic;
    font-size: 0.85rem;
    background: #ffffffc4;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Introducción legal */
.legal-intro {
    background: #2563eb24;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Contenido principal */
.legal-content {
    padding: 3rem 0;
    background-color: #fafbfc;
}

.content-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.content-section h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 1.5rem 0 0.8rem;
}

.content-section p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.7;
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    position: relative;
}

.content-section li::marker {
    color: var(--primary-color);
}

/* Cajas destacadas */
.highlight-box {
    background-color: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.highlight-box::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.warning-box {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.warning-box::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--warning-color);
    margin-right: 0.5rem;
}

/* Enlaces de navegación */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background-color: transparent;
}

.back-link:hover {
    color: #1d4ed8;
    background-color: var(--light-bg);
    transform: translateX(-5px);
}

.back-link i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* Información de última actualización */
.last-updated {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
    font-style: italic;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #cbd5e1;
}

/* Tabla de contenidos (opcional) */
.table-of-contents {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.table-of-contents h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.25rem 0;
    display: block;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-header {
        padding: 3rem 0 1.5rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .content-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-content {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .legal-header h1 {
        font-size: 1.8rem;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .highlight-box,
    .warning-box {
        padding: 0.8rem;
        margin: 1rem 0;
    }
}

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

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

.content-section:nth-child(even) {
    animation-delay: 0.1s;
}

.content-section:nth-child(odd) {
    animation-delay: 0.2s;
}

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

/* Mejoras de accesibilidad */
.content-section:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .back-link,
    .footer {
        display: none;
    }
    
    .legal-header {
        background: none;
        color: black;
        padding: 1rem 0;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}