/* Estilos Base Comunes para Documentación Legal ULPGC */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #2d3748;
    margin: 0;
    padding: 0;
    background-color: #f7fafc;
}

.legal-container {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.legal-header {
    position: relative; /* Contenedor de referencia para el flotante */
    background-color: #004B87; /* Azul institucional ULPGC */
    padding: 24px;
    margin: -30px -30px 30px -30px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: block;
}

.legal-header h1 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important; /* Fuerza el título a blanco */
    padding-right: 160px; /* Espacio de seguridad para que no choque con los idiomas */
}

.legal-header .subtitle {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    font-size: 13px;
    color: #e2e8f0 !important; /* Gris claro/blanco para el subtítulo */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Selector Flotante Aislado */
.lang-switch {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    z-index: 9999 !important; /* Se asegura de estar por encima de cualquier capa */
    display: block !important;
    color: #ffffff !important;
}

/* Fuerza los enlaces a ser Blancos */
.lang-switch a {
    color: #ffffff !important; /* Color blanco real para los enlaces */
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.lang-switch a:hover {
    color: #cbd5e0 !important; /* Se vuelve gris claro al pasar el ratón */
    text-decoration: underline !important;
}

h2 {
    font-size: 18px;
    color: #004B87;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

h3 {
    font-size: 15px;
    color: #2c5282;
    margin-top: 20px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
    text-align: justify;
}

ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

li {
    margin-bottom: 6px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.legal-table th, .legal-table td {
    border: 1px solid #cbd5e0;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background-color: #f7fafc;
    color: #2d3748;
    font-weight: 600;
}

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

.dynamic-data {
    font-weight: 600;
    color: #1a202c;
}